gawk-4.0.1+dfsg.orig/0000755000175000017500000000000011734667242013361 5ustar schotschotgawk-4.0.1+dfsg.orig/ChangeLog0000644000175000017500000003634611734667144015150 0ustar schotschot2012-03-28 Arnold D. Robbins * 4.0.1: Release tar ball made. 2012-03-28 Arnold D. Robbins * 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. 2012-03-21 Corinna Vinschen * getopt.c: Add Cygwin to list of platforms where it's ok to include . 2012-03-20 Arnold D. Robbins Get new getopt to work on Linux and C90 compilers: * 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. Minor bug fix with printf, thanks to John Haque: * builtin.c (format_tree): Initialize base to zero at the top of the while loop. Getting next tar ball ready: * configure.ac: Remove duplicate check for wcscoll. Thanks to Stepan Kasal. 2012-03-16 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. 2012-03-14 Eli Zaretskii * mbsupport.h (btowc): Change for non-DJGPP. * re.c (dfaerror): Add call to exit for DJGPP. 2012-03-14 Arnold D. Robbins * regex_internal.c (re_string_skip_chars): Fix calculation of remain_len with m.b. chars. Thanks to Stanislav Brabec . 2012-02-28 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. 2012-02-27 Arnold D. Robbins * dfa.c (parse_bracket_exp): Revert changes 2012-02-15 to stay in sync with grep. * dfa.h (dfarerror): Add __attribute__ from grep. 2012-02-15 Arnold D. Robbins Fix warnings from GCC 4.6.2 -Wall option. * 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. 2012-02-10 Arnold D. Robbins * dfa.c: Sync with GNU grep. 2012-02-07 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 . 2012-01-13 Arnold D. Robbins * dfa.c [is_valid_unibtye_character]: Fix from GNU grep to bug reported by me from Scott Deifik for DJGPP. 2012-01-03 Arnold D. Robbins * dfa.c: Sync with GNU grep. 2011-12-31 Arnold D. Robbins * 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. 2011-12-26 Arnold D. Robbins Finish Rational Range Interpretation (!) * dfa.c (match_mb_charset): Compare wide characters directly instead of using wcscoll(). * regexec.c (check_node_accept_byte): Ditto. Thanks to Paolo Bonzini for pointing these out. 2011-12-06 John Haque * 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. 2011-12-06 Arnold D. Robbins * awk.h, mbsupport.h: Changes for MBS support on DJGPP and z/OS. * io.c: Disable pty support on z/OS. 2011-11-27 Arnold D. Robbins * dfa.c: Sync with GNU grep. * dfa.h: Add _GL_ATTRIBUTE_PURE macro. Bleah. 2011-11-14 John Haque * debug.c (set_breakpoint_at): Fix problem with setting breakpoints in a switch statement. Thanks to Giorgio Palandri for the bug report. 2011-11-14 Arnold D. Robbins * mbsupport.h: Add check for HAVE_BTOWC, per Pat Rankin. 2011-11-12 Eli Zaretskii * mbsupport.h: Additional glop for dfa.c in Windows environment. 2011-11-01 Arnold D. Robbins * 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. 2011-10-27 Arnold D. Robbins * builtin.c (do_strftime): Per Pat Rankin, instead of casting fclock, use a long variable and check for negative or overflow. 2011-10-25 Arnold D. Robbins * 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). 2011-10-25 Stefano Lattarini dist: generated file `version.c' is not removed by "make distclean" * Makefile.am (distcleancheck_listfiles): Define to ignore the generated `version.c' file. 2011-10-24 Arnold D. Robbins * dfa.c (wcscoll): Create for VMS. * Makefile.am (dist-hook): Run sed scripts to make pc/config.h. 2011-10-24 Eli Zaretskii * builtin.c [HAVE_POPEN_H]: Include "popen.h". * README.git: Update for pc/ systems. 2011-10-21 Arnold D. Robbins * Makefile.am (distcleancheck_listfiles): Added, per advice from Stefano Lattarini . * dfa.c: Additional faking of mbsupport for systems without it; mainly VMS. 2011-10-21 Stefano Lattarini * 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. 2011-10-18 Dave Pitts * dfa.c: Move some decls to the top of their functions for C90 compilers. 2011-10-18 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. 2011-10-10 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. 2011-09-30 Eli Zaretskii * 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. 2011-10-09 Arnold D. Robbins * dfa.c: Sync with GNU grep. 2011-10-04 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. 2011-10-02 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 . 2011-09-24 Arnold D. Robbins * eval.c, io.c, re.c: Fix some spelling errors. Thanks to Jeroen Schot . 2011-09-21 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. 2011-09-16 Arnold D. Robbins * dfa.c: Sync with GNU grep. 2011-09-03 Arnold D. Robbins * dfa.c: Sync with GNU grep. 2011-08-24 Arnold D. Robbins Fix pty co-process communication on Ubuntu GNU/Linux. * io.c: Add include of to get definition of TIOCSCTTY. (two_way_open): Move call for this ioctl to after setsid() call. 2011-08-23 Arnold D. Robbins * 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. 2011-08-10 John Haque BEGINFILE/ENDFILE related code redone. * 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. 2011-06-24 Arnold D. Robbins * Makefile.am (EXTRA_DIST): Add ChangeLog.0. * 4.0.0: Remake the tar ball. 2011-06-23 Arnold D. Robbins * 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. gawk-4.0.1+dfsg.orig/TODO0000644000175000017500000000140011600556610014030 0ustar schotschotAdd 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 gawk-4.0.1+dfsg.orig/depcomp0000755000175000017500000004224611463242060014730 0ustar schotschot#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2006-10-15.18 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 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. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: gawk-4.0.1+dfsg.orig/regex.h0000644000175000017500000005331511734665352014653 0ustar schotschot/* 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,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _REGEX_H #define _REGEX_H 1 #ifdef HAVE_STDDEF_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifndef _LIBC #define __USE_GNU 1 #endif /* Allow the use in C++ code. */ #ifdef __cplusplus extern "C" { #endif /* The following two types have to be signed and unsigned integer type wide enough to hold a value of a pointer. For most ANSI compilers ptrdiff_t and size_t should be likely OK. Still size of these two types is 2 for Microsoft C. Ugh... */ typedef long int s_reg_t; typedef unsigned long int active_reg_t; /* The following bits are used to determine the regexp syntax we recognize. The set/not-set meanings are chosen so that Emacs syntax remains the value 0. The bits are given in alphabetical order, and the definitions shifted by one from the previous bit; thus, when we add or remove a bit, only one other definition need change. */ typedef unsigned long int reg_syntax_t; #ifdef __USE_GNU /* If this bit is not set, then \ inside a bracket expression is literal. If set, then such a \ quotes the following character. */ # define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1) /* If this bit is not set, then + and ? are operators, and \+ and \? are literals. If set, then \+ and \? are operators and + and ? are literals. */ # define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) /* If this bit is set, then character classes are supported. They are: [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. If not set, then character classes are not supported. */ # define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) /* 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. This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because POSIX draft 11.2 says that * etc. in leading positions is undefined. We already implemented a previous draft which made those constructs invalid, though, so we haven't changed the code back. */ # define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) /* If this bit is set, then special characters are always special regardless of where they are in the pattern. If this bit is not set, then special characters are special only in some contexts; otherwise they are ordinary. Specifically, * + ? and intervals are only special when not after the beginning, open-group, or alternation operator. */ # define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) /* If this bit is set, then *, +, ?, and { cannot be first in an re or immediately after an alternation or begin-group operator. */ # define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) /* If this bit is set, then . matches newline. If not set, then it doesn't. */ # define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) /* If this bit is set, then . doesn't match NUL. If not set, then it does. */ # define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) /* If this bit is set, nonmatching lists [^...] do not match newline. If not set, they do. */ # define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) /* If this bit is set, either \{...\} or {...} defines an interval, depending on RE_NO_BK_BRACES. If not set, \{, \}, {, and } are literals. */ # define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) /* If this bit is set, +, ? and | aren't recognized as operators. If not set, they are. */ # define RE_LIMITED_OPS (RE_INTERVALS << 1) /* If this bit is set, newline is an alternation operator. If not set, newline is literal. */ # define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) /* If this bit is set, then `{...}' defines an interval, and \{ and \} are literals. If not set, then `\{...\}' defines an interval. */ # define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) /* If this bit is set, (...) defines a group, and \( and \) are literals. If not set, \(...\) defines a group, and ( and ) are literals. */ # define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) /* If this bit is set, then \ matches . If not set, then \ is a back-reference. */ # define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) /* If this bit is set, then | is an alternation operator, and \| is literal. If not set, then \| is an alternation operator, and | is literal. */ # define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) /* If this bit is set, then an ending range point collating higher than the starting range point, as in [z-a], is invalid. If not set, then when ending range point collates higher than the starting range point, the range is ignored. */ # define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) /* If this bit is set, then an unmatched ) is ordinary. If not set, then an unmatched ) is invalid. */ # define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) /* If this bit is set, succeed as soon as we match the whole pattern, without further backtracking. */ # define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) /* If this bit is set, do not process the GNU regex operators. If not set, then the GNU regex operators are recognized. */ # define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1) /* If this bit is set, turn on internal regex debugging. If not set, and debugging was on, turn it off. This only works if regex.c is compiled -DDEBUG. We define this bit always, so that all that's needed to turn on debugging is to recompile regex.c; the calling code can always have this bit set, and it won't affect anything in the normal case. */ # define RE_DEBUG (RE_NO_GNU_OPS << 1) /* If this bit is set, a syntactically invalid interval is treated as a string of ordinary characters. For example, the ERE 'a{1' is treated as 'a\{1'. */ # define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ # define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) /* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only for ^, because it is difficult to scan the regex backwards to find whether ^ should be special. */ # define RE_CARET_ANCHORS_HERE (RE_ICASE << 1) /* If this bit is set, then \{ cannot be first in an bre or immediately after an alternation or begin-group operator. */ # define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1) /* If this bit is set, then no_sub will be set to 1 during re_compile_pattern. */ # define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1) #endif /* This global variable defines the particular regexp syntax to use (for some interfaces). When a regexp is compiled, the syntax used is stored in the pattern buffer, so changing this does not affect already-compiled regexps. */ extern reg_syntax_t re_syntax_options; #ifdef __USE_GNU /* Define combinations of the above bits for the standard possibilities. (The [[[ comments delimit what gets put into the Texinfo file, so don't delete them!) */ /* [[[begin syntaxes]]] */ #define RE_SYNTAX_EMACS 0 #define RE_SYNTAX_AWK \ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ | 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_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_INVALID_INTERVAL_ORD) #define RE_SYNTAX_GREP \ (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ | RE_NEWLINE_ALT) #define RE_SYNTAX_EGREP \ (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ | RE_NO_BK_VBAR) #define RE_SYNTAX_POSIX_EGREP \ (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ | RE_INVALID_INTERVAL_ORD) /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ #define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC #define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC /* Syntax bits common to both basic and extended POSIX regex syntax. */ #define _RE_SYNTAX_POSIX_COMMON \ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ | RE_INTERVALS | RE_NO_EMPTY_RANGES) #define RE_SYNTAX_POSIX_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP) /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this isn't minimal, since other operators, such as \`, aren't disabled. */ #define RE_SYNTAX_POSIX_MINIMAL_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) #define RE_SYNTAX_POSIX_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD) /* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is removed and RE_NO_BK_REFS is added. */ #define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) /* [[[end syntaxes]]] */ /* Maximum number of duplicates an interval can allow. Some systems (erroneously) define this in other header files, but we want our value, so remove any previous define. */ # ifdef RE_DUP_MAX # undef RE_DUP_MAX # endif /* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */ # define RE_DUP_MAX (0x7fff) #endif /* POSIX `cflags' bits (i.e., information for `regcomp'). */ /* If this bit is set, then use extended regular expression syntax. If not set, then use basic regular expression syntax. */ #define REG_EXTENDED 1 /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ #define REG_ICASE (REG_EXTENDED << 1) /* If this bit is set, then anchors do not match at newline characters in the string. If not set, then anchors do match at newlines. */ #define REG_NEWLINE (REG_ICASE << 1) /* If this bit is set, then report only success or fail in regexec. If not set, then returns differ between not matching and errors. */ #define REG_NOSUB (REG_NEWLINE << 1) /* POSIX `eflags' bits (i.e., information for regexec). */ /* If this bit is set, then the beginning-of-line operator doesn't match the beginning of the string (presumably because it's not the beginning of a line). If not set, then the beginning-of-line operator does match the beginning of the string. */ #define REG_NOTBOL 1 /* Like REG_NOTBOL, except for the end-of-line. */ #define REG_NOTEOL (1 << 1) /* Use PMATCH[0] to delimit the start and end of the search in the buffer. */ #define REG_STARTEND (1 << 2) /* If any error codes are removed, changed, or added, update the `re_error_msg' table in regex.c. */ typedef enum { #if defined _XOPEN_SOURCE || defined __USE_XOPEN2K REG_ENOSYS = -1, /* This will never happen for this implementation. */ #endif REG_NOERROR = 0, /* Success. */ REG_NOMATCH, /* Didn't find a match (for regexec). */ /* POSIX regcomp return error codes. (In the order listed in the standard.) */ REG_BADPAT, /* Invalid pattern. */ REG_ECOLLATE, /* Inalid collating element. */ REG_ECTYPE, /* Invalid character class name. */ REG_EESCAPE, /* Trailing backslash. */ REG_ESUBREG, /* Invalid back reference. */ REG_EBRACK, /* Unmatched left bracket. */ REG_EPAREN, /* Parenthesis imbalance. */ REG_EBRACE, /* Unmatched \{. */ REG_BADBR, /* Invalid contents of \{\}. */ REG_ERANGE, /* Invalid range end. */ REG_ESPACE, /* Ran out of memory. */ REG_BADRPT, /* No preceding re for repetition op. */ /* Error codes we've added. */ REG_EEND, /* Premature end. */ REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ } reg_errcode_t; /* This data structure represents a compiled pattern. Before calling the pattern compiler, the fields `buffer', `allocated', `fastmap', 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 * # ifdef __USE_GNU # define RE_TRANSLATE_TYPE __RE_TRANSLATE_TYPE # endif #endif #ifdef __USE_GNU # define __REPB_PREFIX(name) name #else # define __REPB_PREFIX(name) __##name #endif struct re_pattern_buffer { /* Space that holds the compiled pattern. It is declared as `unsigned char *' because its elements are sometimes used as array indexes. */ unsigned char *__REPB_PREFIX(buffer); /* Number of bytes to which `buffer' points. */ unsigned long int __REPB_PREFIX(allocated); /* Number of bytes actually used in `buffer'. */ unsigned long int __REPB_PREFIX(used); /* Syntax setting with which the pattern was compiled. */ reg_syntax_t __REPB_PREFIX(syntax); /* Pointer to a fastmap, if any, otherwise zero. re_search uses the fastmap, if there is one, to skip over impossible starting points for matches. */ char *__REPB_PREFIX(fastmap); /* Either a translate table to apply to all characters before comparing them, or zero for no translation. The translation is applied to a pattern when it is compiled and to a string when it is matched. */ __RE_TRANSLATE_TYPE __REPB_PREFIX(translate); /* Number of subexpressions found by the compiler. */ size_t re_nsub; /* Zero if this pattern cannot match the empty string, one else. Well, in truth it's used only in `re_search_2', to see whether or not we should use the fastmap, so we don't set this absolutely perfectly; see `re_compile_fastmap' (the `duplicate' case). */ unsigned __REPB_PREFIX(can_be_null) : 1; /* If REGS_UNALLOCATED, allocate space in the `regs' structure for `max (RE_NREGS, re_nsub + 1)' groups. If REGS_REALLOCATE, reallocate space if necessary. If REGS_FIXED, use what's there. */ #ifdef __USE_GNU # define REGS_UNALLOCATED 0 # define REGS_REALLOCATE 1 # define REGS_FIXED 2 #endif unsigned __REPB_PREFIX(regs_allocated) : 2; /* Set to zero when `regex_compile' compiles a pattern; set to one by `re_compile_fastmap' if it updates the fastmap. */ unsigned __REPB_PREFIX(fastmap_accurate) : 1; /* If set, `re_match_2' does not return information about subexpressions. */ unsigned __REPB_PREFIX(no_sub) : 1; /* If set, a beginning-of-line anchor doesn't match at the beginning of the string. */ unsigned __REPB_PREFIX(not_bol) : 1; /* Similarly for an end-of-line anchor. */ unsigned __REPB_PREFIX(not_eol) : 1; /* If true, an anchor at a newline matches. */ unsigned __REPB_PREFIX(newline_anchor) : 1; }; typedef struct re_pattern_buffer regex_t; /* Type for byte offsets within the string. POSIX mandates this. */ typedef int regoff_t; #ifdef __USE_GNU /* This is the structure we store register match data in. See regex.texinfo for a full description of what registers match. */ struct re_registers { unsigned num_regs; regoff_t *start; regoff_t *end; }; /* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, `re_match_2' returns information about at least this many registers the first time a `regs' structure is passed. */ # ifndef RE_NREGS # define RE_NREGS 30 # endif #endif /* POSIX specification for registers. Aside from the different names than `re_registers', POSIX uses an array of structures, instead of a structure of arrays. */ typedef struct { regoff_t rm_so; /* Byte offset from string's start to substring's start. */ regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ } regmatch_t; /* Declarations for routines. */ #ifdef __USE_GNU /* Sets the current default syntax to SYNTAX, and return the old syntax. You can also simply assign to the `re_syntax_options' variable. */ extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax); /* 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. 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); /* Compile a fastmap for the compiled pattern in BUFFER; used to accelerate searches. Return 0 if successful and -2 if was an internal error. */ extern int re_compile_fastmap (struct re_pattern_buffer *__buffer); /* Search in the string STRING (with length LENGTH) for the pattern compiled into BUFFER. Start searching at position START, for RANGE characters. Return the starting position of the match, -1 for no match, or -2 for an internal error. Also return register information in REGS (if REGS and BUFFER->no_sub are nonzero). */ extern int re_search (struct re_pattern_buffer *__buffer, const char *__cstring, int __length, int __start, int __range, struct re_registers *__regs); /* Like `re_search', but search in the concatenation of STRING1 and STRING2. Also, stop searching at index START + STOP. */ extern int re_search_2 (struct re_pattern_buffer *__buffer, const char *__string1, int __length1, const char *__string2, int __length2, int __start, int __range, struct re_registers *__regs, int __stop); /* Like `re_search', but return how many characters in STRING the regexp in BUFFER matched, starting at position START. */ extern int re_match (struct re_pattern_buffer *__buffer, const char *__cstring, int __length, int __start, struct re_registers *__regs); /* Relates to `re_match' as `re_search_2' relates to `re_search'. */ extern int re_match_2 (struct re_pattern_buffer *__buffer, const char *__string1, int __length1, const char *__string2, int __length2, int __start, struct re_registers *__regs, int __stop); /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated with malloc, and must each be at least `NUM_REGS * sizeof (regoff_t)' bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using PATTERN_BUFFER will allocate its own register data, without freeing the old data. */ extern void re_set_registers (struct re_pattern_buffer *__buffer, struct re_registers *__regs, unsigned int __num_regs, regoff_t *__starts, regoff_t *__ends); #endif /* Use GNU */ #if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_BSD) # ifndef _CRAY /* 4.2 bsd compatibility. */ extern char *re_comp (const char *); extern int re_exec (const char *); # endif #endif /* GCC 2.95 and later have "__restrict"; C99 compilers have "restrict", and "configure" may have defined "restrict". */ #ifndef __restrict # if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)) # if defined restrict || 199901L <= __STDC_VERSION__ # define __restrict restrict # else # define __restrict # endif # endif #endif /* gcc 3.1 and up support the [restrict] syntax. */ #ifndef __restrict_arr # if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) \ && !defined __GNUG__ # define __restrict_arr __restrict # else # define __restrict_arr # endif #endif /* POSIX compatibility. */ extern int regcomp (regex_t *__restrict __preg, const char *__restrict __pattern, int __cflags); extern int regexec (const regex_t *__restrict __preg, const char *__restrict __cstring, size_t __nmatch, regmatch_t __pmatch[__restrict_arr], int __eflags); extern size_t regerror (int __errcode, const regex_t *__restrict __preg, char *__restrict __errbuf, size_t __errbuf_size); extern void regfree (regex_t *__preg); #ifdef __cplusplus } #endif /* C++ */ #endif /* regex.h */ gawk-4.0.1+dfsg.orig/floatmagic.h0000644000175000017500000000352711463242060015631 0ustar schotschot/* * floatmagic.h -- Definitions of isnan and isinf for gawk. */ /* * Copyright (C) 2009 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 */ /* * NOTE: MUST be included before this file. Also . * * These definitions are taken from the Autoconf 2.63 manual. Not pretty. */ #ifndef HAVE_ISNAN #ifndef isnan # define isnan(x) \ (sizeof (x) == sizeof (long double) ? isnan_ld (x) \ : sizeof (x) == sizeof (double) ? isnan_d (x) \ : isnan_f (x)) static inline int isnan_f (float x) { return x != x; } static inline int isnan_d (double x) { return x != x; } static inline int isnan_ld (long double x) { return x != x; } #endif #endif #ifndef HAVE_ISINF #ifndef isinf # define isinf(x) \ (sizeof (x) == sizeof (long double) ? isinf_ld (x) \ : sizeof (x) == sizeof (double) ? isinf_d (x) \ : isinf_f (x)) static inline int isinf_f (float x) { return isnan (x - x); } static inline int isinf_d (double x) { return isnan (x - x); } static inline int isinf_ld (long double x) { return isnan (x - x); } #endif #endif gawk-4.0.1+dfsg.orig/command.c0000644000175000017500000031272011734667227015153 0ustar schotschot/* 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 gawk-4.0.1+dfsg.orig/version.in0000644000175000017500000000010611576605474015376 0ustar schotschot#include "config.h" const char *version_string = "@PACKAGE_STRING@"; gawk-4.0.1+dfsg.orig/xalloc.h0000644000175000017500000002250111654051011014772 0ustar schotschot/* xalloc.h -- malloc with out-of-memory checking Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004, 2006, 2007, 2008, 2009, 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 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 . */ #ifndef XALLOC_H_ # define XALLOC_H_ # include # ifdef __cplusplus extern "C" { # endif # ifndef __attribute__ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) # define __attribute__(x) # endif # endif # ifndef ATTRIBUTE_NORETURN # define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) # endif # ifndef ATTRIBUTE_MALLOC # if __GNUC__ >= 3 # define ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) # else # define ATTRIBUTE_MALLOC # endif # endif /* This function is always triggered when memory is exhausted. It must be defined by the application, either explicitly or by using gnulib's xalloc-die module. This is the function to call when one wants the program to die because of a memory allocation failure. */ extern void xalloc_die (void) ATTRIBUTE_NORETURN; void *xmalloc (size_t s) ATTRIBUTE_MALLOC; void *xzalloc (size_t s) ATTRIBUTE_MALLOC; void *xcalloc (size_t n, size_t s) ATTRIBUTE_MALLOC; void *xrealloc (void *p, size_t s); void *x2realloc (void *p, size_t *pn); void *xmemdup (void const *p, size_t s) ATTRIBUTE_MALLOC; char *xstrdup (char const *str) ATTRIBUTE_MALLOC; /* Return 1 if an array of N objects, each of size S, cannot exist due to size arithmetic overflow. S must be positive and N must be nonnegative. This is a macro, not an inline function, so that it works correctly even when SIZE_MAX < N. By gnulib convention, SIZE_MAX represents overflow in size calculations, so the conservative dividend to use here is SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value. However, malloc (SIZE_MAX) fails on all known hosts where sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for exactly-SIZE_MAX allocations on such hosts; this avoids a test and branch when S is known to be 1. */ # define xalloc_oversized(n, s) \ ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n)) /* In the following macros, T must be an elementary or structure/union or typedef'ed type, or a pointer to such a type. To apply one of the following macros to a function pointer or array type, you need to typedef it first and use the typedef name. */ /* Allocate an object of type T dynamically, with error checking. */ /* extern t *XMALLOC (typename t); */ # define XMALLOC(t) ((t *) xmalloc (sizeof (t))) /* Allocate memory for N elements of type T, with error checking. */ /* extern t *XNMALLOC (size_t n, typename t); */ # define XNMALLOC(n, t) \ ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t)))) /* Allocate an object of type T dynamically, with error checking, and zero it. */ /* extern t *XZALLOC (typename t); */ # define XZALLOC(t) ((t *) xzalloc (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) \ ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t)))) /* * Gawk uses this file only to keep dfa.c happy. * We're therefore safe in manually defining HAVE_INLINE to * make the !@#$%^&*() thing just work. */ #ifdef GAWK #define HAVE_INLINE 1 /* so there. nyah, nyah, nyah. */ #endif # if HAVE_INLINE # define static_inline static inline # else void *xnmalloc (size_t n, size_t s) ATTRIBUTE_MALLOC; void *xnrealloc (void *p, size_t n, size_t s); void *x2nrealloc (void *p, size_t *pn, size_t s); char *xcharalloc (size_t n) ATTRIBUTE_MALLOC; # endif # ifdef static_inline /* Allocate an array of N objects, each with S bytes of memory, dynamically, with error checking. S must be nonzero. */ static_inline void *xnmalloc (size_t n, size_t s) ATTRIBUTE_MALLOC; static_inline void * xnmalloc (size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die (); return xmalloc (n * s); } #ifdef GAWK #include /* Allocate an array of N objects, each with S bytes of memory, dynamically, with error checking. S must be nonzero. Clear the contents afterwards. */ void * xcalloc(size_t nmemb, size_t size) { void *p = xmalloc (nmemb * size); memset(p, '\0', nmemb * size); return p; } /* Reallocate a pointer to a new size, with error checking. */ void * xrealloc(void *p, size_t size) { void *new_p = realloc(p, size); if (new_p == 0) xalloc_die (); return new_p; } /* xalloc_die --- fatal error message when malloc fails, needed by dfa.c */ void xalloc_die (void) { extern void r_fatal(const char *msg, ...) ATTRIBUTE_NORETURN ; r_fatal(_("xalloc: malloc failed: %s"), strerror(errno)); } #endif /* Change the size of an allocated block of memory P to an array of N objects each of S bytes, with error checking. S must be nonzero. */ static_inline void * xnrealloc (void *p, size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die (); return xrealloc (p, n * s); } /* If P is null, allocate a block of at least *PN such objects; otherwise, reallocate P so that it contains more than *PN objects each of S bytes. *PN must be nonzero unless P is null, and S must be nonzero. Set *PN to the new number of objects, and return the pointer to the new block. *PN is never set to zero, and the returned pointer is never null. Repeated reallocations are guaranteed to make progress, either by allocating an initial block with a nonzero size, or by allocating a larger block. In the following implementation, nonzero sizes are increased by a factor of approximately 1.5 so that repeated reallocations have O(N) overall cost rather than O(N**2) cost, but the specification for this function does not guarantee that rate. Here is an example of use: int *p = NULL; size_t used = 0; size_t allocated = 0; void append_int (int value) { if (used == allocated) p = x2nrealloc (p, &allocated, sizeof *p); p[used++] = value; } This causes x2nrealloc to allocate a block of some nonzero size the first time it is called. To have finer-grained control over the initial size, set *PN to a nonzero value before calling this function with P == NULL. For example: int *p = NULL; size_t used = 0; size_t allocated = 0; size_t allocated1 = 1000; void append_int (int value) { if (used == allocated) { p = x2nrealloc (p, &allocated1, sizeof *p); allocated = allocated1; } p[used++] = value; } */ static_inline void * x2nrealloc (void *p, size_t *pn, size_t s) { size_t n = *pn; if (! p) { if (! n) { /* The approximate size to use for initial small allocation requests, when the invoking code specifies an old size of zero. 64 bytes is the largest "small" request for the GNU C library malloc. */ enum { DEFAULT_MXFAST = 64 }; n = DEFAULT_MXFAST / s; n += !n; } } else { /* Set N = ceil (1.5 * N) so that progress is made if N == 1. Check for overflow, so that N * S stays in size_t range. The check is slightly conservative, but an exact check isn't worth the trouble. */ if ((size_t) -1 / 3 * 2 / s <= n) xalloc_die (); n += (n + 1) / 2; } *pn = n; return xrealloc (p, n * s); } /* Return a pointer to a new buffer of N bytes. This is like xmalloc, except it returns char *. */ static_inline char *xcharalloc (size_t n) ATTRIBUTE_MALLOC; static_inline char * xcharalloc (size_t n) { 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 } /* C++ does not allow conversions from void * to other pointer types without a cast. Use templates to work around the problem when possible. */ template inline T * xrealloc (T *p, size_t s) { return (T *) xrealloc ((void *) p, s); } template inline T * xnrealloc (T *p, size_t n, size_t s) { return (T *) xnrealloc ((void *) p, n, s); } template inline T * x2realloc (T *p, size_t *pn) { return (T *) x2realloc ((void *) p, pn); } template inline T * x2nrealloc (T *p, size_t *pn, size_t s) { return (T *) x2nrealloc ((void *) p, pn, s); } template inline T * xmemdup (T const *p, size_t s) { return (T *) xmemdup ((void const *) p, s); } # endif #endif /* !XALLOC_H_ */ gawk-4.0.1+dfsg.orig/debug.c0000644000175000017500000041361611734666132014623 0ustar schotschot/* * 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; } gawk-4.0.1+dfsg.orig/FUTURES0000644000175000017500000000367311734665351014451 0ustar schotschot 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 notice and this notice are preserved. This file lists future projects and enhancements for gawk. Items are listed in roughly the order they will be done for a given release. This file is 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. For 4.1 ======= Merge gawk/pgawk/dgawk into one executable 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. Merge xmlgawk -l feature Merge xmlgawk XML extensions Integrate MPFR to provide high precision arithmetic. Continue code reviews / code cleanup Consider making gawk output +nan for NaN values so that it will accept its own output as input. For 4.2 ======= Implement designed API for loadable modules Redo the loadable modules interface from the awk level. 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 search. ?? A RECLEN variable for fixed-length record input. PROCINFO["RS"] would be "RS" or "RECLEN" depending upon what's in use. ?? Use a new or improved dfa and/or regex library. ??? Gnulib Probably never: =============== Do an optimization pass over parse tree? Consider integrating Fred Fish's DBUG library into gawk. Make awk '/foo/' files... run at egrep speeds (how?) ? Have strftime() pay attention to the value of ENVIRON["TZ"] Add a lint check if the return value of a function is used but the function did not supply a value. gawk-4.0.1+dfsg.orig/ylwrap0000644000175000017500000001406111463242060014606 0ustar schotschot#! /bin/sh # ylwrap - wrapper for lex/yacc invocations. scriptversion=2005-05-14.22 # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # Written by Tom Tromey . # # 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. # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . case "$1" in '') echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 exit 1 ;; --basedir) basedir=$2 shift 2 ;; -h|--h*) cat <<\EOF Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... Wrapper for lex/yacc invocations, renaming files as desired. INPUT is the input file OUTPUT is one file PROG generates DESIRED is the file we actually want instead of OUTPUT PROGRAM is program to run ARGS are passed to PROG Any number of OUTPUT,DESIRED pairs may be used. Report bugs to . EOF exit $? ;; -v|--v*) echo "ylwrap $scriptversion" exit $? ;; esac # The input. input="$1" shift case "$input" in [\\/]* | ?:[\\/]*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. input="`pwd`/$input" ;; esac pairlist= while test "$#" -ne 0; do if test "$1" = "--"; then shift break fi pairlist="$pairlist $1" shift done # The program to run. prog="$1" shift # Make any relative path in $prog absolute. case "$prog" in [\\/]* | ?:[\\/]*) ;; *[\\/]*) prog="`pwd`/$prog" ;; esac # FIXME: add hostname here for parallel makes that run commands on # other machines. But that might take us over the 14-char limit. dirname=ylwrap$$ trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15 mkdir $dirname || exit 1 cd $dirname case $# in 0) $prog "$input" ;; *) $prog "$@" "$input" ;; esac ret=$? if test $ret -eq 0; then set X $pairlist shift first=yes # Since DOS filename conventions don't allow two dots, # the DOS version of Bison writes out y_tab.c instead of y.tab.c # and y_tab.h instead of y.tab.h. Test to see if this is the case. y_tab_nodot="no" if test -f y_tab.c || test -f y_tab.h; then y_tab_nodot="yes" fi # The directory holding the input. input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'` # Quote $INPUT_DIR so we can use it in a regexp. # FIXME: really we should care about more than `.' and `\'. input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'` while test "$#" -ne 0; do from="$1" # Handle y_tab.c and y_tab.h output by DOS if test $y_tab_nodot = "yes"; then if test $from = "y.tab.c"; then from="y_tab.c" else if test $from = "y.tab.h"; then from="y_tab.h" fi fi fi if test -f "$from"; then # If $2 is an absolute path name, then just use that, # otherwise prepend `../'. case "$2" in [\\/]* | ?:[\\/]*) target="$2";; *) target="../$2";; esac # We do not want to overwrite a header file if it hasn't # changed. This avoid useless recompilations. However the # parser itself (the first file) should always be updated, # because it is the destination of the .y.c rule in the # Makefile. Divert the output of all other files to a temporary # file so we can compare them to existing versions. if test $first = no; then realtarget="$target" target="tmp-`echo $target | sed s/.*[\\/]//g`" fi # Edit out `#line' or `#' directives. # # We don't want the resulting debug information to point at # an absolute srcdir; it is better for it to just mention the # .y file with no path. # # We want to use the real output file name, not yy.lex.c for # instance. # # We want the include guards to be adjusted too. FROM=`echo "$from" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` TARGET=`echo "$2" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \ -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$? # Check whether header files must be updated. if test $first = no; then if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then echo "$2" is unchanged rm -f "$target" else echo updating "$2" mv -f "$target" "$realtarget" fi fi else # A missing file is only an error for the first file. This # is a blatant hack to let us support using "yacc -d". If -d # is not specified, we don't want an error when the header # file is "missing". if test $first = yes; then ret=1 fi fi shift shift first=no done else ret=$? fi # Remove the directory. cd .. rm -rf $dirname exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: gawk-4.0.1+dfsg.orig/re.c0000644000175000017500000003442711734665765014155 0ustar schotschot/* * re.c - compile regular expressions. */ /* * Copyright (C) 1991-2012 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 "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, int canfatal) { Regexp *rp; const char *rerr; const char *src = s; static char *buf = NULL; static size_t buflen; const char *end = s + len; 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. */ size_t is_multibyte = 0; #if MBS_SUPPORT mbstate_t mbs; if (gawk_mb_cur_max > 1) memset(&mbs, 0, sizeof(mbstate_t)); /* Initialize. */ #endif if (first) { first = FALSE; /* 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 buf) with the * escaped characters translated, and generate the regex * from that. */ 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) { #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))) { /* We treat it as a singlebyte character. */ is_multibyte = 0; } } #endif /* We skip multibyte character, since it must not be a special character. */ if ((gawk_mb_cur_max == 1 || ! is_multibyte) && (*src == '\\')) { c = *++src; switch (c) { case 'a': case 'b': case 'f': case 'n': case 'r': case 't': case 'v': case 'x': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': c2 = parse_escape(&src); if (c2 < 0) cant_happen(); /* * Unix awk treats octal (and hex?) chars * literally in re's, so escape regexp * metacharacters. */ if (do_traditional && ! do_posix && (isdigit(c) || c == 'x') && strchr("()|*+?.^$\\[]", c2) != NULL) *dest++ = '\\'; *dest++ = (char) c2; break; case '8': case '9': /* a\9b not valid */ *dest++ = c; src++; break; case 'y': /* normally \b */ /* gnu regex op */ if (! do_traditional) { *dest++ = '\\'; *dest++ = 'b'; src++; break; } /* else, fall through */ default: *dest++ = '\\'; *dest++ = (char) c; src++; break; } /* switch */ } else { 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'; len = dest - buf; emalloc(rp, Regexp *, sizeof(*rp), "make_regexp"); memset((char *) rp, 0, sizeof(*rp)); rp->dfareg = NULL; rp->pat.allocated = 0; /* regex will allocate the buffer */ emalloc(rp->pat.fastmap, char *, 256, "make_regexp"); /* * Lo these many years ago, had I known what a P.I.T.A. IGNORECASE * was going to turn out to be, I wouldn't have bothered with it. * * In the case where we have a multibyte character set, we have no * choice but to use RE_ICASE, since the casetable is for single-byte * character sets only. * * On the other hand, if we do have a single-byte character set, * using the casetable should give a performance improvement, since * it's computed only once, not each time a regex is compiled. We * also think it's probably better for portability. See the * 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; rp->pat.translate = NULL; } else { syn &= ~RE_ICASE; rp->pat.translate = (RE_TRANSLATE_TYPE) casetable; } } else { rp->pat.translate = NULL; syn &= ~RE_ICASE; } dfa_syn = syn; if (ignorecase) dfa_syn |= RE_ICASE; dfasyntax(dfa_syn, ignorecase, '\n'); re_set_syntax(syn); 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) { rp->dfa = TRUE; rp->dfareg = dfaalloc(); dfacomp(buf, len, rp->dfareg, TRUE); } else rp->dfa = FALSE; rp->has_anchor = has_anchor; return rp; } /* research --- do a regexp search. use dfa if possible */ int research(Regexp *rp, char *str, int start, size_t len, int flags) { const char *ret = str; int try_backref; int need_start; int no_bol; int res; need_start = ((flags & RE_NEED_START) != 0); no_bol = ((flags & RE_NO_BOL) != 0); if (no_bol) rp->pat.not_bol = 1; /* * Always do dfa search if can; if it fails, then even if * need_start is true, we won't bother with the regex search. * * The dfa matcher doesn't have a no_bol flag, so don't bother * trying it in that case. * * 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. */ save = str[start+len]; ret = dfaexec(rp->dfareg, str+start, str+start+len, TRUE, &count, &try_backref); str[start+len] = save; } if (ret) { if (need_start || rp->dfa == FALSE || try_backref) { /* * Passing NULL as last arg speeds up search for cases * where we don't need the start/end info. */ res = re_search(&(rp->pat), str, start+len, start, len, need_start ? &(rp->regs) : NULL); } else res = 1; } else res = -1; rp->pat.not_bol = 0; return res; } /* refree --- free up the dynamic memory used by a compiled regexp */ void refree(Regexp *rp) { if (rp == NULL) return; rp->pat.translate = NULL; regfree(& rp->pat); if (rp->regs.start) free(rp->regs.start); if (rp->regs.end) free(rp->regs.end); if (rp->dfa) { dfafree(rp->dfareg); free(rp->dfareg); } 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 */ Regexp * re_update(NODE *t) { 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 = t->re_exp; if (t->re_text != NULL) { /* 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); } /* was compiled with different IGNORECASE or text changed */ /* free old */ if (t->re_reg != NULL) refree(t->re_reg); if (t->re_cnt > 0) t->re_cnt++; if (t->re_cnt > 10) t->re_cnt = 0; if (t->re_text == NULL || (t->re_flags & CASE) != IGNORECASE) { /* reset regexp text if needed */ t1 = t->re_exp; unref(t->re_text); t->re_text = dupnode(t1); } /* compile it */ t->re_reg = make_regexp(t->re_text->stptr, t->re_text->stlen, 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; } /* resetup --- choose what kind of regexps we match */ void resetup() { if (do_posix) syn = RE_SYNTAX_POSIX_AWK; /* strict POSIX re's */ else if (do_traditional) syn = RE_SYNTAX_AWK; /* traditional Unix awk re's */ else syn = RE_SYNTAX_GNU_AWK; /* POSIX re's + GNU ops */ /* * 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 | RE_INVALID_INTERVAL_ORD; (void) re_set_syntax(syn); dfasyntax(syn, FALSE, '\n'); } /* avoid_dfa --- return true if we should not use the DFA matcher */ int avoid_dfa(NODE *re, char *str, size_t len) { char *end; if (! re->re_reg->has_anchor) return FALSE; for (end = str + len; str < end; str++) if (*str == '\n') return TRUE; return FALSE; } /* reisstring --- return TRUE if the RE match is a simple string match */ int reisstring(const char *text, size_t len, Regexp *re, const char *buf) { static char metas[] = ".*+(){}[]|?^$\\"; int i; int res; const char *matched; /* simple checking for has meta characters in re */ for (i = 0; i < len; i++) { if (strchr(metas, text[i]) != NULL) { return FALSE; /* give up early, can't be string match */ } } /* make accessable to gdb */ matched = &buf[RESTART(re, buf)]; res = (memcmp(text, matched, len) == 0); return res; } /* remaybelong --- return TRUE if the RE contains * ? | + */ int remaybelong(const char *text, size_t len) { while (len--) { if (strchr("*+|?", *text++) != NULL) { return TRUE; } } return FALSE; } /* reflags2str --- make a regex flags value readable */ const char * reflags2str(int flagval) { static const struct flagtab values[] = { { RE_BACKSLASH_ESCAPE_IN_LISTS, "RE_BACKSLASH_ESCAPE_IN_LISTS" }, { RE_BK_PLUS_QM, "RE_BK_PLUS_QM" }, { RE_CHAR_CLASSES, "RE_CHAR_CLASSES" }, { RE_CONTEXT_INDEP_ANCHORS, "RE_CONTEXT_INDEP_ANCHORS" }, { RE_CONTEXT_INDEP_OPS, "RE_CONTEXT_INDEP_OPS" }, { RE_CONTEXT_INVALID_OPS, "RE_CONTEXT_INVALID_OPS" }, { RE_DOT_NEWLINE, "RE_DOT_NEWLINE" }, { RE_DOT_NOT_NULL, "RE_DOT_NOT_NULL" }, { RE_HAT_LISTS_NOT_NEWLINE, "RE_HAT_LISTS_NOT_NEWLINE" }, { RE_INTERVALS, "RE_INTERVALS" }, { RE_LIMITED_OPS, "RE_LIMITED_OPS" }, { RE_NEWLINE_ALT, "RE_NEWLINE_ALT" }, { RE_NO_BK_BRACES, "RE_NO_BK_BRACES" }, { RE_NO_BK_PARENS, "RE_NO_BK_PARENS" }, { RE_NO_BK_REFS, "RE_NO_BK_REFS" }, { RE_NO_BK_VBAR, "RE_NO_BK_VBAR" }, { RE_NO_EMPTY_RANGES, "RE_NO_EMPTY_RANGES" }, { 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_INVALID_INTERVAL_ORD, "RE_INVALID_INTERVAL_ORD" }, { RE_ICASE, "RE_ICASE" }, { RE_CARET_ANCHORS_HERE, "RE_CARET_ANCHORS_HERE" }, { RE_CONTEXT_INVALID_DUP, "RE_CONTEXT_INVALID_DUP" }, { RE_NO_SUB, "RE_NO_SUB" }, { 0, NULL }, }; if (flagval == RE_SYNTAX_EMACS) /* == 0 */ return "RE_SYNTAX_EMACS"; 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; } gawk-4.0.1+dfsg.orig/dfa.c0000644000175000017500000036413311734665351014270 0ustar schotschot/* dfa.c - deterministic extended regexp routines for GNU 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 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 */ /* Written June, 1988 by Mike Haertel Modified July, 1988 by Arthur David Olson to assist BMG speedups */ #include #include #include #include #ifndef VMS #include #else #include #endif #include #include #include #if HAVE_SETLOCALE #include #endif #define STREQ(a, b) (strcmp (a, b) == 0) /* ISASCIIDIGIT differs from isdigit, as follows: - Its arg may be any int or unsigned int; it need not be an unsigned char. - It's guaranteed to evaluate its argument exactly once. - It's typically faster. Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that only '0' through '9' are digits. Prefer ISASCIIDIGIT to isdigit unless it's important to use the locale's definition of `digit' even when the host does not conform to Posix. */ #define ISASCIIDIGIT(c) ((unsigned) (c) - '0' <= 9) /* gettext.h ensures that we don't use gettext if ENABLE_NLS is not defined */ #include "gettext.h" #define _(str) gettext (str) #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" #ifdef GAWK static int is_blank (int c) { return (c == ' ' || c == '\t'); } #endif /* GAWK */ /* HPUX, define those as macros in sys/param.h */ #ifdef setbit # undef setbit #endif #ifdef clrbit # undef clrbit #endif /* Number of bits in an unsigned char. */ #ifndef CHARBITS # define CHARBITS 8 #endif /* First integer value that is greater than any character code. */ #define NOTCHAR (1 << CHARBITS) /* INTBITS need not be exact, just a lower bound. */ #ifndef INTBITS # define INTBITS (CHARBITS * sizeof (int)) #endif /* Number of ints required to hold a bit for every character. */ #define CHARCLASS_INTS ((NOTCHAR + INTBITS - 1) / INTBITS) /* 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 dependent constraints are encoded as 8 bit integers. Each bit that is set indicates that the constraint succeeds in the corresponding context. bit 7 - previous and current are newlines bit 6 - previous was newline, current isn't bit 5 - previous wasn't newline, current is bit 4 - neither previous nor current is a newline bit 3 - previous and current are word-constituents bit 2 - previous was word-constituent, current isn't bit 1 - previous wasn't word-constituent, current is bit 0 - neither previous nor current is word-constituent 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) \ (((constraint) & 0xc0) >> 2 != ((constraint) & 0x30)) #define PREV_LETTER_DEPENDENT(constraint) \ (((constraint) & 0x0c) >> 2 != ((constraint) & 0x03)) /* Tokens that match the empty string subject to some constraint actually work by applying that constraint to determine what may follow them, taking into account what has gone before. The following values are the constraints corresponding to the special tokens previously defined. */ #define NO_CONSTRAINT 0xff #define BEGLINE_CONSTRAINT 0xcf #define ENDLINE_CONSTRAINT 0xaf #define BEGWORD_CONSTRAINT 0xf2 #define ENDWORD_CONSTRAINT 0xf4 #define LIMWORD_CONSTRAINT 0xf6 #define NOTLIMWORD_CONSTRAINT 0xf9 /* The regexp is parsed into an array of tokens in postfix form. Some tokens are operators and others are terminal symbols. Most (but not all) of these codes are returned by the lexical analyzer. */ typedef enum { END = -1, /* END is a terminal symbol that matches the end of input; any value of END or less in the parse tree is such a symbol. Accepting states of the DFA are those that would have a transition on END. */ /* Ordinary character values are terminal symbols that match themselves. */ EMPTY = NOTCHAR, /* EMPTY is a terminal symbol that matches the empty string. */ BACKREF, /* BACKREF is generated by \; it 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 a backtracking matcher. */ BEGLINE, /* BEGLINE is a terminal symbol that matches the empty string if it is at the beginning of a line. */ ENDLINE, /* ENDLINE is a terminal symbol that matches the empty string if it is at the end of a line. */ BEGWORD, /* BEGWORD is a terminal symbol that matches the empty string if it is at the beginning of a word. */ ENDWORD, /* ENDWORD is a terminal symbol that matches the empty string if it is at the end of a word. */ LIMWORD, /* LIMWORD is a terminal symbol that matches the empty string if it is at the beginning or the end of a word. */ NOTLIMWORD, /* NOTLIMWORD is a terminal symbol that matches the empty string if it is not at the beginning or end of a word. */ QMARK, /* QMARK is an operator of one argument that matches zero or one occurences of its argument. */ STAR, /* STAR is an operator of one argument that matches the Kleene closure (zero or more occurrences) of its argument. */ PLUS, /* PLUS is an operator of one argument that matches the positive closure (one or more occurrences) of its argument. */ REPMN, /* REPMN is a lexical token corresponding to the {m,n} construct. REPMN never appears in the compiled token vector. */ CAT, /* CAT is an operator of two arguments that matches the concatenation of its arguments. CAT is never returned by the lexical analyzer. */ OR, /* OR is an operator of two arguments that matches either of its arguments. */ LPAREN, /* LPAREN never appears in the parse tree, it is only a lexeme. */ RPAREN, /* RPAREN never appears in the parse tree. */ ANYCHAR, /* ANYCHAR is a terminal symbol that matches any multibyte (or single byte) characters. It is used only if MB_CUR_MAX > 1. */ MBCSET, /* MBCSET is similar to CSET, but for multibyte characters. */ WCHAR, /* Only returned by lex. wctok contains the wide character representation. */ CSET /* CSET and (and any value greater) is a terminal symbol that matches any of a class of characters. */ } token; /* States of the recognizer correspond to sets of positions in the parse tree, together with the constraints under which they may be matched. So a position is encoded as an index into the parse tree together with a constraint. */ typedef struct { unsigned int index; /* Index into the parse array. */ unsigned int constraint; /* Constraint for matching this position. */ } position; /* Sets of positions are stored as arrays. */ typedef struct { position *elems; /* Elements of this position 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. */ typedef struct { int hash; /* Hash of the positions of this state. */ position_set elems; /* Positions this state could match. */ 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. */ position_set mbps; /* Positions which can match multibyte characters. e.g. period. These staff are used only if MB_CUR_MAX > 1. */ } dfa_state; /* A bracket operator. e.g. [a-c], [[:alpha:]], etc. */ struct mb_char_classes { int cset; int invert; wchar_t *chars; /* Normal characters. */ int nchars; wctype_t *ch_classes; /* Character classes. */ int nch_classes; wchar_t *range_sts; /* Range characters (start of the range). */ wchar_t *range_ends; /* Range characters (end of the range). */ int nranges; char **equivs; /* Equivalent classes. */ int nequivs; char **coll_elems; int ncoll_elems; /* Collating elements. */ }; /* A compiled regular expression. */ struct dfa { /* Fields filled by the scanner. */ charclass *charclasses; /* Array of character sets for CSET tokens. */ int cindex; /* Index for adding new charclasses. */ int calloc; /* Number of charclasses currently allocated. */ /* Fields filled by the parser. */ token *tokens; /* Postfix parse array. */ int tindex; /* Index for adding new tokens. */ int talloc; /* Number of tokens currently allocated. */ int depth; /* Depth required of an evaluation stack used for depth-first traversal of the parse tree. */ int nleaves; /* Number of leaves on the parse tree. */ int nregexps; /* Count of parallel regexps being built with dfaparse(). */ unsigned int mb_cur_max; /* Cached value of MB_CUR_MAX. */ int utf8_anychar_classes[5]; /* To lower ANYCHAR in UTF-8 locales. */ /* The following are used only if MB_CUR_MAX > 1. */ /* The value of multibyte_prop[i] is defined by following rule. if tokens[i] < NOTCHAR bit 0 : tokens[i] is the first byte of a character, including single-byte characters. bit 1 : tokens[i] is the last byte of a character, including single-byte characters. if tokens[i] = MBCSET ("the index of mbcsets correspnd to this operator" << 2) + 3 e.g. tokens = 'single_byte_a', 'multi_byte_A', single_byte_b' = 'sb_a', 'mb_A(1st byte)', 'mb_A(2nd byte)', 'mb_A(3rd byte)', 'sb_b' multibyte_prop = 3 , 1 , 0 , 2 , 3 */ int nmultibyte_prop; int *multibyte_prop; /* Array of the bracket expression in the DFA. */ struct mb_char_classes *mbcsets; int nmbcsets; int mbcsets_alloc; /* Fields filled by the state builder. */ dfa_state *states; /* States of the dfa. */ int sindex; /* Index for adding new states. */ int salloc; /* Number of states currently allocated. */ /* Fields filled by the parse tree->NFA conversion. */ position_set *follows; /* Array of follow sets, indexed by position index. The follow of a position is the set of positions containing characters that could conceivably follow a character matching the given position in a string matching the regexp. Allocated to the maximum possible position index. */ int searchflag; /* True if we are supposed to build a searching as opposed to an exact matcher. A searching matcher finds the first and shortest string matching a regexp anywhere in the buffer, whereas an exact matcher finds the longest string matching, but anchored to the beginning of the buffer. */ /* Fields filled by dfaexec. */ int tralloc; /* Number of transition tables that have slots so far. */ int trcount; /* Number of transition tables that have actually been built. */ int **trans; /* Transition tables for states that can never accept. If the transitions for a state have not yet been computed, or the state could possibly accept, its entry in this table is NULL. */ int **realtrans; /* Trans always points to realtrans + 1; this is so trans[-1] can contain NULL. */ int **fails; /* Transition tables after failing to accept on a state that potentially could do so. */ int *success; /* Table of acceptance conditions used in dfaexec and computed in build_state. */ int *newlines; /* Transitions on newlines. The entry for a newline in any transition table is always -1 so we can count lines without wasting too many cycles. The transition for a newline is stored separately and handled as a special case. Newline is also used as a sentinel at the end of the buffer. */ struct dfamust *musts; /* List of strings, at least one of which is known to appear in any r.e. matching the dfa. */ }; /* Some macros for user access to dfa internals. */ /* ACCEPTING returns true if s could possibly be an accepting state of r. */ #define ACCEPTING(s, r) ((r).states[s].constraint) /* ACCEPTS_IN_CONTEXT returns true if the given state accepts in the specified context. */ #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); /* 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 static void prtok (token t) { char const *s; if (t < 0) fprintf(stderr, "END"); else if (t < NOTCHAR) fprintf(stderr, "%c", t); else { switch (t) { case EMPTY: s = "EMPTY"; break; case BACKREF: s = "BACKREF"; break; case BEGLINE: s = "BEGLINE"; break; case ENDLINE: s = "ENDLINE"; break; case BEGWORD: s = "BEGWORD"; break; case ENDWORD: s = "ENDWORD"; break; case LIMWORD: s = "LIMWORD"; break; case NOTLIMWORD: s = "NOTLIMWORD"; break; case QMARK: s = "QMARK"; break; case STAR: s = "STAR"; break; case PLUS: s = "PLUS"; break; case CAT: s = "CAT"; break; case OR: s = "OR"; break; case LPAREN: s = "LPAREN"; break; case RPAREN: s = "RPAREN"; break; case ANYCHAR: s = "ANYCHAR"; break; case MBCSET: s = "MBCSET"; break; default: s = "CSET"; break; } fprintf(stderr, "%s", s); } } #endif /* DEBUG */ /* Stuff pertaining to charclasses. */ static int tstbit (unsigned int b, charclass const c) { return c[b / INTBITS] & 1 << b % INTBITS; } static void setbit (unsigned int b, charclass c) { c[b / INTBITS] |= 1 << b % INTBITS; } static void clrbit (unsigned int b, charclass c) { c[b / INTBITS] &= ~(1 << b % INTBITS); } static void copyset (charclass const src, charclass dst) { memcpy (dst, src, sizeof (charclass)); } static void zeroset (charclass s) { memset (s, 0, sizeof (charclass)); } static void notset (charclass s) { int i; for (i = 0; i < CHARCLASS_INTS; ++i) s[i] = ~s[i]; } static int equal (charclass const s1, charclass const s2) { return memcmp (s1, s2, sizeof (charclass)) == 0; } /* A pointer to the current dfa is kept here during parsing. */ static struct dfa *dfa; /* Find the index of charclass s in dfa->charclasses, or allocate a new charclass. */ static int charclass_index (charclass const s) { int i; for (i = 0; i < dfa->cindex; ++i) if (equal(s, dfa->charclasses[i])) return i; REALLOC_IF_NECESSARY(dfa->charclasses, dfa->calloc, dfa->cindex + 1); ++dfa->cindex; copyset(s, dfa->charclasses[i]); return i; } /* Syntax bits controlling the behavior of the lexical analyzer. */ static reg_syntax_t syntax_bits, syntax_bits_set; /* Flag for case-folding letters into sets. */ static int case_fold; /* 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; } } } /* 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 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 # define setbit_c setbit static inline bool setbit_wc (wint_t wc, charclass c) { abort (); /*NOTREACHED*/ return false; } #endif /* 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 (MB_CUR_MAX > 1) { 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 { 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 using_utf8 (void) { static int utf8 = -1; if (utf8 == -1) { #if defined HAVE_LANGINFO_CODESET && MBS_SUPPORT utf8 = (STREQ (nl_langinfo (CODESET), "UTF-8")); #else utf8 = 0; #endif } return utf8; } /* Lexical analyzer. All the dross that deals with the obnoxious GNU Regex syntax bits is located here. The poor, suffering reader is referred to the GNU Regex documentation for the meaning of the @#%!@#%^!@ syntax bits. */ static char const *lexptr; /* Pointer to next input character. */ static int lexleft; /* Number of characters remaining. */ static token lasttok; /* Previous token returned; initially END. */ static int laststart; /* True if we're separated from beginning or (, | only by zero-width characters. */ static int parens; /* Count of outstanding left parens. */ static int minrep, maxrep; /* Repeat counts for {m,n}. */ static int cur_mb_len = 1; /* Length of the multibyte representation of wctok. */ /* 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 multibyte character. */ static unsigned char *mblen_buf;/* Correspond to the input buffer in dfaexec(). Each element store the amount of remain byte of corresponding multibyte character in the input string. A element's value is 0 if corresponding character is a single byte chracter. e.g. input : 'a', , , mblen_buf : 0, 3, 2, 1 */ static wchar_t *inputwcs; /* Wide character representation of input string in dfaexec(). The length of this array is same as the length of input string(char array). inputstring[i] is a single-byte char, or 1st byte of a multibyte char. 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(). */ #if MBS_SUPPORT /* Note that characters become unsigned here. */ # define FETCH_WC(c, wc, eoferr) \ do { \ if (! lexleft) \ { \ if ((eoferr) != 0) \ dfaerror (eoferr); \ else \ return lasttok = END; \ } \ else \ { \ wchar_t _wc; \ cur_mb_len = mbrtowc(&_wc, lexptr, lexleft, &mbs); \ if (cur_mb_len <= 0) \ { \ cur_mb_len = 1; \ --lexleft; \ (wc) = (c) = to_uchar (*lexptr++); \ } \ else \ { \ lexptr += cur_mb_len; \ lexleft -= cur_mb_len; \ (wc) = _wc; \ (c) = wctob(wc); \ } \ } \ } while(0) # define FETCH(c, eoferr) \ do { \ wint_t wc; \ FETCH_WC(c, wc, eoferr); \ } while(0) #else /* Note that characters become unsigned here. */ # define FETCH(c, eoferr) \ do { \ if (! lexleft) \ { \ if ((eoferr) != 0) \ dfaerror (eoferr); \ else \ return lasttok = END; \ } \ (c) = to_uchar (*lexptr++); \ --lexleft; \ } while(0) # define FETCH_WC(c, unused, eoferr) FETCH (c, eoferr) #endif /* MBS_SUPPORT */ 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. */ struct dfa_ctype { const char *name; 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 const struct dfa_ctype * _GL_ATTRIBUTE_PURE find_pred (const char *str) { unsigned int i; for (i = 0; prednames[i].name; ++i) if (STREQ (str, prednames[i].name)) break; return &prednames[i]; } /* Multibyte character handling sub-routine for lex. This function parse a bracket expression and build a struct mb_char_classes. */ static token parse_bracket_exp (void) { int invert; int c, c1, c2; charclass ccl; /* 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 = 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, 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 decide the index in dfa->tokens[]. */ /* Initialize work area. */ work_mbc = &(dfa->mbcsets[dfa->nmbcsets++]); memset (work_mbc, 0, sizeof *work_mbc); } else work_mbc = NULL; memset (ccl, 0, sizeof ccl); FETCH_WC (c, wc, _("unbalanced [")); if (c == '^') { FETCH_WC (c, wc, _("unbalanced [")); invert = 1; } 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 this because we assume regex has checked for syntax errors before dfa is ever called. */ if (c == '[' && (syntax_bits & RE_CHAR_CLASSES)) { #define BRACKET_BUFFER_SIZE 128 char str[BRACKET_BUFFER_SIZE]; FETCH_WC (c1, wc1, _("unbalanced [")); /* If pattern contains `[[:', `[[.', or `[[='. */ if (c1 == ':' /* TODO: handle `[[.' and `[[=' also for MB_CUR_MAX == 1. */ || (MB_CUR_MAX > 1 && (c1 == '.' || c1 == '=')) ) { size_t len = 0; for (;;) { FETCH_WC (c, wc, _("unbalanced [")); if ((c == c1 && *lexptr == ']') || lexleft == 0) break; if (len < BRACKET_BUFFER_SIZE) str[len++] = c; else /* This is in any case an invalid class name. */ str[0] = '\0'; } str[len] = '\0'; /* Fetch bracket. */ FETCH_WC (c, wc, _("unbalanced [")); if (c1 == ':') /* build character class. */ { char const *class = (case_fold && (STREQ (str, "upper") || STREQ (str, "lower")) ? "alpha" : str); 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); REALLOC_IF_NECESSARY(work_mbc->ch_classes, ch_classes_al, work_mbc->nch_classes + 1); work_mbc->ch_classes[work_mbc->nch_classes++] = wt; } for (c2 = 0; c2 < NOTCHAR; ++c2) if (pred->func(c2)) setbit_case_fold_c (c2, ccl); } else if (MBS_SUPPORT && (c1 == '=' || c1 == '.')) { char *elem; MALLOC(elem, len + 1); strncpy(elem, str, len + 1); if (c1 == '=') /* build equivalent class. */ { REALLOC_IF_NECESSARY(work_mbc->equivs, equivs_al, work_mbc->nequivs + 1); work_mbc->equivs[work_mbc->nequivs++] = elem; } if (c1 == '.') /* build collating element. */ { REALLOC_IF_NECESSARY(work_mbc->coll_elems, coll_elems_al, work_mbc->ncoll_elems + 1); work_mbc->coll_elems[work_mbc->ncoll_elems++] = elem; } } colon_warning_state |= 8; /* Fetch new lookahead character. */ FETCH_WC (c1, wc1, _("unbalanced [")); continue; } /* We treat '[' as a normal character here. c/c1/wc/wc1 are already set up. */ } if (c == '\\' && (syntax_bits & RE_BACKSLASH_ESCAPE_IN_LISTS)) FETCH_WC(c, wc, _("unbalanced [")); if (c1 == EOF) FETCH_WC(c1, wc1, _("unbalanced [")); if (c1 == '-') /* build range characters. */ { FETCH_WC(c2, wc2, _("unbalanced [")); if (c2 == ']') { /* In the case [x-], the - is an ordinary hyphen, which is left in c1, the lookahead character. */ lexptr -= cur_mb_len; lexleft += cur_mb_len; } } if (c1 == '-' && c2 != ']') { if (c2 == '\\' && (syntax_bits & RE_BACKSLASH_ESCAPE_IN_LISTS)) FETCH_WC(c2, wc2, _("unbalanced [")); 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]. */ REALLOC_IF_NECESSARY(work_mbc->range_sts, range_sts_al, work_mbc->nranges + 1); 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; work_mbc->range_ends[work_mbc->nranges++] = case_fold ? towlower(wc2) : (wchar_t)wc2; #ifndef GREP if (case_fold && (iswalpha(wc) || iswalpha(wc2))) { 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, range_ends_al, work_mbc->nranges + 1); work_mbc->range_ends[work_mbc->nranges++] = towupper(wc2); } #endif } else { c1 = c; if (case_fold) { c1 = tolower (c1); c2 = tolower (c2); } for (c = c1; c <= c2; c++) setbit_case_fold_c (c, ccl); } colon_warning_state |= 8; FETCH_WC(c1, wc1, _("unbalanced [")); continue; } colon_warning_state |= (c == ':') ? 2 : 4; if (MB_CUR_MAX == 1) { 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, chars_al, work_mbc->nchars + 1); work_mbc->chars[work_mbc->nchars++] = wc; } #ifdef GREP continue; #else 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 ((wc = wc1, (c = c1) != ']')); 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; } if (invert) { assert(MB_CUR_MAX == 1); notset(ccl); if (syntax_bits & RE_HAT_LISTS_NOT_NEWLINE) clrbit(eolbyte, ccl); } return CSET + charclass_index(ccl); } static token lex (void) { unsigned int c, c2; int backslash = 0; charclass ccl; int i; /* Basic plan: We fetch a character. If it's a backslash, we set the backslash flag and go through the loop again. On the plus side, this avoids having a duplicate of the main switch inside the backslash case. On the minus side, it means that just about every case begins with "if (backslash) ...". */ for (i = 0; i < 2; ++i) { if (MB_CUR_MAX > 1) { FETCH_WC (c, wctok, NULL); if ((int)c == EOF) goto normal_char; } else FETCH(c, NULL); switch (c) { case '\\': if (backslash) goto normal_char; if (lexleft == 0) dfaerror(_("unfinished \\ escape")); backslash = 1; break; case '^': if (backslash) goto normal_char; if (syntax_bits & RE_CONTEXT_INDEP_ANCHORS || lasttok == END || lasttok == LPAREN || lasttok == OR) return lasttok = BEGLINE; goto normal_char; case '$': if (backslash) goto normal_char; if (syntax_bits & RE_CONTEXT_INDEP_ANCHORS || lexleft == 0 || (syntax_bits & RE_NO_BK_PARENS ? lexleft > 0 && *lexptr == ')' : lexleft > 1 && lexptr[0] == '\\' && lexptr[1] == ')') || (syntax_bits & RE_NO_BK_VBAR ? lexleft > 0 && *lexptr == '|' : lexleft > 1 && lexptr[0] == '\\' && lexptr[1] == '|') || ((syntax_bits & RE_NEWLINE_ALT) && lexleft > 0 && *lexptr == '\n')) return lasttok = ENDLINE; goto normal_char; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (backslash && !(syntax_bits & RE_NO_BK_REFS)) { laststart = 0; return lasttok = BACKREF; } goto normal_char; case '`': if (backslash && !(syntax_bits & RE_NO_GNU_OPS)) return lasttok = BEGLINE; /* FIXME: should be beginning of string */ goto normal_char; case '\'': if (backslash && !(syntax_bits & RE_NO_GNU_OPS)) return lasttok = ENDLINE; /* FIXME: should be end of string */ goto normal_char; case '<': if (backslash && !(syntax_bits & RE_NO_GNU_OPS)) return lasttok = BEGWORD; goto normal_char; case '>': if (backslash && !(syntax_bits & RE_NO_GNU_OPS)) return lasttok = ENDWORD; goto normal_char; case 'b': if (backslash && !(syntax_bits & RE_NO_GNU_OPS)) return lasttok = LIMWORD; goto normal_char; case 'B': if (backslash && !(syntax_bits & RE_NO_GNU_OPS)) return lasttok = NOTLIMWORD; goto normal_char; case '?': if (syntax_bits & RE_LIMITED_OPS) goto normal_char; if (backslash != ((syntax_bits & RE_BK_PLUS_QM) != 0)) goto normal_char; if (!(syntax_bits & RE_CONTEXT_INDEP_OPS) && laststart) goto normal_char; return lasttok = QMARK; case '*': if (backslash) goto normal_char; if (!(syntax_bits & RE_CONTEXT_INDEP_OPS) && laststart) goto normal_char; return lasttok = STAR; case '+': if (syntax_bits & RE_LIMITED_OPS) goto normal_char; if (backslash != ((syntax_bits & RE_BK_PLUS_QM) != 0)) goto normal_char; if (!(syntax_bits & RE_CONTEXT_INDEP_OPS) && laststart) goto normal_char; return lasttok = PLUS; case '{': if (!(syntax_bits & RE_INTERVALS)) goto normal_char; if (backslash != ((syntax_bits & RE_NO_BK_BRACES) == 0)) goto normal_char; if (!(syntax_bits & RE_CONTEXT_INDEP_OPS) && laststart) goto normal_char; if (syntax_bits & RE_NO_BK_BRACES) { /* Scan ahead for a valid interval; if it's not valid, treat it as a literal '{'. */ int lo = -1, hi = -1; char const *p = lexptr; char const *lim = p + lexleft; for (; p != lim && ISASCIIDIGIT (*p); p++) lo = (lo < 0 ? 0 : lo * 10) + *p - '0'; if (p != lim && *p == ',') while (++p != lim && ISASCIIDIGIT (*p)) hi = (hi < 0 ? 0 : hi * 10) + *p - '0'; else hi = lo; if (p == lim || *p != '}' || lo < 0 || RE_DUP_MAX < hi || (0 <= hi && hi < lo)) goto normal_char; } minrep = 0; /* Cases: {M} - exact count {M,} - minimum count, maximum is infinity {M,N} - M through N */ FETCH(c, _("unfinished repeat count")); if (ISASCIIDIGIT (c)) { minrep = c - '0'; for (;;) { FETCH(c, _("unfinished repeat count")); if (! ISASCIIDIGIT (c)) break; minrep = 10 * minrep + c - '0'; } } else dfaerror(_("malformed repeat count")); if (c == ',') { FETCH (c, _("unfinished repeat count")); if (! ISASCIIDIGIT (c)) maxrep = -1; else { maxrep = c - '0'; for (;;) { FETCH (c, _("unfinished repeat count")); if (! ISASCIIDIGIT (c)) break; maxrep = 10 * maxrep + c - '0'; } if (0 <= maxrep && maxrep < minrep) dfaerror (_("malformed repeat count")); } } else maxrep = minrep; if (!(syntax_bits & RE_NO_BK_BRACES)) { if (c != '\\') dfaerror(_("malformed repeat count")); FETCH(c, _("unfinished repeat count")); } if (c != '}') dfaerror(_("malformed repeat count")); laststart = 0; return lasttok = REPMN; case '|': if (syntax_bits & RE_LIMITED_OPS) goto normal_char; if (backslash != ((syntax_bits & RE_NO_BK_VBAR) == 0)) goto normal_char; laststart = 1; return lasttok = OR; case '\n': if (syntax_bits & RE_LIMITED_OPS || backslash || !(syntax_bits & RE_NEWLINE_ALT)) goto normal_char; laststart = 1; return lasttok = OR; case '(': if (backslash != ((syntax_bits & RE_NO_BK_PARENS) == 0)) goto normal_char; ++parens; laststart = 1; return lasttok = LPAREN; case ')': if (backslash != ((syntax_bits & RE_NO_BK_PARENS) == 0)) goto normal_char; if (parens == 0 && syntax_bits & RE_UNMATCHED_RIGHT_PAREN_ORD) goto normal_char; --parens; laststart = 0; return lasttok = RPAREN; case '.': if (backslash) goto normal_char; if (MB_CUR_MAX > 1) { /* In multibyte environment period must match with a single character not a byte. So we use ANYCHAR. */ laststart = 0; return lasttok = ANYCHAR; } zeroset(ccl); notset(ccl); if (!(syntax_bits & RE_DOT_NEWLINE)) clrbit(eolbyte, ccl); if (syntax_bits & RE_DOT_NOT_NULL) clrbit('\0', ccl); laststart = 0; return lasttok = CSET + charclass_index(ccl); case 's': case 'S': if (!backslash || (syntax_bits & RE_NO_GNU_OPS)) goto normal_char; zeroset(ccl); for (c2 = 0; c2 < NOTCHAR; ++c2) if (isspace(c2)) setbit(c2, ccl); if (c == 'S') notset(ccl); laststart = 0; return lasttok = CSET + charclass_index(ccl); case 'w': case 'W': if (!backslash || (syntax_bits & RE_NO_GNU_OPS)) goto normal_char; zeroset(ccl); for (c2 = 0; c2 < NOTCHAR; ++c2) if (IS_WORD_CONSTITUENT(c2)) setbit(c2, ccl); if (c == 'W') notset(ccl); laststart = 0; return lasttok = CSET + charclass_index(ccl); case '[': if (backslash) goto normal_char; laststart = 0; return lasttok = parse_bracket_exp(); default: normal_char: laststart = 0; /* For multibyte character sets, folding is done in atom. Always return WCHAR. */ if (MB_CUR_MAX > 1) return lasttok = WCHAR; if (case_fold && isalpha(c)) { zeroset(ccl); setbit_case_fold_c (c, ccl); return lasttok = CSET + charclass_index(ccl); } return lasttok = c; } } /* The above loop should consume at most a backslash and some other character. */ abort(); return END; /* keeps pedantic compilers happy. */ } /* Recursive descent parser for regular expressions. */ static token tok; /* Lookahead token. */ static int depth; /* Current depth of a hypothetical stack holding deferred productions. This is used to determine the depth that will be required of the real stack later on in dfaanalyze(). */ static void addtok_mb (token t, int mbprop) { if (MB_CUR_MAX > 1) { REALLOC_IF_NECESSARY(dfa->multibyte_prop, dfa->nmultibyte_prop, dfa->tindex + 1); dfa->multibyte_prop[dfa->tindex] = mbprop; } REALLOC_IF_NECESSARY(dfa->tokens, dfa->talloc, dfa->tindex + 1); dfa->tokens[dfa->tindex++] = t; switch (t) { case QMARK: case STAR: case PLUS: break; case CAT: case OR: --depth; break; default: ++dfa->nleaves; case EMPTY: ++depth; break; } if (depth > dfa->depth) 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 (MB_CUR_MAX > 1 && t == MBCSET) { 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 { addtok_mb (t, 3); } } #if MBS_SUPPORT /* We treat a multibyte character as a single atom, so that DFA can treat a multibyte character as a single expression. e.g. We construct following tree from "". */ static void addtok_wc (wint_t wc) { unsigned char buf[MB_LEN_MAX]; mbstate_t s; int i; memset (&s, 0, sizeof s); cur_mb_len = wcrtomb ((char *) buf, wc, &s); /* This is merely stop-gap. When cur_mb_len is 0 or negative, buf[0] is undefined, yet skipping the addtok_mb call altogether can result in heap corruption. */ if (cur_mb_len <= 0) buf[0] = 0; addtok_mb(buf[0], cur_mb_len == 1 ? 3 : 1); for (i = 1; i < cur_mb_len; i++) { addtok_mb(buf[i], i == cur_mb_len - 1 ? 2 : 0); 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 */ { 0, 0, 0, 0, 0, 0, 0xfffffffcU, 0 }, /* c2-df: 2-byte sequence */ { 0, 0, 0, 0, 0, 0, 0, 0xffff }, /* e0-ef: 3-byte sequence */ { 0, 0, 0, 0, 0, 0, 0, 0xff0000 } /* f0-f7: 4-byte sequence */ }; const unsigned int n = sizeof (utf8_classes) / sizeof (utf8_classes[0]); unsigned int i; /* Define the five character classes that are needed below. */ if (dfa->utf8_anychar_classes[0] == 0) for (i = 0; i < n; i++) { charclass c; copyset (utf8_classes[i], c); if (i == 1) { if (!(syntax_bits & RE_DOT_NEWLINE)) clrbit (eolbyte, c); if (syntax_bits & RE_DOT_NOT_NULL) clrbit ('\0', c); } dfa->utf8_anychar_classes[i] = CSET + charclass_index(c); } /* A valid UTF-8 character is ([0x00-0x7f] |[0xc2-0xdf][0x80-0xbf] |[0xe0-0xef[0x80-0xbf][0x80-0xbf] |[0xf0-f7][0x80-0xbf][0x80-0xbf][0x80-0xbf]) which I'll write more concisely "B|CA|DAA|EAAA". Factor the [0x00-0x7f] and you get "B|(C|(D|EA)A)A". And since the token buffer is in reverse Polish notation, you get "B C D E A CAT OR A CAT OR A CAT OR". */ for (i = 1; i < n; i++) addtok (dfa->utf8_anychar_classes[i]); while (--i > 1) { addtok (dfa->utf8_anychar_classes[0]); addtok (CAT); addtok (OR); } #endif } /* The grammar understood by the parser is as follows. regexp: regexp OR branch branch branch: branch closure closure closure: closure QMARK closure STAR closure PLUS closure REPMN atom atom: ANYCHAR MBCSET CSET BACKREF BEGLINE ENDLINE BEGWORD ENDWORD LIMWORD NOTLIMWORD LPAREN regexp RPAREN The parser builds a parse tree in postfix form in an array of tokens. */ static void atom (void) { if (0) { /* empty */ } else if (MBS_SUPPORT && tok == WCHAR) { addtok_wc (case_fold ? towlower(wctok) : wctok); #ifndef GREP if (case_fold && iswalpha(wctok)) { addtok_wc (towupper(wctok)); addtok (OR); } #endif tok = lex(); } 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 pretty sure it would be both profitable and correct to do it for any encoding; however, the optimization must be done manually as it is done above in add_utf8_anychar. So, let's start with UTF-8: it is the most used, and the structure of the encoding makes the correctness more obvious. */ add_utf8_anychar(); tok = lex(); } else if ((tok >= 0 && tok < NOTCHAR) || tok >= CSET || tok == BACKREF || tok == BEGLINE || tok == ENDLINE || tok == BEGWORD #if MBS_SUPPORT || tok == ANYCHAR || tok == MBCSET #endif /* MBS_SUPPORT */ || tok == ENDWORD || tok == LIMWORD || tok == NOTLIMWORD) { addtok(tok); tok = lex(); } else if (tok == LPAREN) { tok = lex(); regexp(); if (tok != RPAREN) dfaerror(_("unbalanced (")); tok = lex(); } else addtok(EMPTY); } /* Return the number of tokens in the given subexpression. */ static int _GL_ATTRIBUTE_PURE nsubtoks (int tindex) { int ntoks1; switch (dfa->tokens[tindex - 1]) { default: return 1; case QMARK: case STAR: case PLUS: return 1 + nsubtoks(tindex - 1); case CAT: case OR: ntoks1 = nsubtoks(tindex - 1); return 1 + ntoks1 + nsubtoks(tindex - 1 - ntoks1); } } /* Copy the given subexpression to the top of the tree. */ static void copytoks (int tindex, int ntokens) { int i; for (i = 0; i < ntokens; ++i) { addtok(dfa->tokens[tindex + i]); /* 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]; } } static void closure (void) { int tindex, ntokens, i; atom(); while (tok == QMARK || tok == STAR || tok == PLUS || tok == REPMN) if (tok == REPMN && (minrep || maxrep)) { ntokens = nsubtoks(dfa->tindex); tindex = dfa->tindex - ntokens; if (maxrep < 0) addtok(PLUS); if (minrep == 0) addtok(QMARK); for (i = 1; i < minrep; ++i) { copytoks(tindex, ntokens); addtok(CAT); } for (; i < maxrep; ++i) { copytoks(tindex, ntokens); addtok(QMARK); addtok(CAT); } tok = lex(); } else if (tok == REPMN) { dfa->tindex -= nsubtoks(dfa->tindex); tok = lex(); closure(); } else { addtok(tok); tok = lex(); } } static void branch (void) { closure(); while (tok != RPAREN && tok != OR && tok >= 0) { closure(); addtok(CAT); } } static void regexp (void) { branch(); while (tok == OR) { tok = lex(); branch(); addtok(OR); } } /* Main entry point for the parser. S is a string to be parsed, len is the length of the string, so s can include NUL characters. D is a pointer to the struct dfa to parse into. */ void dfaparse (char const *s, size_t len, struct dfa *d) { dfa = d; lexptr = s; lexleft = len; lasttok = END; laststart = 1; parens = 0; if (MB_CUR_MAX > 1) { cur_mb_len = 0; memset(&mbs, 0, sizeof mbs); } if (! syntax_bits_set) dfaerror(_("no syntax specified")); tok = lex(); depth = d->depth; regexp(); if (tok != END) dfaerror(_("unbalanced )")); addtok(END - d->nregexps); addtok(CAT); if (d->nregexps) addtok(OR); ++d->nregexps; } /* Some primitives for operating on sets of positions. */ /* Copy one set to another; the destination must be large enough. */ static void copy (position_set const *src, position_set *dst) { REALLOC_IF_NECESSARY(dst->elems, dst->alloc, src->nelem); memcpy(dst->elems, src->elems, sizeof(dst->elems[0]) * src->nelem); dst->nelem = src->nelem; } 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) lo = mid + 1; else hi = mid; } if (lo < count && p.index == s->elems[lo].index) { 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 the positions of both sets were inserted into an initially empty set. */ static void merge (position_set const *s1, position_set const *s2, position_set *m) { 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) m->elems[m->nelem++] = s1->elems[i++]; else if (s1->elems[i].index < s2->elems[j].index) m->elems[m->nelem++] = s2->elems[j++]; else { m->elems[m->nelem] = s1->elems[i++]; m->elems[m->nelem++].constraint |= s2->elems[j++].constraint; } while (i < s1->nelem) m->elems[m->nelem++] = s1->elems[i++]; while (j < s2->nelem) m->elems[m->nelem++] = s2->elems[j++]; } /* Delete a position from a set. */ static void delete (position p, position_set *s) { int i; for (i = 0; i < s->nelem; ++i) if (p.index == s->elems[i].index) break; if (i < s->nelem) for (--s->nelem; i < s->nelem; ++i) s->elems[i] = s->elems[i + 1]; } /* 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. Context tells whether we got here on a newline or letter. */ static int state_index (struct dfa *d, position_set const *s, int context) { int hash = 0; int constraint; int i, j; context &= ~CTX_NONE; for (i = 0; i < s->nelem; ++i) hash ^= s->elems[i].index + s->elems[i].constraint; /* Try to find a state that exactly matches the proposed one. */ for (i = 0; i < d->sindex; ++i) { if (hash != d->states[i].hash || s->nelem != d->states[i].elems.nelem || context != d->states[i].context) continue; for (j = 0; j < s->nelem; ++j) if (s->elems[j].constraint != d->states[i].elems.elems[j].constraint || s->elems[j].index != d->states[i].elems.elems[j].index) break; if (j == s->nelem) return i; } /* We'll have to create a new state. */ REALLOC_IF_NECESSARY(d->states, d->salloc, d->sindex + 1); d->states[i].hash = hash; alloc_position_set(&d->states[i].elems, s->nelem); copy(s, &d->states[i].elems); 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; } 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, 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]; } else if (d->tokens[s->elems[j].index] == BACKREF) { d->states[i].constraint = NO_CONSTRAINT; d->states[i].backref = 1; } ++d->sindex; return i; } /* Find the epsilon closure of a set of positions. If any position of the set contains a symbol that matches the empty string in some context, replace that position with the elements of its follow labeled with an appropriate constraint. Repeat exhaustively until no funny positions are left. S->elems must be large enough to hold the result. */ static void epsclosure (position_set *s, struct dfa const *d) { int i, j; char *visited; /* array of booleans, enough to use char, not int */ position p, old; CALLOC(visited, d->tindex); for (i = 0; i < s->nelem; ++i) if (d->tokens[s->elems[i].index] >= NOTCHAR && d->tokens[s->elems[i].index] != BACKREF #if MBS_SUPPORT && d->tokens[s->elems[i].index] != ANYCHAR && d->tokens[s->elems[i].index] != MBCSET #endif && d->tokens[s->elems[i].index] < CSET) { old = s->elems[i]; p.constraint = old.constraint; delete(s->elems[i], s); if (visited[old.index]) { --i; continue; } visited[old.index] = 1; switch (d->tokens[old.index]) { case BEGLINE: p.constraint &= BEGLINE_CONSTRAINT; break; case ENDLINE: p.constraint &= ENDLINE_CONSTRAINT; break; case BEGWORD: p.constraint &= BEGWORD_CONSTRAINT; break; case ENDWORD: p.constraint &= ENDWORD_CONSTRAINT; break; case LIMWORD: p.constraint &= LIMWORD_CONSTRAINT; break; case NOTLIMWORD: p.constraint &= NOTLIMWORD_CONSTRAINT; break; default: break; } for (j = 0; j < d->follows[old.index].nelem; ++j) { p.index = d->follows[old.index].elems[j].index; insert(p, s); } /* Force rescan to start at the beginning. */ i = -1; } 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. Nullable: A node is nullable if it is at the root of a regexp that can match the empty string. * EMPTY leaves are nullable. * No other leaf is nullable. * A QMARK or STAR node is nullable. * A PLUS node is nullable if its argument is nullable. * A CAT node is nullable if both its arguments are nullable. * An OR node is nullable if either argument is nullable. Firstpos: The firstpos of a node is the set of positions (nonempty leaves) that could correspond to the first character of a string matching the regexp rooted at the given node. * EMPTY leaves have empty firstpos. * The firstpos of a nonempty leaf is that leaf itself. * The firstpos of a QMARK, STAR, or PLUS node is the firstpos of its argument. * The firstpos of a CAT node is the firstpos of the left argument, union the firstpos of the right if the left argument is nullable. * The firstpos of an OR node is the union of firstpos of each argument. Lastpos: The lastpos of a node is the set of positions that could correspond to the last character of a string matching the regexp at the given node. * EMPTY leaves have empty lastpos. * The lastpos of a nonempty leaf is that leaf itself. * The lastpos of a QMARK, STAR, or PLUS node is the lastpos of its argument. * The lastpos of a CAT node is the lastpos of its right argument, union the lastpos of the left if the right argument is nullable. * The lastpos of an OR node is the union of the lastpos of each argument. Follow: The follow of a position is the set of positions that could correspond to the character following a character matching the node in a string matching the regexp. At this point we consider special symbols that match the empty string in some context to be just normal characters. Later, if we find that a special symbol is in a follow set, we will replace it with the elements of its follow, labeled with an appropriate constraint. * Every node in the firstpos of the argument of a STAR or PLUS node is in the follow of every node in the lastpos. * Every node in the firstpos of the second argument of a CAT node is in the follow of every node in the lastpos of the first argument. Because of the postfix representation of the parse tree, the depth-first analysis is conveniently done by a linear scan with the aid of a stack. Sets are stored as arrays of the elements, obeying a stack-like allocation scheme; the number of elements in each set deeper in the stack can be used to determine the address of a particular set's array. */ void dfaanalyze (struct dfa *d, int searchflag) { int *nullable; /* Nullable stack. */ int *nfirstpos; /* Element count stack for firstpos sets. */ position *firstpos; /* Array where firstpos elements are stored. */ int *nlastpos; /* Element count stack for lastpos sets. */ position *lastpos; /* Array where lastpos elements are stored. */ position_set tmp; /* Temporary set for merging sets. */ position_set merged; /* Result of merging sets. */ int separate_contexts; /* Context wanted by some position. */ int *o_nullable; int *o_nfirst, *o_nlast; position *o_firstpos, *o_lastpos; int i, j; position *pos; #ifdef DEBUG fprintf(stderr, "dfaanalyze:\n"); for (i = 0; i < d->tindex; ++i) { fprintf(stderr, " %d:", i); prtok(d->tokens[i]); } putc('\n', stderr); #endif d->searchflag = searchflag; MALLOC(nullable, d->depth); o_nullable = nullable; MALLOC(nfirstpos, d->depth); o_nfirst = nfirstpos; MALLOC(firstpos, d->nleaves); o_firstpos = firstpos, firstpos += d->nleaves; MALLOC(nlastpos, d->depth); o_nlast = nlastpos; MALLOC(lastpos, d->nleaves); o_lastpos = lastpos, lastpos += d->nleaves; alloc_position_set(&merged, d->nleaves); CALLOC(d->follows, d->tindex); for (i = 0; i < d->tindex; ++i) { switch (d->tokens[i]) { case EMPTY: /* The empty set is nullable. */ *nullable++ = 1; /* The firstpos and lastpos of the empty leaf are both empty. */ *nfirstpos++ = *nlastpos++ = 0; break; case STAR: case PLUS: /* Every element in the firstpos of the argument is in the follow of every element in the lastpos. */ tmp.nelem = nfirstpos[-1]; tmp.elems = firstpos; pos = lastpos; for (j = 0; j < nlastpos[-1]; ++j) { merge(&tmp, &d->follows[pos[j].index], &merged); copy(&merged, &d->follows[pos[j].index]); } case QMARK: /* A QMARK or STAR node is automatically nullable. */ if (d->tokens[i] != PLUS) nullable[-1] = 1; break; case CAT: /* Every element in the firstpos of the second argument is in the follow of every element in the lastpos of the first argument. */ tmp.nelem = nfirstpos[-1]; tmp.elems = firstpos; pos = lastpos + nlastpos[-1]; for (j = 0; j < nlastpos[-2]; ++j) { merge(&tmp, &d->follows[pos[j].index], &merged); copy(&merged, &d->follows[pos[j].index]); } /* The firstpos of a CAT node is the firstpos of the first argument, union that of the second argument if the first is nullable. */ if (nullable[-2]) nfirstpos[-2] += nfirstpos[-1]; else firstpos += nfirstpos[-1]; --nfirstpos; /* The lastpos of a CAT node is the lastpos of the second argument, union that of the first argument if the second is nullable. */ if (nullable[-1]) nlastpos[-2] += nlastpos[-1]; else { pos = lastpos + nlastpos[-2]; for (j = nlastpos[-1] - 1; j >= 0; --j) pos[j] = lastpos[j]; lastpos += nlastpos[-2]; nlastpos[-2] = nlastpos[-1]; } --nlastpos; /* A CAT node is nullable if both arguments are nullable. */ nullable[-2] = nullable[-1] && nullable[-2]; --nullable; break; case OR: /* The firstpos is the union of the firstpos of each argument. */ nfirstpos[-2] += nfirstpos[-1]; --nfirstpos; /* The lastpos is the union of the lastpos of each argument. */ nlastpos[-2] += nlastpos[-1]; --nlastpos; /* An OR node is nullable if either argument is nullable. */ nullable[-2] = nullable[-1] || nullable[-2]; --nullable; break; default: /* Anything else is a nonempty position. (Note that special constructs like \< are treated as nonempty strings here; an "epsilon closure" effectively makes them nullable later. Backreferences have to get a real position so we can detect transitions on them later. But they are nullable. */ *nullable++ = d->tokens[i] == BACKREF; /* This position is in its own firstpos and lastpos. */ *nfirstpos++ = *nlastpos++ = 1; --firstpos, --lastpos; firstpos->index = lastpos->index = i; firstpos->constraint = lastpos->constraint = NO_CONSTRAINT; /* Allocate the follow set for this position. */ alloc_position_set(&d->follows[i], 1); break; } #ifdef DEBUG /* ... balance the above nonsyntactic #ifdef goo... */ fprintf(stderr, "node %d:", i); prtok(d->tokens[i]); putc('\n', stderr); fprintf(stderr, nullable[-1] ? " nullable: yes\n" : " nullable: no\n"); fprintf(stderr, " firstpos:"); for (j = nfirstpos[-1] - 1; j >= 0; --j) { fprintf(stderr, " %d:", firstpos[j].index); prtok(d->tokens[firstpos[j].index]); } fprintf(stderr, "\n lastpos:"); for (j = nlastpos[-1] - 1; j >= 0; --j) { fprintf(stderr, " %d:", lastpos[j].index); 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. */ for (i = 0; i < d->tindex; ++i) if (d->tokens[i] < NOTCHAR || d->tokens[i] == BACKREF #if MBS_SUPPORT || d->tokens[i] == ANYCHAR || d->tokens[i] == MBCSET #endif || d->tokens[i] >= CSET) { #ifdef DEBUG fprintf(stderr, "follows(%d:", i); prtok(d->tokens[i]); fprintf(stderr, "):"); for (j = d->follows[i].nelem - 1; j >= 0; --j) { fprintf(stderr, " %d:", d->follows[i].elems[j].index); prtok(d->tokens[d->follows[i].elems[j].index]); } putc('\n', stderr); #endif copy(&d->follows[i], &merged); epsclosure(&merged, d); copy(&merged, &d->follows[i]); } /* Get the epsilon closure of the firstpos of the regexp. The result will be the set of positions of state 0. */ merged.nelem = 0; for (i = 0; i < nfirstpos[-1]; ++i) insert(firstpos[i], &merged); epsclosure(&merged, d); /* Build the initial state. */ d->salloc = 1; d->sindex = 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(merged.elems); } /* Find, for each character, the transition out of state s of d, and store it in the appropriate slot of trans. We divide the positions of s into groups (positions can appear in more than one group). Each group is labeled with a set of characters that every position in the group matches (taking into account, if necessary, preceding context information of s). For each group, find the union of the its elements' follows. This set is the set of positions of the new state. For each character in the group's label, set the transition on this character to be to a state corresponding to the set's positions, and its associated backward context information, if necessary. If we are building a searching matcher, we include the positions of state 0 in every state. The collection of groups is constructed by building an equivalence-class partition of the positions of s. For each position, find the set of characters C that it matches. Eliminate any characters from C that fail on grounds of backward context. Search through the groups, looking for a group whose label L has nonempty intersection with C. If L - C is nonempty, create a new group labeled L - C and having the same positions as the current group, and set L to the intersection of L and C. Insert the position in this group, set C = C - L, and resume scanning. If after comparing with every group there are characters remaining in C, create a new group labeled with the characters of C and insert this position in that group. */ void dfastate (int s, struct dfa *d, int trans[]) { 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. */ int matchesf; /* True if matches is nonempty. */ charclass intersect; /* Intersection with some label set. */ int intersectf; /* True if intersect is nonempty. */ charclass leftovers; /* Stuff in the label that didn't match. */ int leftoversf; /* True if leftovers is nonempty. */ 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 state_newline; /* New state on a newline transition. */ int state_letter; /* New state on a letter transition. */ int next_isnt_1st_byte = 0; /* Flag if we can't add state0. */ int i, j, k; MALLOC (grps, NOTCHAR); MALLOC (labels, NOTCHAR); zeroset(matches); for (i = 0; i < d->states[s].elems.nelem; ++i) { pos = d->states[s].elems.elems[i]; if (d->tokens[pos.index] >= 0 && d->tokens[pos.index] < NOTCHAR) setbit(d->tokens[pos.index], matches); else if (d->tokens[pos.index] >= CSET) copyset(d->charclasses[d->tokens[pos.index] - CSET], matches); 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) alloc_position_set(&d->states[s].mbps, 1); insert(pos, &(d->states[s].mbps)); continue; } else continue; /* Some characters may need to be eliminated from matches because they fail in the current context. */ if (pos.constraint != 0xFF) { if (! MATCHES_NEWLINE_CONTEXT(pos.constraint, d->states[s].context & CTX_NEWLINE, CTX_NEWLINE)) clrbit(eolbyte, matches); if (! MATCHES_NEWLINE_CONTEXT(pos.constraint, 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].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].context & CTX_LETTER, 0)) for (j = 0; j < CHARCLASS_INTS; ++j) matches[j] &= letters[j]; /* If there are no characters left, there's no point in going on. */ for (j = 0; j < CHARCLASS_INTS && !matches[j]; ++j) continue; if (j == CHARCLASS_INTS) continue; } for (j = 0; j < ngrps; ++j) { /* If matches contains a single character only, and the current group's label doesn't contain that character, go on to the next group. */ if (d->tokens[pos.index] >= 0 && d->tokens[pos.index] < NOTCHAR && !tstbit(d->tokens[pos.index], labels[j])) continue; /* Check if this group's label has a nonempty intersection with matches. */ intersectf = 0; for (k = 0; k < CHARCLASS_INTS; ++k) (intersect[k] = matches[k] & labels[j][k]) ? (intersectf = 1) : 0; if (! intersectf) continue; /* It does; now find the set differences both ways. */ leftoversf = matchesf = 0; for (k = 0; k < CHARCLASS_INTS; ++k) { /* Even an optimizing compiler can't know this for sure. */ int match = matches[k], label = labels[j][k]; (leftovers[k] = ~match & label) ? (leftoversf = 1) : 0; (matches[k] = match & ~label) ? (matchesf = 1) : 0; } /* If there were leftovers, create a new group labeled with them. */ if (leftoversf) { copyset(leftovers, labels[ngrps]); copyset(intersect, labels[j]); 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. 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. */ if (! matchesf) break; } /* If we've passed the last group, and there are still characters unaccounted for, then we'll have to create a new group. */ if (j == ngrps) { copyset(matches, labels[ngrps]); zeroset(matches); MALLOC(grps[ngrps].elems, d->nleaves); grps[ngrps].nelem = 1; grps[ngrps].elems[0] = pos.index; ++ngrps; } } 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) { /* Find the state(s) corresponding to the positions of state 0. */ copy(&d->states[0].elems, &follows); 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 (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; } else for (i = 0; i < NOTCHAR; ++i) trans[i] = -1; for (i = 0; i < ngrps; ++i) { follows.nelem = 0; /* 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]].nelem; ++k) insert(d->follows[grps[i].elems[j]].elems[k], &follows); if (d->mb_cur_max > 1) { /* If a token in follows.elems is not 1st byte of a multibyte character, or the states of follows must accept the bytes which are not 1st byte of the multibyte character. Then, if a state of follows encounter a byte, it must not be a 1st byte of a multibyte character nor single byte character. We cansel to add state[0].follows to next state, because state[0] must accept 1st-byte For example, we assume is a certain single byte character, is a certain multibyte character, and the codepoint of equals the 2nd byte of the codepoint of . When state[0] accepts , state[i] transit to state[i+1] 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 cannot add state[0]. */ next_isnt_1st_byte = 0; for (j = 0; j < follows.nelem; ++j) { if (!(d->multibyte_prop[follows.elems[j].index] & 1)) { next_isnt_1st_byte = 1; break; } } } /* If we are building a searching matcher, throw in the positions of state 0 as well. */ 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. */ 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); if (separate_contexts & CTX_NEWLINE) state_newline = state_index(d, &follows, CTX_NEWLINE); else state_newline = state; if (separate_contexts & CTX_LETTER) state_letter = state_index(d, &follows, CTX_LETTER); else state_letter = state; /* Set the transitions for each character in the current label. */ for (j = 0; j < CHARCLASS_INTS; ++j) for (k = 0; k < INTBITS; ++k) if (labels[i][j] & 1 << k) { int c = j * INTBITS + k; if (c == eolbyte) trans[c] = state_newline; else if (IS_WORD_CONSTITUENT(c)) trans[c] = state_letter; else if (c < NOTCHAR) trans[c] = state; } } for (i = 0; i < ngrps; ++i) free(grps[i].elems); free(follows.elems); free(tmp.elems); free(grps); free(labels); } /* Some routines for manipulating a compiled dfa's transition tables. Each state may or may not have a transition table; if it does, and it is a non-accepting state, then d->trans[state] points to its table. If it is an accepting state then d->fails[state] points to its table. If it has no table at all, then d->trans[state] is NULL. TODO: Improve this comment, get rid of the unnecessary redundancy. */ static void build_state (int s, struct dfa *d) { int *trans; /* The new transition table. */ int i; /* Set an upper limit on the number of transition tables that will ever exist at once. 1024 is arbitrary. The idea is that the frequently used transition tables will be quickly rebuilt, whereas the ones that were only needed once or twice will be cleared away. */ if (d->trcount >= 1024) { for (i = 0; i < d->tralloc; ++i) { free(d->trans[i]); free(d->fails[i]); d->trans[i] = d->fails[i] = NULL; } d->trcount = 0; } ++d->trcount; /* Set up the success bits for this state. */ d->success[s] = 0; 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, NOTCHAR); dfastate(s, d, trans); /* Now go through the new transition table, and make sure that the trans and fail arrays are allocated large enough to hold a pointer for the largest state mentioned in the table. */ for (i = 0; i < NOTCHAR; ++i) if (trans[i] >= d->tralloc) { int oldalloc = d->tralloc; while (trans[i] >= d->tralloc) d->tralloc *= 2; REALLOC(d->realtrans, d->tralloc + 1); d->trans = d->realtrans + 1; REALLOC(d->fails, d->tralloc); REALLOC(d->success, d->tralloc); REALLOC(d->newlines, d->tralloc); while (oldalloc < d->tralloc) { d->trans[oldalloc] = NULL; d->fails[oldalloc++] = NULL; } } /* Keep the newline transition in a special place so we can use it as a sentinel. */ d->newlines[s] = trans[eolbyte]; trans[eolbyte] = -1; if (ACCEPTING(s, *d)) d->fails[s] = trans; else d->trans[s] = trans; } static void build_state_zero (struct dfa *d) { d->tralloc = 1; d->trcount = 0; CALLOC(d->realtrans, d->tralloc + 1); d->trans = d->realtrans + 1; CALLOC(d->fails, d->tralloc); MALLOC(d->success, d->tralloc); MALLOC(d->newlines, d->tralloc); build_state(0, d); } /* Multibyte character handling sub-routines for dfaexec. */ /* Initial state may encounter the byte which is not a single byte character nor 1st byte of a multibyte character. But it is incorrect for initial state to accept such a byte. For example, in sjis encoding the regular expression like "\\" accepts the codepoint 0x5c, but should not accept the 2nd byte of the codepoint 0x815c. Then Initial state must skip the bytes which are not a single byte character nor 1st byte of a multibyte character. */ #define SKIP_REMAINS_MB_IF_INITIAL_STATE(s, p) \ if (s == 0) \ { \ while (inputwcs[p - buf_begin] == 0 \ && mblen_buf[p - buf_begin] > 0 \ && (unsigned char const *) p < buf_end) \ ++p; \ if ((char *) p >= end) \ { \ free(mblen_buf); \ free(inputwcs); \ *end = saved_end; \ return NULL; \ } \ } static void realloc_trans_if_necessary(struct dfa *d, int new_state) { /* Make sure that the trans and fail arrays are allocated large enough to hold a pointer for the new state. */ if (new_state >= d->tralloc) { int oldalloc = d->tralloc; while (new_state >= d->tralloc) d->tralloc *= 2; REALLOC(d->realtrans, d->tralloc + 1); d->trans = d->realtrans + 1; REALLOC(d->fails, d->tralloc); REALLOC(d->success, d->tralloc); REALLOC(d->newlines, d->tralloc); while (oldalloc < d->tralloc) { d->trans[oldalloc] = NULL; d->fails[oldalloc++] = NULL; } } } /* Return values of transit_state_singlebyte(), and transit_state_consume_1char. */ typedef enum { TRANSIT_STATE_IN_PROGRESS, /* State transition has not finished. */ TRANSIT_STATE_DONE, /* State transition has finished. */ TRANSIT_STATE_END_BUFFER /* Reach the end of the buffer. */ } status_transit_state; /* Consume a single byte and transit state from 's' to '*next_state'. This function is almost same as the state transition routin in dfaexec(). But state transition is done just once, otherwise matching succeed or reach the end of the buffer. */ static status_transit_state transit_state_singlebyte (struct dfa *d, int s, unsigned char const *p, int *next_state) { int *t; int works = s; status_transit_state rval = TRANSIT_STATE_IN_PROGRESS; while (rval == TRANSIT_STATE_IN_PROGRESS) { if ((t = d->trans[works]) != NULL) { works = t[*p]; rval = TRANSIT_STATE_DONE; if (works < 0) works = 0; } else if (works < 0) { if (p == buf_end) { /* At the moment, it must not happen. */ abort (); } works = 0; } else if (d->fails[works]) { works = d->fails[works][*p]; rval = TRANSIT_STATE_DONE; } else { build_state(works, d); } } *next_state = works; return rval; } /* 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 context; wchar_t wc; int mbclen; wc = inputwcs[idx]; mbclen = (mblen_buf[idx] == 0)? 1 : mblen_buf[idx]; /* Check syntax bits. */ if (wc == (wchar_t)eolbyte) { if (!(syntax_bits & RE_DOT_NEWLINE)) return 0; } else if (wc == (wchar_t)'\0') { if (syntax_bits & RE_DOT_NOT_NULL) return 0; } context = wchar_context(wc); if (!SUCCEEDS_IN_CONTEXT(pos.constraint, d->states[s].context, context)) return 0; return mbclen; } /* 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) { int i; int match; /* Flag which represent that matching succeed. */ int match_len; /* Length of the character (or collating element) with which this operator match. */ int op_len; /* Length of the operator. */ char buffer[128]; /* Pointer to the structure to which we are currently refering. */ struct mb_char_classes *work_mbc; int context; wchar_t wc; /* Current refering character. */ wc = inputwcs[idx]; /* Check syntax bits. */ if (wc == (wchar_t)eolbyte) { if (!(syntax_bits & RE_DOT_NEWLINE)) return 0; } else if (wc == (wchar_t)'\0') { if (syntax_bits & RE_DOT_NOT_NULL) return 0; } 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. */ work_mbc = &(d->mbcsets[(d->multibyte_prop[pos.index]) >> 2]); match = !work_mbc->invert; match_len = (mblen_buf[idx] == 0)? 1 : mblen_buf[idx]; /* Match in range 0-255? */ if (wc < NOTCHAR && work_mbc->cset != -1 && tstbit((unsigned char)wc, d->charclasses[work_mbc->cset])) goto charset_matched; /* match with a character class? */ for (i = 0; inch_classes; i++) { if (iswctype((wint_t)wc, work_mbc->ch_classes[i])) goto charset_matched; } strncpy(buffer, (char const *) buf_begin + idx, match_len); buffer[match_len] = '\0'; /* match with an equivalent class? */ for (i = 0; inequivs; i++) { op_len = strlen(work_mbc->equivs[i]); strncpy(buffer, (char const *) buf_begin + idx, op_len); buffer[op_len] = '\0'; if (strcoll(work_mbc->equivs[i], buffer) == 0) { match_len = op_len; goto charset_matched; } } /* match with a collating element? */ for (i = 0; incoll_elems; i++) { op_len = strlen(work_mbc->coll_elems[i]); strncpy(buffer, (char const *) buf_begin + idx, op_len); buffer[op_len] = '\0'; if (strcoll(work_mbc->coll_elems[i], buffer) == 0) { match_len = op_len; goto charset_matched; } } /* match with a range? */ for (i = 0; inranges; i++) { if (work_mbc->range_sts[i] <= wc && wc <= work_mbc->range_ends[i]) goto charset_matched; } /* match with a character? */ for (i = 0; inchars; i++) { if (wc == work_mbc->chars[i]) goto charset_matched; } match = !match; charset_matched: return match ? match_len : 0; } /* Check each of `d->states[s].mbps.elem' can match or not. Then return the array which corresponds to `d->states[s].mbps.elem' and each element of the array contains the amount of the bytes with which the element can match. `idx' is the index from the buf_begin, and it is the current position in the buffer. Caller MUST free the array which this function return. */ static int* check_matching_with_multibyte_ops (struct dfa *d, int s, int idx) { int i; int* rarray; 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]; switch(d->tokens[pos.index]) { case ANYCHAR: rarray[i] = match_anychar(d, s, pos, idx); break; case MBCSET: rarray[i] = match_mb_charset(d, s, pos, idx); break; default: break; /* cannot happen. */ } } return rarray; } /* Consume a single character and enumerate all of the positions which can be next position from the state `s'. `match_lens' is the input. It can be NULL, but it can also be the output of check_matching_with_multibyte_ops() for optimization. `mbclen' and `pps' are the output. `mbclen' is the length of the character consumed, and `pps' is the set this function enumerate. */ static status_transit_state transit_state_consume_1char (struct dfa *d, int s, unsigned char const **pp, int *match_lens, int *mbclen, position_set *pps) { int i, j; int s1, s2; int* work_mbls; status_transit_state rs = TRANSIT_STATE_DONE; /* Calculate the length of the (single/multi byte) character to which p points. */ *mbclen = (mblen_buf[*pp - buf_begin] == 0)? 1 : mblen_buf[*pp - buf_begin]; /* Calculate the state which can be reached from the state `s' by consuming `*mbclen' single bytes from the buffer. */ s1 = s; for (i = 0; i < *mbclen; i++) { s2 = s1; rs = transit_state_singlebyte(d, s2, (*pp)++, &s1); } /* Copy the positions contained by `s1' to the set `pps'. */ copy(&(d->states[s1].elems), pps); /* Check (inputed)match_lens, and initialize if it is NULL. */ if (match_lens == NULL && d->states[s].mbps.nelem != 0) work_mbls = check_matching_with_multibyte_ops(d, s, *pp - buf_begin); else work_mbls = match_lens; /* Add all of the positions which can be reached from `s' by consuming a single character. */ for (i = 0; i < d->states[s].mbps.nelem ; i++) { if (work_mbls[i] == *mbclen) for (j = 0; j < d->follows[d->states[s].mbps.elems[i].index].nelem; j++) insert(d->follows[d->states[s].mbps.elems[i].index].elems[j], pps); } if (match_lens == NULL && work_mbls != NULL) free(work_mbls); return rs; } /* Transit state from s, then return new state and update the pointer of the buffer. This function is for some operator which can match with a multi- byte character or a collating element (which may be multi characters). */ static int transit_state (struct dfa *d, int s, unsigned char const **pp) { int s1; int mbclen; /* The length of current input multibyte character. */ int maxlen = 0; int i, j; int *match_lens = NULL; int nelem = d->states[s].mbps.nelem; /* Just a alias. */ position_set follows; unsigned char const *p1 = *pp; wchar_t wc; if (nelem > 0) /* This state has (a) multibyte operator(s). We check whether each of them can match or not. */ { /* Note: caller must free the return value of this function. */ match_lens = check_matching_with_multibyte_ops(d, s, *pp - buf_begin); for (i = 0; i < nelem; i++) /* Search the operator which match the longest string, in this state. */ { if (match_lens[i] > maxlen) maxlen = match_lens[i]; } } if (nelem == 0 || maxlen == 0) /* This state has no multibyte operator which can match. We need to check only one single byte character. */ { status_transit_state rs; rs = transit_state_singlebyte(d, s, *pp, &s1); /* We must update the pointer if state transition succeeded. */ if (rs == TRANSIT_STATE_DONE) ++*pp; free(match_lens); return s1; } /* This state has some operators which can match a multibyte character. */ 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. We enumerate all of the positions which `s' can reach by consuming `maxlen' bytes. */ transit_state_consume_1char(d, s, pp, match_lens, &mbclen, &follows); wc = inputwcs[*pp - mbclen - buf_begin]; s1 = state_index(d, &follows, wchar_context (wc)); realloc_trans_if_necessary(d, s1); while (*pp - p1 < maxlen) { transit_state_consume_1char(d, s1, pp, NULL, &mbclen, &follows); for (i = 0; i < nelem ; i++) { if (match_lens[i] == *pp - p1) for (j = 0; j < d->follows[d->states[s1].mbps.elems[i].index].nelem; j++) insert(d->follows[d->states[s1].mbps.elems[i].index].elems[j], &follows); } wc = inputwcs[*pp - mbclen - buf_begin]; s1 = state_index(d, &follows, wchar_context (wc)); realloc_trans_if_necessary(d, s1); } free(match_lens); free(follows.elems); 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 buffer, and the shortest possible version thereof. Return a pointer to the first character after the match, or NULL if none is found. BEGIN 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 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 allow_nl, int *count, int *backref) { 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. */ unsigned char saved_end; if (! d->tralloc) build_state_zero(d); s = s1 = 0; p = (unsigned char const *) begin; trans = d->trans; saved_end = *(unsigned char *) end; *end = eol; if (d->mb_cur_max > 1) { MALLOC(mblen_buf, end - begin + 2); MALLOC(inputwcs, end - begin + 2); memset(&mbs, 0, sizeof(mbstate_t)); prepare_wc_buf ((const char *) p, end); } for (;;) { if (d->mb_cur_max > 1) while ((t = trans[s]) != NULL) { if (p > buf_end) break; s1 = s; SKIP_REMAINS_MB_IF_INITIAL_STATE(s, p); if (d->states[s].mbps.nelem == 0) { s = t[*p++]; 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 { 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++]; } } if (s >= 0 && (char *) p <= end && d->fails[s]) { if (d->success[s] & sbit[*p]) { if (backref) *backref = (d->states[s].backref != 0); if (d->mb_cur_max > 1) { free(mblen_buf); free(inputwcs); } *end = saved_end; return (char *) p; } s1 = s; if (d->mb_cur_max > 1) { /* Can match with a multibyte character (and multicharacter collating element). Transition table might be updated. */ s = transit_state(d, s, &p); trans = d->trans; } else s = d->fails[s][*p++]; continue; } /* If the previous character was a newline, count it. */ 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 (d->mb_cur_max > 1) { free(mblen_buf); free(inputwcs); } *end = saved_end; return NULL; } if (s >= 0) { build_state(s, d); trans = d->trans; continue; } if (p[-1] == eol && allow_nl) { s = d->newlines[s1]; continue; } s = 0; } } static void free_mbdata (struct dfa *d) { unsigned int i; free(d->multibyte_prop); d->multibyte_prop = NULL; for (i = 0; i < d->nmbcsets; ++i) { unsigned int j; struct mb_char_classes *p = &(d->mbcsets[i]); free(p->chars); free(p->ch_classes); free(p->range_sts); free(p->range_ends); for (j = 0; j < p->nequivs; ++j) free(p->equivs[j]); free(p->equivs); for (j = 0; j < p->ncoll_elems; ++j) free(p->coll_elems[j]); free(p->coll_elems); } free(d->mbcsets); d->mbcsets = NULL; d->nmbcsets = 0; } /* Initialize the components of a dfa that the other routines don't initialize for themselves. */ void dfainit (struct dfa *d) { memset (d, 0, sizeof *d); d->calloc = 1; MALLOC(d->charclasses, d->calloc); d->talloc = 1; MALLOC(d->tokens, d->talloc); d->mb_cur_max = MB_CUR_MAX; if (d->mb_cur_max > 1) { d->nmultibyte_prop = 1; MALLOC(d->multibyte_prop, d->nmultibyte_prop); d->mbcsets_alloc = 1; MALLOC(d->mbcsets, d->mbcsets_alloc); } } static void dfaoptimize (struct dfa *d) { unsigned int i; if (!MBS_SUPPORT || !using_utf8()) return; for (i = 0; i < d->tindex; ++i) { switch(d->tokens[i]) { case ANYCHAR: /* Lowered. */ abort (); case MBCSET: /* Requires multi-byte algorithm. */ return; default: break; } } free_mbdata (d); d->mb_cur_max = 1; } /* Parse and analyze a single string of the given length. */ void dfacomp (char const *s, size_t len, struct dfa *d, int searchflag) { dfainit(d); dfaparse(s, len, d); dfamust(d); dfaoptimize(d); dfaanalyze(d, searchflag); } /* Free the storage held by the components of a dfa. */ void dfafree (struct dfa *d) { int i; struct dfamust *dm, *ndm; free(d->charclasses); free(d->tokens); if (d->mb_cur_max > 1) free_mbdata(d); for (i = 0; i < d->sindex; ++i) { free(d->states[i].elems.elems); if (MBS_SUPPORT) free(d->states[i].mbps.elems); } free(d->states); for (i = 0; i < d->tindex; ++i) free(d->follows[i].elems); free(d->follows); for (i = 0; i < d->tralloc; ++i) { free(d->trans[i]); free(d->fails[i]); } free(d->realtrans); free(d->fails); free(d->newlines); free(d->success); for (dm = d->musts; dm; dm = ndm) { ndm = dm->next; free(dm->must); free(dm); } } /* Having found the postfix representation of the regular expression, try to find a long sequence of characters that must appear in any line containing the r.e. Finding a "longest" sequence is beyond the scope here; we take an easy way out and hope for the best. (Take "(ab|a)b"--please.) We do a bottom-up calculation of sequences of characters that must appear in matches of r.e.'s represented by trees rooted at the nodes of the postfix representation: sequences that must appear at the left of the match ("left") sequences that must appear at the right of the match ("right") lists of sequences that must appear somewhere in the match ("in") sequences that must constitute the match ("is") When we get to the root of the tree, we use one of the longest of its calculated "in" sequences as our answer. The sequence we find is returned in d->must (where "d" is the single argument passed to "dfamust"); the length of the sequence is returned in d->mustn. The sequences calculated for the various types of node (in pseudo ANSI c) are shown below. "p" is the operand of unary operators (and the left-hand operand of binary operators); "q" is the right-hand operand of binary operators. "ZERO" means "a zero-length sequence" below. Type left right is in ---- ---- ----- -- -- char c # c # c # c # c ANYCHAR ZERO ZERO ZERO ZERO MBCSET ZERO ZERO ZERO ZERO CSET ZERO ZERO ZERO ZERO STAR ZERO ZERO ZERO ZERO QMARK ZERO ZERO ZERO ZERO PLUS p->left p->right ZERO p->in CAT (p->is==ZERO)? (q->is==ZERO)? (p->is!=ZERO && p->in plus p->left : q->right : q->is!=ZERO) ? q->in plus p->is##q->left p->right##q->is p->is##q->is : p->right##q->left ZERO OR longest common longest common (do p->is and substrings common to leading trailing q->is have same p->in and q->in (sub)sequence (sub)sequence length and of p->left of p->right content) ? and q->left and q->right p->is : NULL If there's anything else we recognize in the tree, all four sequences get set to zero-length sequences. If there's something we don't recognize in the tree, we just return a zero-length sequence. Break ties in favor of infrequent letters (choosing 'zzz' in preference to 'aaa')? And. . .is it here or someplace that we might ponder "optimizations" such as egrep 'psi|epsilon' -> egrep 'psi' egrep 'pepsi|epsilon' -> egrep 'epsi' (Yes, we now find "epsi" as a "string that must occur", but we might also simplify the *entire* r.e. being sought) grep '[c]' -> grep 'c' grep '(ab|a)b' -> grep 'ab' grep 'ab*' -> grep 'a' grep 'a*b' -> grep 'b' There are several issues: Is optimization easy (enough)? Does optimization actually accomplish anything, or is the automaton you get from "psi|epsilon" (for example) the same as the one you get from "psi" (for example)? Are optimizable r.e.'s likely to be used in real-life situations (something like 'ab*' is probably unlikely; something like is 'psi|epsilon' is likelier)? */ static char * icatalloc (char *old, char const *new) { char *result; 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; } static char * icpyalloc (char const *string) { return icatalloc (NULL, string); } static char * _GL_ATTRIBUTE_PURE istrstr (char const *lookin, char const *lookfor) { char const *cp; size_t len; len = strlen(lookfor); for (cp = lookin; *cp != '\0'; ++cp) if (strncmp(cp, lookfor, len) == 0) return (char *) cp; return NULL; } static void freelist (char **cpp) { int i; if (cpp == NULL) return; for (i = 0; cpp[i] != NULL; ++i) { free(cpp[i]); cpp[i] = NULL; } } static char ** enlist (char **cpp, char *new, size_t len) { int i, j; if (cpp == NULL) return NULL; if ((new = icpyalloc(new)) == NULL) { freelist(cpp); return NULL; } new[len] = '\0'; /* Is there already something in the list that's new (or longer)? */ for (i = 0; cpp[i] != NULL; ++i) if (istrstr(cpp[i], new) != NULL) { free(new); return cpp; } /* Eliminate any obsoleted strings. */ j = 0; while (cpp[j] != NULL) if (istrstr(new, cpp[j]) == NULL) ++j; else { free(cpp[j]); if (--i == j) break; cpp[j] = cpp[i]; cpp[i] = NULL; } /* Add the new string. */ REALLOC(cpp, i + 2); cpp[i] = new; cpp[i + 1] = NULL; return cpp; } /* Given pointers to two strings, return a pointer to an allocated list of their distinct common substrings. Return NULL if something seems wild. */ static char ** comsubs (char *left, char const *right) { char **cpp; char *lcp; char *rcp; size_t i, len; if (left == NULL || right == NULL) return NULL; cpp = malloc(sizeof *cpp); if (cpp == NULL) return NULL; cpp[0] = NULL; for (lcp = left; *lcp != '\0'; ++lcp) { len = 0; rcp = strchr (right, *lcp); while (rcp != NULL) { for (i = 1; lcp[i] != '\0' && lcp[i] == rcp[i]; ++i) continue; if (i > len) len = i; rcp = strchr (rcp + 1, *lcp); } if (len == 0) continue; { char **p = enlist (cpp, lcp, len); if (p == NULL) { freelist (cpp); cpp = NULL; break; } cpp = p; } } return cpp; } static char ** addlists (char **old, char **new) { int i; if (old == NULL || new == NULL) return NULL; for (i = 0; new[i] != NULL; ++i) { old = enlist(old, new[i], strlen(new[i])); if (old == NULL) break; } return old; } /* Given two lists of substrings, return a new list giving substrings common to both. */ static char ** inboth (char **left, char **right) { char **both; char **temp; int lnum, rnum; if (left == NULL || right == NULL) return NULL; both = malloc(sizeof *both); if (both == NULL) return NULL; both[0] = NULL; for (lnum = 0; left[lnum] != NULL; ++lnum) { for (rnum = 0; right[rnum] != NULL; ++rnum) { temp = comsubs(left[lnum], right[rnum]); if (temp == NULL) { freelist(both); return NULL; } both = addlists(both, temp); freelist(temp); free(temp); if (both == NULL) return NULL; } } return both; } typedef struct { char **in; char *left; char *right; char *is; } must; static void resetmust (must *mp) { mp->left[0] = mp->right[0] = mp->is[0] = '\0'; freelist(mp->in); } static void dfamust (struct dfa *d) { must *musts; must *mp; char *result; int ri; int i; int exact; token t; static must must0; struct dfamust *dm; static char empty_string[] = ""; result = empty_string; exact = 0; 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 = 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; } #ifdef DEBUG fprintf(stderr, "dfamust:\n"); for (i = 0; i < d->tindex; ++i) { fprintf(stderr, " %d:", i); prtok(d->tokens[i]); } putc('\n', stderr); #endif for (ri = 0; ri < d->tindex; ++ri) { switch (t = d->tokens[ri]) { case LPAREN: case RPAREN: assert (!"neither LPAREN nor RPAREN may appear here"); case EMPTY: case BEGLINE: case ENDLINE: case BEGWORD: case ENDWORD: case LIMWORD: case NOTLIMWORD: case BACKREF: resetmust(mp); break; case STAR: case QMARK: assert (musts < mp); --mp; resetmust(mp); break; case OR: assert (&musts[2] <= mp); { char **new; must *lmp; must *rmp; int j, ln, rn, n; rmp = --mp; lmp = --mp; /* Guaranteed to be. Unlikely, but. . . */ if (!STREQ (lmp->is, rmp->is)) lmp->is[0] = '\0'; /* Left side--easy */ i = 0; while (lmp->left[i] != '\0' && lmp->left[i] == rmp->left[i]) ++i; lmp->left[i] = '\0'; /* Right side */ ln = strlen(lmp->right); rn = strlen(rmp->right); n = ln; if (n > rn) n = rn; for (i = 0; i < n; ++i) if (lmp->right[ln - i - 1] != rmp->right[rn - i - 1]) break; for (j = 0; j < i; ++j) lmp->right[j] = lmp->right[(ln - i) + j]; lmp->right[j] = '\0'; new = inboth(lmp->in, rmp->in); if (new == NULL) goto done; freelist(lmp->in); free(lmp->in); lmp->in = new; } break; case PLUS: assert (musts < mp); --mp; mp->is[0] = '\0'; break; case END: assert (mp == &musts[1]); for (i = 0; musts[0].in[i] != NULL; ++i) if (strlen(musts[0].in[i]) > strlen(result)) result = musts[0].in[i]; if (STREQ (result, musts[0].is)) exact = 1; goto done; case CAT: assert (&musts[2] <= mp); { must *lmp; must *rmp; rmp = --mp; lmp = --mp; /* In. Everything in left, plus everything in right, plus catenation of left's right and right's left. */ lmp->in = addlists(lmp->in, rmp->in); if (lmp->in == NULL) goto done; if (lmp->right[0] != '\0' && rmp->left[0] != '\0') { char *tp; tp = icpyalloc(lmp->right); tp = icatalloc(tp, rmp->left); lmp->in = enlist(lmp->in, tp, strlen(tp)); free(tp); if (lmp->in == NULL) goto done; } /* Left-hand */ if (lmp->is[0] != '\0') { lmp->left = icatalloc(lmp->left, rmp->left); if (lmp->left == NULL) goto done; } /* Right-hand */ if (rmp->is[0] == '\0') lmp->right[0] = '\0'; lmp->right = icatalloc(lmp->right, rmp->right); if (lmp->right == NULL) goto done; /* Guaranteed to be */ if (lmp->is[0] != '\0' && rmp->is[0] != '\0') { lmp->is = icatalloc(lmp->is, rmp->is); if (lmp->is == NULL) goto done; } else lmp->is[0] = '\0'; } break; default: if (t < END) { assert (!"oops! t >= END"); } else if (t == '\0') { /* not on *my* shift */ goto done; } else if (t >= CSET || !MBS_SUPPORT || t == ANYCHAR || t == MBCSET ) { /* easy enough */ resetmust(mp); } else { /* plain character */ resetmust(mp); mp->is[0] = mp->left[0] = mp->right[0] = t; mp->is[1] = mp->left[1] = mp->right[1] = '\0'; mp->in = enlist(mp->in, mp->is, (size_t)1); if (mp->in == NULL) goto done; } break; } #ifdef DEBUG fprintf(stderr, " node: %d:", ri); prtok(d->tokens[ri]); fprintf(stderr, "\n in:"); for (i = 0; mp->in[i]; ++i) fprintf(stderr, " \"%s\"", mp->in[i]); fprintf(stderr, "\n is: \"%s\"\n", mp->is); fprintf(stderr, " left: \"%s\"\n", mp->left); fprintf(stderr, " right: \"%s\"\n", mp->right); #endif ++mp; } done: if (strlen(result)) { MALLOC(dm, 1); dm->exact = exact; MALLOC(dm->must, strlen(result) + 1); strcpy(dm->must, result); dm->next = d->musts; d->musts = dm; } mp = musts; for (i = 0; i <= d->tindex; ++i) { freelist(mp[i].in); free(mp[i].in); free(mp[i].left); free(mp[i].right); free(mp[i].is); } free(mp); } struct dfa * dfaalloc (void) { return xmalloc (sizeof (struct dfa)); } struct dfamust * _GL_ATTRIBUTE_PURE dfamusts (struct dfa const *d) { return d->musts; } /* vim:set shiftwidth=2: */ gawk-4.0.1+dfsg.orig/msg.c0000644000175000017500000000613211734665352014315 0ustar schotschot/* * msg.c - routines for error messages. */ /* * 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. * * 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, 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 "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 */ void err(const char *s, const char *emsg, va_list argp) { char *file; const char *me; (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 (source != NULL) (void) fprintf(stderr, "%s:", source); else (void) fprintf(stderr, _("cmd. line:")); (void) fprintf(stderr, "%d: ", sourceline); } if (FNR > 0) { file = FILENAME_node->var_value->stptr; (void) putc('(', stderr); if (file) (void) fprintf(stderr, "FILENAME=%s ", file); (void) fprintf(stderr, "FNR=%ld) ", FNR); } (void) fprintf(stderr, "%s", s); vfprintf(stderr, emsg, argp); (void) fprintf(stderr, "\n"); (void) fflush(stderr); } /* msg --- take a varargs error message and print it */ void msg(const char *mesg, ...) { va_list args; va_start(args, mesg); err("", mesg, args); va_end(args); } /* warning --- print a warning message */ void warning(const char *mesg, ...) { va_list args; va_start(args, mesg); err(_("warning: "), mesg, args); va_end(args); } void error(const char *mesg, ...) { va_list args; va_start(args, mesg); err(_("error: "), mesg, args); va_end(args); } /* set_loc --- set location where a fatal error happened */ void set_loc(const char *file, int line) { srcfile = file; srcline = line; /* This stupid line keeps some compilers happy: */ file = srcfile; line = srcline; } /* r_fatal --- print a fatal error message */ void r_fatal(const char *mesg, ...) { va_list args; va_start(args, mesg); err(_("fatal: "), mesg, args); va_end(args); #ifdef GAWKDEBUG abort(); #endif 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); } gawk-4.0.1+dfsg.orig/profile.c0000644000175000017500000007324511734665352015200 0ustar schotschot/* * profile.c - gawk bytecode pretty-printer with counts */ /* * Copyright (C) 1999-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 */ #include "awk.h" 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(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; #define SPACEOVER 0 /* init_profiling --- do needed initializations, see also main.c */ void init_profiling(int *flag ATTRIBUTE_UNUSED, const char *def_file ATTRIBUTE_UNUSED) { #ifdef PROFILING if (*flag == FALSE) { *flag = TRUE; set_prof_file(def_file); } #endif } /* set_prof_file --- set the output file for profiling */ void 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"), file, strerror(errno)); warning(_("sending profile to standard error")); prof_fp = stderr; } } /* init_profiling_signals --- set up signal handling for pgawk */ void init_profiling_signals() { #ifdef PROFILING #ifdef __DJGPP__ signal(SIGINT, dump_and_exit); signal(SIGQUIT, just_dump); #else /* !__DJGPP__ */ #ifdef SIGHUP signal(SIGHUP, dump_and_exit); #endif #ifdef SIGUSR1 signal(SIGUSR1, just_dump); #endif #endif /* !__DJGPP__ */ #endif /* PROFILING */ } /* indent --- print out enough tabs */ static void indent(long count) { int i; if (count == 0) fprintf(prof_fp, "\t"); else fprintf(prof_fp, "%6ld ", count); assert(indent_level >= 0); for (i = 0; i < indent_level; i++) fprintf(prof_fp, "\t"); } /* indent_in --- increase the level, with error checking */ static void indent_in(void) { assert(indent_level >= 0); indent_level++; } /* indent_out --- decrease the level, with error checking */ static void indent_out(void) { indent_level--; assert(indent_level >= 0); } static void pp_push(int type, char *s, int flag) { 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; } static NODE * pp_pop() { NODE *n; n = pp_stack; pp_stack = n->hnext; return n; } static void pp_free(NODE *n) { if ((n->flags & CAN_FREE) != 0) efree(n->pp_str); freenode(n); } /* * pprint --- pretty print a program segment */ static void pprint(INSTRUCTION *startp, INSTRUCTION *endp, int in_for_header) { 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; 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; default: cant_happen(); } 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: break; } break; 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; 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; 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; 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; 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 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; 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; 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; 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; 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; 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); } 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; 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; 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; 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; case Op_exec_count: if (! in_for_header) indent(pc->exec_count); break; default: cant_happen(); } if (pc == endp) break; } } /* 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(Func_print print_func, FILE *fp, const char *in_str, size_t len, int delim, int breaklines) { char *s = pp_string(in_str, len, delim); int count; size_t slen; const char *str = (const char *) s; #define BREAKPOINT 70 /* arbitrary */ 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 print_func(fp, "%c", *str); } efree(s); } #ifdef PROFILING /* just_dump --- dump the profile and function stack and keep going */ static RETSIGTYPE just_dump(int signum) { extern INSTRUCTION *code_block; dump_prog(code_block); dump_funcs(); dump_fcall_stack(prof_fp); fflush(prof_fp); signal(signum, just_dump); /* for OLD Unix systems ... */ } /* dump_and_exit --- dump the profile, the function stack, and exit */ static RETSIGTYPE dump_and_exit(int signum) { just_dump(signum); exit(EXIT_FAILURE); } #endif /* dump_prog --- dump the program */ /* * XXX: I am not sure it is right to have the strings in the dump * be translated, but I'll leave it alone for now. */ void 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)); pprint(code, NULL, FALSE); } /* prec_level --- return the precedence of an operator, for paren tests */ static int prec_level(int type) { switch (type) { 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 Op_field_spec: case Op_field_spec_lhs: return 14; case Op_exp: case Op_exp_i: return 13; case Op_preincrement: case Op_predecrement: case Op_postincrement: case Op_postdecrement: return 12; case Op_unary_minus: case Op_not: return 11; case Op_times: case Op_times_i: case Op_quotient: case Op_quotient_i: case Op_mod: case Op_mod_i: return 10; case Op_plus: case Op_plus_i: case Op_minus: case Op_minus_i: return 9; case Op_concat: case Op_assign_concat: return 8; case Op_equal: case Op_notequal: case Op_greater: case Op_leq: case Op_geq: case Op_match: case Op_nomatch: return 7; case Op_K_getline: case Op_K_getline_redir: return 6; case Op_less: return 5; case Op_in_array: return 5; case Op_and: return 4; case Op_or: return 3; case Op_cond_exp: return 2; 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: 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 --- parenthesize an expression in stack */ static void pp_parenthesize(NODE *sp) { char *p = sp->pp_str; size_t len = sp->pp_len; 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; } 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); 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); } } /* pp_string --- pretty format a string or regex constant */ char * pp_string(const char *in_str, size_t len, int delim) { 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; assert(delim == '"' || delim == '/'); if (delim == '/') { escapes = re_escapes; printables = re_printables; } else { escapes = str_escapes; printables = str_printables; } /* 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_number --- pretty format a number */ char * pp_number(AWKNUM d) { #define PP_PRECISION 6 char *str; 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; } /* pp_func --- pretty print a function */ int pp_func(INSTRUCTION *pc, void *data ATTRIBUTE_UNUSED) { int j; char **pnames; NODE *f; static int first = TRUE; int pcount; 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; } /* redir2str --- convert a redirection type into a printable value */ const char * redir2str(int redirtype) { 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]; } gawk-4.0.1+dfsg.orig/builtin.c0000644000175000017500000023123211734666217015177 0ustar schotschot/* * builtin.c - Builtin functions and various utility procedures. */ /* * 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. * * 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 "awk.h" #if defined(HAVE_FCNTL_H) #include #endif #include #include "random.h" #include "floatmagic.h" #if defined(HAVE_POPEN_H) #include "popen.h" #endif #ifndef CHAR_BIT # define CHAR_BIT 8 #endif /* The extra casts work around common compiler bugs. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* The outer cast is needed to work around a bug in Cray C 5.0.3.0. It is necessary at least when t == time_t. */ #define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \ ? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)) #define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t))) #ifndef INTMAX_MIN # define INTMAX_MIN TYPE_MINIMUM (intmax_t) #endif #ifndef UINTMAX_MAX # define UINTMAX_MAX TYPE_MAXIMUM (uintmax_t) #endif #ifndef SIZE_MAX /* C99 constant, can't rely on it everywhere */ #define SIZE_MAX ((size_t) -1) #endif #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; #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 /* * Since we supply the version of random(), we know what * value to use here. */ #define GAWK_RANDOM_MAX 0x7fffffffL 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 */ static void efwrite(const void *ptr, size_t size, size_t count, FILE *fp, const char *from, struct redirect *rp, int flush) { errno = 0; if (fwrite(ptr, size, count, fp) != count) goto wrerror; if (flush && ((fp == stdout && output_is_tty) || (rp != NULL && (rp->flag & RED_NOBUF)))) { fflush(fp); if (ferror(fp)) goto wrerror; } return; wrerror: fatal(_("%s to \"%s\" failed (%s)"), from, rp ? rp->value : _("standard output"), errno ? strerror(errno) : _("reason unknown")); } /* do_exp --- exponential function */ NODE * do_exp(int nargs) { NODE *tmp; double d, res; tmp = POP_SCALAR(); if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("exp: received non-numeric argument")); d = force_number(tmp); DEREF(tmp); errno = 0; res = exp(d); if (errno == ERANGE) warning(_("exp: argument %g is out of range"), d); return make_number((AWKNUM) res); } /* stdfile --- return fp for a standard file */ /* * This function allows `fflush("/dev/stdout")' to work. * The other files will be available via getredirect(). * /dev/stdin is not included, since fflush is only for output. */ static FILE * stdfile(const char *name, size_t len) { if (len == 11) { if (strncmp(name, "/dev/stderr", 11) == 0) return stderr; else if (strncmp(name, "/dev/stdout", 11) == 0) return stdout; } return NULL; } /* do_fflush --- flush output, either named file or pipe or everything */ NODE * do_fflush(int nargs) { struct redirect *rp; NODE *tmp; FILE *fp; int status = 0; const char *file; /* fflush() --- flush stdout */ if (nargs == 0) { if (output_fp != stdout) (void) fflush(output_fp); status = fflush(stdout); return make_number((AWKNUM) status); } tmp = POP_STRING(); file = tmp->stptr; /* fflush("") --- flush all */ if (tmp->stlen == 0) { status = flush_io(); DEREF(tmp); return make_number((AWKNUM) status); } rp = getredirect(tmp->stptr, tmp->stlen); status = -1; if (rp != NULL) { if ((rp->flag & (RED_WRITE|RED_APPEND)) == 0) { if (rp->flag & RED_PIPE) warning(_("fflush: cannot flush: pipe `%s' opened for reading, not writing"), file); else warning(_("fflush: cannot flush: file `%s' opened for reading, not writing"), file); DEREF(tmp); return make_number((AWKNUM) status); } fp = rp->fp; if (fp != NULL) status = fflush(fp); } else if ((fp = stdfile(tmp->stptr, tmp->stlen)) != NULL) { status = fflush(fp); } else { status = -1; warning(_("fflush: `%s' is not an open file, pipe or co-process"), file); } DEREF(tmp); return make_number((AWKNUM) status); } #if MBS_SUPPORT /* strncasecmpmbs --- like strncasecmp (multibyte string version) */ int strncasecmpmbs(const unsigned char *s1, const unsigned char *s2, size_t n) { 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) { if (is_valid_character(s1[i1])) { mbclen1 = 1; 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]); } } if (is_valid_character(s2[i2])) { mbclen2 = 1; 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. */ return gap; } /* s1 and s2 are equivalent. */ return 0; } /* Inspect the buffer `src' and write the index of each byte to `dest'. Caller must allocate `dest'. e.g. str = , , a, b, , , , c where mb(i) means the `i'-th byte of a multibyte character. dest = 1, 2, 1, 1, 1, 2, 3. 1 */ static void index_multibyte_buffer(char* src, char* dest, int len) { int idx, prev_idx; mbstate_t mbs, prevs; 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); if (mbclen == (size_t) -1 || mbclen == 1 || mbclen == 0) { /* singlebyte character. */ mbclen = 1; prev_idx = idx + 1; } else if (mbclen == (size_t) -2) { /* a part of a multibyte character. */ mbclen = idx - prev_idx + 1; } else if (mbclen > 1) { /* the end of a multibyte character. */ prev_idx = idx + 1; prevs = mbs; } else { /* Can't reach. */ } dest[idx] = mbclen; } } #else /* a dummy function */ static void index_multibyte_buffer(char* src ATTRIBUTE_UNUSED, char* dest ATTRIBUTE_UNUSED, int len ATTRIBUTE_UNUSED) { cant_happen(); } #endif /* do_index --- find index of a string */ NODE * do_index(int nargs) { NODE *s1, *s2; 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); if (do_lint) { if ((s1->flags & (STRING|STRCUR)) == 0) lintwarn(_("index: received non-string first argument")); if ((s2->flags & (STRING|STRCUR)) == 0) lintwarn(_("index: received non-string second argument")); } force_string(s1); force_string(s2); p1 = s1->stptr; p2 = s2->stptr; l1 = s1->stlen; l2 = s2->stlen; ret = 0; /* * Icky special case, index(foo, "") should return 1, * since both bwk awk and mawk do, and since match("foo", "") * returns 1. This makes index("", "") work, too, fwiw. */ if (l2 == 0) { ret = 1; goto out; } #if MBS_SUPPORT if (gawk_mb_cur_max > 1) { s1 = force_wstring(s1); s2 = force_wstring(s2); /* * If we don't have valid wide character strings, use * the real bytes. */ do_single_byte = ((s1->wstlen == 0 && s1->stlen > 0) || (s2->wstlen == 0 && s2->stlen > 0)); } #endif /* IGNORECASE will already be false if posix */ if (IGNORECASE) { while (l1 > 0) { if (l2 > l1) break; #if MBS_SUPPORT if (! do_single_byte && gawk_mb_cur_max > 1) { const wchar_t *pos; pos = wcasestrstr(s1->wstptr, s1->wstlen, s2->wstptr, s2->wstlen); if (pos == NULL) ret = 0; else ret = pos - s1->wstptr + 1; /* 1-based */ goto out; } else { #endif /* * 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)) { ret = 1 + s1->stlen - l1; break; } l1--; p1++; #if MBS_SUPPORT } #endif } } else { while (l1 > 0) { if (l2 > l1) break; if (*p1 == *p2 && (l2 == 1 || (l2 > 0 && memcmp(p1, p2, l2) == 0))) { ret = 1 + s1->stlen - l1; break; } #if MBS_SUPPORT if (! do_single_byte && gawk_mb_cur_max > 1) { const wchar_t *pos; pos = wstrstr(s1->wstptr, s1->wstlen, s2->wstptr, s2->wstlen); if (pos == NULL) ret = 0; else ret = pos - s1->wstptr + 1; /* 1-based */ goto out; } else { l1--; p1++; } #else l1--; p1++; #endif } } out: DEREF(s1); DEREF(s2); return make_number((AWKNUM) ret); } /* double_to_int --- convert double to int, used several places */ double double_to_int(double d) { if (d >= 0) d = Floor(d); else d = Ceil(d); return d; } /* do_int --- convert double to int for awk */ NODE * do_int(int nargs) { NODE *tmp; double d; 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); 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, array or $0 */ NODE * do_length(int nargs) { NODE *tmp; size_t len; tmp = POP(); if (tmp->type == Node_var_array) { static short warned = FALSE; if (do_posix) fatal(_("length: received array argument")); if (do_lint && ! warned) { warned = TRUE; lintwarn(_("`length(array)' is a gawk extension")); } return make_number((AWKNUM) tmp->table_size); } assert(tmp->type == Node_val); if (do_lint && (tmp->flags & (STRING|STRCUR)) == 0) lintwarn(_("length: received non-string argument")); (void) force_string(tmp); #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; DEREF(tmp); return make_number((AWKNUM) len); } /* do_log --- the log function */ NODE * do_log(int nargs) { NODE *tmp; double d, arg; 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); DEREF(tmp); return make_number((AWKNUM) d); } /* * 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. * * It is one of the uglier parts of gawk. Thanks to Michal Jaegermann * for taming this beast and making it compatible with ANSI C. */ NODE * format_tree( const char *fmt_string, size_t n0, NODE **the_args, long num_args) { /* copy 'l' bytes from 's' to 'obufout' checking for space in the process */ /* difference of pointers should be of ptrdiff_t type, but let us be kind */ #define bchunk(s, l) if (l) { \ while ((l) > ofre) { \ size_t olen = obufout - obuf; \ erealloc(obuf, char *, osiz * 2, "format_tree"); \ ofre += osiz; \ osiz *= 2; \ obufout = obuf + olen; \ } \ memcpy(obufout, s, (size_t) (l)); \ obufout += (l); \ ofre -= (l); \ } /* copy one byte from 's' to 'obufout' checking for space in the process */ #define bchunk_one(s) { \ if (ofre < 1) { \ size_t olen = obufout - obuf; \ erealloc(obuf, char *, osiz * 2, "format_tree"); \ ofre += osiz; \ osiz *= 2; \ obufout = obuf + olen; \ } \ *obufout++ = *s; \ --ofre; \ } /* Is there space for something L big in the buffer? */ #define chksize(l) if ((l) >= ofre) { \ size_t olen = obufout - obuf; \ size_t delta = osiz+l-ofre; \ erealloc(obuf, char *, osiz + delta, "format_tree"); \ obufout = obuf + olen; \ ofre += delta; \ osiz += delta; \ } size_t cur_arg = 0; NODE *r = NULL; int i; int toofew = FALSE; char *obuf, *obufout; size_t osiz, ofre; const char *chbuf; const char *s0, *s1; int cs1; NODE *arg; long fw, prec, argnum; int used_dollar; int lj, alt, big_flag, bigbig_flag, small_flag, have_prec, need_format; long *cur = NULL; uintmax_t uval; int sgn; int base; /* * Although this is an array, the elements serve two different * purposes. The first element is the general buffer meant * to hold the entire result string. The second one is a * temporary buffer for large floating point values. They * could just as easily be separate variables, and the * code might arguably be clearer. */ struct { char *buf; size_t bufsize; char stackbuf[30]; } cpbufs[2]; #define cpbuf cpbufs[0].buf char *cend = &cpbufs[0].stackbuf[sizeof(cpbufs[0].stackbuf)]; char *cp; const char *fill; AWKNUM tmpval; char signchar = FALSE; size_t len; int zero_flag = FALSE; int quote_flag = FALSE; int ii, jj; char *chp; size_t copy_count, char_count; static const char sp[] = " "; static const char zero_string[] = "0"; static const char lchbuf[] = "0123456789abcdef"; static const char Uchbuf[] = "0123456789ABCDEF"; #define INITIAL_OUT_SIZE 512 emalloc(obuf, char *, INITIAL_OUT_SIZE, "format_tree"); obufout = obuf; osiz = INITIAL_OUT_SIZE; ofre = osiz - 2; cur_arg = 1; { size_t k; for (k = 0; k < sizeof(cpbufs)/sizeof(cpbufs[0]); k++) { cpbufs[k].bufsize = sizeof(cpbufs[k].stackbuf); cpbufs[k].buf = cpbufs[k].stackbuf; } } /* * The point of this goop is to grow the buffer * holding the converted number, so that large * values don't overflow a fixed length buffer. */ #define PREPEND(CH) do { \ if (cp == cpbufs[0].buf) { \ char *prev = cpbufs[0].buf; \ emalloc(cpbufs[0].buf, char *, 2*cpbufs[0].bufsize, \ "format_tree"); \ memcpy((cp = cpbufs[0].buf+cpbufs[0].bufsize), prev, \ cpbufs[0].bufsize); \ cpbufs[0].bufsize *= 2; \ if (prev != cpbufs[0].stackbuf) \ efree(prev); \ cend = cpbufs[0].buf+cpbufs[0].bufsize; \ } \ *--cp = (CH); \ } while(0) /* * Check first for use of `count$'. * If plain argument retrieval was used earlier, choke. * Otherwise, return the requested argument. * If not `count$' now, but it was used earlier, choke. * If this format is more than total number of args, choke. * Otherwise, return the current argument. */ #define parse_next_arg() { \ if (argnum > 0) { \ if (cur_arg > 1) { \ msg(_("fatal: must use `count$' on all formats or none")); \ goto out; \ } \ arg = the_args[argnum]; \ } else if (used_dollar) { \ 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; \ break; \ } else { \ arg = the_args[cur_arg]; \ cur_arg++; \ } \ } need_format = FALSE; used_dollar = FALSE; s0 = s1 = fmt_string; while (n0-- > 0) { if (*s1 != '%') { s1++; continue; } need_format = TRUE; bchunk(s0, s1 - s0); s0 = s1; cur = &fw; fw = 0; prec = 0; base = 0; argnum = 0; have_prec = FALSE; signchar = FALSE; zero_flag = FALSE; quote_flag = FALSE; lj = alt = big_flag = bigbig_flag = small_flag = FALSE; fill = sp; cp = cend; chbuf = lchbuf; s1++; retry: if (n0-- == 0) /* ran out early! */ break; switch (cs1 = *s1++) { case (-1): /* dummy case to allow for checking */ check_pos: if (cur != &fw) break; /* reject as a valid format */ goto retry; case '%': need_format = FALSE; /* * 29 Oct. 2002: * The C99 standard pages 274 and 279 seem to imply that * since there's no arg converted, the field width doesn't * apply. The code already was that way, but this * comment documents it, at least in the code. */ if (do_lint) { const char *msg = NULL; if (fw && ! have_prec) msg = _("field width is ignored for `%%' specifier"); else if (fw == 0 && have_prec) msg = _("precision is ignored for `%%' specifier"); else if (fw && have_prec) msg = _("field width and precision are ignored for `%%' specifier"); if (msg != NULL) lintwarn("%s", msg); } bchunk_one("%"); s0 = s1; break; case '0': /* * Only turn on zero_flag if we haven't seen * the field width or precision yet. Otherwise, * screws up floating point formatting. */ if (cur == & fw) zero_flag = TRUE; if (lj) goto retry; /* FALL through */ case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (cur == NULL) break; if (prec >= 0) *cur = cs1 - '0'; /* * with a negative precision *cur is already set * to -1, so it will remain negative, but we have * to "eat" precision digits in any case */ while (n0 > 0 && *s1 >= '0' && *s1 <= '9') { --n0; *cur = *cur * 10 + *s1++ - '0'; } if (prec < 0) /* negative precision is discarded */ have_prec = FALSE; if (cur == &prec) cur = NULL; if (n0 == 0) /* badly formatted control string */ continue; goto retry; case '$': 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) { 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((unsigned char) *s1)) { int val = 0; for (; n0 > 0 && *s1 && isdigit((unsigned char) *s1); s1++, n0--) { val *= 10; val += *s1 - '0'; } if (*s1 != '$') { msg(_("fatal: no `$' supplied for positional field width or precision")); goto out; } else { s1++; n0--; } if (val >= num_args) { toofew = TRUE; break; } arg = the_args[val]; } else { parse_next_arg(); } *cur = force_number(arg); if (*cur < 0 && cur == &fw) { *cur = -*cur; lj++; } if (cur == &prec) { if (*cur >= 0) have_prec = TRUE; else have_prec = FALSE; cur = NULL; } goto retry; case ' ': /* print ' ' or '-' */ /* 'space' flag is ignored */ /* if '+' already present */ if (signchar != FALSE) goto check_pos; /* FALL THROUGH */ case '+': /* print '+' or '-' */ signchar = cs1; goto check_pos; case '-': if (prec < 0) break; if (cur == &prec) { prec = -1; goto retry; } fill = sp; /* if left justified then other */ lj++; /* filling is ignored */ goto check_pos; case '.': if (cur != &fw) break; cur = ≺ have_prec = TRUE; goto retry; case '#': alt = TRUE; goto check_pos; case '\'': #if defined(HAVE_LOCALE_H) /* allow quote_flag if there is a thousands separator. */ if (loc.thousands_sep[0] != '\0') quote_flag = TRUE; goto check_pos; #else goto retry; #endif case 'l': if (big_flag) break; else { static short warned = FALSE; if (do_lint && ! warned) { lintwarn(_("`l' is meaningless in awk formats; ignored")); warned = TRUE; } if (do_posix) { msg(_("fatal: `l' is not permitted in POSIX awk formats")); goto out; } } big_flag = TRUE; goto retry; case 'L': if (bigbig_flag) break; else { static short warned = FALSE; if (do_lint && ! warned) { lintwarn(_("`L' is meaningless in awk formats; ignored")); warned = TRUE; } if (do_posix) { msg(_("fatal: `L' is not permitted in POSIX awk formats")); goto out; } } bigbig_flag = TRUE; goto retry; case 'h': if (small_flag) break; else { static short warned = FALSE; if (do_lint && ! warned) { lintwarn(_("`h' is meaningless in awk formats; ignored")); warned = TRUE; } if (do_posix) { msg(_("fatal: `h' is not permitted in POSIX awk formats")); goto out; } } small_flag = TRUE; goto retry; case 'c': need_format = FALSE; parse_next_arg(); /* user input that looks numeric is numeric */ if ((arg->flags & (MAYBE_NUM|NUMBER)) == MAYBE_NUM) (void) force_number(arg); if (arg->flags & NUMBER) { 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", arg->numbr); } cpbuf[0] = uval; prec = 1; cp = cpbuf; goto pr_tail; } /* * As per POSIX, only output first character of a * string value. Thus, we ignore any provided * precision, forcing it to 1. (Didn't this * used to work? 6/2003.) */ 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; parse_next_arg(); arg = force_string(arg); if (fw == 0 && ! have_prec) prec = arg->stlen; else { char_count = mbc_char_count(arg->stptr, arg->stlen); if (! have_prec || prec > char_count) prec = char_count; } cp = arg->stptr; goto pr_tail; case 'd': case 'i': need_format = FALSE; parse_next_arg(); tmpval = force_number(arg); /* * Check for Nan or Inf. */ if (isnan(tmpval) || isinf(tmpval)) goto out_of_range; else tmpval = double_to_int(tmpval); /* * ``The result of converting a zero value with a * precision of zero is no characters.'' */ if (have_prec && prec == 0 && tmpval == 0) goto pr_tail; if (tmpval < 0) { tmpval = -tmpval; sgn = TRUE; } else { if (tmpval == -0.0) /* avoid printing -0 */ tmpval = 0.0; sgn = FALSE; } /* * Use snprintf return value to tell if there * is enough room in the buffer or not. */ while ((i = snprintf(cpbufs[1].buf, cpbufs[1].bufsize, "%.0f", tmpval)) >= cpbufs[1].bufsize) { if (cpbufs[1].buf == cpbufs[1].stackbuf) cpbufs[1].buf = NULL; if (i > 0) { cpbufs[1].bufsize += ((i > cpbufs[1].bufsize) ? i : cpbufs[1].bufsize); } else cpbufs[1].bufsize *= 2; assert(cpbufs[1].bufsize > 0); erealloc(cpbufs[1].buf, char *, cpbufs[1].bufsize, "format_tree"); } if (i < 1) goto out_of_range; chp = &cpbufs[1].buf[i-1]; ii = jj = 0; do { PREPEND(*chp); chp--; i--; #if defined(HAVE_LOCALE_H) if (quote_flag && loc.grouping[ii] && ++jj == loc.grouping[ii]) { if (i) /* 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) quote_flag = FALSE; else { ii++; jj = 0; } } #endif } while (i > 0); /* add more output digits to match the precision */ if (have_prec) { while (cend - cp < prec) PREPEND('0'); } if (sgn) PREPEND('-'); else if (signchar) PREPEND(signchar); /* * When to fill with zeroes is of course not simple. * First: No zero fill if left-justifying. * Next: There seem to be two cases: * A '0' without a precision, e.g. %06d * A precision with no field width, e.g. %.10d * Any other case, we don't want to fill with zeroes. */ if (! lj && ((zero_flag && ! have_prec) || (fw == 0 && have_prec))) fill = zero_string; if (prec > fw) fw = prec; prec = cend - cp; if (fw > prec && ! lj && fill != sp && (*cp == '-' || signchar)) { bchunk_one(cp); cp++; prec--; fw--; } goto pr_tail; case 'X': chbuf = Uchbuf; /* FALL THROUGH */ case 'x': base += 6; /* FALL THROUGH */ case 'u': base += 2; /* FALL THROUGH */ case 'o': base += 8; need_format = FALSE; parse_next_arg(); tmpval = force_number(arg); /* * ``The result of converting a zero value with a * precision of zero is no characters.'' * * If I remember the ANSI C standard, though, * it says that for octal conversions * the precision is artificially increased * to add an extra 0 if # is supplied. * Indeed, in C, * printf("%#.0o\n", 0); * prints a single 0. */ if (! alt && have_prec && prec == 0 && tmpval == 0) goto pr_tail; if (tmpval < 0) { uval = (uintmax_t) (intmax_t) tmpval; if ((AWKNUM)(intmax_t)uval != double_to_int(tmpval)) goto out_of_range; } else { uval = (uintmax_t) tmpval; if ((AWKNUM)uval != double_to_int(tmpval)) goto out_of_range; } /* * When to fill with zeroes is of course not simple. * First: No zero fill if left-justifying. * Next: There seem to be two cases: * A '0' without a precision, e.g. %06d * A precision with no field width, e.g. %.10d * Any other case, we don't want to fill with zeroes. */ if (! lj && ((zero_flag && ! have_prec) || (fw == 0 && have_prec))) fill = zero_string; ii = jj = 0; do { PREPEND(chbuf[uval % base]); uval /= base; #if defined(HAVE_LOCALE_H) 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) quote_flag = FALSE; else { ii++; jj = 0; } } #endif } while (uval > 0); /* add more output digits to match the precision */ if (have_prec) { while (cend - cp < prec) PREPEND('0'); } if (alt && tmpval != 0) { if (base == 16) { PREPEND(cs1); PREPEND('0'); if (fill != sp) { bchunk(cp, 2); cp += 2; fw -= 2; } } else if (base == 8) PREPEND('0'); } base = 0; if (prec > fw) fw = prec; prec = cend - cp; pr_tail: if (! lj) { while (fw > prec) { bchunk_one(fill); fw--; } } copy_count = prec; if (fw == 0 && ! have_prec) ; else if (gawk_mb_cur_max > 1 && (cs1 == 's' || cs1 == 'c')) { assert(cp == arg->stptr || cp == cpbuf); copy_count = mbc_byte_count(arg->stptr, prec); } bchunk(cp, copy_count); while (fw > prec) { bchunk_one(fill); fw--; } s0 = s1; break; out_of_range: /* out of range - emergency use of %g format */ if (do_lint) lintwarn(_("[s]printf: value %g is out of range for `%%%c' format"), (double) tmpval, cs1); cs1 = 'g'; goto format_float; case 'F': #if ! defined(PRINTF_HAS_F_FORMAT) || PRINTF_HAS_F_FORMAT != 1 cs1 = 'f'; /* FALL THROUGH */ #endif case 'g': case 'G': case 'e': case 'f': case 'E': need_format = FALSE; parse_next_arg(); tmpval = force_number(arg); format_float: if (! have_prec) prec = DEFAULT_G_PRECISION; chksize(fw + prec + 9); /* 9 == slop */ cp = cpbuf; *cp++ = '%'; if (lj) *cp++ = '-'; if (signchar) *cp++ = signchar; if (alt) *cp++ = '#'; if (zero_flag) *cp++ = '0'; if (quote_flag) *cp++ = '\''; strcpy(cp, "*.*"); cp += 3; *cp++ = cs1; *cp = '\0'; #if defined(LC_NUMERIC) if (quote_flag && ! use_lc_numeric) setlocale(LC_NUMERIC, ""); #endif { int n; while ((n = snprintf(obufout, ofre, cpbuf, (int) fw, (int) prec, (double) tmpval)) >= ofre) chksize(n) } #if defined(LC_NUMERIC) if (quote_flag && ! use_lc_numeric) setlocale(LC_NUMERIC, "C"); #endif len = strlen(obufout); ofre -= len; obufout += len; s0 = s1; break; default: if (do_lint && isalpha(cs1)) lintwarn(_("ignoring unknown format specifier character `%c': no argument converted"), cs1); break; } if (toofew) { 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) { if (need_format) lintwarn( _("[s]printf: format specifier does not have control letter")); if (cur_arg < num_args) lintwarn( _("too many arguments supplied for format string")); } bchunk(s0, s1 - s0); r = make_str_node(obuf, obufout - obuf, ALREADY_MALLOCED); 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) efree(cpbufs[k].buf); } if (obuf != NULL) efree(obuf); } if (r == NULL) gawk_exit(EXIT_FATAL); return r; } /* printf_common --- common code for sprintf and printf */ static NODE * printf_common(int nargs) { 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)); } } 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; } /* do_sprintf --- perform sprintf */ NODE * do_sprintf(int nargs) { NODE *r; r = printf_common(nargs); if (r == NULL) gawk_exit(EXIT_FATAL); return r; } /* do_printf --- perform printf, including redirection */ void do_printf(int nargs, int redirtype) { FILE *fp = NULL; NODE *tmp; struct redirect *rp = NULL; int errflg; /* not used, sigh */ NODE *redir_exp = 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")); } 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(int nargs) { NODE *tmp; double arg; tmp = POP_SCALAR(); if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("sqrt: received non-numeric argument")); arg = (double) force_number(tmp); DEREF(tmp); if (arg < 0.0) warning(_("sqrt: called with negative argument %g"), arg); return make_number((AWKNUM) sqrt(arg)); } /* do_substr --- do the substr function */ NODE * do_substr(int nargs) { NODE *t1; NODE *r; size_t indx; size_t length = 0; double d_index = 0, d_length = 0; size_t src_len; 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)) { if (do_lint) lintwarn(_("substr: start index %g is invalid, using 1"), d_index); d_index = 1; } if (do_lint && double_to_int(d_index) != d_index) lintwarn(_("substr: non-integer start index %g will be truncated"), d_index); /* awk indices are from 1, C's are from 0 */ if (d_index <= SIZE_MAX) indx = d_index - 1; else indx = SIZE_MAX; if (nargs == 2) { /* third arg. missing */ /* use remainder of string */ length = t1->stlen - indx; /* default to bytes */ #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 */ length = t1->wstlen - indx; } #endif d_length = length; /* set here in case used in diagnostics, below */ } 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")); DEREF(t1); return Nnull_string; } /* get total len of input string, for following checks */ #if MBS_SUPPORT if (gawk_mb_cur_max > 1) { t1 = force_wstring(t1); src_len = t1->wstlen; } else #endif src_len = t1->stlen; if (indx >= src_len) { if (do_lint) lintwarn(_("substr: start index %g is past end of string"), d_index); DEREF(t1); return Nnull_string; } if (length > src_len - indx) { if (do_lint) lintwarn( _("substr: length %g at start index %g exceeds length of first argument (%lu)"), d_length, d_index, (unsigned long int) src_len); length = src_len - indx; } #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; /* * 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)); emalloc(substr, char *, (length * gawk_mb_cur_max) + 2, "do_substr"); wp = t1->wstptr + indx; for (cp = substr; 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'; r = make_str_node(substr, cp - substr, ALREADY_MALLOCED); } #else r = make_string(t1->stptr + indx, length); #endif DEREF(t1); return r; } /* do_strftime --- format a time stamp */ NODE * 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]; const char *format; int formatlen; int do_gmt; NODE *val = NULL; NODE *sub = NULL; /* set defaults first */ format = def_strftime_format; /* traditional date format */ formatlen = strlen(format); (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 (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 (nargs >= 2) { t2 = POP_SCALAR(); if (do_lint && (t2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("strftime: received non-numeric second argument")); 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); } 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); else tm = localtime(& fclock); bufp = buf; bufsize = sizeof(buf); for (;;) { *bufp = '\0'; buflen = strftime(bufp, bufsize, format, tm); /* * buflen can be zero EITHER because there's not enough * room in the string, or because the control command * goes to the empty string. Make a reasonable guess that * if the buffer is 1024 times bigger than the length of the * format string, it's not failing for lack of room. * Thanks to Paul Eggert for pointing out this issue. */ if (buflen > 0 || bufsize >= 1024 * formatlen) break; bufsize *= 2; if (bufp == buf) emalloc(bufp, char *, bufsize, "do_strftime"); else erealloc(bufp, char *, bufsize, "do_strftime"); } ret = make_string(bufp, buflen); if (bufp != buf) efree(bufp); if (t1) DEREF(t1); return ret; } /* do_systime --- get the time of day */ NODE * do_systime(int nargs ATTRIBUTE_UNUSED) { time_t lclock; (void) time(& lclock); return make_number((AWKNUM) lclock); } /* do_mktime --- turn a time string into a timestamp */ NODE * do_mktime(int nargs) { NODE *t1; struct tm then; long year; int month, day, hour, minute, second, count; int dst = -1; /* default is unknown */ time_t then_stamp; char save; t1 = POP_SCALAR(); if (do_lint && (t1->flags & (STRING|STRCUR)) == 0) lintwarn(_("mktime: received non-string argument")); t1 = force_string(t1); save = t1->stptr[t1->stlen]; t1->stptr[t1->stlen] = '\0'; count = sscanf(t1->stptr, "%ld %d %d %d %d %d %d", & year, & month, & day, & 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")); t1->stptr[t1->stlen] = save; DEREF(t1); if (count < 6 || month == INT_MIN || year < INT_MIN + 1900 || year - 1900 > INT_MAX) return make_number((AWKNUM) -1); memset(& then, '\0', sizeof(then)); then.tm_sec = second; then.tm_min = minute; then.tm_hour = hour; then.tm_mday = day; then.tm_mon = month - 1; then.tm_year = year - 1900; then.tm_isdst = dst; then_stamp = mktime(& then); return make_number((AWKNUM) then_stamp); } /* do_system --- run an external command */ NODE * 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 = 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 */ save = cmd[tmp->stlen]; cmd[tmp->stlen] = '\0'; os_restore_mode(fileno(stdin)); ret = system(cmd); if (ret != -1) ret = WEXITSTATUS(ret); if ((BINMODE & 1) != 0) os_setbinmode(fileno(stdin), O_BINARY); cmd[tmp->stlen] = save; } DEREF(tmp); return make_number((AWKNUM) ret); } extern NODE **fmt_list; /* declared in eval.c */ /* do_print --- print items, separated by OFS, terminated with ORS */ void do_print(int nargs, int redirtype) { struct redirect *rp = NULL; int errflg; /* not used, sigh */ FILE *fp = NULL; int i; NODE *redir_exp = NULL; NODE *tmp; assert(nargs <= max_args); 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; 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(tmp); else args_array[i] = format_val(OFMT, OFMTidx, tmp); } } if (redir_exp != NULL) { DEREF(redir_exp); decr_sp(); } if (fp == NULL) { for (i = nargs; i > 0; i--) DEREF(args_array[i]); return; } 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); } if (ORSlen > 0) efwrite(ORS, sizeof(char), (size_t) ORSlen, fp, "print", rp, TRUE); if (rp != NULL && (rp->flag & RED_TWOWAY) != 0) fflush(rp->fp); } /* do_print_rec --- special case printing of $0, for speed */ void do_print_rec(int nargs, int redirtype) { FILE *fp = NULL; NODE *f0; struct redirect *rp = NULL; 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; if (fp == NULL) return; if (! field0_valid) (void) get_field(0L, NULL); /* rebuild record */ f0 = fields_arr[0]; if (do_lint && f0 == Nnull_string) lintwarn(_("reference to uninitialized field `$%d'"), 0); efwrite(f0->stptr, sizeof(char), f0->stlen, fp, "print", rp, FALSE); if (ORSlen > 0) efwrite(ORS, sizeof(char), (size_t) ORSlen, fp, "print", rp, TRUE); if (rp != NULL && (rp->flag & RED_TWOWAY) != 0) fflush(rp->fp); } #if MBS_SUPPORT /* is_wupper --- function version of iswupper for passing function pointers */ static int is_wupper(wchar_t c) { return iswupper(c); } /* is_wlower --- function version of iswlower for passing function pointers */ static int is_wlower(wchar_t c) { return iswlower(c); } /* to_wupper --- function version of towupper for passing function pointers */ static int to_wlower(wchar_t c) { return towlower(c); } /* 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(int nargs) { NODE *t1, *t2; 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); if (gawk_mb_cur_max == 1) { unsigned char *cp, *cp2; for (cp = (unsigned char *)t2->stptr, cp2 = (unsigned char *)(t2->stptr + t2->stlen); cp < cp2; cp++) if (isupper(*cp)) *cp = tolower(*cp); } #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(int nargs) { NODE *t1, *t2; 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); if (gawk_mb_cur_max == 1) { unsigned char *cp, *cp2; for (cp = (unsigned char *)t2->stptr, cp2 = (unsigned char *)(t2->stptr + t2->stlen); cp < cp2; cp++) if (islower(*cp)) *cp = toupper(*cp); } #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(int nargs) { NODE *t1, *t2; double d1, d2; POP_TWO_SCALARS(t1, t2); if (do_lint) { if ((t1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("atan2: received non-numeric first argument")); if ((t2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("atan2: received non-numeric second argument")); } d1 = force_number(t1); d2 = force_number(t2); DEREF(t1); DEREF(t2); return make_number((AWKNUM) atan2(d1, d2)); } /* do_sin --- do the sin function */ NODE * do_sin(int nargs) { NODE *tmp; double d; tmp = POP_SCALAR(); if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("sin: received non-numeric argument")); d = sin((double) force_number(tmp)); DEREF(tmp); return make_number((AWKNUM) d); } /* do_cos --- do the cos function */ NODE * do_cos(int nargs) { NODE *tmp; double d; tmp = POP_SCALAR(); if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("cos: received non-numeric argument")); d = cos((double) force_number(tmp)); DEREF(tmp); return make_number((AWKNUM) d); } /* do_rand --- do the rand function */ static int firstrand = TRUE; /* Some systems require this array to be integer aligned. Sigh. */ #define SIZEOF_STATE 256 static uint32_t istate[SIZEOF_STATE/sizeof(uint32_t)]; static char *const state = (char *const) istate; /* ARGSUSED */ NODE * do_rand(int nargs ATTRIBUTE_UNUSED) { if (firstrand) { (void) initstate((unsigned) 1, state, SIZEOF_STATE); /* don't need to srandom(1), initstate() does it for us. */ firstrand = FALSE; setstate(state); } /* * Per historical practice and POSIX, return value N is * * 0 <= n < 1 */ return make_number((AWKNUM) (random() % GAWK_RANDOM_MAX) / GAWK_RANDOM_MAX); } /* do_srand --- seed the random number generator */ NODE * do_srand(int nargs) { NODE *tmp; static long save_seed = 1; long ret = save_seed; /* SVR4 awk srand returns previous seed */ if (firstrand) { (void) initstate((unsigned) 1, state, SIZEOF_STATE); /* don't need to srandom(1), we're changing the seed below */ firstrand = FALSE; (void) setstate(state); } if (nargs == 0) srandom((unsigned int) (save_seed = (long) time((time_t *) 0))); else { 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))); DEREF(tmp); } return make_number((AWKNUM) ret); } /* do_match --- match a regexp, set RSTART and RLENGTH, * optional third arg is array filled with text of * subpatterns enclosed in parens and start and len info. */ NODE * do_match(int nargs) { NODE *tre, *t1, *dest, *it; int rstart, len, ii; int rlength; Regexp *rp; regoff_t s; char *start; char *buf = NULL; char buff[100]; size_t amt, oldamt = 0, ilen, slen; char *subsepstr; size_t subseplen; dest = NULL; 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 */ #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; rstart = wc_indices[rstart]; } #endif rstart++; /* now it's 1-based indexing */ /* Build the array only if the caller wants the optional subpatterns */ if (dest != NULL) { subsepstr = SUBSEP_node->var_value->stptr; subseplen = SUBSEP_node->var_value->stlen; for (ii = 0; ii < NUMSUBPATS(rp, t1->stptr); ii++) { /* * Loop over all the subpats; some of them may have * matched even if all of them did not. */ 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; #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; } #endif it = make_string(start, len); it->flags |= MAYBE_NUM; /* user input */ 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; if (oldamt == 0) { emalloc(buf, char *, amt, "do_match"); } else if (amt > oldamt) { erealloc(buf, char *, amt, "do_match"); } oldamt = amt; memcpy(buf, buff, ilen); memcpy(buf + ilen, subsepstr, subseplen); memcpy(buf + ilen + subseplen, "start", 6); slen = ilen + subseplen + 5; it = make_number((AWKNUM) subpat_start + 1); 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); memcpy(buf + ilen + subseplen, "length", 7); slen = ilen + subseplen + 6; it = make_number((AWKNUM) subpat_len); sub = make_string(buf, slen); lhs = assoc_lookup(dest, sub, FALSE); unref(*lhs); *lhs = it; unref(sub); } } efree(buf); } if (wc_indices != NULL) efree(wc_indices); } else { /* match failed */ rstart = 0; rlength = -1; } 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 make_number((AWKNUM) rstart); } /* do_sub --- do the work for sub, gsub, and gensub */ /* * Gsub can be tricksy; particularly when handling the case of null strings. * The following awk code was useful in debugging problems. It is too bad * that it does not readily translate directly into the C code, below. * * #! /usr/local/bin/mawk -f * * BEGIN { * TRUE = 1; FALSE = 0 * print "--->", mygsub("abc", "b+", "FOO") * print "--->", mygsub("abc", "x*", "X") * print "--->", mygsub("abc", "b*", "X") * print "--->", mygsub("abc", "c", "X") * print "--->", mygsub("abc", "c+", "X") * print "--->", mygsub("abc", "x*$", "X") * } * * function mygsub(str, regex, replace, origstr, newstr, eosflag, nonzeroflag) * { * origstr = str; * eosflag = nonzeroflag = FALSE * while (match(str, regex)) { * if (RLENGTH > 0) { # easy case * nonzeroflag = TRUE * if (RSTART == 1) { # match at front of string * newstr = newstr replace * } else { * newstr = newstr substr(str, 1, RSTART-1) replace * } * str = substr(str, RSTART+RLENGTH) * } else if (nonzeroflag) { * # last match was non-zero in length, and at the * # current character, we get a zero length match, * # which we don't really want, so skip over it * newstr = newstr substr(str, 1, 1) * str = substr(str, 2) * nonzeroflag = FALSE * } else { * # 0-length match * if (RSTART == 1) { * newstr = newstr replace substr(str, 1, 1) * str = substr(str, 2) * } else { * return newstr str replace * } * } * if (length(str) == 0) * if (eosflag) * break * else * eosflag = TRUE * } * if (length(str) > 0) * newstr = newstr str # rest of string * * return newstr * } */ /* * 1/2004: The gawk sub/gsub behavior dates from 1996, when we proposed it * for POSIX. The proposal fell through the cracks, and the 2001 POSIX * standard chose a more simple behavior. * * The relevant text is to be found on lines 6394-6407 (pages 166, 167) of the * 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. * * 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 . */ NODE * do_sub(int nargs, unsigned int flags) { char *scan; char *bp, *cp; char *buf = NULL; size_t buflen; char *matchend; size_t len; char *matchstart; char *text; size_t textlen = 0; char *repl; char *replend; size_t repllen; int sofar; int ampersands; int matches = 0; Regexp *rp; NODE *s; /* subst. pattern */ NODE *t; /* string to make sub. in; $0 if none given */ NODE *tmp; 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); 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); 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) goto done; t->flags |= STRING; text = t->stptr; textlen = t->stlen; buflen = textlen + 2; repl = s->stptr; replend = repl + s->stlen; repllen = replend - repl; emalloc(buf, char *, buflen + 2, "do_sub"); buf[buflen] = '\0'; buf[buflen + 1] = '\0'; ampersands = 0; /* * Some systems' malloc() can't handle being called with an * argument of zero. Thus we have to have some special case * code to check for `repllen == 0'. This can occur for * something like: * sub(/foo/, "", mystring) * for example. */ if (gawk_mb_cur_max > 1 && repllen > 0) { emalloc(mb_indices, char *, repllen * sizeof(char), "do_sub"); index_multibyte_buffer(repl, mb_indices, repllen); } for (scan = repl; scan < replend; scan++) { if ((gawk_mb_cur_max == 1 || (repllen > 0 && mb_indices[scan - repl] == 1)) && (*scan == '&')) { repllen--; ampersands++; } else if (*scan == '\\') { if (flags & GENSUB) { /* gensub, behave sanely */ if (isdigit((unsigned char) scan[1])) { ampersands++; scan++; } else { /* \q for any q --> q */ repllen--; scan++; } } else if (do_posix) { /* \& --> &, \\ --> \ */ if (scan[1] == '&' || scan[1] == '\\') { repllen--; scan++; } /* else leave alone, it goes into the output */ } else { /* gawk default behavior since 1996 */ if (strncmp(scan, "\\\\\\&", 4) == 0) { /* \\\& --> \& */ repllen -= 2; scan += 3; } else if (strncmp(scan, "\\\\&", 3) == 0) { /* \\& --> \ */ ampersands++; repllen--; scan += 2; } else if (scan[1] == '&') { /* \& --> & */ repllen--; scan++; } /* else leave alone, it goes into the output */ } } } lastmatchnonzero = FALSE; bp = buf; for (current = 1;; current++) { matches++; matchstart = t->stptr + RESTART(rp, t->stptr); matchend = t->stptr + REEND(rp, t->stptr); /* * create the result, copying in parts of the original * string */ len = matchstart - text + repllen + ampersands * (matchend - matchstart); sofar = bp - buf; while (buflen < (sofar + len + 1)) { buflen *= 2; erealloc(buf, char *, buflen, "sub_common"); bp = buf + sofar; } for (scan = text; scan < matchstart; scan++) *bp++ = *scan; if (global || current == how_many) { /* * If the current match matched the null string, * and the last match didn't and did a replacement, * and the match of the null string is at the front of * the text (meaning right after end of the previous * replacement), then skip this one. */ if (matchstart == matchend && lastmatchnonzero && matchstart == text) { lastmatchnonzero = FALSE; matches--; goto empty; } /* * If replacing all occurrences, or this is the * match we want, copy in the replacement text, * making substitutions as we go. */ 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) ) { for (cp = matchstart; cp < matchend; cp++) *bp++ = *cp; } else if (*scan == '\\' && (gawk_mb_cur_max == 1 || (repllen > 0 && mb_indices[scan - repl] == 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; start = t->stptr + SUBPATSTART(rp, t->stptr, dig); end = t->stptr + SUBPATEND(rp, t->stptr, dig); for (cp = start; cp < end; cp++) *bp++ = *cp; } scan++; } else /* \q for any q --> q */ *bp++ = *++scan; } else if (do_posix) { /* \& --> &, \\ --> \ */ if (scan[1] == '&' || scan[1] == '\\') scan++; *bp++ = *scan; } else { /* gawk default behavior since 1996 */ if (strncmp(scan, "\\\\\\&", 4) == 0) { /* \\\& --> \& */ *bp++ = '\\'; *bp++ = '&'; scan += 3; } else if (strncmp(scan, "\\\\&", 3) == 0) { /* \\& --> \ */ *bp++ = '\\'; for (cp = matchstart; cp < matchend; cp++) *bp++ = *cp; scan += 2; } else if (scan[1] == '&') { /* \& --> & */ *bp++ = '&'; scan++; } else *bp++ = *scan; } } else *bp++ = *scan; if (matchstart != matchend) lastmatchnonzero = TRUE; } else { /* * don't want this match, skip over it by copying * in current text. */ for (cp = matchstart; cp < matchend; cp++) *bp++ = *cp; } empty: /* catch the case of gsub(//, "blah", whatever), i.e. empty regexp */ if (matchstart == matchend && matchend < text + textlen) { *bp++ = *matchend; matchend++; } textlen = text + textlen - matchend; text = matchend; if ((current >= how_many && ! global) || ((long) textlen <= 0 && matchstart == matchend) || research(rp, t->stptr, text - t->stptr, textlen, RE_NEED_START) == -1) break; } sofar = bp - buf; if (buflen - sofar - textlen - 1) { buflen = sofar + textlen + 2; erealloc(buf, char *, buflen, "do_sub"); bp = buf + sofar; } for (scan = matchend; scan < text + textlen; scan++) *bp++ = *scan; *bp = '\0'; textlen = bp - buf; if (mb_indices != NULL) efree(mb_indices); done: DEREF(s); if ((matches == 0 || (flags & LITERAL) != 0) && buf != NULL) efree(buf); if (flags & GENSUB) { if (matches > 0) { /* return the result string */ DEREF(t); return make_str_node(buf, textlen, ALREADY_MALLOCED); } /* return the original string */ return t; } /* 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); } /* make_integer - Convert an integer to a number node. */ static NODE * make_integer(uintmax_t n) { n = adjust_uint(n); return make_number((AWKNUM) n); } /* do_lshift --- perform a << operation */ NODE * do_lshift(int nargs) { NODE *s1, *s2; uintmax_t uval, ushift, res; AWKNUM val, shift; POP_TWO_SCALARS(s1, s2); if (do_lint) { if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("lshift: received non-numeric first argument")); if ((s2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("lshift: received non-numeric second argument")); } val = force_number(s1); shift = force_number(s2); if (do_lint) { if (val < 0 || shift < 0) lintwarn(_("lshift(%lf, %lf): negative values will give strange results"), val, shift); if (double_to_int(val) != val || double_to_int(shift) != shift) lintwarn(_("lshift(%lf, %lf): fractional values will be truncated"), val, shift); if (shift >= sizeof(uintmax_t) * CHAR_BIT) lintwarn(_("lshift(%lf, %lf): too large shift value will give strange results"), val, shift); } DEREF(s1); DEREF(s2); uval = (uintmax_t) val; ushift = (uintmax_t) shift; res = uval << ushift; return make_integer(res); } /* do_rshift --- perform a >> operation */ NODE * do_rshift(int nargs) { NODE *s1, *s2; uintmax_t uval, ushift, res; AWKNUM val, shift; POP_TWO_SCALARS(s1, s2); if (do_lint) { if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("rshift: received non-numeric first argument")); if ((s2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("rshift: received non-numeric second argument")); } val = force_number(s1); shift = force_number(s2); if (do_lint) { if (val < 0 || shift < 0) lintwarn(_("rshift(%lf, %lf): negative values will give strange results"), val, shift); if (double_to_int(val) != val || double_to_int(shift) != shift) lintwarn(_("rshift(%lf, %lf): fractional values will be truncated"), val, shift); if (shift >= sizeof(uintmax_t) * CHAR_BIT) lintwarn(_("rshift(%lf, %lf): too large shift value will give strange results"), val, shift); } DEREF(s1); DEREF(s2); uval = (uintmax_t) val; ushift = (uintmax_t) shift; res = uval >> ushift; return make_integer(res); } /* do_and --- perform an & operation */ NODE * do_and(int nargs) { NODE *s1, *s2; uintmax_t uleft, uright, res; AWKNUM left, right; POP_TWO_SCALARS(s1, s2); if (do_lint) { if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("and: received non-numeric first argument")); if ((s2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("and: received non-numeric second argument")); } left = force_number(s1); right = force_number(s2); if (do_lint) { if (left < 0 || right < 0) lintwarn(_("and(%lf, %lf): negative values will give strange results"), left, right); if (double_to_int(left) != left || double_to_int(right) != right) lintwarn(_("and(%lf, %lf): fractional values will be truncated"), left, right); } DEREF(s1); DEREF(s2); uleft = (uintmax_t) left; uright = (uintmax_t) right; res = uleft & uright; return make_integer(res); } /* do_or --- perform an | operation */ NODE * do_or(int nargs) { NODE *s1, *s2; uintmax_t uleft, uright, res; AWKNUM left, right; POP_TWO_SCALARS(s1, s2); if (do_lint) { if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("or: received non-numeric first argument")); if ((s2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("or: received non-numeric second argument")); } left = force_number(s1); right = force_number(s2); if (do_lint) { if (left < 0 || right < 0) lintwarn(_("or(%lf, %lf): negative values will give strange results"), left, right); if (double_to_int(left) != left || double_to_int(right) != right) lintwarn(_("or(%lf, %lf): fractional values will be truncated"), left, right); } DEREF(s1); DEREF(s2); uleft = (uintmax_t) left; uright = (uintmax_t) right; res = uleft | uright; return make_integer(res); } /* do_xor --- perform an ^ operation */ NODE * do_xor(int nargs) { NODE *s1, *s2; uintmax_t uleft, uright, res; AWKNUM left, right; 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")); if ((s2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("xor: received non-numeric second argument")); } left = force_number(s1); right = force_number(s2); if (do_lint) { if (left < 0 || right < 0) lintwarn(_("xor(%lf, %lf): negative values will give strange results"), left, right); if (double_to_int(left) != left || double_to_int(right) != right) lintwarn(_("xor(%lf, %lf): fractional values will be truncated"), left, right); } DEREF(s1); DEREF(s2); uleft = (uintmax_t) left; uright = (uintmax_t) right; res = uleft ^ uright; return make_integer(res); } /* do_compl --- perform a ~ operation */ NODE * do_compl(int nargs) { NODE *tmp; double d; uintmax_t uval; tmp = POP_SCALAR(); if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("compl: received non-numeric argument")); d = force_number(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) lintwarn(_("compl(%lf): fractional value will be truncated"), d); } uval = (uintmax_t) d; uval = ~ uval; return make_integer(uval); } /* do_strtonum --- the strtonum function */ NODE * do_strtonum(int nargs) { NODE *tmp; AWKNUM d; tmp = POP_SCALAR(); if ((tmp->flags & (NUMBER|NUMCUR)) != 0) d = (AWKNUM) force_number(tmp); else if (isnondecimal(tmp->stptr, use_lc_numeric)) d = nondec2awknum(tmp->stptr, tmp->stlen); else d = (AWKNUM) force_number(tmp); DEREF(tmp); return make_number((AWKNUM) d); } /* nondec2awknum --- convert octal or hex value to double */ /* * Because of awk's concatenation rules and the way awk.y:yylex() * collects a number, this routine has to be willing to stop on the * first invalid character. */ AWKNUM nondec2awknum(char *str, size_t len) { AWKNUM retval = 0.0; char save; short val; char *start = str; if (*str == '0' && (str[1] == 'x' || str[1] == 'X')) { /* * User called strtonum("0x") or some such, * so just quit early. */ if (len <= 2) return (AWKNUM) 0.0; for (str += 2, len -= 2; len > 0; len--, str++) { switch (*str) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': val = *str - '0'; break; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': val = *str - 'a' + 10; break; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': val = *str - 'A' + 10; break; default: goto done; } retval = (retval * 16) + val; } } else if (*str == '0') { for (; len > 0; len--) { if (! isdigit((unsigned char) *str)) goto done; else if (*str == '8' || *str == '9') { str = start; goto decimal; } retval = (retval * 8) + (*str - '0'); str++; } } else { decimal: save = str[len]; retval = strtod(str, NULL); str[len] = save; } done: return retval; } /* do_dcgettext, do_dcngettext --- handle i18n translations */ #if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT static int localecategory_from_argument(NODE *t) { static const struct category_table { int val; const char *name; } cat_tab[] = { #ifdef LC_ALL { LC_ALL, "LC_ALL" }, #endif /* LC_ALL */ #ifdef LC_COLLATE { LC_COLLATE, "LC_COLLATE" }, #endif /* LC_COLLATE */ #ifdef LC_CTYPE { LC_CTYPE, "LC_CTYPE" }, #endif /* LC_CTYPE */ #ifdef LC_MESSAGES { LC_MESSAGES, "LC_MESSAGES" }, #endif /* LC_MESSAGES */ #ifdef LC_MONETARY { LC_MONETARY, "LC_MONETARY" }, #endif /* LC_MONETARY */ #ifdef LC_NUMERIC { LC_NUMERIC, "LC_NUMERIC" }, #endif /* LC_NUMERIC */ #ifdef LC_RESPONSE { LC_RESPONSE, "LC_RESPONSE" }, #endif /* LC_RESPONSE */ #ifdef LC_TIME { LC_TIME, "LC_TIME" }, #endif /* LC_TIME */ }; if (t != NULL) { int low, high, i, mid; char *category; int lc_cat = -1; category = t->stptr; /* binary search the table */ low = 0; high = (sizeof(cat_tab) / sizeof(cat_tab[0])) - 1; while (low <= high) { mid = (low + high) / 2; i = strcmp(category, cat_tab[mid].name); if (i < 0) /* category < mid */ high = mid - 1; else if (i > 0) /* category > mid */ low = mid + 1; else { lc_cat = cat_tab[mid].val; break; } } if (lc_cat == -1) /* not there */ fatal(_("dcgettext: `%s' is not a valid locale category"), category); return lc_cat; } else return LC_MESSAGES; } #endif /* * awk usage is * * str = dcgettext(string [, domain [, category]]) * str = dcngettext(string1, string2, number [, domain [, category]]) * * Default domain is TEXTDOMAIN, default category is LC_MESSAGES. */ NODE * do_dcgettext(int nargs) { NODE *tmp, *t1, *t2 = NULL; char *string; char *the_result; #if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT int lc_cat; char *domain; if (nargs == 3) { /* third argument */ tmp = POP_STRING(); lc_cat = localecategory_from_argument(tmp); DEREF(tmp); } else lc_cat = LC_MESSAGES; 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 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 DEREF(t1); return make_string(the_result, strlen(the_result)); } NODE * 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; if (nargs == 5) { /* fifth argument */ tmp = POP_STRING(); lc_cat = localecategory_from_argument(tmp); DEREF(tmp); } else lc_cat = LC_MESSAGES; t3 = NULL; 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 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 DEREF(t1); DEREF(t2); return make_string(the_result, strlen(the_result)); } /* do_bindtextdomain --- set the directory for a text domain */ /* * awk usage is * * binding = bindtextdomain(dir [, domain]) * * If dir is "", pass NULL to C version. * Default domain is TEXTDOMAIN. */ NODE * do_bindtextdomain(int nargs) { NODE *t1, *t2; const char *directory, *domain; const char *the_result; t1 = t2 = NULL; /* set defaults */ directory = NULL; domain = TEXTDOMAIN; 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); DEREF(t1); if (t2 != NULL) DEREF(t2); 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) { #if MBS_SUPPORT mbstate_t cur_state; size_t sum = 0; int mb_len; memset(& cur_state, 0, sizeof(cur_state)); assert(gawk_mb_cur_max > 1); mb_len = mbrlen(ptr, numchars * gawk_mb_cur_max, &cur_state); if (mb_len <= 0) return numchars; /* no valid m.b. char */ for (; numchars > 0; numchars--) { mb_len = mbrlen(ptr, numchars * gawk_mb_cur_max, &cur_state); if (mb_len <= 0) break; sum += mb_len; ptr += mb_len; } return sum; #else return numchars; #endif } /* mbc_char_count --- return number of m.b. chars in string, up to numbytes bytes */ static size_t mbc_char_count(const char *ptr, size_t numbytes) { #if MBS_SUPPORT mbstate_t cur_state; size_t sum = 0; int mb_len; 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 */ for (; numbytes > 0; numbytes--) { mb_len = mbrlen(ptr, numbytes * gawk_mb_cur_max, &cur_state); if (mb_len <= 0) break; sum++; ptr += mb_len; } return sum; #else return numbytes; #endif } gawk-4.0.1+dfsg.orig/install-sh0000755000175000017500000003160011733031307015347 0ustar schotschot#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-10-14.15 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" posix_glob= posix_mkdir= # Desired mode of installed file. mode=0755 chmodcmd=$chmodprog chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) mode=$2 shift shift case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac done if test $# -ne 0 && test -z "$dir_arg$dstarg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix=/ ;; -*) prefix=./ ;; *) prefix= ;; esac case $posix_glob in '') if (set -f) 2>/dev/null; then posix_glob=true else posix_glob=false fi ;; esac oIFS=$IFS IFS=/ $posix_glob && set -f set fnord $dstdir shift $posix_glob && set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dst"; then $doit $rmcmd -f "$dst" 2>/dev/null \ || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } } || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: gawk-4.0.1+dfsg.orig/test/0000755000175000017500000000000011734667245014343 5ustar schotschotgawk-4.0.1+dfsg.orig/test/zeroflag.awk0000644000175000017500000000005311463242060016635 0ustar schotschotBEGIN { printf("%2.1d---%02.1d\n", 2, 2) } gawk-4.0.1+dfsg.orig/test/widesub.awk0000644000175000017500000000031611463242060016470 0ustar schotschotBEGIN { str = "type=\"directory\" version=\"1.0\"" #print "BEGIN:", str while (str) { sub(/^[^=]*/, "", str); s = substr(str, 2) print s sub(/^="[^"]*"/, "", str) sub(/^[ \t]*/, "", str) } } gawk-4.0.1+dfsg.orig/test/rsnulbig.ok0000644000175000017500000000000611463242060016476 0ustar schotschot16386 gawk-4.0.1+dfsg.orig/test/numindex.ok0000644000175000017500000000001411463242060016477 0ustar schotschot0 0.000000% gawk-4.0.1+dfsg.orig/test/rstest5.awk0000644000175000017500000000444511463242060016446 0ustar schotschot# From spcecdt@armory.com Tue May 6 13:42:34 2003 # Return-Path: # Received: from localhost (aahz [127.0.0.1]) # by skeeve.com (8.12.5/8.12.5) with ESMTP id h46AgG53003519 # for ; Tue, 6 May 2003 13:42:34 +0300 # Received: from actcom.co.il [192.114.47.1] # by localhost with POP3 (fetchmail-5.9.0) # for arnold@localhost (single-drop); Tue, 06 May 2003 13:42:34 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Tue May 6 13:48:46 2003) # X-From_: spcecdt@armory.com Tue May 6 13:26:09 2003 # Received: from smtp1.actcom.net.il by actcom.co.il with ESMTP # (8.11.6/actcom-0.2) id h46AQ6520133 for ; # Tue, 6 May 2003 13:26:07 +0300 (EET DST) # (rfc931-sender: lmail.actcom.co.il [192.114.47.13]) # Received: from f7.net (consort.superb.net [209.61.216.22]) # by smtp1.actcom.net.il (8.12.8/8.12.8) with ESMTP id h46ARSfl010998 # for ; Tue, 6 May 2003 13:27:31 +0300 # Received: from armory.com (deepthought.armory.com [192.122.209.42]) # by f7.net (8.11.7/8.11.6) with SMTP id h46AQ1I18183 # for ; Tue, 6 May 2003 06:26:01 -0400 # Date: Tue, 6 May 2003 03:25:59 -0700 # From: "John H. DuBois III" # To: Aharon Robbins # Subject: Re: gawk 3.1.2b now available # Message-ID: <20030506102559.GA16105@armory.com> # References: <200305051157.h45Bv4XO003106@localhost.localdomain> # Mime-Version: 1.0 # Content-Type: text/plain; charset=us-ascii # Content-Disposition: inline # In-Reply-To: <200305051157.h45Bv4XO003106@localhost.localdomain> # User-Agent: Mutt/1.3.28i # X-Www: http://www.armory.com./~spcecdt/ # Sender: spcecdt@armory.com # X-SpamBouncer: 1.4 (10/07/01) # X-SBClass: OK # Status: RO # # The patch fixed the previous case, but here's another one - this prints # : # # BEGIN { # RS = "" # "echo 'foo\n\nbaz'" | getline # "echo 'foo\n\nbaz'" | getline # "echo 'bar\n\nbaz'" | getline # print x # } # # John # -- # John DuBois spcecdt@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/ # BEGIN { RS = "" "echo 'foo\n\nbaz'" | getline ; print "echo 'foo\n\nbaz'" | getline ; print "echo 'bar\n\nbaz'" | getline ; print printf "x = <%s>\n", x } gawk-4.0.1+dfsg.orig/test/posix.in0000644000175000017500000000001011463242060016003 0ustar schotschot1:2,3 4 gawk-4.0.1+dfsg.orig/test/poundbang.awk0000755000175000017500000000003311463242060017002 0ustar schotschot#! /tmp/gawk -f { print } gawk-4.0.1+dfsg.orig/test/arryref3.ok0000644000175000017500000000015111463242060016407 0ustar schotschotgawk: arryref3.awk:17: fatal: attempt to use array `c (from b, from a)' in a scalar context EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/fstabplus.awk0000644000175000017500000000006011463242060017025 0ustar schotschotBEGIN { FS = "\t+" } { print $1, $2 } gawk-4.0.1+dfsg.orig/test/fcall_exit.awk0000644000175000017500000000066411463242060017146 0ustar schotschot#!/bin/awk -f function crash () { exit 1 } function true (a,b,c) { return 0 } BEGIN { if (ARGV[1] == 1) { print "true(1, 1, crash()) => crash properly." true(1, 1, crash()) } else if (ARGV[1] == 2) { print "true(1, crash(), 1) => do not crash properly." true(1, crash(),1) } else { print "true(1, crash()) => do not crash properly." true(1, crash()) } } # FdF gawk-4.0.1+dfsg.orig/test/convfmt.awk0000644000175000017500000000040211463242060016476 0ustar schotschotBEGIN { CONVFMT = "%2.2f" a = 123.456 b = a "" # give `a' string value also printf "a = %s\n", a CONVFMT = "%.6g" printf "a = %s\n", a a += 0 # make `a' numeric only again printf "a = %s\n", a # use `a' as string } gawk-4.0.1+dfsg.orig/test/ChangeLog0000644000175000017500000000611211734667107016112 0ustar schotschot2012-03-28 Arnold D. Robbins * 4.0.1: Release tar ball made. 2012-03-20 Arnold D. Robbins * Makefile.am (printfbad3): New test. * printfbad3.awk, printfbad3.ok: New files. 2012-02-22 Arnold D. Robbins * 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 . 2011-12-26 Arnold D. Robbins * Makefile.am (rri1): New test. * rri1.awk, rri1.in, rri1.ok: New files. 2011-12-06 Arnold D. Robbins * Makefile.am: Rationalize the $(CMP) lines wherever possible. 2011-10-24 Arnold D. Robbins * beginfile2.sh: Use `...` instead of $(...) for broken systems where /bin/sh doesn't support $(...). Thanks to Nelson Beebe for the report. 2011-10-21 John Haque * beginfile2.in, beginfile2.sh, beginfile2.ok: Adjust input file names. 2011-10-21 Corinna Vinschen * Makefile.am (beginfile2): Adjust for running out of srcdir. * beginfile2.sh: Same. 2011-10-02 Arnold D. Robbins * 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 . 2011-08-10 Arnold D. Robbins * 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. 2011-08-09 Arnold D. Robbins * 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' 2011-07-29 Arnold D. Robbins * Makefile.am (next): Redirect output to output file! 2011-07-28 Arnold D. Robbins * 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. 2011-07-26 Arnold D. Robbins * Makefile.am (getline4, gsubtst8): New tests. * getline4.awk, getline4.in, getline4.ok: New files. * gsubtst8.awk, gsubtst8.in, gsubtst8.ok: New files. 2011-07-15 Arnold D. Robbins * Makefile.am (gsubtst7): New test. * gsubtst7.awk, gsubtst7.in, gsubtst7.ok: New files. 2011-06-24 Arnold D. Robbins * Makefile.am (EXTRA_DIST): Add ChangeLog.0. * 4.0.0: Remake the tar ball. 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. gawk-4.0.1+dfsg.orig/test/sclforin.ok0000644000175000017500000000012011524325776016503 0ustar schotschotgawk: sclforin.awk:1: fatal: attempt to use scalar `j' as an array EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/mtchi18n.in0000644000175000017500000000000211463242060016275 0ustar schotschot gawk-4.0.1+dfsg.orig/test/rebuf.awk0000644000175000017500000000310011463242060016123 0ustar schotschot# From lole@epost.de Wed Sep 4 09:54:19 IDT 2002 # Article: 14288 of comp.lang.awk # Path: iad-read.news.verio.net!dfw-artgen!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!213.70.124.113!not-for-mail # From: LorenzAtWork # Newsgroups: comp.lang.awk # Subject: bug in gawk 3.1.1? # Date: Wed, 28 Aug 2002 10:34:50 +0200 # Lines: 45 # Message-ID: <7g1pmukv07c56ep3qav3uebnipdaohqh2l@4ax.com> # Reply-To: lole@epost.de # NNTP-Posting-Host: 213.70.124.113 # Mime-Version: 1.0 # Content-Type: text/plain; charset=us-ascii # Content-Transfer-Encoding: 7bit # X-Trace: fu-berlin.de 1030523788 53278293 213.70.124.113 (16 [68559]) # X-Newsreader: Forte Agent 1.91/32.564 # Xref: dfw-artgen comp.lang.awk:14288 # # hello all, # # I'm using the following script # BEGIN { RS="ti1\n(dwv,)?" s = 0 i = 0 } { if ($1 != "") s = $1 print ++i, s } # # to extract values from a file of the form # # ti1 # dwv,98.22 # ti1 # dwv,103.08 # ti1 # ti1 # dwv,196.25 # ti1 # dwv,210.62 # ti1 # dwv,223.53 # # The desired result for this example looks like # # 1 0 # 2 98.22 # 3 103.08 # 4 103.08 # 5 196.25 # 6 210.62 # 7 223.53 # # The script work fine the most time, but when run on the attached file # (sorry for the size, but the error would not appear with less data) I # get some (three with the attached file) lines that look like # # 1262 dwv,212.97 # 1277 dwv,174.33 # 1279 dwv,151.79 # # I can't think of a other reason for this than a bug in gawk! # # I'm running gawk 3.1.1 on winnt 4.0 # # best regards # Lorenz # # gawk-4.0.1+dfsg.orig/test/fldchgnf.awk0000644000175000017500000000005311463242060016577 0ustar schotschot{ OFS = ":"; $2 = ""; print $0; print NF } gawk-4.0.1+dfsg.orig/test/icasers.awk0000644000175000017500000000010711463242060016455 0ustar schotschotBEGIN { RS = "[[:upper:]\\n]+" } { print ; IGNORECASE = ! IGNORECASE } gawk-4.0.1+dfsg.orig/test/widesub3.awk0000644000175000017500000000015411463242060016553 0ustar schotschot{ if (substr($1,1,1) == substr($0,1,1)) print "substr matches" sub(/foo/,"bar") print nr++ } gawk-4.0.1+dfsg.orig/test/fsrs.ok0000644000175000017500000000002611463242060015630 0ustar schotschota b c d e f1 2 3 4 5 6gawk-4.0.1+dfsg.orig/test/printfbad2.in0000644000175000017500000000001311463242060016677 0ustar schotschota%28b%29%c gawk-4.0.1+dfsg.orig/test/rebuf.in0000644000175000017500000004024411463242060015761 0ustar schotschotti1 dwv,214.59 ti1 dwv,230.31 ti1 dwv,242.64 ti1 dwv,253.94 ti1 dwv,264.33 ti1 dwv,270.94 ti1 dwv,273.52 ti1 dwv,270.08 ti1 dwv,263.19 ti1 dwv,254.45 ti1 dwv,244.91 ti1 dwv,234.55 ti1 dwv,222.49 ti1 dwv,209.94 ti1 dwv,197.17 ti1 dwv,182.89 ti1 dwv,169.76 ti1 dwv,158.59 ti1 dwv,145.37 ti1 dwv,135.46 ti1 dwv,124.77 ti1 dwv,115.98 ti1 dwv,108.77 ti1 dwv,101.12 ti1 dwv,94.45 ti1 dwv,89.08 ti1 dwv,84.63 ti1 dwv,81.05 ti1 dwv,78.93 ti1 dwv,76.65 ti1 dwv,75.59 ti1 ti1 ti1 dwv,77.47 ti1 dwv,80.17 ti1 dwv,83.90 ti1 dwv,88.56 ti1 dwv,95.69 ti1 dwv,97.48 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,203.08 ti1 dwv,218.22 ti1 dwv,229.37 ti1 dwv,238.49 ti1 dwv,247.43 ti1 dwv,255.22 ti1 dwv,261.31 ti1 dwv,262.36 ti1 dwv,260.66 ti1 dwv,256.33 ti1 dwv,249.34 ti1 dwv,240.03 ti1 dwv,228.55 ti1 dwv,215.42 ti1 dwv,203.37 ti1 dwv,190.01 ti1 dwv,177.81 ti1 dwv,165.44 ti1 dwv,152.92 ti1 dwv,142.03 ti1 dwv,132.91 ti1 dwv,124.48 ti1 dwv,116.45 ti1 dwv,109.06 ti1 dwv,103.27 ti1 dwv,98.87 ti1 dwv,94.95 ti1 dwv,92.56 ti1 dwv,90.47 ti1 dwv,89.48 ti1 ti1 dwv,90.53 ti1 dwv,93.07 ti1 dwv,97.12 ti1 dwv,101.82 ti1 dwv,108.18 ti1 dwv,109.73 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,202.97 ti1 dwv,217.38 ti1 dwv,231.73 ti1 dwv,243.11 ti1 dwv,255.37 ti1 dwv,264.12 ti1 dwv,269.64 ti1 dwv,270.98 ti1 dwv,269.65 ti1 dwv,264.55 ti1 dwv,257.16 ti1 dwv,246.01 ti1 dwv,232.88 ti1 dwv,219.85 ti1 dwv,208.79 ti1 dwv,197.00 ti1 dwv,183.93 ti1 dwv,172.00 ti1 dwv,160.55 ti1 dwv,150.59 ti1 dwv,141.47 ti1 dwv,133.02 ti1 dwv,126.21 ti1 dwv,120.64 ti1 dwv,115.79 ti1 dwv,111.62 ti1 dwv,108.41 ti1 dwv,106.41 ti1 ti1 ti1 dwv,109.08 ti1 dwv,113.23 ti1 dwv,118.57 ti1 dwv,122.57 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,208.07 ti1 dwv,224.14 ti1 dwv,236.28 ti1 dwv,248.12 ti1 dwv,258.97 ti1 dwv,267.74 ti1 dwv,272.47 ti1 dwv,271.52 ti1 dwv,266.80 ti1 dwv,258.61 ti1 dwv,249.30 ti1 dwv,239.19 ti1 dwv,228.28 ti1 dwv,215.79 ti1 dwv,203.86 ti1 dwv,190.08 ti1 dwv,177.40 ti1 dwv,163.81 ti1 dwv,152.60 ti1 dwv,141.33 ti1 dwv,130.98 ti1 dwv,121.98 ti1 dwv,114.08 ti1 dwv,106.61 ti1 dwv,99.75 ti1 dwv,93.10 ti1 dwv,86.57 ti1 dwv,80.62 ti1 dwv,76.05 ti1 dwv,71.52 ti1 dwv,68.85 ti1 dwv,67.46 ti1 dwv,66.86 ti1 dwv,67.51 ti1 dwv,69.75 ti1 dwv,72.85 ti1 dwv,76.23 ti1 dwv,82.85 ti1 dwv,89.33 ti1 dwv,93.39 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,188.37 ti1 dwv,204.42 ti1 dwv,217.16 ti1 dwv,228.89 ti1 dwv,238.83 ti1 dwv,247.70 ti1 dwv,253.59 ti1 dwv,257.17 ti1 ti1 dwv,254.00 ti1 dwv,248.24 ti1 dwv,240.14 ti1 dwv,229.42 ti1 dwv,218.97 ti1 dwv,205.09 ti1 dwv,192.61 ti1 dwv,179.74 ti1 dwv,166.76 ti1 dwv,155.36 ti1 dwv,143.58 ti1 dwv,131.40 ti1 dwv,121.84 ti1 dwv,112.46 ti1 dwv,105.41 ti1 dwv,97.15 ti1 dwv,90.09 ti1 dwv,84.79 ti1 dwv,80.52 ti1 dwv,75.58 ti1 dwv,72.59 ti1 dwv,69.39 ti1 dwv,67.51 ti1 dwv,66.42 ti1 ti1 ti1 dwv,67.82 ti1 dwv,69.76 ti1 dwv,73.19 ti1 dwv,77.35 ti1 dwv,82.36 ti1 dwv,87.82 ti1 dwv,93.30 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,190.58 ti1 dwv,203.43 ti1 dwv,216.48 ti1 dwv,228.89 ti1 dwv,241.91 ti1 dwv,251.60 ti1 dwv,257.78 ti1 dwv,262.18 ti1 dwv,263.13 ti1 dwv,260.91 ti1 dwv,255.34 ti1 dwv,247.17 ti1 dwv,236.85 ti1 dwv,225.24 ti1 dwv,213.39 ti1 dwv,201.46 ti1 dwv,187.77 ti1 dwv,175.31 ti1 dwv,162.95 ti1 dwv,152.55 ti1 dwv,142.56 ti1 dwv,132.94 ti1 dwv,125.00 ti1 dwv,117.69 ti1 dwv,110.96 ti1 dwv,105.02 ti1 dwv,101.78 ti1 dwv,98.48 ti1 dwv,97.06 ti1 dwv,96.50 ti1 ti1 dwv,98.48 ti1 dwv,101.18 ti1 dwv,104.56 ti1 dwv,109.67 ti1 dwv,115.86 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,200.02 ti1 dwv,217.51 ti1 dwv,233.21 ti1 dwv,245.72 ti1 dwv,258.21 ti1 dwv,267.24 ti1 dwv,273.79 ti1 dwv,273.20 ti1 dwv,270.38 ti1 dwv,260.76 ti1 dwv,250.05 ti1 dwv,241.32 ti1 dwv,231.14 ti1 dwv,219.83 ti1 dwv,206.13 ti1 dwv,193.24 ti1 dwv,180.73 ti1 dwv,167.82 ti1 dwv,156.94 ti1 dwv,144.13 ti1 dwv,134.40 ti1 dwv,125.23 ti1 dwv,116.13 ti1 dwv,107.34 ti1 dwv,99.71 ti1 dwv,94.11 ti1 dwv,88.91 ti1 dwv,84.51 ti1 dwv,81.50 ti1 dwv,78.66 ti1 dwv,76.57 ti1 dwv,75.82 ti1 ti1 dwv,76.88 ti1 dwv,79.03 ti1 dwv,82.12 ti1 dwv,85.73 ti1 dwv,91.05 ti1 dwv,96.31 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,184.18 ti1 dwv,201.10 ti1 dwv,214.21 ti1 dwv,226.18 ti1 dwv,237.72 ti1 dwv,247.57 ti1 dwv,254.36 ti1 dwv,258.34 ti1 dwv,259.80 ti1 dwv,257.76 ti1 dwv,253.17 ti1 dwv,246.51 ti1 dwv,237.92 ti1 dwv,227.09 ti1 dwv,214.13 ti1 dwv,202.20 ti1 dwv,189.21 ti1 dwv,177.65 ti1 dwv,166.18 ti1 dwv,154.03 ti1 dwv,142.21 ti1 dwv,131.51 ti1 dwv,121.28 ti1 dwv,111.80 ti1 dwv,104.47 ti1 dwv,98.80 ti1 dwv,94.76 ti1 dwv,91.81 ti1 dwv,89.17 ti1 dwv,88.00 ti1 ti1 ti1 dwv,89.20 ti1 dwv,91.17 ti1 dwv,94.35 ti1 dwv,99.00 ti1 dwv,105.43 ti1 dwv,109.34 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,194.84 ti1 dwv,212.05 ti1 dwv,226.30 ti1 dwv,239.03 ti1 dwv,250.94 ti1 dwv,259.73 ti1 dwv,266.64 ti1 dwv,269.67 ti1 dwv,269.03 ti1 dwv,265.03 ti1 dwv,258.23 ti1 dwv,249.32 ti1 dwv,238.03 ti1 dwv,226.20 ti1 dwv,213.46 ti1 dwv,200.53 ti1 dwv,187.65 ti1 dwv,174.89 ti1 dwv,163.22 ti1 dwv,152.47 ti1 dwv,142.65 ti1 dwv,133.97 ti1 dwv,126.59 ti1 dwv,120.52 ti1 dwv,115.57 ti1 dwv,111.49 ti1 dwv,108.03 ti1 dwv,106.01 ti1 dwv,105.28 ti1 ti1 dwv,106.91 ti1 dwv,109.73 ti1 dwv,114.91 ti1 dwv,120.66 ti1 dwv,123.74 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,211.57 ti1 dwv,227.06 ti1 dwv,240.57 ti1 dwv,252.26 ti1 dwv,262.67 ti1 dwv,270.66 ti1 dwv,273.40 ti1 dwv,270.25 ti1 dwv,263.76 ti1 dwv,256.03 ti1 dwv,246.87 ti1 dwv,237.10 ti1 dwv,225.11 ti1 dwv,211.53 ti1 dwv,197.77 ti1 dwv,185.75 ti1 dwv,173.00 ti1 dwv,159.31 ti1 dwv,147.18 ti1 dwv,134.84 ti1 dwv,125.07 ti1 dwv,115.82 ti1 dwv,107.33 ti1 dwv,100.07 ti1 dwv,93.55 ti1 dwv,87.60 ti1 dwv,81.75 ti1 dwv,77.03 ti1 dwv,73.39 ti1 dwv,70.97 ti1 dwv,67.94 ti1 dwv,66.64 ti1 dwv,65.80 ti1 ti1 dwv,66.85 ti1 dwv,68.78 ti1 dwv,71.47 ti1 dwv,74.20 ti1 dwv,78.68 ti1 dwv,85.08 ti1 dwv,87.47 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,185.81 ti1 dwv,201.66 ti1 dwv,215.07 ti1 dwv,227.26 ti1 dwv,238.00 ti1 dwv,247.64 ti1 dwv,255.03 ti1 dwv,257.12 ti1 dwv,256.17 ti1 dwv,253.47 ti1 dwv,248.93 ti1 dwv,241.39 ti1 dwv,231.45 ti1 dwv,220.49 ti1 dwv,208.48 ti1 dwv,196.04 ti1 dwv,182.73 ti1 dwv,169.40 ti1 dwv,157.24 ti1 dwv,145.56 ti1 dwv,133.54 ti1 dwv,124.01 ti1 dwv,114.55 ti1 dwv,105.75 ti1 dwv,98.32 ti1 dwv,91.91 ti1 dwv,86.08 ti1 dwv,81.35 ti1 dwv,77.78 ti1 dwv,73.85 ti1 dwv,71.12 ti1 dwv,68.53 ti1 dwv,67.09 ti1 dwv,66.34 ti1 ti1 ti1 dwv,67.92 ti1 dwv,70.08 ti1 dwv,73.78 ti1 dwv,78.68 ti1 dwv,84.33 ti1 dwv,90.25 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,183.19 ti1 dwv,198.96 ti1 dwv,213.55 ti1 dwv,225.91 ti1 dwv,237.33 ti1 dwv,246.66 ti1 dwv,254.98 ti1 dwv,259.46 ti1 dwv,261.02 ti1 dwv,260.02 ti1 dwv,255.96 ti1 dwv,249.08 ti1 dwv,240.15 ti1 dwv,229.51 ti1 dwv,217.21 ti1 dwv,205.06 ti1 dwv,192.62 ti1 dwv,177.43 ti1 dwv,165.06 ti1 dwv,152.36 ti1 dwv,142.35 ti1 dwv,134.58 ti1 dwv,126.20 ti1 dwv,119.86 ti1 dwv,113.67 ti1 dwv,108.20 ti1 dwv,104.71 ti1 dwv,100.83 ti1 dwv,98.96 ti1 dwv,98.38 ti1 ti1 dwv,100.29 ti1 dwv,103.47 ti1 dwv,107.73 ti1 dwv,113.04 ti1 dwv,118.90 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,200.70 ti1 dwv,217.77 ti1 dwv,232.45 ti1 dwv,244.28 ti1 dwv,256.61 ti1 dwv,265.93 ti1 dwv,272.01 ti1 ti1 dwv,268.67 ti1 dwv,260.53 ti1 dwv,252.09 ti1 dwv,243.72 ti1 dwv,232.68 ti1 dwv,220.49 ti1 dwv,206.88 ti1 dwv,193.98 ti1 dwv,181.33 ti1 dwv,168.61 ti1 dwv,156.50 ti1 dwv,145.54 ti1 dwv,136.43 ti1 dwv,125.95 ti1 dwv,117.26 ti1 dwv,109.81 ti1 dwv,103.36 ti1 dwv,97.15 ti1 dwv,92.86 ti1 dwv,89.02 ti1 dwv,86.39 ti1 dwv,84.44 ti1 dwv,83.72 ti1 ti1 dwv,85.89 ti1 dwv,88.39 ti1 dwv,92.31 ti1 dwv,96.00 ti1 dwv,100.24 ti1 dwv,102.55 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,197.15 ti1 dwv,212.33 ti1 dwv,225.48 ti1 dwv,236.75 ti1 dwv,247.52 ti1 dwv,255.21 ti1 dwv,260.74 ti1 dwv,262.81 ti1 dwv,262.09 ti1 dwv,258.08 ti1 dwv,250.83 ti1 dwv,242.39 ti1 dwv,230.86 ti1 dwv,219.62 ti1 dwv,206.80 ti1 dwv,193.41 ti1 dwv,180.60 ti1 dwv,168.20 ti1 dwv,157.77 ti1 dwv,145.25 ti1 dwv,136.23 ti1 dwv,126.28 ti1 dwv,118.10 ti1 dwv,110.74 ti1 dwv,105.29 ti1 dwv,99.75 ti1 dwv,95.61 ti1 dwv,92.16 ti1 dwv,89.93 ti1 dwv,88.45 ti1 ti1 dwv,89.11 ti1 dwv,90.87 ti1 dwv,94.21 ti1 dwv,98.16 ti1 dwv,104.24 ti1 dwv,108.98 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,195.81 ti1 dwv,211.95 ti1 dwv,226.36 ti1 dwv,240.61 ti1 dwv,251.93 ti1 dwv,259.13 ti1 dwv,265.36 ti1 dwv,269.71 ti1 dwv,270.27 ti1 dwv,266.44 ti1 dwv,260.44 ti1 dwv,251.94 ti1 dwv,240.79 ti1 dwv,228.95 ti1 dwv,215.90 ti1 dwv,203.25 ti1 dwv,190.01 ti1 dwv,177.92 ti1 dwv,165.60 ti1 dwv,155.49 ti1 dwv,144.32 ti1 dwv,136.07 ti1 dwv,127.64 ti1 dwv,120.28 ti1 dwv,114.57 ti1 dwv,109.99 ti1 dwv,106.36 ti1 dwv,104.49 ti1 dwv,103.84 ti1 ti1 dwv,105.77 ti1 dwv,107.83 ti1 dwv,112.41 ti1 dwv,117.71 ti1 dwv,120.66 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,210.13 ti1 dwv,225.03 ti1 dwv,238.76 ti1 dwv,250.50 ti1 dwv,261.18 ti1 dwv,269.22 ti1 dwv,274.18 ti1 dwv,272.28 ti1 dwv,266.66 ti1 dwv,258.68 ti1 dwv,249.88 ti1 dwv,239.94 ti1 dwv,227.14 ti1 dwv,213.22 ti1 dwv,197.58 ti1 dwv,184.86 ti1 dwv,172.52 ti1 dwv,160.19 ti1 dwv,149.20 ti1 dwv,137.49 ti1 dwv,127.86 ti1 dwv,118.91 ti1 dwv,110.49 ti1 dwv,102.73 ti1 dwv,96.33 ti1 dwv,90.95 ti1 dwv,86.38 ti1 dwv,82.72 ti1 dwv,79.65 ti1 dwv,77.61 ti1 dwv,75.70 ti1 dwv,74.49 ti1 ti1 ti1 dwv,76.48 ti1 dwv,79.14 ti1 dwv,82.84 ti1 dwv,87.86 ti1 dwv,92.69 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,181.33 ti1 dwv,196.86 ti1 dwv,210.98 ti1 dwv,223.13 ti1 dwv,233.90 ti1 dwv,243.19 ti1 dwv,250.57 ti1 dwv,255.00 ti1 dwv,256.36 ti1 dwv,255.16 ti1 dwv,250.15 ti1 dwv,242.80 ti1 dwv,233.82 ti1 dwv,223.41 ti1 dwv,210.81 ti1 dwv,199.04 ti1 dwv,187.39 ti1 dwv,174.14 ti1 dwv,162.62 ti1 dwv,151.39 ti1 dwv,139.59 ti1 dwv,128.71 ti1 dwv,119.17 ti1 dwv,111.02 ti1 dwv,103.91 ti1 dwv,96.78 ti1 dwv,91.56 ti1 dwv,87.13 ti1 dwv,83.22 ti1 dwv,80.50 ti1 dwv,76.83 ti1 dwv,74.24 ti1 dwv,70.80 ti1 dwv,69.04 ti1 dwv,67.12 ti1 dwv,66.51 ti1 ti1 dwv,68.77 ti1 dwv,72.19 ti1 dwv,77.34 ti1 dwv,84.04 ti1 dwv,88.55 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,190.51 ti1 dwv,207.14 ti1 dwv,220.57 ti1 dwv,232.51 ti1 dwv,243.35 ti1 dwv,252.41 ti1 dwv,258.62 ti1 dwv,262.18 ti1 ti1 dwv,259.10 ti1 dwv,253.54 ti1 dwv,245.44 ti1 dwv,235.55 ti1 dwv,223.43 ti1 dwv,209.91 ti1 dwv,197.52 ti1 dwv,185.90 ti1 dwv,172.13 ti1 dwv,161.09 ti1 dwv,150.58 ti1 dwv,140.37 ti1 dwv,130.27 ti1 dwv,122.13 ti1 dwv,114.99 ti1 dwv,108.76 ti1 dwv,104.67 ti1 dwv,100.36 ti1 dwv,97.61 ti1 dwv,95.48 ti1 dwv,94.83 ti1 dwv,95.45 ti1 dwv,97.15 ti1 dwv,100.73 ti1 dwv,105.10 ti1 dwv,111.46 ti1 dwv,118.27 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,202.92 ti1 dwv,220.25 ti1 dwv,233.35 ti1 dwv,243.48 ti1 dwv,254.85 ti1 dwv,265.75 ti1 dwv,272.62 ti1 ti1 dwv,269.36 ti1 dwv,261.82 ti1 dwv,252.85 ti1 dwv,244.08 ti1 dwv,232.96 ti1 dwv,219.59 ti1 dwv,207.32 ti1 dwv,193.87 ti1 dwv,181.77 ti1 dwv,168.60 ti1 dwv,155.76 ti1 dwv,144.03 ti1 dwv,134.07 ti1 dwv,123.46 ti1 dwv,114.47 ti1 dwv,107.64 ti1 dwv,100.46 ti1 dwv,94.53 ti1 dwv,89.28 ti1 dwv,84.59 ti1 dwv,80.96 ti1 dwv,78.54 ti1 dwv,76.28 ti1 dwv,75.51 ti1 ti1 dwv,76.55 ti1 dwv,78.55 ti1 dwv,81.57 ti1 dwv,85.18 ti1 dwv,90.61 ti1 dwv,96.01 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,184.51 ti1 dwv,201.57 ti1 dwv,216.33 ti1 dwv,228.69 ti1 dwv,239.90 ti1 dwv,250.41 ti1 dwv,257.91 ti1 dwv,262.29 ti1 dwv,263.41 ti1 dwv,261.70 ti1 dwv,256.75 ti1 dwv,246.82 ti1 dwv,236.35 ti1 dwv,225.17 ti1 dwv,212.90 ti1 dwv,201.61 ti1 dwv,188.42 ti1 dwv,175.92 ti1 dwv,163.70 ti1 dwv,153.18 ti1 dwv,142.89 ti1 dwv,132.95 ti1 dwv,125.18 ti1 dwv,117.61 ti1 dwv,110.36 ti1 dwv,104.56 ti1 dwv,100.13 ti1 dwv,96.64 ti1 dwv,93.52 ti1 dwv,91.91 ti1 ti1 ti1 dwv,93.84 ti1 dwv,97.13 ti1 dwv,101.08 ti1 dwv,107.19 ti1 dwv,111.89 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,195.89 ti1 dwv,212.65 ti1 dwv,226.60 ti1 dwv,239.28 ti1 dwv,251.28 ti1 dwv,259.92 ti1 dwv,266.03 ti1 dwv,269.76 ti1 ti1 dwv,265.55 ti1 dwv,258.92 ti1 dwv,250.42 ti1 dwv,240.04 ti1 dwv,229.03 ti1 dwv,216.69 ti1 dwv,204.21 ti1 dwv,191.25 ti1 dwv,178.40 ti1 dwv,168.31 ti1 dwv,157.47 ti1 dwv,148.62 ti1 dwv,139.12 ti1 dwv,129.54 ti1 dwv,121.65 ti1 dwv,114.59 ti1 dwv,109.30 ti1 dwv,106.39 ti1 dwv,104.71 ti1 ti1 dwv,106.41 ti1 dwv,109.22 ti1 dwv,113.62 ti1 dwv,118.31 ti1 dwv,124.34 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,205.67 ti1 dwv,221.25 ti1 dwv,235.02 ti1 dwv,247.47 ti1 dwv,258.37 ti1 dwv,267.42 ti1 dwv,272.60 ti1 dwv,272.00 ti1 dwv,267.91 ti1 dwv,260.38 ti1 dwv,251.10 ti1 dwv,241.32 ti1 dwv,230.96 ti1 dwv,217.34 ti1 dwv,204.99 ti1 dwv,191.24 ti1 dwv,178.58 ti1 dwv,164.79 ti1 dwv,153.07 ti1 dwv,141.06 ti1 dwv,129.86 ti1 dwv,119.79 ti1 dwv,111.13 ti1 dwv,103.53 ti1 dwv,96.95 ti1 dwv,89.42 ti1 dwv,85.22 ti1 dwv,80.54 ti1 dwv,76.85 ti1 dwv,74.41 ti1 dwv,72.12 ti1 dwv,71.21 ti1 ti1 ti1 dwv,72.13 ti1 dwv,74.22 ti1 dwv,76.95 ti1 dwv,80.65 ti1 dwv,85.36 ti1 dwv,90.60 ti1 dwv,92.36 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,191.27 ti1 dwv,205.03 ti1 dwv,218.89 ti1 dwv,230.87 ti1 dwv,241.63 ti1 dwv,249.83 ti1 dwv,255.42 ti1 dwv,257.98 ti1 dwv,257.33 ti1 dwv,252.87 ti1 dwv,245.90 ti1 dwv,237.78 ti1 dwv,227.14 ti1 dwv,214.67 ti1 dwv,202.31 ti1 dwv,188.68 ti1 dwv,175.96 ti1 dwv,163.25 ti1 dwv,151.43 ti1 dwv,139.79 ti1 dwv,130.40 ti1 dwv,118.92 ti1 dwv,110.88 ti1 dwv,101.92 ti1 dwv,94.45 ti1 dwv,88.13 ti1 dwv,83.19 ti1 dwv,79.11 ti1 dwv,74.60 ti1 dwv,71.86 ti1 dwv,68.77 ti1 dwv,66.57 ti1 dwv,65.24 ti1 dwv,64.41 ti1 ti1 dwv,64.92 ti1 dwv,66.62 ti1 dwv,68.93 ti1 dwv,72.77 ti1 dwv,77.76 ti1 dwv,83.41 ti1 dwv,89.19 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,182.68 ti1 dwv,199.88 ti1 dwv,214.62 ti1 dwv,227.29 ti1 dwv,238.62 ti1 dwv,249.01 ti1 dwv,256.68 ti1 dwv,262.71 ti1 dwv,263.44 ti1 dwv,259.87 ti1 dwv,254.66 ti1 dwv,248.11 ti1 dwv,240.01 ti1 dwv,229.30 ti1 dwv,216.52 ti1 dwv,205.15 ti1 dwv,192.49 ti1 dwv,179.70 ti1 dwv,167.51 ti1 dwv,156.31 ti1 dwv,145.97 ti1 dwv,135.93 ti1 dwv,128.06 ti1 dwv,119.45 ti1 dwv,113.01 ti1 dwv,108.31 ti1 dwv,103.79 ti1 dwv,100.92 ti1 dwv,98.90 ti1 dwv,98.28 ti1 ti1 dwv,100.12 ti1 dwv,102.38 ti1 dwv,106.07 ti1 dwv,111.06 ti1 dwv,117.00 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,202.42 ti1 dwv,217.46 ti1 dwv,232.83 ti1 dwv,245.05 ti1 dwv,256.39 ti1 dwv,265.28 ti1 dwv,271.80 ti1 ti1 dwv,268.63 ti1 dwv,261.21 ti1 dwv,253.57 ti1 dwv,244.41 ti1 dwv,233.79 ti1 dwv,220.80 ti1 dwv,209.24 ti1 dwv,196.54 ti1 dwv,183.38 ti1 dwv,170.14 ti1 dwv,157.79 ti1 dwv,144.31 ti1 dwv,131.53 ti1 dwv,122.20 ti1 dwv,113.46 ti1 dwv,106.57 ti1 dwv,100.93 ti1 dwv,96.80 ti1 dwv,92.10 ti1 dwv,88.77 ti1 dwv,86.07 ti1 dwv,83.75 ti1 dwv,82.40 ti1 ti1 ti1 ti1 ti1 dwv,84.82 ti1 dwv,88.34 ti1 dwv,92.06 ti1 dwv,98.22 ti1 dwv,103.08 ti1 ti1 ti1 ti1 ti1 ti1 dwv,196.25 ti1 dwv,210.62 ti1 dwv,223.53 ti1 dwv,235.01 ti1 dwv,245.30 ti1 dwv,253.56 ti1 dwv,259.86 ti1 dwv,261.87 ti1 ti1 dwv,257.71 ti1 dwv,251.10 ti1 dwv,242.25 ti1 dwv,232.00 ti1 dwv,219.62 ti1 dwv,207.54 ti1 dwv,194.54 ti1 dwv,182.85 ti1 dwv,170.49 ti1 dwv,158.24 ti1 dwv,147.54 ti1 dwv,137.40 ti1 dwv,129.81 ti1 dwv,121.07 ti1 dwv,114.39 ti1 dwv,109.32 ti1 dwv,103.67 ti1 dwv,99.51 ti1 dwv,96.53 ti1 dwv,94.67 ti1 dwv,93.79 ti1 ti1 dwv,95.31 ti1 dwv,98.43 ti1 dwv,102.95 ti1 dwv,109.01 ti1 dwv,115.86 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,209.63 ti1 dwv,224.03 ti1 dwv,236.93 ti1 dwv,249.17 ti1 dwv,259.34 ti1 dwv,267.41 ti1 dwv,271.07 ti1 dwv,270.51 ti1 dwv,263.93 ti1 dwv,255.80 ti1 dwv,246.03 ti1 dwv,235.96 ti1 dwv,223.79 ti1 dwv,209.68 ti1 dwv,196.98 ti1 dwv,184.70 ti1 dwv,171.16 ti1 dwv,157.06 ti1 dwv,145.05 ti1 dwv,133.80 ti1 dwv,123.45 ti1 dwv,114.06 ti1 dwv,106.78 ti1 dwv,98.12 ti1 dwv,91.19 ti1 dwv,84.78 ti1 dwv,80.10 ti1 dwv,74.95 ti1 dwv,71.88 ti1 dwv,68.51 ti1 dwv,66.13 ti1 dwv,64.64 ti1 dwv,63.65 ti1 dwv,63.06 ti1 ti1 dwv,64.29 ti1 dwv,66.41 ti1 dwv,68.95 ti1 dwv,73.12 ti1 dwv,78.00 ti1 dwv,83.67 ti1 dwv,85.55 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,187.86 ti1 dwv,202.65 ti1 dwv,216.23 ti1 dwv,228.24 ti1 dwv,239.81 ti1 dwv,248.77 ti1 dwv,252.97 ti1 dwv,254.72 ti1 ti1 dwv,253.22 ti1 dwv,247.80 ti1 dwv,239.99 ti1 dwv,229.87 ti1 dwv,218.26 ti1 dwv,205.99 ti1 dwv,193.09 ti1 dwv,180.59 ti1 dwv,167.42 ti1 dwv,154.33 ti1 dwv,142.32 ti1 dwv,131.88 ti1 dwv,122.32 ti1 dwv,112.84 ti1 dwv,104.07 ti1 dwv,96.62 ti1 dwv,90.02 ti1 dwv,84.43 ti1 dwv,79.90 ti1 dwv,74.59 ti1 dwv,71.27 ti1 dwv,67.37 ti1 dwv,64.97 ti1 dwv,62.82 ti1 dwv,61.60 ti1 ti1 ti1 dwv,62.99 ti1 dwv,64.80 ti1 dwv,68.51 ti1 dwv,72.70 ti1 dwv,77.97 ti1 dwv,84.10 ti1 dwv,88.07 ti1 ti1 ti1 ti1 ti1 ti1 ti1 ti1 dwv,184.25 ti1 dwv,199.56 ti1 dwv,212.97 ti1 dwv,226.37 ti1 dwv,237.23 ti1 dwv,247.66 ti1 dwv,254.97 ti1 dwv,259.77 ti1 dwv,261.89 ti1 dwv,260.39 ti1 dwv,255.67 ti1 dwv,248.49 ti1 dwv,238.75 ti1 dwv,228.34 ti1 dwv,215.95 ti1 dwv,201.71 ti1 dwv,187.12 ti1 dwv,174.33 ti1 dwv,162.05 ti1 dwv,151.79 ti1 dwv,142.67 ti1 dwv,134.03 ti1 dwv,126.03 ti1 dwv,118.64 ti1 dwv,112.00 ti1 dwv,107.16 ti1 dwv,103.71 ti1 dwv,100.06 ti1 dwv,98.59 ti1 dwv,97.68 ti1 ti1 gawk-4.0.1+dfsg.orig/test/gsubtst6.ok0000644000175000017500000000001011463242060016425 0ustar schotschota:b:c:d gawk-4.0.1+dfsg.orig/test/fwtest3.ok0000644000175000017500000000000611654051011016244 0ustar schotschot12345 gawk-4.0.1+dfsg.orig/test/addcomma.ok0000644000175000017500000000035611463242060016426 0ustar schotschot0 0.00 -1 -1.00 -12.34 -12.34 12345 12,345.00 -1234567.89 -1,234,567.89 -123. -123.00 -123456 -123,456.00 gawk-4.0.1+dfsg.orig/test/ofmtbig.ok0000644000175000017500000000002511463242060016301 0ustar schotschot 0 99999999999 a 1 1 gawk-4.0.1+dfsg.orig/test/reindops.awk0000644000175000017500000000011711463242060016650 0ustar schotschot{ if ($1 !~ /^+[2-9]/) print "gawk is broken" else print "gawk is ok" } gawk-4.0.1+dfsg.orig/test/prt1eval.awk0000644000175000017500000000012111463242060016556 0ustar schotschotfunction tst () { sum += 1 return sum } BEGIN { OFMT = "%.0f" ; print tst() } gawk-4.0.1+dfsg.orig/test/rstest1.ok0000644000175000017500000000000411463242060016254 0ustar schotschot3 3 gawk-4.0.1+dfsg.orig/test/lint.ok0000644000175000017500000000043311463242060015623 0ustar schotschotgawk: lint.awk:6: warning: delete: index `2' not in array `a' gawk: lint.awk:7: warning: turning off `--lint' due to assignment to `LINT' gawk: lint.awk:10: warning: delete: index `4' not in array `a' gawk: lint.awk:11: warning: turning off `--lint' due to assignment to `LINT' done gawk-4.0.1+dfsg.orig/test/getlndir.ok0000644000175000017500000000002611463242060016463 0ustar schotschot4, -1, Is a directory gawk-4.0.1+dfsg.orig/test/pid.ok0000644000175000017500000000003111463242060015423 0ustar schotschotPID ok PPID ok All Done. gawk-4.0.1+dfsg.orig/test/getlnbuf.awk0000644000175000017500000000076611463242060016645 0ustar schotschot#Date: Tue, 21 Dec 1999 16:11:07 +0100 #From: Daniel Schnell #To: bug-gnu-utils@gnu.org #CC: arnold@gnu.org #Subject: BUG in gawk (version 3.0.4 linux, windows): Text mangeling in between # search for "@K@CODE" segment $0 ~ /@K@CODE/ { # get next record getline temp printf ("@K@CODE\n") printf ("%s\n",temp) } $0 !~ /@K@CODE/ { printf ("%s\n", $0) } gawk-4.0.1+dfsg.orig/test/fflush.ok0000644000175000017500000000010011463242060016133 0ustar schotschot1st 2nd 1st 2nd 1st 2nd 1st 2nd 1st 2nd 1st 2nd 1st 2nd 1st 2nd gawk-4.0.1+dfsg.orig/test/aadelete2.ok0000644000175000017500000000013511463614133016506 0ustar schotschotgawk: aadelete2.awk:9: fatal: attempt to use array `a["1"]' in a scalar context EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/regeq.ok0000644000175000017500000000000411463242060015752 0ustar schotschot0 7 gawk-4.0.1+dfsg.orig/test/nlinstr.awk0000644000175000017500000000010611463242060016514 0ustar schotschotBEGIN { RS = "" } { if (/^@/) print "not ok" else print "ok" } gawk-4.0.1+dfsg.orig/test/fsspcoln.in0000644000175000017500000000000611463242060016475 0ustar schotschota:b:c gawk-4.0.1+dfsg.orig/test/prtoeval.ok0000644000175000017500000000004711463242060016512 0ustar schotschot partial line: 'A STRING' gawk-4.0.1+dfsg.orig/test/clsflnam.in0000644000175000017500000000002511463242060016446 0ustar schotschotline 1 line 2 line 3 gawk-4.0.1+dfsg.orig/test/resplit.ok0000644000175000017500000000000211463242060016327 0ustar schotschotb gawk-4.0.1+dfsg.orig/test/pid.awk0000644000175000017500000000232411463242060015603 0ustar schotschot# From: John C. Oppenheimer # Subject: gawk-3.0.2 pid test # To: arnold@skeeve.atl.ga.us # Date: Mon, 10 Feb 1997 08:31:55 -0600 (CST) # # Thanks for the very quick reply. # # This all started when I was looking for how to do the equivalent of # "nextfile." I was after documentation and found our gawk down a few # revs. # # Looks like the nextfile functionality was added somewhere around # 2.15.5. There wasn't a way to do it, until now! Thanks for the # functionality! # # Saw the /dev/xxx capability and just tried it. # # Anyway, I wrote a pid test. I hope that it is portable. Wanted to # make a user test, but looks like id(1) is not very portable. But a # little test is better than none. # # John # # pid.ok is a zero length file # # ================== pid.awk ============ BEGIN { # 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 else print "PID ok" if (ppid != ok_ppid) printf "Bad ppid %d, wanted %d\n", ppid, ok_ppid else print "PPID ok" # ADR --- added # close("/dev/pid") # close("/dev/ppid") print "All Done." } gawk-4.0.1+dfsg.orig/test/asorti.ok0000644000175000017500000000043211463242060016155 0ustar schotschota[1] = "Alligator" a[2] = "Iguana" a[3] = "Nouns" a[4] = "aardvark" a[5] = "animal" a[6] = "people" a[7] = "zebra" a[8] = "zoo" ============ a[1] = "aardvark" a[2] = "Alligator" a[3] = "animal" a[4] = "Iguana" a[5] = "Nouns" a[6] = "people" a[7] = "zebra" a[8] = "zoo" ============ gawk-4.0.1+dfsg.orig/test/dumpvars.ok0000644000175000017500000000044111732151350016515 0ustar schotschotARGC: 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" gawk-4.0.1+dfsg.orig/test/splitdef.ok0000644000175000017500000000002111463242060016460 0ustar schotschotn = 6, a[3] = as gawk-4.0.1+dfsg.orig/test/fpat3.in0000644000175000017500000000000711654051011015660 0ustar schotschota,b,,c gawk-4.0.1+dfsg.orig/test/nondec.awk0000644000175000017500000000005311463242060016272 0ustar schotschotBEGIN { print 0x81c3e8, 0x744018, 00.34 } gawk-4.0.1+dfsg.orig/test/leaddig.awk0000644000175000017500000000033011463242060016413 0ustar schotschot# check that values with leading digits get converted the # right way, based on a note in comp.lang.awk. # # run with gawk -v x=2E -f leaddig.awk BEGIN { print "x =", x, (x == 2), (x == 2E0), (x == 2E), (x == 2D) } gawk-4.0.1+dfsg.orig/test/lc_num1.awk0000644000175000017500000000064211463242060016366 0ustar schotschot# Bug reported by Ulrich Drepper. # BEGIN { # printf("%'d %d\n", 1000000, 1000000) # } # April 2010: # This needs to be a smarter test so that systems without the %'d flag # don't generate a needless failure. BEGIN { s = sprintf("%'d", 1234) if (s == "1,234" || s == "1234") print "ok, or at least the quote flag isn't supported" else { command = "od -c" print("fail:", s) | command close(command) } } gawk-4.0.1+dfsg.orig/test/regx8bit.ok0000644000175000017500000000013411463242060016407 0ustar schotschot"å" = å "ä" = ä s = "så är det" match(s,/\yså/) = 1 s ~ /å/ = 1 s ~ /så/ = 1 s ~ /\yså/ = 1 gawk-4.0.1+dfsg.orig/test/parseme.ok0000644000175000017500000000044211463242060016311 0ustar schotschotgawk: parseme.awk:1: BEGIN { toupper(substr*line,1,12)) } gawk: parseme.awk:1: ^ syntax error 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 gawk-4.0.1+dfsg.orig/test/nofile.ok0000644000175000017500000000014211463242060016126 0ustar schotschotgawk: fatal: cannot open file `no/such/file' for reading (No such file or directory) EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/argarray.ok0000644000175000017500000000035111463242060016464 0ustar schotschothere we have 3 arguments which are gawk ./argarray.in - Environment variable TEST= and the current input file is called "" in main loop, this input file is known as "./argarray.in" in main loop, this input file is known as "-" gawk-4.0.1+dfsg.orig/test/sortempty.ok0000644000175000017500000000000211463242060016713 0ustar schotschot0 gawk-4.0.1+dfsg.orig/test/mbfw1.ok0000644000175000017500000000004611463242060015671 0ustar schotschotSite Kungsbacka Göteborg Stenungsund gawk-4.0.1+dfsg.orig/test/datanonl.in0000644000175000017500000000003411463242060016447 0ustar schotschotbleble@foo1.bh.pl denygawk-4.0.1+dfsg.orig/test/devfd1.ok0000644000175000017500000000172611463242060016034 0ustar schotschotthis is file f1, line 1 this is file f2, line 1 this is file f1, line 2 this is file f2, line 2 this is file f1, line 3 this is file f2, line 3 this is file f1, line 4 this is file f2, line 4 this is file f1, line 5 this is file f2, line 5 this is file f1, line 6 this is file f2, line 6 this is file f1, line 7 this is file f2, line 7 this is file f1, line 8 this is file f2, line 8 this is file f1, line 9 this is file f2, line 9 this is file f1, line 10 this is file f2, line 10 this is file f1, line 11 this is file f2, line 11 this is file f1, line 12 this is file f2, line 12 this is file f1, line 13 this is file f2, line 13 this is file f1, line 14 this is file f2, line 14 this is file f1, line 15 this is file f2, line 15 this is file f1, line 16 this is file f2, line 16 this is file f1, line 17 this is file f2, line 17 this is file f1, line 18 this is file f2, line 18 this is file f1, line 19 this is file f2, line 19 this is file f1, line 20 this is file f2, line 20 gawk-4.0.1+dfsg.orig/test/badargs.ok0000644000175000017500000000207311734665352016300 0ustar schotschotgawk: 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: (standard) -f progfile --file=progfile -F fs --field-separator=fs -v var=val --assign=var=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 -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. gawk is a pattern scanning and processing language. By default it reads standard input and writes standard output. Examples: gawk '{ sum += $1 }; END { print sum }' file gawk -F: '{ print $1 }' /etc/passwd gawk-4.0.1+dfsg.orig/test/sort1.ok0000644000175000017500000001347211561551450015741 0ustar schotschot [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--- gawk-4.0.1+dfsg.orig/test/aryprm5.awk0000644000175000017500000000005311463242060016423 0ustar schotschotfunction f(x){ x[1] = x } BEGIN { f(a) } gawk-4.0.1+dfsg.orig/test/iobug1.awk0000644000175000017500000000327011463242060016216 0ustar schotschot# From arnold@f7.net Fri Nov 26 11:53:12 2004 # X-Envelope-From: james@nocrew.org # X-Envelope-To: # To: bug-gawk@gnu.org # Subject: gawk 3.1.4: reproducible hang, regression from 3.1.3 # From: James Troup # Date: Fri, 26 Nov 2004 03:14:05 +0000 # Message-ID: <877jo9qp36.fsf@shiri.gloaming.local> # User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) # MIME-Version: 1.0 # Content-Type: text/plain; charset=us-ascii # # # Hi, # # A Debian user reported[0] gawk 3.1.4 broke a (relatively) complex # program that makes extensive use of awk, called 'apt-move'. I finally # managed to reduced the problem down to a 3 line test case, enclosed # below[1]. # # I believe the problem comes from the following code, introduced in # 3.1.4: # # [io.c, line 560] # | for (rp = red_head; rp != NULL; rp = rp->next) { # | if ((rp->flag & RED_EOF) && tree->type == Node_redirect_pipein) { # | if (rp->pid != -1) # | wait_any(0); # | } # # The problem is that, if we have an existing redirect which is a simple # file redirect[b] and it's hit EOF and we try to create a new '|' # redirect[c], this new code will try to wait(2) and if there are any # other redirects which _did_ spawn a child (like [a]) the wait() will # hang indefinitely waiting for it to exit. # # Hope that makes sense :) # # -- # James # # [0] http://bugs.debian.org/263964 # # [1] # ================================================================================ #!/usr/bin/gawk -f BEGIN { printf "" | "cat" # [a] getline line < "/dev/null" # [b] "true" | getline line # [c] } # ================================================================================ gawk-4.0.1+dfsg.orig/test/arrayref.ok0000644000175000017500000000000411463242060016462 0ustar schotschot1 1 gawk-4.0.1+dfsg.orig/test/arrayprm3.ok0000644000175000017500000000000211463242060016565 0ustar schotschot1 gawk-4.0.1+dfsg.orig/test/beginfile1.awk0000644000175000017500000000064111463242060017034 0ustar schotschotBEGINFILE { 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 } gawk-4.0.1+dfsg.orig/test/scalar.awk0000644000175000017500000000003611463242060016272 0ustar schotschotBEGIN{ sub(/x/,"",a) a[1] } gawk-4.0.1+dfsg.orig/test/inputred.ok0000644000175000017500000000000711463242060016504 0ustar schotschot-1.txt gawk-4.0.1+dfsg.orig/test/nfset.in0000644000175000017500000000005011463242060015764 0ustar schotschot1 2 1 2 3 4 1 2 3 4 5 1 2 3 4 5 6 7 8 1 gawk-4.0.1+dfsg.orig/test/gnuops2.ok0000644000175000017500000000001611463242060016247 0ustar schotschot3 3 3 3 3 3 3 gawk-4.0.1+dfsg.orig/test/nfset.ok0000644000175000017500000000005211463242060015771 0ustar schotschot1 2 1 2 3 4 1 2 3 4 5 1 2 3 4 5 1 gawk-4.0.1+dfsg.orig/test/minusstr.awk0000644000175000017500000000002411463242060016706 0ustar schotschotBEGIN { print-"6" } gawk-4.0.1+dfsg.orig/test/subamp.in0000644000175000017500000000000411463242060016133 0ustar schotschotaaa gawk-4.0.1+dfsg.orig/test/fsfwfs.awk0000644000175000017500000000007611463242060016327 0ustar schotschotBEGIN{FIELDWIDTHS="6 6 6 5";OFS=",";FS=FS}{print $1,$2,$3,$4} gawk-4.0.1+dfsg.orig/test/fsspcoln.ok0000644000175000017500000000000211463242060016474 0ustar schotschotb gawk-4.0.1+dfsg.orig/test/lintwarn.awk0000644000175000017500000000053411527016056016673 0ustar schotschot# 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 "" gawk-4.0.1+dfsg.orig/test/dynlj.ok0000644000175000017500000000003211463242060015770 0ustar schotschothello world gawk-4.0.1+dfsg.orig/test/regeq.awk0000644000175000017500000000134711463242060016136 0ustar schotschot#Date: Sat, 8 May 1999 17:42:20 +0200 #From: Iva Cabric #To: bug-gnu-utils@gnu.org #Cc: arnold@gnu.org #Subject: Problem in gawk with match # #Hello, # #gawk reports fatal error in match when first character in regexp is "=" : # #$ gawk '{ where = match($0, /=a/); print where}' #gawk: cmd. line:1: { where = match($0, /=a/); print where} #gawk: cmd. line:1: ^ parse error #gawk: cmd. line:1: fatal: match() cannot have 0 arguments # #Using "\=" instead "=" works without problems : # #$ gawk '{ where = match($0, /\=a/); print where}' #sdgfa #0 #asdfds=a #7 # #Other versions of awk have no problems with "/=/" (except oawk on SunOS). # #-- # @ # { where = match($0, /=a/); print where} gawk-4.0.1+dfsg.orig/test/getnr2tm.ok0000644000175000017500000000005111463242060016413 0ustar schotschot1 lines in 1 sec: 1 lines/sec; nlines=1 gawk-4.0.1+dfsg.orig/test/defref.ok0000644000175000017500000000017211463242060016110 0ustar schotschotgawk: warning: function `foo' called but never defined gawk: defref.awk:1: fatal: function `foo' not defined EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/pipeio2.ok0000644000175000017500000000067111463242060016230 0ustar schotschot'echo January 1997 | sed "s/[0-9]/./g"' January .... 'echo S M Tu W Th F S | sed "s/[0-9]/./g"' S M Tu W Th F S 'echo 1 2 3 4 | sed "s/[0-9]/./g"' . . . . 'echo 5 6 7 8 9 10 11 | sed "s/[0-9]/./g"' . . . . . .. .. 'echo 12 13 14 15 16 17 18 | sed "s/[0-9]/./g"' .. .. .. .. .. .. .. 'echo 19 20 21 22 23 24 25 | sed "s/[0-9]/./g"' .. .. .. .. .. .. .. 'echo 26 27 28 29 30 31 | sed "s/[0-9]/./g"' .. .. .. .. .. .. gawk-4.0.1+dfsg.orig/test/zeroe0.awk0000644000175000017500000000236611463242060016241 0ustar schotschot# From sbohdjal@matrox.com Tue Dec 31 11:41:25 2002 # Return-Path: # X-From_: sbohdjal@matrox.com Mon Dec 30 17:34:41 2002 # Message-Id: <4.3.1.1.20021230101824.00fc4bd8@mailbox.matrox.com> # Date: Mon, 30 Dec 2002 10:33:10 -0500 # To: bug-gawk@gnu.org # From: Serge Bohdjalian # Subject: GAWK 3.1.1 bug, DJGPP port # # When I run the following AWK file... # BEGIN { $0 = "00E0"; print $0 ", " ($0 && 1) ", " ($0 != ""); $1 = "00E0"; print $1 ", " ($1 && 1) ", " ($1 != ""); } # # With the SimTel version of GAWK 3.1.1 for Windows (downloadable from # ftp://ftp.cdrom.com/pub/simtelnet/gnu/djgpp/v2gnu/), I get the following # output... # # 00E0, 0, 1 # 00E0, 1, 1 # # With the Cygwin version of GAWK 3.1.1 for Windows, I get... # # 00E0, 1, 1 # 00E0, 1, 1 # # As far as I know, if "$0" isn't blank, the value of "($0 && 1)" should be # "1" (true). I get the same problem if I substitute "00E0" with "00E1" to # "00E9". Other strings don't have have this problem (for example, "00EA"). # The problem occurs whether I use file input or whether I manually assign # "$0" (as above). # # The problem is also discussed in a comp.lang.awk posting ("Bug in GAWK # 3.1.1?", Dec. 27, 2002). # # -Serge gawk-4.0.1+dfsg.orig/test/rstest1.awk0000644000175000017500000000012311463242060016427 0ustar schotschotBEGIN { RS = "" FS = ":" s = "a:b\nc:d" print split(s,a) print length(a[2]) } gawk-4.0.1+dfsg.orig/test/nlstrina.awk0000644000175000017500000000576411463242060016674 0ustar schotschot# From E.Ab@chem.rug.nl Wed Aug 2 13:16:53 2000 # Received: from mail.actcom.co.il # by localhost with POP3 (fetchmail-5.1.2) # for arnold@localhost (single-drop); Wed, 02 Aug 2000 13:16:53 -0400 (EDT) # Received: from lmail.actcom.co.il by actcom.co.il with ESMTP # (8.9.1a/actcom-0.2) id MAA21699 for ; # Wed, 2 Aug 2000 12:20:38 +0300 (EET DST) # (rfc931-sender: lmail.actcom.co.il [192.114.47.13]) # Received: from freefriends.org (freefriends.org [63.85.55.109]) # by lmail.actcom.co.il (8.9.3/8.9.1) with ESMTP id LAA22723 # for ; Wed, 2 Aug 2000 11:23:22 +0300 # Received: from mescaline.gnu.org (mescaline.gnu.org [158.121.106.21]) # by freefriends.org (8.9.3/8.9.3) with ESMTP id FAA23582 # for ; Wed, 2 Aug 2000 05:18:59 -0400 # Received: from dep.chem.rug.nl (dep.chem.rug.nl [129.125.7.81]) # by mescaline.gnu.org (8.9.1a/8.9.1) with ESMTP id FAA30670; # Wed, 2 Aug 2000 05:20:24 -0400 # Received: from rugmd34.chem.rug.nl (rugmd34.chem.rug.nl [129.125.42.34]) # by dep.chem.rug.nl (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id LAA17089; # Wed, 2 Aug 2000 11:20:23 +0200 # Received: from chem.rug.nl (localhost [127.0.0.1]) by rugmd34.chem.rug.nl (980427.SGI.8.8.8/980728.SGI.AUTOCF) via ESMTP id LAA25392; Wed, 2 Aug 2000 11:20:22 +0200 (MDT) # Sender: E.Ab@chem.rug.nl # Message-ID: <3987E7D5.2BDC5FD3@chem.rug.nl> # Date: Wed, 02 Aug 2000 11:20:21 +0200 # From: Eiso AB # X-Mailer: Mozilla 4.72C-SGI [en] (X11; I; IRIX 6.5 IP32) # X-Accept-Language: en # MIME-Version: 1.0 # To: bug-gnu-utils@gnu.org, arnold@gnu.org # Subject: bug? [GNU Awk 3.0.5] # # Content-Type: text/plain; charset=us-ascii # Content-Transfer-Encoding: 7bit # X-UIDL: \f8"!(8G!!ZL$#!h>X!! # Status: R # # hi Arnold, # # # Please try the script beneath... # I'm not sure if this is a bug or not, but I would expect # the empty string as an array index just to be treated # like any other string # # so if ("" in ta) would be true, and for ( i in ta ) should loop only once. # BEGIN { v="" ta[v]++ if ( v in ta) print "a",v,++ta[v],ta[v] print "b",v,++ta[v],ta[v] for( i in ta) print "c",++c,i,ta[i] } # # goodluck, Eiso # # -- # _________ # _______________________________/ Eiso AB \_________________________ # # o # # o Dept. of Biochemistry # University of Groningen # The Netherlands # o # . . # o ^ mailto:eiso@chem.rug.nl # | - _ mailto:eiso@dds.nl # \__|__/ http://md.chem.rug.nl/~eiso # | tel 4326 # | # / \ # / \ # | | # ________ ._| |_. ________________________________________________ # gawk-4.0.1+dfsg.orig/test/splitvar.ok0000644000175000017500000000000211463242060016511 0ustar schotschot4 gawk-4.0.1+dfsg.orig/test/onlynl.in0000644000175000017500000000000411463242060016157 0ustar schotschot gawk-4.0.1+dfsg.orig/test/igncfs.in0000644000175000017500000000005411463242060016122 0ustar schotschotthis is handled ok This is Not hanDLed Well gawk-4.0.1+dfsg.orig/test/aryprm4.awk0000644000175000017500000000005611463242060016425 0ustar schotschotfunction f(x){ x = 1 } BEGIN { f(a) a[1] } gawk-4.0.1+dfsg.orig/test/opasnidx.awk0000644000175000017500000000006511463242060016654 0ustar schotschotBEGIN { b = 1; a[b] = 2; a[b++] += 1; print b,a[1] } gawk-4.0.1+dfsg.orig/test/resplit.in0000644000175000017500000000001411463242060016327 0ustar schotschota:b:c d:e:f gawk-4.0.1+dfsg.orig/test/ofmt.awk0000644000175000017500000000237511463242060016002 0ustar schotschot# From dragon!knorke.saar.de!florian Wed Jul 16 10:47:27 1997 # Return-Path: # Message-ID: <19970716164451.63610@knorke.saar.de> # Date: Wed, 16 Jul 1997 16:44:51 +0200 # From: Florian La Roche # To: bug-gnu-utils@prep.ai.mit.edu # CC: arnold@gnu.ai.mit.edu # Subject: bug in gawk 3.0.3 # MIME-Version: 1.0 # Content-Type: text/plain; charset=us-ascii # X-Mailer: Mutt 0.76 # Status: R # Content-Length: 1725 # X-Lines: 177 # X-Display-Position: 0 # # I have a problem with gawk 3.0.3 on linux with libc 5.4.33. # The memory is corrupted, if I use OFMT = "%.12g". # With OFMT = "%.6g" evrything works fine, but I don't have enough # digits for the computation. # # Thanks a lot, # Florian La Roche # # Here is the sample awk-Script together with sample data: # BEGIN { OFMT = "%.12g" big = 99999999999 lowest = big small = 0 highest = small dir = "" } $0 ~ /^[0-9]+$/ { # some old awks do not think $0 is numeric, so use $1 if ($1 < lowest) lowest = $1 if ($1 > highest) highest = $1 next } $0 ~ /\/\.:$/ { if (dir != "") { if (highest != small) print dir, highest, lowest else print dir, "-", "-" } dir = substr($0, 1, length($0)-3) # trim off /.: lowest = big highest = small } gawk-4.0.1+dfsg.orig/test/out2.ok0000644000175000017500000000005611463242060015547 0ustar schotschotNormal print statement This printed on stdout gawk-4.0.1+dfsg.orig/test/fsbs.in0000644000175000017500000000000411463242060015601 0ustar schotschot1\2 gawk-4.0.1+dfsg.orig/test/gsubtst3.in0000644000175000017500000000425011463242060016431 0ustar schotschot(^) 12345 x12345 ($) 12345 12345x (^)|($) 12345 x12345x ($)|(^) 12345 x12345x 2 12345 1x345 (^)|2 12345 x1x345 2|(^) 12345 x1x345 ($)|2 12345 1x345x 2|($) 12345 1x345x (2)|(^) 12345 x1x345 (^)|(2) 12345 x1x345 (2)|($) 12345 1x345x ($)|(2) 12345 1x345x ((2)|(^)). 12345 xx45 ((^)|(2)). 12345 xx45 .((2)|($)) 12345 x34x .(($)|(2)) 12345 x34x (^)|6 12345 x12345 6|(^) 12345 x12345 ($)|6 12345 12345x 6|($) 12345 12345x 2|6|(^) 12345 x1x345 2|(^)|6 12345 x1x345 6|2|(^) 12345 x1x345 6|(^)|2 12345 x1x345 (^)|6|2 12345 x1x345 (^)|2|6 12345 x1x345 2|6|($) 12345 1x345x 2|($)|6 12345 1x345x 6|2|($) 12345 1x345x 6|($)|2 12345 1x345x ($)|6|2 12345 1x345x ($)|2|6 12345 1x345x 2|4|(^) 12345 x1x3x5 2|(^)|4 12345 x1x3x5 4|2|(^) 12345 x1x3x5 4|(^)|2 12345 x1x3x5 (^)|4|2 12345 x1x3x5 (^)|2|4 12345 x1x3x5 2|4|($) 12345 1x3x5x 2|($)|4 12345 1x3x5x 4|2|($) 12345 1x3x5x 4|($)|2 12345 1x3x5x ($)|4|2 12345 1x3x5x ($)|2|4 12345 1x3x5x x{0}((2)|(^)) 12345 x1x345 x{0}((^)|(2)) 12345 x1x345 x{0}((2)|($)) 12345 1x345x x{0}(($)|(2)) 12345 1x345x x*((2)|(^)) 12345 x1x345 x*((^)|(2)) 12345 x1x345 x*((2)|($)) 12345 1x345x x*(($)|(2)) 12345 1x345x x{0}^ 12345 x12345 x{0}$ 12345 12345x (x{0}^)|2 12345 x1x345 (x{0}$)|2 12345 1x345x gawk-4.0.1+dfsg.orig/test/lintold.ok0000644000175000017500000000214211463242060016321 0ustar schotschotgawk: lintold.awk:7: warning: `delete' is not supported in old awk gawk: lintold.awk:8: warning: old awk does not support the keyword `in' except after `for' gawk: lintold.awk:9: warning: old awk does not support operator `**=' gawk: lintold.awk:10: warning: old awk does not support the keyword `in' except after `for' gawk: lintold.awk:10: warning: old awk does not support multidimensional arrays gawk: lintold.awk:11: warning: operator `^=' is not supported in old awk gawk: lintold.awk:11: warning: old awk does not support operator `**' gawk: lintold.awk:11: warning: operator `^' is not supported in old awk gawk: lintold.awk:13: warning: old awk does not support multiple `BEGIN' or `END' rules gawk: lintold.awk:15: warning: old awk does not support the `\b' escape sequence gawk: lintold.awk:15: warning: old awk does not support the `\f' escape sequence gawk: lintold.awk:15: warning: old awk does not support the `\r' escape sequence gawk: lintold.awk:19: warning: old awk does not support multiple `BEGIN' or `END' rules 1 gawk: lintold.awk:14: warning: old awk does not support regexps as value of `FS' done gawk-4.0.1+dfsg.orig/test/mbstr1.awk0000644000175000017500000000013111463242060016231 0ustar schotschotBEGIN { print length("\x81\x82\x83\x84") print index("\x81\x82\x83\x84", "\x81\x82") } gawk-4.0.1+dfsg.orig/test/concat2.awk0000644000175000017500000000013511463242060016356 0ustar schotschotfunction f(s, x) { x = 1 s = 3 s = s x print s } BEGIN { for (i = 1; i <=12; i++) f() } gawk-4.0.1+dfsg.orig/test/funsemnl.ok0000644000175000017500000000000411463242060016476 0ustar schotschotfoo gawk-4.0.1+dfsg.orig/test/space.ok0000644000175000017500000000013511463242060015747 0ustar schotschotgawk: fatal: can't open source file ` ' for reading (No such file or directory) EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/wjposer1.ok0000644000175000017500000007064111463242060016437 0ustar schotschot%IH:exertion %P:nut'i %G:exertion %OIH:exertion %C:N %SF:abstractions-misc %S:JOPA/EDFR/VESE %ES:000088 %UID:002463 %MD:1999/03/15 %IH:information %P:ts'iyantsuk t'eooninzun %G:information %OIH:information %C:N %SF:abstractions-misc %S:JOPA/BRBI %UID:000986 %MD:1997/12/17 %IH:interval %P:k'et'uk %G:interval %OIH:interval %C:N %SF:abstractions-misc %S:MAGO %ES:001077 %UID:000873 %MD:1997/12/11 %IH:language %P:khunek %G:language, word, message %OIH:language/word/message %POSS:ghunek %P1p:neghunek %C:N %SF:abstractions-misc %S:MAGO/BRBI/JOPA/EDFR/VESE/JEKO %UID:000928 %MD:2001/02/10 %IH:word %P:khunek %G:language, word, message %OIH:language/word/message %POSS:ghunek %P1p:neghunek %C:N %SF:abstractions-misc %S:MAGO/BRBI/JOPA/EDFR/VESE/JEKO %UID:000928 %MD:2001/02/10 %IH:message %P:khunek %G:language, word, message %OIH:language/word/message %POSS:ghunek %P1p:neghunek %C:N %SF:abstractions-misc %S:MAGO/BRBI/JOPA/EDFR/VESE/JEKO %UID:000928 %MD:2001/02/10 %IH:running %P:gal %G:running %OIH:running %C:N %R:Dugal ndesda. He got hurt while running. %SF:abstractions-misc %S:JOPA %ES:000535 %UID:002462 %MD:1999/03/15 %IH:work %P:t'en %G:work %OIH:work %C:N %SF:abstractions-misc %S:VESE/PEJO %ES:000672 %UID:003028 %POCKET:N %MD:2000/10/04 %IH:work %P:'ut'en %G:work %OIH:work %C:N %SF:abstractions-misc %P1p:neye'ut'en %S:JOPA %ES:001041 %UID:004264 %POCKET:Y %MD:2001/03/15 %IH:Spotted Frog %P:dulkw'ah %G:Spotted Frog %OIH:Spotted Frog/Frog, Spotted %SN:Rana pretiosa %MN:Lives in water and has red markings on the belly. %PICTURE:/home/poser/Research/Dakelh/Pictures/psfiles/SpottedFrog.ps %CAPTION:{\qc Tsasdli} --- Spotted Frog %PICPERMISSION:N %PICCREDIT:Drawing of Spotted Frog from {\it The Amphibians of British Columbia\/}. %C:N %SF:amphibiansandreptiles %S:EDFR %UID:004111 %POCKET:Y %MD:2001/03/07 %IH:Frog, Spotted %P:dulkw'ah %G:Spotted Frog %OIH:Spotted Frog/Frog, Spotted %SN:Rana pretiosa %MN:Lives in water and has red markings on the belly. %PICTURE:/home/poser/Research/Dakelh/Pictures/psfiles/SpottedFrog.ps %CAPTION:{\qc Tsasdli} --- Spotted Frog %PICPERMISSION:N %PICCREDIT:Drawing of Spotted Frog from {\it The Amphibians of British Columbia\/}. %C:N %SF:amphibiansandreptiles %S:EDFR %UID:004111 %POCKET:Y %MD:2001/03/07 %IH:lizard %P:chunlai %G:salamander, lizard %OIH:lizard/salamander %MN:The only species of salamander found in the region is the Long-toed Salamander {\it Ambystoma macrodactylum\/}. No lizards are found in the region. However, this term is applied to other varieties of salamander and to lizards, such as the gekkos sold as pets. %FGREF:Corkran \& Thoms (1996;39) %SN:Ambystoma macrodactylum %C:N %SF:amphibiansandreptiles %S:LITM/JOPA/BRBI %UID:000157 %MD:1998/05/16 %IH:salamander %P:chunlai %G:salamander, lizard %OIH:lizard/salamander %MN:The only species of salamander found in the region is the Long-toed Salamander {\it Ambystoma macrodactylum\/}. No lizards are found in the region. However, this term is applied to other varieties of salamander and to lizards, such as the gekkos sold as pets. %FGREF:Corkran \& Thoms (1996;39) %SN:Ambystoma macrodactylum %C:N %SF:amphibiansandreptiles %S:LITM/JOPA/BRBI %UID:000157 %MD:1998/05/16 %IH:snake %P:tl'ughus %G:snake %OIH:snake %C:N %MN:The only snake found in the region is the Common Garter Snake {\it Thamnophis sirtalis\/}. However, the term is applied to all snakes. %SN:Thamnophis sirtalis %SF:amphibiansandreptiles %S:LITM/JOPA/BRBI/MAGO %UID:000250 %MD:1998/12/07 %IH:Western Toad %P:tsasdli %G:Western Toad %SN:Bufo boreas %OIH:Western Toad/Toad, Western %MN:Lives on land. %SF:amphibiansandreptiles %C:N %S:LITM/JOPA/BRBI/MAGO/STJA/EDFR %UID:000059 %MD:2001/03/07 %IH:Toad, Western %P:tsasdli %G:Western Toad %SN:Bufo boreas %OIH:Western Toad/Toad, Western %MN:Lives on land. %SF:amphibiansandreptiles %C:N %S:LITM/JOPA/BRBI/MAGO/STJA/EDFR %UID:000059 %MD:2001/03/07 %IH:bitch %P:lhits'e %G:bitch, female dog %OIH:bitch/dog, female %C:N %SF:animals-domestic %S:JOPA/EDFR/VESE %UID:002446 %MD:1999/03/15 %IH:dog, female %P:lhits'e %G:bitch, female dog %OIH:bitch/dog, female %C:N %SF:animals-domestic %S:JOPA/EDFR/VESE %UID:002446 %MD:1999/03/15 %IH:cow %P:musdus %G:cow %OIH:cow %C:N %P2s:nmusdus %ETYM:Loan from Cree {\qf mostos} ``buffalo''. %LOANSOURCE:Cree %SF:animals-domestic %S:LITM/JOPA/BRBI/MAGO %UID:000036 %MD:1997/06/12 %IH:dog %P:lhi %G:dog %OIH:dog %C:N %DUOPLURAL:lhike %SF:animals-domestic %POSS:lik %P1s:slik %P1p:nelik %DUOPLURAL:lhike %S:LITM/JOPA/BRBI/STJA/VESE/EDFR/JEKO %UID:000270 %MD:2001/02/15 %IH:donkey %P:budzocho %G:donkey, mule %OIH:donkey/mule %SF:animals-domestic %ETYM:``big ears''. %C:N %S:JOPA/BRBI %UID:000376 %MD:1997/11/14 %IH:mule %P:budzocho %G:donkey, mule %OIH:donkey/mule %SF:animals-domestic %ETYM:``big ears''. %C:N %S:JOPA/BRBI %UID:000376 %MD:1997/11/14 %IH:horse %P:yeztli %G:horse %OIH:horse %SF:animals-domestic %ETYM:A contraction of {\qc yezihlhi} ``elk dog''. %C:N %S:LITM/JOPA/BRBI/PEJO %UID:000042 %MD:2000/10/21 %IH:dogs %P:lhike %G:Irregular plural of {\qc lhi}, q.v. %OIH:dogs %C:N %SF:animals-domestic %S:LITM/BRBI/JOPA/STJA %UID:000293 %MD:1999/01/26 %IH:lamb %P:sbaiyaz %G:lamb %OIH:lamb %C:N %SF:animals-domestic %S:LITM %UID:000254 %MD:1997/06/16 %IH:pig %P:gugoos %G:pig %OIH:pig %C:N %ETYM:Ultimately borrowed from French {\qf coche}, probably via Cree. %LOANSOURCE:Cree %SF:animals-domestic %S:LITM/JOPA/BRBI %UID:000133 %MD:1997/06/16 %IH:bat %P:'ut'az %G:bat %OIH:bat %SF:animals-land %C:N %S:JOPA/BRBI %UID:000390 %MD:1997/11/14 %IH:bat %P:liyabdut'ai %G:bat %MN:The only kind of bat found in the region is the Little Brown Myotis. %OIH:bat %SF:animals-land %SN:Myotis lucifugus %ETYM:Literally, ``devil bird'', a compound of {\qc liyab} ``devil'', a loan from French {\qf le diable}, and {\qc dut'ai} ``bird''. %LOANSOURCE:French %C:N %S:JOPA/BRBI %UID:000215 %MD:1997/06/16 %IH:black bear %P:sus %G:black bear %OIH:black bear %C:N %SF:animals-land %SN:Ursus americanus %S:LITM/JOPA/BRBI/STJA/EDFR/VESE/JEKO %UID:000048 %MD:1998/12/19 %IH:buffalo %P:musduscho dughai %G:buffalo %OIH:buffalo %SF:animals-land %C:N %ETYM:``big hairy cow''. %S:JOPA/EDFR %UID:003478 %POCKET:Y %MD:2000/11/04 %IH:buffalo %P:tl'ok'umusdus %G:buffalo %OIH:buffalo %SF:animals-land %C:N %S:JOPA/BRBI %UID:000374 %MD:2000/11/01 %IH:bull moose %P:jenyo %G:bull moose %OIH:bull moose/moose, bull %SF:animals-land %C:N %S:MAGO/JOPA/VESE/EDFR/JEKO %UID:000474 %MD:1999/05/11 %IH:moose, bull %P:jenyo %G:bull moose %OIH:bull moose/moose, bull %SF:animals-land %C:N %S:MAGO/JOPA/VESE/EDFR/JEKO %UID:000474 %MD:1999/05/11 %IH:moose, bull %P:denyo %G:bull moose %OIH:moose, bull %SF:animals-land %C:N %S:LITM/JOPA %UID:000348 %MD:1997/06/18 %IH:calf moose %P:tsiyeyaz %G:calf moose %OIH:calf moose/moose, calf %SF:animals-land %C:N %S:JOPA/BRBI %UID:000380 %MD:1997/11/14 %IH:moose, calf %P:tsiyeyaz %G:calf moose %OIH:calf moose/moose, calf %SF:animals-land %C:N %S:JOPA/BRBI %UID:000380 %MD:1997/11/14 %IH:calf moose %P:duniyaz %G:calf moose %OIH:calf moose/moose, calf %C:N %SF:animals-land %S:LITM/JOPA/BRBI %UID:000245 %MD:1997/06/16 %IH:moose, calf %P:duniyaz %G:calf moose %OIH:calf moose/moose, calf %C:N %SF:animals-land %S:LITM/JOPA/BRBI %UID:000245 %MD:1997/06/16 %IH:caribou %P:whudzih %G:caribou %OIH:caribou %C:N %SF:animals-land %SN:Rangifer tarandus %S:JOPA/BRBI/MAGO/EDFR/VESE/JEKO %UID:000274 %MD:1999/05/11 %IH:cat %P:boos %G:cat %OIH:cat %C:N %SN:Felis domesticus %ETYM:Loan from English {\qf puss}, possibly via Chinook Jargon. %LOANSOURCE:English %SF:animals-land %S:LITM/JOPA/BRBI %UID:000137 %MD:1997/12/17 %IH:chipmunk %P:ts'uwhuljos %G:chipmunk %OIH:chipmunk %C:N %SF:animals-land %S:LITM/JOPA/BRBI %UID:000146 %MD:1997/06/16 %IH:cougar %P:booscho %G:cougar %OIH:cougar %SF:animals-land %SN:Felis concolor %C:N %ETYM:Literally, ``big cat'', where {\qc boos} ``cat'' is a loan from English {\qf puss}, possibly via Chinook Jargon. %S:JOPA/BRBI %UID:000050 %MD:1997/11/14 %IH:cow moose %P:duni'at %G:cow moose %OIH:cow moose/moose, cow %SF:animals-land %C:N %S:JOPA/BRBI %UID:000377 %MD:1997/11/14 %IH:moose, cow %P:duni'at %G:cow moose %OIH:cow moose/moose, cow %SF:animals-land %C:N %S:JOPA/BRBI %UID:000377 %MD:1997/11/14 %IH:coyote %P:tintulhi %G:coyote %OIH:coyote %C:N %SF:animals-land %SN:Canis latrans %S:JOPA/BRBI %R:LITM has chuntulhi. %UID:000155 %MD:1997/06/16 %IH:deer %P:yests'e %G:deer %OIH:deer %SF:animals-land %C:N %S:LITM/JOPA/BRBI/EDFR %UID:000132 %MD:1998/12/16 %IH:dry cow moose %P:dets'it %G:dry cow moose %OIH:dry cow moose/moose, dry cow %SF:animals-land %C:N %S:JOPA/BRBI %UID:000378 %MD:1997/11/14 %IH:moose, dry cow %P:dets'it %G:dry cow moose %OIH:dry cow moose/moose, dry cow %SF:animals-land %C:N %S:JOPA/BRBI %UID:000378 %MD:1997/11/14 %IH:elk %P:yezih %G:elk %OIH:elk %SF:animals-land %C:N %R:STJA doesn't use this. %S:JOPA/BRBI %UID:000382 %MD:1997/11/14 %IH:beaver, female %P:tsa'at %G:female beaver %OIH:beaver, female %C:N %SF:animals-land %S:STJA %UID:001295 %MD:1998/12/08 %IH:fisher %P:chunihcho %G:fisher %OIH:fisher %ETYM:``big marten''. %SF:animals-land %SN:Martes pennanti %C:N %S:JOPA/BRBI/MAGO %UID:000385 %MD:2000/06/18 %IH:flying squirrel %P:ts'unalhbuz %G:flying squirrel %OIH:flying squirrel %SF:animals-land %SN:Glaucomys sabrinus alpinus %PICTURE:/home/poser/Research/Dakelh/Pictures/psfiles/FlyingSquirrel.ps %CAPTION:{\qc ts'unulhbuz} --- Flying Squirrel %PICPERMISSION:N %PICCREDIT:Drawing of Flying Squirrel from {\it The Mammals of British Columbia\/}. %C:N %S:JOPA/BRBI %UID:000389 %MD:1997/11/14 %IH:fox %P:nanguz %G:fox %OIH:fox %C:N %SF:animals-land %S:MAGO %UID:000139 %MD:2001/02/26 %IH:grizzly bear %P:shas %G:grizzly bear %OIH:grizzly bear %C:N %SF:animals-land %S:LITM/JOPA/BRBI/VESE/EDFR/JEKO %UID:000039 %MD:1997/06/12 %IH:grizzly bear cub %P:shasyaz %G:grizzly bear cub %OIH:grizzly bear cub/cub, grizzly bear %C:N %SF:animals-land %S:STJA %UID:002114 %MD:1999/02/20 %IH:cub, grizzly bear %P:shasyaz %G:grizzly bear cub %OIH:grizzly bear cub/cub, grizzly bear %C:N %SF:animals-land %S:STJA %UID:002114 %MD:1999/02/20 %IH:grizzly bear sow %P:shas'at %G:grizzly bear sow %OIH:grizzly bear sow/sow, grizzly bear %C:N %SF:animals-land %ETYM:``grizzly bear's wife''. %S:STJA %UID:002113 %MD:1999/02/20 %IH:sow, grizzly bear %P:shas'at %G:grizzly bear sow %OIH:grizzly bear sow/sow, grizzly bear %C:N %SF:animals-land %ETYM:``grizzly bear's wife''. %S:STJA %UID:002113 %MD:1999/02/20 %IH:lynx %P:wasi %G:lynx %OIH:lynx %C:N %SF:animals-land %SN:Felis lynx %ETYM:Loan from Gitksan {\qf wish}. %LOANSOURCE:Gitksan %S:JOPA/BRBI/STJA/EDFR/VESE/JEKO/MAGO %UID:000049 %MD:2001/04/20 %IH:woodchuck %P:k'ani %G:woodchuck %OIH:woodchuck %C:N %SF:animals-land %SN:Marmota monax %S:JOPA/BRBI/PEJO %R:Clarified with Josie and Peter 2001/05/28. %UID:000391 %POCKET:Y %MD:2001/05/28 %IH:marmot %P:dutni %G:marmot %OIH:marmot %SF:animals-land %C:N %SN:Marmota caligata %R:Josie and Peter are not really familiar with marmots but have heard older people talk about them. %S:JOPA/PEJO %UID:000143 %MD:1998/02/10 %IH:marten %P:chunih %G:marten %OIH:marten %SF:animals-land %SN:Martes americana %C:N %S:JOPA/BRBI/VESE/EDFR/JEKO/MAGO %UID:000016 %MD:2001/04/20 %IH:mink %P:telhjoos %G:mink %OIH:mink %C:N %SF:animals-land %SN:Mustela vison %S:LITM/JOPA/BRBI %UID:000167 %MD:1997/06/16 %IH:moose %P:duni %G:moose %OIH:moose %C:N %SF:animals-land %SN:Alces alces andersoni %S:LITM-EDFR/JOPA/BRBI %UID:000346 %MD:1997/06/18 %IH:mouse %P:dats'ooz %G:mouse %OIH:mouse %SF:animals-land %C:N %S:LITM/JOPA/MAGO/VESE/JEKO %UID:000156 %MD:2001/01/22 %IH:muskrat %P:tsek'et %G:muskrat %OIH:muskrat %C:N %SF:animals-land %SN:Ondatra zibethicus %S:JOPA/BRBI/STJA/MAGO %UID:000335 %MD:1998/12/08 %IH:moose, newly sexually mature cow %P:chanjo %G:newly sexually mature cow moose %OIH:moose, newly sexually mature cow %SF:animals-land %C:N %S:JOPA/BRBI %UID:000379 %MD:1997/11/14 %IH:pack rat %P:looncho %G:pack rat %OIH:pack rat %C:N %SF:animals-land %S:VESE/JEKO/MAGO %UID:000149 %MD:1999/05/10 %IH:packrat %P:dlooncho %G:packrat %OIH:packrat %C:N %SF:animals-land %S:JOPA %UID:002701 %MD:1999/05/11 %IH:porcupine %P:duneza %G:porcupine %OIH:porcupine %SF:animals-land %C:N %S:JOPA/BRBI/MAGO %UID:000388 %MD:2001/03/06 %IH:porcupine %P:ts'it %G:porcupine %OIH:porcupine %SF:animals-land %SN:Erethizon dorsatum %C:N %ETYM:Perhaps derived from the interjection {\qc ts'it} ``don't touch it!''. %S:JOPA/BRBI/MAGO/BEMC/STJA %UID:000387 %MD:1998/12/08 %IH:puppy %P:lhiyaz %G:puppy %OIH:puppy %C:N %SF:animals-land %DUOPLURAL:lhiyazke %DUOPLURAL:lhikeyaz %R:Josie prefers {\qc lhikeyaz}. %S:LITM/BRBI/JOPA/EDFR/MAGO-JEKO %UID:000182 %MD:2001/05/26 %IH:squirrel %P:nats'ildelh %G:Red Squirrel %OIH:squirrel/Red Squirrel %SN:Tamiasciurus hudsonicus colum. %C:N %SF:animals-land %S:LITM/JOPA/BRBI/STJA %UID:000034 %MD:1999/02/17 %IH:Red Squirrel %P:nats'ildelh %G:Red Squirrel %OIH:squirrel/Red Squirrel %SN:Tamiasciurus hudsonicus colum. %C:N %SF:animals-land %S:LITM/JOPA/BRBI/STJA %UID:000034 %MD:1999/02/17 %IH:rabbit %P:goh %G:rabbit %OIH:rabbit %C:N %SF:animals-land %S:LITM/JOPA/VESE/EDFR/JEKO %UID:000023 %MD:1999/05/11 %IH:moose, recently weaned calf %P:ooch'ainischoot %G:recently weaned calf moose %OIH:moose, recently weaned calf %SF:animals-land %C:N %S:JOPA/BRBI %UID:000381 %MD:1997/11/14 %IH:sheep %P:sbai %G:sheep %OIH:sheep %C:N %SF:animals-land %S:MAGO %UID:001131 %MD:1998/02/10 %IH:sheep %P:'usbai %G:sheep %OIH:sheep %SF:animals-land %C:N %S:JOPA/BRBI %UID:000375 %MD:1997/11/14 %IH:shrew %P:'ulhguk %G:shrew %OIH:shrew %SF:animals-land %C:N %S:MAGO/VESE/JEKO %UID:000526 %MD:2001/01/22 %IH:skunk %P:hoonliz %G:skunk %OIH:skunk %C:N %P2s:unhoonliz %SF:animals-land %S:LITM/JOPA/BRBI/MAGO/VESE/EDFR/JEKO %UID:000052 %MD:1997/06/12 %IH:weasel %P:nohbai %G:weasel %OIH:weasel %C:N %SF:animals-land %S:JOPA/BRBI/MAGO %UID:000141 %MD:1997/06/16 %IH:wolf %P:yus %G:wolf %OIH:wolf %C:N %SF:animals-land %SN:Canis lupus %S:LITM/JOPA/BRBI %UID:000051 %MD:1997/06/12 %IH:wolverine %P:noostel %G:wolverine %OIH:wolverine %C:N %SF:animals-land %SN:Gulo gulo %S:JOPA/BRBI/MAGO/VESE/EDFR/JEKO %UID:000140 %MD:2001/04/20 %IH:beaver, young %P:tsatsul %G:young beaver %OIH:beaver, young %SF:animals-land %C:N %S:JOPA/BRBI/STJA %UID:000384 %MD:1998/12/08 %IH:beaver dam %P:lht'at %G:beaver dam %OIH:beaver dam/dam, beaver %C:N %SF:animals-misc %S:STJA %UID:001287 %MD:1998/12/08 %IH:dam, beaver %P:lht'at %G:beaver dam %OIH:beaver dam/dam, beaver %C:N %SF:animals-misc %S:STJA %UID:001287 %MD:1998/12/08 %IH:beaver dam %P:'ulh %G:beaver dam %OIH:beaver dam/dam, beaver %C:N %SF:animals-misc %S:STJA %UID:001288 %MD:1998/12/08 %IH:dam, beaver %P:'ulh %G:beaver dam %OIH:beaver dam/dam, beaver %C:N %SF:animals-misc %S:STJA %UID:001288 %MD:1998/12/08 %IH:beaver lodge %P:tsaken %G:beaver lodge %OIH:beaver lodge %C:N %SF:animals-misc %S:JOPA/BRBI/STJA %UID:000405 %MD:1998/12/08 %IH:beaver path under the ice %P:tunyohtsati %G:beaver path under the ice %OIH:beaver path under the ice %C:N %SF:animals-misc %S:JOPA/EDFR %UID:003769 %POCKET:Y %MD:2001/02/13 %IH:black bear den %P:sus'an %G:black bear den %OIH:black bear den %C:N %SF:animals-misc %S:LITM/STJA %UID:000131 %MD:1998/12/08 %IH:tracks, grizzly bear %P:shask'oh %G:grizzly bear tracks %OIH:tracks, grizzly bear %C:N %SF:animals-misc %S:MAGO %UID:001132 %MD:1998/02/10 %IH:leech %P:hoolht'ukw %G:leech %OIH:leech %SF:animals-misc %C:N %S:JOPA/PEJO/EDFR %UID:003410 %POCKET:Y %MD:2000/11/01 %IH:leech %P:hoot'ub %G:leech %OIH:leech %SF:bugs %C:N %S:JOPA/BRBI/MAGO %UID:000370 %MD:2000/11/01 %IH:moose tracks %P:dunik'oh %G:moose tracks %OIH:moose tracks %C:N %SF:animals-misc %S:PEJO/JOPA %ES:000491 %UID:003121 %POCKET:Y %MD:2000/09/28 %IH:tracks, rabbit %P:gohk'oh %G:rabbit tracks %OIH:tracks, rabbit %C:N %SF:animals-misc %S:LITM %UID:000073 %MD:1997/06/12 %IH:beaver %P:tsa %G:beaver %OIH:beaver %C:N %SN:Castor canadensis %UID:000044 %SF:animals-water %S:JOPA/BRBI/STJA/EDFR/VESE/JEKO/MAGO %MD:2001/04/18 %IH:kit, beaver %P:tsayaz %G:beaver kit %OIH:kit, beaver/beaver, baby %SF:animals-water %C:N %S:STJA %UID:001294 %MD:2000/06/18 %IH:beaver, baby %P:tsayaz %G:beaver kit %OIH:kit, beaver/beaver, baby %SF:animals-water %C:N %S:STJA %UID:001294 %MD:2000/06/18 %IH:beaver, big %P:tsati %G:big beaver, old beaver %OIH:beaver, big/beaver, old %C:N %SF:animals-water %S:LITM/JOPA/BRBI/STJA %UID:000206 %MD:1998/12/08 %IH:beaver, old %P:tsati %G:big beaver, old beaver %OIH:beaver, big/beaver, old %C:N %SF:animals-water %S:LITM/JOPA/BRBI/STJA %UID:000206 %MD:1998/12/08 %IH:otter %P:tsis %G:otter %OIH:otter %SF:animals-water %SN:Lutra canadensis %C:N %S:JOPA/BRBI %UID:000386 %MD:1997/11/14 %IH:crow %P:datsan %G:American Crow %C:N %SF:bird-gen %SN:Corvus brachyrhynchos %OIH:crow/American Crow %S:LITM/PEJO %UID:000158 %MD:2000/10/21 %IH:American Crow %P:datsan %G:American Crow %C:N %SF:bird-gen %SN:Corvus brachyrhynchos %OIH:crow/American Crow %S:LITM/PEJO %UID:000158 %MD:2000/10/21 %IH:Robin, American %P:sewh %G:American Robin %OIH:Robin, American %SN:Turdus migratorius %C:N %SF:bird-gen %S:LITM/JOPA/BRBI/PEJO %UID:000181 %MD:2000/10/21 %IH:Bald Eagle %P:tsebalyan %G:Bald Eagle %OIH:Bald Eagle %C:N %SF:bird-gen %SN:Haliaeetus leucocephalus %S:LITM/JOPA/BRBI %UID:000150 %MD:1997/06/16 %IH:bird %P:dut'ai %G:bird, duck %OIH:bird/duck %C:N %SF:bird-gen %S:LITM/JOPA/BRBI/MAGO/STJA/PEJO %UID:000081 %MD:2000/09/28 %IH:duck %P:dut'ai %G:bird, duck %OIH:bird/duck %C:N %SF:bird-gen %S:LITM/JOPA/BRBI/MAGO/STJA/PEJO %UID:000081 %MD:2000/09/28 %IH:crane %P:delh %G:crane %OIH:crane %C:N %SF:bird-gen %S:LITM %UID:000255 %MD:1997/06/16 %IH:goose %P:khoh %G:goose %OIH:goose %C:N %P1s:skhoh %P2s:nkhoh %P1p:nekhoh %POSS:khoh %SF:bird-gen %S:JOPA/BRBI/MAGO/VESE/EDFR/JEKO %UID:000031 %MD:2001/02/15 %IH:hummingbird %P:ts'unalhduz %G:hummingbird %OIH:hummingbird %C:N %SF:bird-gen %S:LITM/BRBI/JOPA %UID:000242 %MD:1997/06/16 %IH:bird, little %P:gagiyaz %G:little bird %OIH:bird, little %C:N %QCHECK:Any little bird? %SF:bird-gen %S:PEJO %UID:003115 %POCKET:Y %MD:2000/09/28 %IH:bird, little %P:dut'aiyaz %G:little bird %OIH:bird, little %C:N %SF:bird-gen %S:STJA/JOPA/EDFR/VESE/PEJO %UID:001818 %MD:2000/09/28 %IH:loon %P:dadzi %G:loon %OIH:loon %SF:bird-gen %SN:Gavia immer %C:N %S:LITM/JOPA/BRBI %UID:000020 %MD:1997/06/12 %IH:Mallard Duck %P:t'ugicho %G:Mallard Duck %OIH:Mallard Duck %C:N %SN:Anas platyrhynchos %SF:bird-gen %S:LITM/JOPA/BRBI/MAGO/VESE/EDFR/JEKO %UID:000041 %MD:1999/05/11 %IH:owl %P:musdzoon %G:owl %OIH:owl %C:N %SF:bird-gen %S:LITM/BRBI/JOPA/MAGO %UID:000135 %MD:1997/12/11 %IH:Red-Necked Grebe %P:ts'olh %G:Red-necked Grebe %MN:A variety of duck locally known as the Helldiver. %OIH:Red-Necked Grebe/Helldiver/Grebe, Red-Necked %SN:Podiceps grisegena %SF:bird-gen %C:N %S:BRBI/JOPA %UID:000263 %MD:2001/03/08 %IH:Helldiver %P:ts'olh %G:Red-necked Grebe %MN:A variety of duck locally known as the Helldiver. %OIH:Red-Necked Grebe/Helldiver/Grebe, Red-Necked %SN:Podiceps grisegena %SF:bird-gen %C:N %S:BRBI/JOPA %UID:000263 %MD:2001/03/08 %IH:Grebe, Red-Necked %P:ts'olh %G:Red-necked Grebe %MN:A variety of duck locally known as the Helldiver. %OIH:Red-Necked Grebe/Helldiver/Grebe, Red-Necked %SN:Podiceps grisegena %SF:bird-gen %C:N %S:BRBI/JOPA %UID:000263 %MD:2001/03/08 %IH:Ruffed grouse %P:'utsut %G:Ruffed grouse %OIH:Ruffed grouse %C:N %SF:bird-gen %S:LITM %UID:000218 %MD:1997/06/16 %IH:Spruce Grouse %P:nat'oh %G:Spruce Grouse, Fool Hen %OIH:Spruce Grouse/Grouse, Spruce/Fool Hen %SF:bird-gen %SN:Dendragapus canadensis %C:N %S:MAGO/LITM %UID:000539 %MD:1997/12/04 %IH:Grouse, Spruce %P:nat'oh %G:Spruce Grouse, Fool Hen %OIH:Spruce Grouse/Grouse, Spruce/Fool Hen %SF:bird-gen %SN:Dendragapus canadensis %C:N %S:MAGO/LITM %UID:000539 %MD:1997/12/04 %IH:Fool Hen %P:nat'oh %G:Spruce Grouse, Fool Hen %OIH:Spruce Grouse/Grouse, Spruce/Fool Hen %SF:bird-gen %SN:Dendragapus canadensis %C:N %S:MAGO/LITM %UID:000539 %MD:1997/12/04 %IH:Steller's Jay %P:tehgwuzeh %G:Steller's Jay, commonly known locally as ``bluejay''. %OIH:Steller's Jay/jay, Steller's/Bluejay (Steller's Jay) %SF:bird-gen %SN:Cyanocitta stelleri %C:N %S:JOPA/BRBI %UID:000356 %MD:1997/11/14 %IH:jay, Steller's %P:tehgwuzeh %G:Steller's Jay, commonly known locally as ``bluejay''. %OIH:Steller's Jay/jay, Steller's/Bluejay (Steller's Jay) %SF:bird-gen %SN:Cyanocitta stelleri %C:N %S:JOPA/BRBI %UID:000356 %MD:1997/11/14 %IH:Bluejay (Steller's Jay) %P:tehgwuzeh %G:Steller's Jay, commonly known locally as ``bluejay''. %OIH:Steller's Jay/jay, Steller's/Bluejay (Steller's Jay) %SF:bird-gen %SN:Cyanocitta stelleri %C:N %S:JOPA/BRBI %UID:000356 %MD:1997/11/14 %IH:sandpiper %P:wedlew %G:sandpiper %OIH:sandpiper %C:N %SN:Eremophila alpestris et sim. %SF:bird-gen %S:LITM %UID:000237 %MD:2002/07/19 %IH:seagull %P:besk'i %G:seagull %OIH:seagull %C:N %SN:Larus species %SF:bird-gen %S:LITM %UID:000136 %MD:2002/07/19 %IH:swan %P:ts'incho %G:swan %OIH:swan %C:N %SF:bird-gen %S:LITM %UID:000222 %MD:1997/06/16 %IH:Tree Swallow %P:'uschas %G:Tree Swallow %OIH:Tree Swallow %SF:bird-gen %SN:Tachycineta bicolor %C:N %S:MAGO %UID:000535 %MD:1997/11/22 %IH:Whiskey Jack %P:gwuzeh %G:Whiskey Jack, Gray Jay, Canadian Jay %OIH:Whiskey Jack/Jay, Gray/Jay, Canadian %C:N %SN:Perisoreus canadensis %SF:bird-gen %S:LITM/JOPA/BRBI/MAGO %UID:000148 %MD:1997/11/22 %IH:Jay, Gray %P:gwuzeh %G:Whiskey Jack, Gray Jay, Canadian Jay %OIH:Whiskey Jack/Jay, Gray/Jay, Canadian %C:N %SN:Perisoreus canadensis %SF:bird-gen %S:LITM/JOPA/BRBI/MAGO %UID:000148 %MD:1997/11/22 %IH:Jay, Canadian %P:gwuzeh %G:Whiskey Jack, Gray Jay, Canadian Jay %OIH:Whiskey Jack/Jay, Gray/Jay, Canadian %C:N %SN:Perisoreus canadensis %SF:bird-gen %S:LITM/JOPA/BRBI/MAGO %UID:000148 %MD:1997/11/22 %IH:woodpecker %P:chundulkw'uz %G:woodpecker %OIH:woodpecker %C:N %SF:bird-gen %S:JOPA/BRBI/STJA %UID:000138 %MD:1999/03/31 %IH:nest %P:-t'o %G:nest %OIH:nest %C:N %Pind:'ut'o %P3s:but'o %Pref:dut'o %SF:bird-misc/bugs %S:STJA/PEJO/JOPA/BRBI/EDFR %ES:001353 %UID:000226 %MD:2001/03/07 %IH:eye, a single %P:-nak'uz %G:a single eye %OIH:eye, a single %C:N %SF:body-ext %S:JOPA/EDFR %ES:000457 %UID:003770 %POCKET:Y %MD:2001/02/13 %IH:ankle %P:-kechunoh %G:ankle %OIH:ankle %P1s:skechunoh %P2s:nkechunoh %C:N %S:MAGO/STJA %SF:body-ext %UID:000865 %MD:1999/03/03 %IH:antler %P:-de %G:antler, horn %OIH:antler/horn %C:N %SF:body-ext %P3s:bude %S:STJA %UID:002266 %MD:1999/03/02 %IH:horn %P:-de %G:antler, horn %OIH:antler/horn %C:N %SF:body-ext %P3s:bude %S:STJA %UID:002266 %MD:1999/03/02 %IH:velvet, antler %P:-de_zu_s %G:antler velvet %OIH:velvet, antler %C:N %SF:body-ext %P3s:bude_zu_s %S:STJA %UID:002267 %MD:1999/03/02 %IH:anus %P:-tsul %G:anus, asshole %OIH:anus/asshole %C:N %P1s:stsul %SF:body-ext %S:STJA %UID:002171 %MD:1999/02/23 %IH:asshole %P:-tsul %G:anus, asshole %OIH:anus/asshole %C:N %P1s:stsul %SF:body-ext %S:STJA %UID:002171 %MD:1999/02/23 %IH:arm %P:-gan %G:arm %OIH:arm %P1s:sgan %P2s:ngan %Pref:dugan %C:N %S:LITM/MAGO/STJA/JOPA/VESE/EDFR/JEKO %SF:body-ext %UID:000863 %MD:1999/02/22 %IH:armpit %P:-chak'ests'oh %G:armpit %OIH:armpit %P1s:schak'ests'oh %C:N %S:MAGO %UID:000859 %SF:body-ext %MD:1997/12/11 %IH:back (of body) %P:-t'ak %G:back (of body) %OIH:back (of body) %P1s:st'ak %P3s:but'ak %C:N %S:MAGO/EDFR/VESE/JEKO %SF:body-ext %UID:000899 %MD:1997/12/11 %IH:back of hand %P:-lat'ak %G:back of hand %OIH:back of hand %P1s:slat'ak %C:N %S:MAGO %SF:body-ext %UID:000871 %MD:1997/12/11 %IH:beaver paws %P:tsake %G:beaver paws %OIH:beaver paws %C:N %SF:body-ext %S:LITM-EDFR %UID:000329 %MD:1997/06/18 %IH:beaver tail %P:tsache %G:beaver tail %OIH:beaver tail %C:N %SF:body-ext %S:LITM %UID:000207 %MD:1997/06/16 %IH:belly %P:-but %G:belly %OIH:belly %P1s:sbut %C:N %S:MAGO %SF:body-ext %UID:000937 %MD:1997/12/11 %IH:breast %P:-ts'oo %G:breast %OIH:breast %P1s:sts'oo %C:N %S:MAGO %UID:000855 %SF:body-ext %MD:1997/12/11 %IH:bum %P:-tl'a %G:bum, buttocks %OIH:bum/buttocks %P1s:stl'a %C:N %S:MAGO %SF:body-ext %UID:000936 %MD:1997/12/11 %IH:buttocks %P:-tl'a %G:bum, buttocks %OIH:bum/buttocks %P1s:stl'a %C:N %S:MAGO %SF:body-ext %UID:000936 %MD:1997/12/11 %IH:calf of leg %P:-kechunch'ooz %G:calf of leg %OIH:calf of leg %C:N %SF:body-ext %S:JOPA/EDFR %UID:004458 %POCKET:Y %MD:2001/04/20 %IH:cheek %P:-nembus %G:cheek %OIH:cheek %P1s:snimbus %C:N %S:MAGO/JOPA/BRBI %SF:body-ext %UID:000889 %MD:1997/12/11 %IH:chest %P:-yoh %G:chest %OIH:chest %C:N %SF:body-ext %S:JOPA/EDFR %ES:000660 %UID:003777 %POCKET:Y %MD:2001/02/13 %IH:chin %P:-yeda' %G:chin %OIH:chin %P1s:syeda' %C:N %S:MAGO %SF:body-ext %UID:000882 %MD:1997/12/11 %IH:cranial fontanelle %P:-tsidakwhudutle %G:cranial fontanelle, baby's soft spot %OIH:cranial fontanelle/baby's soft spot %C:N %P3s:butsidakwhudutle %S:MAGO %SF:body-ext %UID:000898 %MD:1997/12/11 %IH:baby's soft spot %P:-tsidakwhudutle %G:cranial fontanelle, baby's soft spot %OIH:cranial fontanelle/baby's soft spot %C:N %P3s:butsidakwhudutle %S:MAGO %SF:body-ext %UID:000898 %MD:1997/12/11 %IH:ear %P:-dzo %G:ear %OIH:ear %MN:This refers to the ear considered as a whole, especially the exterior. When the canal in particular is referred to, one uses {\qc -dzek}, q.v. %C:N %P1s:sdzo %S:MAGO %SF:body-ext %UID:000879 %MD:1997/12/11 %IH:earlobe %P:-dzobal %G:earlobe %OIH:earlobe %C:N %P1s:sdzobal %SF:body-ext %S:BRBI/MAGO %UID:000641 %MD:1997/12/17 %IH:elbow %P:-nints'uzti %G:elbow %OIH:elbow %P1s:snints'uzti %C:N %S:MAGO %SF:body-ext %UID:000916 %MD:1997/12/11 %IH:eye %P:-na %G:eye %OIH:eye %P1s:sna %P3s:buna %C:N %S:MAGO/JOPA/EDFR %SF:body-ext %UID:000891 %MD:1998/12/18 %IH:eye socket %P:-nak'et %G:eye socket %OIH:eye socket %P1s:snak'et %C:N %S:MAGO %SF:body-ext %UID:000892 %MD:1997/12/11 %IH:eyebrow %P:-nach'usdooz %G:eyebrow %OIH:eyebrow %P1s:snach'usdooz %C:N %S:MAGO %SF:body-ext %UID:000896 %MD:1997/12/11 %IH:eyelash %P:-nalusgha %G:eyelash %OIH:eyelash %P1s:snalusgha %C:N %S:MAGO %SF:body-ext %UID:000895 %MD:1997/12/11 %IH:eyelid %P:-nalus %G:eyelid %OIH:eyelid %P1s:snalus %C:N %S:MAGO %SF:body-ext %UID:000894 %MD:1997/12/11 %IH:face %P:-nen %G:face %OIH:face %P1s:snen %P2s:nyunen %P3s:bunen %C:N %S:MAGO/PEJO/STJA/JOPA/VESE/EDFR %SF:body-ext %ES:000369 %UID:000890 %MD:2001/04/20 %IH:feather %P:ts'uz %G:feather, down %OIH:feather/down %C:N %SF:body-ext %S:LITM/STJA/PEJO %UID:000271 %MD:2000/10/16 %IH:down %P:ts'uz %G:feather, down %OIH:feather/down %C:N %SF:body-ext %S:LITM/STJA/PEJO %UID:000271 %MD:2000/10/16 %IH:feathers %P:dut'aits'uz %G:feathers, down %OIH:feathers/down %C:N %SF:body-ext %S:STJA %UID:002647 %MD:2001/02/27 %IH:down %P:dut'aits'uz %G:feathers, down %OIH:feathers/down %C:N %SF:body-ext %S:STJA %UID:002647 %MD:2001/02/27 %IH:finger other than thumb or pinkie %P:-lasge %G:finger other than thumb or pinkie %OIH:finger other than thumb or pinkie %P1s:slasge %C:N %S:MAGO/STJA/JOPA/PEJO/EDFR %SF:body-ext %UID:000869 %MD:2000/11/01 %IH:fingernails %P:-lagui %G:fingernails, claws of forepaws %OIH:fingernails/claws of forepaws %P1s:slagui %C:N %S:MAGO %SF:body-ext %UID:000875 %MD:1997/12/11 %IH:claws of forepaws %P:-lagui %G:fingernails, claws of forepaws %OIH:fingernails/claws of forepaws %P1s:slagui %C:N %S:MAGO %SF:body-ext %UID:000875 %MD:1997/12/11 %IH:foot %P:-ke %G:foot %OIH:foot %C:N %P1s:ske %Pref:duke %S:MAGO/STJA/JOPA/VESE/EDFR/JEKO %UID:000851 %SF:body-ext %MD:1999/05/11 %IH:hair %P:-gha %G:hair %MN:This refers to hair in general and where no more specific term exists, as on the arms and chest. It is not used to refer to the hair of the head, for which the more specific term {\qc -tsigha} is always used. %OIH:hair %C:N %S:MAGO %SF:body-ext %UID:000888 %MD:1997/12/11 %IH:hair of the head %P:-tsigha %G:hair of the head %OIH:hair of the head %P1s:stsigha %P2s:ntsigha %P3s:butsigha %C:N %S:MAGO/LITM/PEJO %SF:body-ext %UID:000887 %MD:2000/10/20 %IH:hand %P:-la %G:hand %OIH:hand %P1s:sla %P2s:nla %C:N %S:MAGO/STJA %SF:body-ext %POCKET:Y %UID:000866 %MD:1999/02/17 %IH:head %P:-tsi %G:head %OIH:head %Pref:dutsi %C:N %SF:body-ext %S:STJA %UID:002965 %POCKET:Y %MD:1999/06/24 %IH:heel %P:-kelatsul %G:heel %OIH:heel %P1s:skelatsul %C:N %S:MAGO %SF:body-ext %UID:000917 %MD:1997/12/11 %IH:hip %P:-k'ui %G:hip %OIH:hip %P1s:sk'ui %C:N %S:MAGO/JOPA %SF:body-ext %UID:000923 %MD:2001/03/15 %IH:knee %P:-gwut %G:knee %OIH:knee %P1s:sgwut %C:N %S:MAGO %SF:body-ext %UID:000933 %MD:1997/12/11 %IH:kneecap %P:-gwutlasi'ai %G:kneecap %OIH:kneecap %P1s:sgwutlasi'ai %R:has something to do with floating at tip of knee %C:N %S:MAGO %SF:body-ext %UID:000925 %MD:1997/12/11 %IH:knuckles at boundary between hand and fingers %P:-langwut %G:knuckles at boundary between hand and fingers %OIH:knuckles at boundary between hand and fingers %P1s:slangwut %SF:body-ext %C:N %S:JOPA/BRBI %UID:000967 %MD:1997/12/17 %IH:leg %P:-kechun %G:leg %OIH:leg %P1s:skechun %C:N %S:MAGO %UID:000852 %SF:body-ext %MD:1997/12/11 gawk-4.0.1+dfsg.orig/test/splitvar.awk0000644000175000017500000000006011463242060016666 0ustar schotschot{ sep = "=+" n = split($0, a, sep) print n } gawk-4.0.1+dfsg.orig/test/mtchi18n.ok0000644000175000017500000000000411463242060016302 0ustar schotschot1 1 gawk-4.0.1+dfsg.orig/test/fstabplus.in0000644000175000017500000000000511463242060016650 0ustar schotschot1 2 gawk-4.0.1+dfsg.orig/test/delfunc.awk0000644000175000017500000000011311463242060016441 0ustar schotschot# from Stepan Kasal, 9 July 2003 function f() { delete f } BEGIN { f() } gawk-4.0.1+dfsg.orig/test/double2.awk0000644000175000017500000000304011463242060016357 0ustar schotschot# Date: Mon, 19 Dec 2005 18:14:13 -0800 # From: David Ellsworth # Subject: Re: gawk number to string bug # To: eggert@CS.UCLA.EDU, eliz@gnu.org # Cc: arnold@skeeve.com, aschorr@telemetry-investments.com, # bug-gnu-utils@gnu.org, ellswort@nas.nasa.gov # Message-id: <200512200214.jBK2EDuu020216@ece03.nas.nasa.gov> # # Since you are taking my bug report seriously (which is really great), # let me add some more fuel to the fire. Consider this program: # # BEGIN { x=2**60; for(i=60;i<=65;i++) { printf "2^%d= %s %d %g\n",i,x,x,x; x*=2}} # # which prints out powers of two around 2^63. On an Opteron (as well as # an Itanium), you get # # 2^60= 1152921504606846976 1152921504606846976 1.15292e+18 # 2^61= 2305843009213693952 2305843009213693952 2.30584e+18 # 2^62= 4611686018427387904 4611686018427387904 4.61169e+18 # 2^63= -9223372036854775808 9223372036854775808 9.22337e+18 # 2^64= 1.84467e+19 0 1.84467e+19 # 2^65= 3.68935e+19 3.68935e+19 3.68935e+19 # # On a Xeon, you get # # 2^60= 1.15292e+18 1152921504606846976 1.15292e+18 # 2^61= 2.30584e+18 2305843009213693952 2.30584e+18 # 2^62= 4.61169e+18 4611686018427387904 4.61169e+18 # 2^63= 9.22337e+18 9223372036854775808 9.22337e+18 # 2^64= 1.84467e+19 0 1.84467e+19 # 2^65= 3.68935e+19 3.68935e+19 3.68935e+19 # # The 2^64 value for %d is probably also a bug since the outputs # for 2^63 and 2^65 are reasonable. # # - David # BEGIN { x = 2 ^ 60 # for (i = 60; i <= 65; i++) { for (i = 60; i <= 63; i++) { printf "2^%d= %s %d %g %o\n", i, x, x, x, x x *= 2 } } gawk-4.0.1+dfsg.orig/test/reint.awk0000644000175000017500000000003411463242060016144 0ustar schotschot{ print match($0, /a{3}/) } gawk-4.0.1+dfsg.orig/test/printf1.ok0000644000175000017500000000017611463242060016244 0ustar schotschot%8.5d, 100 --- | 00100| %#o, 0 --- |0| %#.1o, 0 --- |0| %#.0o, 0 --- |0| %#x, 0 --- |0| %.0d, 0 --- || %5.0d, 0 --- | | gawk-4.0.1+dfsg.orig/test/nofmtch.ok0000644000175000017500000000013211463242060016307 0ustar schotschotgawk: nofmtch.awk:1: warning: [s]printf: format specifier does not have control letter %3 gawk-4.0.1+dfsg.orig/test/delsub.ok0000644000175000017500000000001311560330314016123 0ustar schotschotstill here gawk-4.0.1+dfsg.orig/test/arryref2.ok0000644000175000017500000000003211463242060016404 0ustar schotschot1 local2 2 local 3 global gawk-4.0.1+dfsg.orig/test/dfastress.ok0000644000175000017500000000000211577700113016647 0ustar schotschot0 gawk-4.0.1+dfsg.orig/test/nasty2.awk0000644000175000017500000000036711463242060016254 0ustar schotschot# Based on nasty.awk, test same thing for printf # BEGIN { a="aaaaa" a=a a #10 a=a a #20 a=a a #40 a=a a #80 a=a a #160 a=a a # i.e. a is long enough printf("a = %s, f() = %s\n", a, f()) print a } function f() { gsub(/a/, "123", a) return "X" } gawk-4.0.1+dfsg.orig/test/anchgsub.ok0000644000175000017500000000004511463242060016446 0ustar schotschotThis is a test, this is only a test. gawk-4.0.1+dfsg.orig/test/gnuops3.ok0000644000175000017500000000001611463242060016250 0ustar schotschot1 0 1 1 x x x gawk-4.0.1+dfsg.orig/test/patsplit.ok0000644000175000017500000000213011463242060016511 0ustar schotschotSplitting: 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] = gawk-4.0.1+dfsg.orig/test/aryprm2.ok0000644000175000017500000000014111463242060016245 0ustar schotschotgawk: aryprm2.awk:3: fatal: attempt to use array `a (from arr)' in a scalar context EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/uninit2.ok0000644000175000017500000000022011463242060016237 0ustar schotschotgawk: uninit2.awk:1: warning: reference to uninitialized variable `a' 1 gawk: uninit2.awk:2: warning: reference to uninitialized variable `b' 1 gawk-4.0.1+dfsg.orig/test/fldchg.awk0000644000175000017500000000020711463242060016254 0ustar schotschot{ # print "0:", $0 gsub("aa", "+") print "1:", $0 $3 = "<" $3 ">" print "2:", $0 print "2a:" "%" $1 "%" $2 "%" $3 "%" $4 "%" $5 } gawk-4.0.1+dfsg.orig/test/exitval2.w320000644000175000017500000000023611463242060016416 0ustar schotschotBEGIN { print "foo" | "sh -c \"read x ; echo $x ; exit 12\"" } # this should still exit 0, as pointed out by kenny mccormack in # comp.lang.awk on 2 feb 2005 gawk-4.0.1+dfsg.orig/test/arryref2.awk0000644000175000017500000000022511463242060016561 0ustar schotschotBEGIN { foo(a) for (i in a) print i, a[i] } function foo(b) { bar(b) b[2] = "local" } function bar(c) { a[3] = "global" c[1] = "local2" } gawk-4.0.1+dfsg.orig/test/aryprm1.ok0000644000175000017500000000014111463242060016244 0ustar schotschotgawk: aryprm1.awk:4: fatal: attempt to use array `a (from arr)' in a scalar context EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/nulrsend.ok0000644000175000017500000000000411463242060016501 0ustar schotschot1 2 gawk-4.0.1+dfsg.orig/test/gnuops3.awk0000644000175000017500000000044211463242060016424 0ustar schotschot# Mon Jan 31 09:57:30 IST 2005 # test both dfa and regex matchers on \B # tests from Stepan Kasal, kasal@ucw.cz BEGIN { print (" " ~ / \B /) # test dfa matcher print ("a b" ~ /\B/) print (" b" ~ /\B/) print ("a " ~ /\B/) a = " " gsub(/\B/, "x", a) # test regex matcher print a } gawk-4.0.1+dfsg.orig/test/lintwarn.ok0000644000175000017500000000506611527020463016524 0ustar schotschotgawk: 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 gawk-4.0.1+dfsg.orig/test/splitwht.awk0000644000175000017500000000014211463242060016701 0ustar schotschotBEGIN { str = "a b\t\tc d" n = split(str, a, " ") print n m = split(str, b, / /) print m } gawk-4.0.1+dfsg.orig/test/aryprm7.ok0000644000175000017500000000013111463242060016251 0ustar schotschotgawk: aryprm7.awk:2: fatal: attempt to use scalar parameter `y' as an array EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/rs.awk0000644000175000017500000000004311463242060015447 0ustar schotschotBEGIN { RS = "" } { print $1, $2 } gawk-4.0.1+dfsg.orig/test/numindex.awk0000644000175000017500000000263411463242060016662 0ustar schotschot#To: bug-gnu-utils@gnu.org #cc: arnold@gnu.org #Subject: Possible bug in GNU Awk 3.0.4 #Date: Wed, 24 Nov 1999 21:47:24 +0000 #From: Daniel Elphick #Message-Id: # #This is a multipart MIME message. # #--==_Exmh_-11192982200 #Content-Type: text/plain; charset=us-ascii # # #When I use the attached awk script unique on the attached data file, it #reports that all 4 lines of the data are the same. Using mawk it correctly #reports that there are no repeats. # #I don't know if there are limits on the size of associative array keys for the #purposes of reliable indexing but if there is then it is not (obviously) #documented. # # #--==_Exmh_-11192982200 #Content-Type: text/plain ; name="data"; charset=us-ascii #Content-Description: data #Content-Disposition: attachment; filename="data" # #322322111111112232231111 #322322111111112213223111 #322322111111112211132231 #322322111111112211113223 # #--==_Exmh_-11192982200 #Content-Type: text/plain ; name="unique"; charset=us-ascii #Content-Description: unique #Content-Disposition: attachment; filename="unique" # { if($0 in a) { printf("line %d has been seen before at line %d\n", NR, a[$0]) repeat_count += 1 } else { a[$0] = NR } count += 1 } END { # printf("%d %f%%\n", repeat_count, (float)repeat_count / count * 100) printf("%d %f%%\n", repeat_count, repeat_count / count * 100) } # #--==_Exmh_-11192982200-- gawk-4.0.1+dfsg.orig/test/sclifin.ok0000644000175000017500000000011711524325776016321 0ustar schotschotgawk: sclifin.awk:3: fatal: attempt to use scalar `j' as an array EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/fwtest.in0000644000175000017500000000000411463242060016160 0ustar schotschotabc gawk-4.0.1+dfsg.orig/test/gsubtst8.in0000644000175000017500000000002011654051011016421 0ustar schotschota bar b c foo d gawk-4.0.1+dfsg.orig/test/nastyparm.ok0000644000175000017500000000022511560331156016675 0ustar schotschot 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 gawk-4.0.1+dfsg.orig/test/anchgsub.in0000644000175000017500000000005011463242060016437 0ustar schotschot This is a test, this is only a test. gawk-4.0.1+dfsg.orig/test/inftest.awk0000644000175000017500000000034511463242060016504 0ustar schotschotBEGIN { k = 0 x = 100 # Added k limit test after finding some systems that didn't terminate # the loop correctly, sigh... do { k++; y = x ; x *= 1000; print x,y } while ( y < x && k < 1700) print "loop terminated" } gawk-4.0.1+dfsg.orig/test/arynocls.awk0000644000175000017500000000665511463242060016674 0ustar schotschot#To: bug-gnu-utils@gnu.org #From: Kristján Jónasson #Subject: Gawk bug #Cc: arnold@gnu.org # #Hi! # #The following seems to be a bug in gawk. I have tried as I could to #minimize the bug-causing program, so of course it does not seem to do #anything useful in its present form. The error message received is: # #gawk: test.awk:15: fatal error: internal error #Aborted # #Note that there is an attached file that the program reads, called "a". I #played with the program a fair bit and my feeling is that the error is #related with the delete statement, and not the reading of the file and the #close statement. At one point I was able to remove the file reading and #still obtain the error. If, for example, I remove the close statement and #make two copies of the file instead, (reading one copy in sub1 and the #other in sub2), the error still occurs. # #The operating system is Red Hat Linux, version 6.0, the gawk is version #3.0.4, and the gawk was obtained from an rpm file gawk-3.0.4-1.i386.rpm. # #The program is: # # Wed Mar 8 13:41:34 IST 2000 # ADR: modified to use INPUT, so can set it from command line. # When run, no output is produced, but it shouldn't core # dump, either. # # The program bug is to not close the file in sub2. function sub1(x) { # while (getline < "a" == 1) i++ while (getline < INPUT == 1) i++ # close("a") close(INPUT) } function sub2(x) { i=0 delete y # while (getline < "a" == 1) z[++i] = $1 while (getline < INPUT == 1) z[++i] = $1 for(i in z) y[i] = x[i] + z[i] } function sub3(x, y, z) { sub2(x) for(i=1; i<=4; i++) z[i] = y[i] } BEGIN { sub1(x) sub2(x) sub3(x, y, z) } # #And the data file is: # # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # 32.440 3.830 3.383700000000000 10.08 298 865 # # gawk-4.0.1+dfsg.orig/test/nonl.awk0000644000175000017500000000000111463242060015763 0ustar schotschot0gawk-4.0.1+dfsg.orig/test/prdupval.in0000644000175000017500000000000411463242060016501 0ustar schotschotone gawk-4.0.1+dfsg.orig/test/compare2.awk0000644000175000017500000001432211463242060016540 0ustar schotschot# From beebe@math.utah.edu Thu Aug 2 15:35:07 2001 # Received: from mail.actcom.co.il [192.114.47.13] # by localhost with POP3 (fetchmail-5.7.4) # for arnold@localhost (single-drop); Thu, 02 Aug 2001 15:35:07 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Thu Aug 2 16:02:36 2001) # X-From_: beebe@sunshine.math.utah.edu Thu Aug 2 15:41:13 2001 # Received: from lmail.actcom.co.il by actcom.co.il with ESMTP # (8.9.1a/actcom-0.2) id PAA01349 for ; # Thu, 2 Aug 2001 15:41:06 +0300 (EET DST) # (rfc931-sender: mail.actcom.co.il [192.114.47.13]) # Received: from billohost.com (www.billohost.com [209.196.35.10]) # by lmail.actcom.co.il (8.11.2/8.11.2) with ESMTP id f72Cf3I21032 # for ; Thu, 2 Aug 2001 15:41:05 +0300 # Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164]) # by billohost.com (8.9.3/8.9.3) with ESMTP id IAA28585 # for ; Thu, 2 Aug 2001 08:34:38 -0400 # Received: from sunshine.math.utah.edu ([128.110.198.2]) # by fencepost.gnu.org with esmtp (Exim 3.22 #1 (Debian)) # id 15SHjG-00036x-00 # for ; Thu, 02 Aug 2001 08:37:30 -0400 # Received: from suncore.math.utah.edu (IDENT:GsUbUdUYCtFLRE4HvnnvhN4JsjooYcfR@suncore0.math.utah.edu [128.110.198.5]) # by sunshine.math.utah.edu (8.9.3/8.9.3) with ESMTP id GAA00190; # Thu, 2 Aug 2001 06:37:04 -0600 (MDT) # Received: (from beebe@localhost) # by suncore.math.utah.edu (8.9.3/8.9.3) id GAA20469; # Thu, 2 Aug 2001 06:37:03 -0600 (MDT) # Date: Thu, 2 Aug 2001 06:37:03 -0600 (MDT) # From: "Nelson H. F. Beebe" # To: arnold@gnu.org # Cc: beebe@math.utah.edu # X-US-Mail: "Center for Scientific Computing, Department of Mathematics, 322 # INSCC, University of Utah, 155 S 1400 E RM 233, Salt Lake City, UT # 84112-0090, USA" # X-Telephone: +1 801 581 5254 # X-FAX: +1 801 585 1640, +1 801 581 4148 # X-URL: http://www.math.utah.edu/~beebe # Subject: awk implementations: a bug, or new dark corner? # Message-ID: # Status: RO # # Consider the following program: # # % cat bug.awk BEGIN { split("00/00/00",mdy,"/") if ((mdy[1] == 0) && (mdy[2] == 0) && (mdy[3] == 0)) { print "OK: zero strings compare equal to number zero" exit(0) } else { print "ERROR: zero strings compare unequal to number zero" exit(1) } } # # Here are the awk implementation versions (on Sun Solaris 2.7): # # % awk -V # awk version 19990416 # # % mawk -W version # mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan # # % nawk -V # awk version 20001115 # # % gawk --version # GNU Awk 3.1.10 # ... # # Here's what they say about the test program: # # foreach f (awk mawk nawk gawk gawk-*) # echo ======== $f # $f -f ~/bug.awk # end # # ======== awk # OK: zero strings compare equal to number zero # ======== mawk # OK: zero strings compare equal to number zero # ======== nawk # OK: zero strings compare equal to number zero # ======== gawk # ERROR: zero strings compare unequal to number zero # ======== gawk-3.0.0 # OK: zero strings compare equal to number zero # ======== gawk-3.0.1 # OK: zero strings compare equal to number zero # ======== gawk-3.0.3 # OK: zero strings compare equal to number zero # ======== gawk-3.0.4 # OK: zero strings compare equal to number zero # ======== gawk-3.0.5 # OK: zero strings compare equal to number zero # ======== gawk-3.0.6 # OK: zero strings compare equal to number zero # ======== gawk-3.0.60 # OK: zero strings compare equal to number zero # ======== gawk-3.0.90 # ERROR: zero strings compare unequal to number zero # ======== gawk-3.0.91 # ERROR: zero strings compare unequal to number zero # ======== gawk-3.0.92 # ERROR: zero strings compare unequal to number zero # ======== gawk-3.0.93 # ERROR: zero strings compare unequal to number zero # ======== gawk-3.0.94 # ERROR: zero strings compare unequal to number zero # ======== gawk-3.0.95 # ERROR: zero strings compare unequal to number zero # ======== gawk-3.0.96 # ERROR: zero strings compare unequal to number zero # ======== gawk-3.0.97 # ERROR: zero strings compare unequal to number zero # ======== gawk-3.1.0 # ERROR: zero strings compare unequal to number zero # ======== gawk-3.1.10 # ERROR: zero strings compare unequal to number zero # # Identical results were obtained on Apple Rhapsody, Apple Darwin, # Compaq/DEC Alpha OSF/1, Intel x86 GNU/Linux, SGI IRIX 6.5, DEC Alpha # GNU/Linux, and Sun SPARC GNU/Linux, so it definitely is not a C # compiler problem. # # However, the gray awk book, p. 44, says: # # In a comparison expression like: # x == y # if both operands have a numeric type, the comparison is numeric; # otherwise, any numeric operand is converted to a string and the # comparison is made on the string values. # # and the new green gawk book, p. 95, says: # # When comparing operands of mixed types, numeric operands are # converted to strings using the value of `CONVFMT' # # This suggests that the OK response in bug.awk is wrong, and the ERROR # response is correct. Only recent gawk releases do the right thing, # and it is awk, mawk, and nawk that have a bug. # # If I change the test program from "00/00/00" to "0/0/0", all versions # tested produce the OK response. # # Comments? # # After reading the two book excerpts, I changed my code to read # # if (((0 + mdy[1]) == 0) && ((0 + mdy[2]) == 0) && ((0 + mdy[3]) == 0)) # # and output from all implementations now agrees. # # ------------------------------------------------------------------------------- # - Nelson H. F. Beebe Tel: +1 801 581 5254 - # - Center for Scientific Computing FAX: +1 801 585 1640, +1 801 581 4148 - # - University of Utah Internet e-mail: beebe@math.utah.edu - # - Department of Mathematics, 322 INSCC beebe@acm.org beebe@computer.org - # - 155 S 1400 E RM 233 beebe@ieee.org - # - Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe - # ------------------------------------------------------------------------------- # gawk-4.0.1+dfsg.orig/test/printf0.ok0000644000175000017500000000000211463242060016227 0ustar schotschotX gawk-4.0.1+dfsg.orig/test/arynocls.in0000644000175000017500000000335211463242060016507 0ustar schotschot 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 32.440 3.830 3.383700000000000 10.08 298 865 gawk-4.0.1+dfsg.orig/test/nlstrina.ok0000644000175000017500000000002511463242060016504 0ustar schotschota 2 2 b 3 3 c 1 3 gawk-4.0.1+dfsg.orig/test/synerr1.ok0000644000175000017500000000012111463242060016252 0ustar schotschotgawk: synerr1.awk:4: print "hi" gawk: synerr1.awk:4: ^ syntax error EXIT CODE: 1 gawk-4.0.1+dfsg.orig/test/reparse.in0000644000175000017500000000001211463242060016304 0ustar schotschot1 axbxc 2 gawk-4.0.1+dfsg.orig/test/leadnl.ok0000644000175000017500000000030611463242060016113 0ustar schotschotName is: Jane Doe Address is: 123 Main Street City and State are: Anywhere, SE 12345-6789 Name is: John Smith Address is: 456 Tree-lined Avenue City and State are: Smallville, MW 98765-4321 gawk-4.0.1+dfsg.orig/test/posix2008sub.ok0000644000175000017500000000017311467161451017054 0ustar schotschotorig = "here is some text", repl = "" result is "here is text" gawk-4.0.1+dfsg.orig/test/getlnbuf.in0000644000175000017500000012215211463242060016463 0ustar schotschotEXTRA_INFO.TYP3.EC := EC; EXTRA_INFO.TYP3.TEXT:= 'CONNECT_SERVICE TO OAM FAILED'; G9PXYA1S!G9TE500_EHP_P( 'G9IBSA1C003', /*@@ID*/ G9PXYA1S!G9TE102_ERR_CLASS_SWERR, /*@@CLASS*/ ADDR(EXTRA_INFO.ERROR_HANDLER), /* EXTRA-INFO ADDR */ G9PXYA1S!G9TE100_GB_LM, /* USER-ID */ NULL /* OPTIONAL-SWET-INFO ADDR */ ); /***@@@ END OF ERROR ***/ @K@FREEZE 917596041 @K@NAME T_ERR4_1 @K@INSCRIPT ERROR_HANDLING: DB_OVERFLOW MP/NSEI @K@CODE /***@@@ ERROR ***/ /*@@ERRORTEXT *@ DB-OVERFLOW *@ *@ *@@DESCRIPTION *@ THE INSTANCE-CREATION WAS NOT POSSIBLE *@ BECAUSE THE DATABASE WOULD OVERFLOW *@ *@@EXTRA INFO *@ (EXTRA_INFO_4_STRUCT) *@ NSEI *@ NSVCI *@ TEXT *@ */ EXTRA_INFO.TYP4.NSEI := EVD_PTR->.KEYS.INT_ARR(0); EXTRA_INFO.TYP4.NSVCI:= EVD_PTR->.KEYS.INT_ARR(1); EXTRA_INFO.TYP4.TEXT := 'NSVC-HAND.: MP/NSEI-OVERFLOW'; G9PXYA1S!G9TE500_EHP_P( 'G9IBSA1C004', /*@@ID*/ G9PXYA1S!G9TE102_ERR_CLASS_ESC_MAX_ANY, /*@@CLASS*/ ADDR(EXTRA_INFO.ERROR_HANDLER), /* EXTRA-INFO ADDR */ G9PXYA1S!G9TE100_GB_LM, /* USER-ID */ NULL /* OPTIONAL-SWET-INFO ADDR */ ); /***@@@ END OF ERROR ***/ @K@FREEZE 920903219 @K@NAME T_ERR4_2 @K@INSCRIPT ERROR_HANDLING: DB_OVERFLOW MP/NSVCI @K@CODE /***@@@ ERROR ***/ /*@@ERRORTEXT *@ DB-OVERFLOW *@ *@ *@@DESCRIPTION *@ THE INSTANCE-CREATION WAS NOT POSSIBLE *@ BECAUSE THE DATABASE WOULD OVERFLOW *@ *@@EXTRA INFO *@ (EXTRA_INFO_4_STRUCT) *@ NSEI *@ NSVCI *@ TEXT *@ */ EXTRA_INFO.TYP4.NSEI := EVD_PTR->.KEYS.INT_ARR(0); EXTRA_INFO.TYP4.NSVCI:= EVD_PTR->.KEYS.INT_ARR(1); EXTRA_INFO.TYP4.TEXT := 'NSVC-HAND.: MP/NSVCI-OVERFLOW'; G9PXYA1S!G9TE500_EHP_P( 'G9IBSA1C004', /*@@ID*/ G9PXYA1S!G9TE102_ERR_CLASS_ESC_MAX_ANY, /*@@CLASS*/ ADDR(EXTRA_INFO.ERROR_HANDLER), /* EXTRA-INFO ADDR */ G9PXYA1S!G9TE100_GB_LM, /* USER-ID */ NULL /* OPTIONAL-SWET-INFO ADDR */ ); /***@@@ END OF ERROR ***/ @K@FREEZE 920903222 @K@NAME T_ERR4_3 @K@INSCRIPT ERROR_HANDLING: DB_OVERFLOW NSEI/NSVCI @K@CODE /***@@@ ERROR ***/ /*@@ERRORTEXT *@ DB-OVERFLOW *@ *@ *@@DESCRIPTION *@ THE INSTANCE-CREATION WAS NOT POSSIBLE *@ BECAUSE THE DATABASE WOULD OVERFLOW *@ *@@EXTRA INFO *@ (EXTRA_INFO_4_STRUCT) *@ NSEI *@ NSVCI *@ TEXT *@ */ EXTRA_INFO.TYP4.NSEI := EVD_PTR->.KEYS.INT_ARR(0); EXTRA_INFO.TYP4.NSVCI:= EVD_PTR->.KEYS.INT_ARR(1); EXTRA_INFO.TYP4.TEXT := 'NSVC-HAND.: NSEI/NSVC-OVERFLOW'; G9PXYA1S!G9TE500_EHP_P( 'G9IBSA1C004', /*@@ID*/ G9PXYA1S!G9TE102_ERR_CLASS_ESC_MAX_ANY, /*@@CLASS*/ ADDR(EXTRA_INFO.ERROR_HANDLER), /* EXTRA-INFO ADDR */ G9PXYA1S!G9TE100_GB_LM, /* USER-ID */ NULL /* OPTIONAL-SWET-INFO ADDR */ ); /***@@@ END OF ERROR ***/ @K@FREEZE 920903226 @K@NAME TR_RESET @K@INSCRIPT RESTART_ TNS_RESET_ TIMER @K@CODE /* TIMER EVENT DESCRIPTOR STILL THERE */ /* INITIALIZATION OF THE TIMER-EVENT-DESCRIPTOR STILL VALID */ NSVCI_CON_PTR->.TIM_EVD_PTR->.TIMER:= TNS_RESET_MAP; /* START TIMER */ G9PX508_START_TIMER_P ( NSVCI_CON_PTR->.TIM_EVD_PTR ); @K@FREEZE 924684867 @K@NAME TX_AUDIT @K@INSCRIPT FOR AUDIT @K@NAME M_BLKOACKM @K@INSCRIPT NS_ BLOCK_ACK @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9IBDF4_NS_LM_M) + G9IBD44_NS_PDU_DATA_OFFSET_C), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9IBD40_NS_LM_PDU_C; TX_EVD_PTR->.EVENT_DESTINATION:= GBDL_HANDLE; IF /* 'OTHER' ALIVE NSVC TO THIS NSEI EXISTING? */ NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR /= NULL THEN /* USE THIS 'OTHER' FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(1):= NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR TRANSPORT */ ELSE /* USE AFFECTED NSVC AGAIN FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(1):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR TRANSPORT */ FI; /* POINTER TO PDU IN POOL-ELEMENT */ NS_PDU_PTR:= NS_PDU_REF_M (INT(TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT) + G9IBD44_NS_PDU_DATA_OFFSET_C); /* OFFSET OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_OFFSET:= G9IBD44_NS_PDU_DATA_OFFSET_C; /* LENGTH OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(NS_PDU_PTR->.G9IBDF4_PDU_TYPE) + SIZE(NS_PDU_PTR->.D3); /* NOW THE POOL-ELEMENT */ NS_PDU_PTR->.G9IBDF4_PDU_TYPE:= G9IBDR2_NS_BLOCK_ACK_C; /* PDU-TYPE */ NS_PDU_PTR->.D3.NSVCI_TLV.NSVCI_VAL := NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVC TO BE BLOCKED */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 938805885 @K@NAME T_RCTRUE @K@INSCRIPT RC = TRUE @K@CODE RC:= TRUE; @K@FREEZE 922176328 @K@NAME M_AC_SBVCN @K@INSCRIPT G9IBME0_ ACT_ SIGN_BVC_C @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB512_GET_MSG_LESS_EV_DESCR_P ( SID_GBNSVC, TX_EVD_PTR ); /* COMPOSING THE EVENT */ TX_EVD_PTR->.EVENT_CMD:= G9IBME0_ACT_SIGN_BVC_C; TX_EVD_PTR->.EVENT_DESTINATION:= GBBVC_HANDLE; TX_EVD_PTR->.KEYS.INT_ARR(0):= EVD_PTR->.KEYS.INT_ARR(0); TX_EVD_PTR->.KEYS.INT_ARR(1):= SIGN_BVCI; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 938788211 @K@NAME T_RC_EOD @K@INSCRIPT RC = END OF DATA @K@CODE RC:= G9IBSM4_RC_END_OF_DATA; @K@FREEZE 921083785 @K@NAME T_RC_EMP @K@INSCRIPT RC = EMPTY @K@CODE RC:= G9IBSM4_RC_EMPTY; @K@FREEZE 921083757 @K@NAME T_RC_ERR @K@INSCRIPT RC = ERROR @K@CODE RC:= G9IBSM4_RC_ERROR; @K@FREEZE 921083731 @K@NAME S_UNUSED @K@INSCRIPT G9IBSM0_ UNUSED @K@CODE @K@FREEZE 919416670 @K@NAME TA_UNBLOCK @K@INSCRIPT START_ TNS_UNBLOCK_ TIMER @K@CODE /* GET TIMER-EVENT DESCRIPTOR */ G9PB513_GET_TIMER_EV_DESCR_P ( SID_GBNSVC, NSVCI_CON_PTR->.TIM_EVD_PTR ); /* INITIALIZATION OF THE TIMER-EVENT-DESCRIPTOR */ NSVCI_CON_PTR->.TIM_EVD_PTR->.EVENT_CMD:= G9IBSE4_TO_TNS_C; NSVCI_CON_PTR->.TIM_EVD_PTR->.EVENT_DESTINATION:= GBNSVC_HANDLE; NSVCI_CON_PTR->.TIM_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; NSVCI_CON_PTR->.TIM_EVD_PTR->.KEYS.INT_ARR(1):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; NSVCI_CON_PTR->.TIM_EVD_PTR->.TIMER:= TNS_UNBLOCK_MAP; /* START TIMER */ G9PX508_START_TIMER_P ( NSVCI_CON_PTR->.TIM_EVD_PTR ); @K@FREEZE 924686210 @K@NAME M_BLK_ACKM @K@INSCRIPT NS_ BLOCK_ACK @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9IBDF4_NS_LM_M) + G9IBD44_NS_PDU_DATA_OFFSET_C), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9IBD40_NS_LM_PDU_C; TX_EVD_PTR->.EVENT_DESTINATION:= GBDL_HANDLE; TX_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(1):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR TRANSPORT */ /* POINTER TO PDU IN POOL-ELEMENT */ NS_PDU_PTR:= NS_PDU_REF_M (INT(TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT) + G9IBD44_NS_PDU_DATA_OFFSET_C); /* OFFSET OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_OFFSET:= G9IBD44_NS_PDU_DATA_OFFSET_C; /* LENGTH OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(NS_PDU_PTR->.G9IBDF4_PDU_TYPE) + SIZE(NS_PDU_PTR->.D3); /* NOW THE POOL-ELEMENT */ NS_PDU_PTR->.G9IBDF4_PDU_TYPE:= G9IBDR2_NS_BLOCK_ACK_C; /* PDU-TYPE */ NS_PDU_PTR->.D3.NSVCI_TLV.NSVCI_VAL := NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVC TO BE BLOCKED */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 926348442 @K@NAME TA_NXTALIV @K@INSCRIPT DEFINE NEW 'NEXT_ ALIVE' @K@CODE IF /* ALIVE NSVC TO THE NSEI EXISTING? */ NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR /= NULL THEN /* TAKE NEXT ELEMENT IN THE LINKED LIST AS THE NEXT ALIVE NSVC */ NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR:= NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.NEXT_ALV_NSVCI_CON_PTR; FI; @K@FREEZE 938801086 @K@NAME M_DE_CBVCN @K@INSCRIPT G9IBME2_ DEACT_ CELL_BVC_C @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB512_GET_MSG_LESS_EV_DESCR_P ( SID_GBNSVC, TX_EVD_PTR ); /* COMPOSING THE EVENT */ TX_EVD_PTR->.EVENT_CMD:= G9IBME2_DEACT_CELL_BVC_C; TX_EVD_PTR->.EVENT_DESTINATION:= GBBVC_HANDLE; TX_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; TX_EVD_PTR->.KEYS.INT_ARR(1):= EVD_PTR->.ADD_DATA(3); /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 933318270 @K@NAME TA_NXTRESP @K@INSCRIPT DEFINE NEW 'NEXT_ RESPONSIBLE' @K@CODE NSEI_CON_PTR->.NEXT_RESP_NSVCI_CON_PTR:= NSEI_CON_PTR->.NEXT_RESP_NSVCI_CON_PTR->.NEXT_LSP_NSVCI_CON_PTR; @K@FREEZE 938005006 @K@NAME TA_NXTSUBS @K@INSCRIPT DEFINE NEW 'NEXT_ SUBSTITUTE' @K@CODE NSEI_CON_PTR->.NEXT_SUBS_NSVCI_CON_PTR:= NSEI_CON_PTR->.NEXT_SUBS_NSVCI_CON_PTR->.NEXT_UBL_NSVCI_CON_PTR; @K@NAME M_BLK_O__M @K@INSCRIPT NS_ BLOCK @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9IBDF4_NS_LM_M) + G9IBD44_NS_PDU_DATA_OFFSET_C), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9IBD40_NS_LM_PDU_C; TX_EVD_PTR->.EVENT_DESTINATION:= GBDL_HANDLE; IF /* 'OTHER' ALIVE NSVC TO THIS NSEI EXISTING? */ NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR /= NULL THEN /* USE THIS 'OTHER' FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(1):= NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR TRANSPORT */ ELSE /* USE AFFECTED NSVC AGAIN FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(1):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR TRANSPORT */ FI; /* POINTER TO PDU IN POOL-ELEMENT */ NS_PDU_PTR:= NS_PDU_REF_M (INT(TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT) + G9IBD44_NS_PDU_DATA_OFFSET_C); /* OFFSET OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_OFFSET:= G9IBD44_NS_PDU_DATA_OFFSET_C; /* LENGTH OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(NS_PDU_PTR->.G9IBDF4_PDU_TYPE) + SIZE(NS_PDU_PTR->.D2); /* NOW THE POOL-ELEMENT */ NS_PDU_PTR->.G9IBDF4_PDU_TYPE:= G9IBDR1_NS_BLOCK_C; /* PDU-TYPE */ NS_PDU_PTR->.D2.CAUSE_TLV.CAUSE_VAL:= G9IBBA2_NS_TRANSIT_NETWORK_FAILURE; /* CAUSE FOR BLOCK */ NS_PDU_PTR->.D2.NSVCI_TLV.NSVCI_VAL := NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVC TO BE BLOCKED */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@TEXT GSM 8.16 CHAP. 7.2: THE NS-BLOCK-PDU MAY BE SENT IN ANY ALIVE (BLOCKED OR UNBLOCKED) NS-VC... @K@FREEZE 938803215 @K@NAME M_DE_SBVCN @K@INSCRIPT G9IBME1_ DEACT_ SIGN_BVC_C @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB512_GET_MSG_LESS_EV_DESCR_P ( SID_GBNSVC, TX_EVD_PTR ); /* COMPOSING THE EVENT */ TX_EVD_PTR->.EVENT_CMD:= G9IBME1_DEACT_SIGN_BVC_C; TX_EVD_PTR->.EVENT_DESTINATION:= GBBVC_HANDLE; TX_EVD_PTR->.KEYS.INT_ARR(0):= EVD_PTR->.KEYS.INT_ARR(0); TX_EVD_PTR->.KEYS.INT_ARR(1):= SIGN_BVCI; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 938788201 @K@NAME M_OAME401M @K@INSCRIPT ERROR_MESSAGE: ERRONOUS_PDU RESET_PDU @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSE */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSE; OAM_MSG_PTR->.HANDLED_OBJECT.NSE_ID:= EVD_PTR->.KEYS.INT_ARR(0); /* USED NSEI (FROM ECI) */ /* ERROR-CAUSE = ERRONEOUS_PDU */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; /* ADDITIONAL_PDU_INFO */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= G9OC124_RESET_PDU; OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= EVD_PTR->.ADD_DATA(0); /* AFFECTED NSEI (FROM PDU) */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= EVD_PTR->.ADD_DATA(1); /* AFFECTED NSVCI (FROM PDU) */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 935766108 @K@NAME M_OAME402M @K@INSCRIPT ERROR_MESSAGE: ERRONOUS_PDU RESET_PDU @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= EVD_PTR->.KEYS.INT_ARR(1); /* USED NSVCI (FROM ECI) */ /* ERROR-CAUSE = ERRONEOUS_PDU */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; /* ADDITIONAL_PDU_INFO */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= G9OC124_RESET_PDU; OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= EVD_PTR->.ADD_DATA(0); /* NSEI FROM PDU */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= EVD_PTR->.ADD_DATA(1); /* NSVCI FROM PDU */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 935766407 @K@NAME M_OAME411M @K@INSCRIPT ERROR_MESSAGE: ERRONOUS_PDU RESET_ACK_PDU @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSE */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSE; OAM_MSG_PTR->.HANDLED_OBJECT.NSE_ID:= EVD_PTR->.KEYS.INT_ARR(0); /* USED NSEI (FROM ECI) */ /* ERROR-CAUSE = ERRONEOUS_PDU */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; /* ADDITIONAL_PDU_INFO */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= G9OC124_RESET_ACK_PDU; OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= EVD_PTR->.ADD_DATA(0); /* NSEI FROM PDU */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= EVD_PTR->.ADD_DATA(1); /* NSVCI FROM PDU */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 935767332 @K@NAME M_OAME412M @K@INSCRIPT ERROR_MESSAGE: ERRONOUS_PDU RESET_ACK_PDU @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= EVD_PTR->.KEYS.INT_ARR(1); /* USED NSVCI (FROM ECI) */ /* ERROR-CAUSE = ERRONEOUS_PDU */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; /* ADDITIONAL_PDU_INFO */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= G9OC124_RESET_ACK_PDU; OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= EVD_PTR->.ADD_DATA(0); /* NSEI FROM PDU */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= EVD_PTR->.ADD_DATA(1); /* NSVCI FROM PDU */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 935767189 @K@NAME C_CON @K@INSCRIPT RC_DB @K@CODE RC_DB @K@FREEZE 922176673 @K@NAME M_BLK____M @K@INSCRIPT NS_ BLOCK @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9IBDF4_NS_LM_M) + G9IBD44_NS_PDU_DATA_OFFSET_C), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9IBD40_NS_LM_PDU_C; TX_EVD_PTR->.EVENT_DESTINATION:= GBDL_HANDLE; TX_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(1):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR TRANSPORT */ /* POINTER TO PDU IN POOL-ELEMENT */ NS_PDU_PTR:= NS_PDU_REF_M (INT(TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT) + G9IBD44_NS_PDU_DATA_OFFSET_C); /* OFFSET OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_OFFSET:= G9IBD44_NS_PDU_DATA_OFFSET_C; /* LENGTH OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(NS_PDU_PTR->.G9IBDF4_PDU_TYPE) + SIZE(NS_PDU_PTR->.D2); /* NOW THE POOL-ELEMENT */ NS_PDU_PTR->.G9IBDF4_PDU_TYPE:= G9IBDR1_NS_BLOCK_C; /* PDU-TYPE */ NS_PDU_PTR->.D2.CAUSE_TLV.CAUSE_VAL:= G9IBBA2_NS_OAM_INTERVENTION; /* CAUSE FOR BLOCK */ NS_PDU_PTR->.D2.NSVCI_TLV.NSVCI_VAL := NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVC TO BE BLOCKED */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@TEXT GSM 8.16 CHAP. 7.2: THE NS-BLOCK-PDU MAY BE SENT IN ANY ALIVE (BLOCKED OR UNBLOCKED) NS-VC... @K@FREEZE 926348613 @K@NAME S_BLOCKED @K@INSCRIPT G9IBSM0_ BLOCKED @K@CODE @K@FREEZE 922176496 @K@NAME D_CON @K@INSCRIPT CONTEXT GOT @K@CODE RC_DB = G9IBSR0_RC_OK @K@FREEZE 921772339 @K@NAME M_OAME901M @K@INSCRIPT ERROR_MESSAGE: OPERATIONAL_STATE_CHANGE UBL->BLK @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = OPERATIONAL_STATE_CHANGE */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_OPERATIONAL_STATE_CHANGE; /* ADDITIONAL_OPERATIONAL_STATE_INFO */ OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_OLD:= G9OC101_UNBLOCKED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_OLD:= G9OC102_ENABLED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_NEW:= G9OC102_ENABLED; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 925970975 @K@NAME M_OAME902M @K@INSCRIPT ERROR_MESSAGE: OPERATIONAL_STATE_CHANGE UBL->BLK @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = OPERATIONAL_STATE_CHANGE */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_OPERATIONAL_STATE_CHANGE; /* ADDITIONAL_OPERATIONAL_STATE_INFO */ OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_OLD:= G9OC101_UNBLOCKED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_OLD:= G9OC102_ENABLED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_NEW:= G9OC102_DISABLED; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 925970987 @K@NAME M_OAME10SM @K@INSCRIPT ERROR_MESSAGE: ALARM_BEGIN_NS_ALIVE_TEST @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = ALARM_BEGIN_NS_ALIVE_TEST*/ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_BEGIN_NS_ALIVE_TEST; /* ADDITIONAL_ALARM_INFO */ OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= TRUE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= TRUE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@NAME M_OAME911M @K@INSCRIPT ERROR_MESSAGE: OPERATIONAL_STATE_CHANGE BLK->UBL @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = OPERATIONAL_STATE_CHANGE */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_OPERATIONAL_STATE_CHANGE; /* ADDITIONAL_OPERATIONAL_STATE_INFO */ OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_OLD:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_NEW:= G9OC101_UNBLOCKED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_OLD:= G9OC102_ENABLED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_NEW:= G9OC102_ENABLED; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 925970996 @K@NAME M_OAME20SM @K@INSCRIPT ERROR_MESSAGE: ALARM_END_NS_ALIVE_TEST @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = ALARM_END_NS_ALIVE_TEST */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_END_NS_ALIVE_TEST; /* ADDITIONAL_ALARM_INFO */ OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= TRUE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= TRUE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@NAME M_OAME10_M @K@INSCRIPT ERROR_MESSAGE: ALARM_BEGIN_NS_ALIVE_TEST @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = ALARM_BEGIN_NS_ALIVE_TEST*/ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_BEGIN_NS_ALIVE_TEST; /* ADDITIONAL_ALARM_INFO */ OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= TRUE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= TRUE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922443813 @K@NAME D_SEM @K@INSCRIPT CALL_SEM = TRUE @K@CODE CALL_SEM = TRUE @K@FREEZE 922176624 @K@NAME D_N_0 @K@INSCRIPT N = 0 @K@CODE NSVCI_CON_PTR->.N = 0 @K@FREEZE 921511000 @K@NAME M_OAME12_M @K@INSCRIPT ERROR_MESSAGE: ALARM_BEGIN_NS_ALIVE_TEST @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = ALARM_BEGIN_NS_ALIVE_TEST*/ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_BEGIN_NS_ALIVE_TEST; /* ADDITIONAL_ALARM_INFO */ OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= FALSE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= G9OC103_ALIVE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= TRUE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922443829 @K@NAME M_OAME21_M @K@INSCRIPT ERROR_MESSAGE: ALARM_END_NS_ALIVE_TEST @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = ALARM_END_NS_ALIVE_TEST */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_END_NS_ALIVE_TEST; /* ADDITIONAL_ALARM_INFO */ OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= TRUE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= FALSE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922443856 @K@NAME M_OAME13_M @K@INSCRIPT ERROR_MESSAGE: ALARM_BEGIN_NS_ALIVE_TEST @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = ALARM_BEGIN_NS_ALIVE_TEST*/ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_BEGIN_NS_ALIVE_TEST; /* ADDITIONAL_ALARM_INFO */ OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= FALSE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= G9OC101_UNBLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= G9OC103_ALIVE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= TRUE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922443838 @K@NAME M_OAME22_M @K@INSCRIPT ERROR_MESSAGE: ALARM_END_NS_ALIVE_TEST @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = ALARM_END_NS_ALIVE_TEST */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_END_NS_ALIVE_TEST; /* ADDITIONAL_ALARM_INFO */ OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= FALSE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= G9OC103_ALIVE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= TRUE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922443864 @K@NAME M_OAME30_M @K@INSCRIPT ERROR_MESSAGE: NO_ANSWER_FORM_BSS RESET_PROCEDURE @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = NO_ANSWER_FROM_BSS */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_NO_ANSWER_FROM_BSS; /* INITIATED_PROCEDURE */ OAM_MSG_PTR->.INITIATED_PROCEDURE:= G9OC123_RESET_PROCEDURE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922175973 @K@NAME M_OAME31_M @K@INSCRIPT ERROR_MESSAGE: NO_ANSWER_FROM_BSS BLOCK_PROCEDURE @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = NO_ANSWER_FROM_BSS */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_NO_ANSWER_FROM_BSS; /* INITIATED_PROCEDURE */ OAM_MSG_PTR->.INITIATED_PROCEDURE:= G9OC123_BLOCK_PROCEDURE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922175976 @K@NAME M_OAME32_M @K@INSCRIPT ERROR_MESSAGE: NO_ANSWER_FROM_BSS UNBLOCK_PROCEDURE @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = NO_ANSWER_FROM_BSS */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_NO_ANSWER_FROM_BSS; /* INITIATED_PROCEDURE */ OAM_MSG_PTR->.INITIATED_PROCEDURE:= G9OC123_UNBLOCK_PROCEDURE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922175980 @K@NAME M_OAME42_M @K@INSCRIPT ERROR_MESSAGE: ERRONOUS_PDU BLOCK_PDU @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= EVD_PTR->.ADD_DATA(1); /* USED NSVCI (FROM ECI) */ /* ERROR-CAUSE = ERRONEOUS_PDU */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; /* ADDITIONAL_PDU_INFO */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= G9OC124_BLOCK_PDU; OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= EVD_PTR->.KEYS.INT_ARR(0); /* AFFECTED NSEI (FROM PDU) */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= EVD_PTR->.KEYS.INT_ARR(1); /* AFFECTED NSVCI (FROM PDU) */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 934296141 @K@NAME M_OAME50_M @K@INSCRIPT ERROR_MESSAGE: STATUS_PDU_CONTAINS_ERROR_INFO RECEIVED @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR-CAUSE = STATUS_PDU_CONTAINS_ERROR_INFO */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_STATUS_PDU_CONTAINS_ERROR_INFO; /* ADDITIONAL_STATUS_PDU_INFO */ INT_CAUSE_PTR.INT_PTR:= ADDR(EVD_PTR->.ADD_DATA(2)); OAM_MSG_PTR->.ADDITIONAL_STATUS_PDU_INFO:= INT_CAUSE_PTR.CAUSE_PTR->; /* CAUSE */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@TEXT NICHT OK @K@FREEZE 934298924 @K@NAME M_OAME43_M @K@INSCRIPT ERROR_MESSAGE: ERRONOUS_PDU BLOCK_ACK_PDU @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= EVD_PTR->.ADD_DATA(1); /* USED NSVCI (FROM ECI) */ /* ERROR-CAUSE = ERRONEOUS_PDU */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; /* ADDITIONAL_PDU_INFO */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= G9OC124_BLOCK_ACK_PDU; OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= EVD_PTR->.KEYS.INT_ARR(0); /* AFFECTED NSEI (FROM PDU) */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= EVD_PTR->.KEYS.INT_ARR(1); /* AFFECTED NSVCI (FROM PDU) */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 934297710 gawk-4.0.1+dfsg.orig/test/onlynl.awk0000644000175000017500000000004611463242060016341 0ustar schotschotBEGIN { RS = "" } { print "got", $0 } gawk-4.0.1+dfsg.orig/test/gsubtst3.awk0000644000175000017500000003120211463242060016602 0ustar schotschot# From laura_fairhead@talk21.com Fri May 10 11:24:41 2002 # Return-Path: # Received: from localhost (aahz [127.0.0.1]) # by skeeve.com (8.11.2/8.11.2) with ESMTP id g4A8OdU01822 # for ; Fri, 10 May 2002 11:24:40 +0300 # Received: from actcom.co.il [192.114.47.1] # by localhost with POP3 (fetchmail-5.7.4) # for arnold@localhost (single-drop); Fri, 10 May 2002 11:24:40 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Fri May 10 11:30:42 2002) # X-From_: laura_fairhead@talk21.com Fri May 10 05:39:57 2002 # Received: from lmail.actcom.co.il by actcom.co.il with ESMTP # (8.11.6/actcom-0.2) id g4A2dpw26380 for ; # Fri, 10 May 2002 05:39:52 +0300 (EET DST) # (rfc931-sender: mail.actcom.co.il [192.114.47.13]) # Received: from f7.net (consort.superb.net [209.61.216.22]) # by lmail.actcom.co.il (8.11.6/8.11.6) with ESMTP id g4A2dxl10851 # for ; Fri, 10 May 2002 05:39:59 +0300 # Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) # by f7.net (8.11.6/8.11.6) with ESMTP id g4A2dwN11097 # for ; Thu, 9 May 2002 22:39:58 -0400 # Received: from [194.73.242.6] (helo=wmpmta04-app.mail-store.com) # by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) # id 1760K4-0001QX-00 # for ; Thu, 09 May 2002 22:39:56 -0400 # Received: from wmpmtavirtual ([10.216.84.15]) # by wmpmta04-app.mail-store.com # (InterMail vM.5.01.02.00 201-253-122-103-101-20001108) with SMTP # id <20020510023921.EEW24107.wmpmta04-app.mail-store.com@wmpmtavirtual> # for ; Fri, 10 May 2002 03:39:21 +0100 # Received: from 213.1.102.243 by t21web05-lrs ([10.216.84.15]); Fri, 10 May 02 03:38:42 GMT+01:00 # X-Mailer: talk21 v1.24 - http://talk21.btopenworld.com # From: laura_fairhead@talk21.com # To: bug-gawk@gnu.org # X-Talk21Ref: none # Date: Fri, 10 May 2002 03:38:42 GMT+01:00 # Subject: bug in gawk 3.1.0 regex code # Mime-Version: 1.0 # Content-type: multipart/mixed; boundary="--GgOuLpDpIyE--1020998322088--" # Message-Id: <20020510023921.EEW24107.wmpmta04-app.mail-store.com@wmpmtavirtual> # X-SpamBouncer: 1.4 (10/07/01) # X-SBClass: OK # Status: RO # # Multipart Message Boundary - attachment/bodypart follows: # # # ----GgOuLpDpIyE--1020998322088-- # Content-Type: text/plain # Content-Transfer-Encoding: 7bit # # # I believe I've just found a bug in gawk3.1.0 implementation of # extended regular expressions. It seems to be down to the alternation # operator; when using an end anchor '$' as a subexpression in an # alternation and the entire matched RE is a nul-string it fails # to match the end of string, for example; # # gsub(/$|2/,"x") # print # # input = 12345 # expected output = 1x345x # actual output = 1x345 # # The start anchor '^' always works as expected; # # gsub(/^|2/,"x") # print # # input = 12345 # expected output = x1x345 # actual output = x1x345 # # This was with POSIX compliance enabled althought that doesn't # effect the result. # # I checked on gawk3.0.6 and got exactly the same results however # gawk2.15.6 gives the expected results. # # All the follow platforms produced the same results; # # gawk3.0.6 / Win98 / i386 # gawk3.1.0 / Win98 / i386 # gawk3.0.5 / Linux2.2.16 / i386 # # Complete test results were as follows; # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # regex input expected actual bug? # ------------------------------------------------------------- # (^) 12345 x12345 x12345 # ($) 12345 12345x 12345x # (^)|($) 12345 x12345x x12345x # ($)|(^) 12345 x12345x x12345x # 2 12345 1x345 1x345 # (^)|2 12345 x1x345 x1x345 # 2|(^) 12345 x1x345 x1x345 # ($)|2 12345 1x345x 1x345 **BUG** # 2|($) 12345 1x345x 1x345 **BUG** # (2)|(^) 12345 x1x345 x1x345 # (^)|(2) 12345 x1x345 x1x345 # (2)|($) 12345 1x345x 1x345 **BUG** # ($)|(2) 12345 1x345x 1x345 **BUG** # ((2)|(^)). 12345 xx45 xx45 # ((^)|(2)). 12345 xx45 xx45 # .((2)|($)) 12345 x34x x34x # .(($)|(2)) 12345 x34x x34x # (^)|6 12345 x12345 x12345 # 6|(^) 12345 x12345 x12345 # ($)|6 12345 12345x 12345x # 6|($) 12345 12345x 12345x # 2|6|(^) 12345 x1x345 x1x345 # 2|(^)|6 12345 x1x345 x1x345 # 6|2|(^) 12345 x1x345 x1x345 # 6|(^)|2 12345 x1x345 x1x345 # (^)|6|2 12345 x1x345 x1x345 # (^)|2|6 12345 x1x345 x1x345 # 2|6|($) 12345 1x345x 1x345 **BUG** # 2|($)|6 12345 1x345x 1x345 **BUG** # 6|2|($) 12345 1x345x 1x345 **BUG** # 6|($)|2 12345 1x345x 1x345 **BUG** # ($)|6|2 12345 1x345x 1x345 **BUG** # ($)|2|6 12345 1x345x 1x345 **BUG** # 2|4|(^) 12345 x1x3x5 x1x3x5 # 2|(^)|4 12345 x1x3x5 x1x3x5 # 4|2|(^) 12345 x1x3x5 x1x3x5 # 4|(^)|2 12345 x1x3x5 x1x3x5 # (^)|4|2 12345 x1x3x5 x1x3x5 # (^)|2|4 12345 x1x3x5 x1x3x5 # 2|4|($) 12345 1x3x5x 1x3x5 **BUG** # 2|($)|4 12345 1x3x5x 1x3x5 **BUG** # 4|2|($) 12345 1x3x5x 1x3x5 **BUG** # 4|($)|2 12345 1x3x5x 1x3x5 **BUG** # ($)|4|2 12345 1x3x5x 1x3x5 **BUG** # ($)|2|4 12345 1x3x5x 1x3x5 **BUG** # x{0}((2)|(^)) 12345 x1x345 x1x345 # x{0}((^)|(2)) 12345 x1x345 x1x345 # x{0}((2)|($)) 12345 1x345x 1x345 **BUG** # x{0}(($)|(2)) 12345 1x345x 1x345 **BUG** # x*((2)|(^)) 12345 x1x345 x1x345 # x*((^)|(2)) 12345 x1x345 x1x345 # x*((2)|($)) 12345 1x345x 1x345 **BUG** # x*(($)|(2)) 12345 1x345x 1x345 **BUG** # x{0}^ 12345 x12345 x12345 # x{0}$ 12345 12345x 12345x # (x{0}^)|2 12345 x1x345 x1x345 # (x{0}$)|2 12345 1x345x 1x345 **BUG** # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # # Here's the test program I used, a few of the cases use ERE {n[,[m]]} # operators so need '-W posix', (although the same results minus # those tests came out without POSIX compliance enabled) # # [ Invocation was 'gawk -W posix -f tregex.awk' ] # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # tregex.awk # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ BEGIN{ print _=sprintf("%-20s%-10s%-10s%-10s%-10s\n","regex","input","expected","actual","bug?") OFS="-" $(length(_)+1)="" print $0 while(getline # # # byefrom # # Laura Fairhead # # # # # -------------------- # talk21 your FREE portable and private address on the net at http://www.talk21.com # ----GgOuLpDpIyE--1020998322088-- # Content-Type: : application/zip;; Name="COPY.ZIP" # Content-Transfer-Encoding: base64 # Content-Disposition: attachment; filename="COPY.ZIP" # # UEsDBBQAAAAIALoaqiyj8d/bjwMAAKsaAAADAAAARklMrVjfa+JAEH4P5H8ISwrRU9EYfbheKBR6 # xRcLvevbYbFtzsqJlBrpQr3722+zMWZ31pk1MaG0Q/m+nR87O9kvruM6/5p4XOc9WSTc05/l # +m2bSivhb8lzmrx43vw53c5X2f+etourHOc63XMe1wlmLQ8+g3AYjaTFD2ZplY9g+xRbWly3 # NPastYMrQN9cs4DvHYz+dHbomY8SOTctGDlcQfXND1Uz6cK3EXcVdpY37ltSuB55u339cNtu # F76NPTudHYR0zS2RZ/sd1maHVLdYI/cp31b2PvFW72jkvIi2tLTI94nXY/eCfeZK8Ap7GO1b # u7QAO8+8FjsLfFx7OowtfW6dLYRv22wZ031uYYc7M/aK5xvEfjp7vDPnQxW2OZuqndDxWeyw # dt6y5rXPt5xrqG8bW9a8tm8ZN1q1UyYTXvNT2HjN7VWLLL3GR7pl9nlUkx1Z+5xm2/qcYsu4 # z2KHtfOWNad6jR92jGN9jvm2sSNbn1vYlj4n2TLus9h4zW1s/tn/e3iHV55MOXumvUarsvVX # +OknNGfrr/AK7DbMulLkbZh1VTa8uFSLHF5cqlVt5tW9eWRsH2VbVY10rp+TCu9Q6Rxj2/Ju # SJE2KG5TqW57848/jS15fXM7mX66ztv7cp16j/FGGr8DdtEN+5uL7sD49WvNOkwGIv5KaS3+ # FsJamLmyFkYmrFnLde6+/4hZl7mOH6yS9SJ9DR5bXwatmLHCrd/PivTxulwlwSJJV8t14n1j # abIRCfde5mm2iojx/ib2B5eTaeyHl3cPP2N/KNbsx5Op6yw226fg/qbDeIbNc/DoHAR6Mu2I # dTp+X/zEsTCvGPvK9j0govsrfxqqdJN9cKhMY0vilwdPOebmRwqIy4+x+Tni+Hrc/PKAAnGZ # 7pXH2fyaYK6X4+B9CcPBt/RRt9z8FoDhoOpH/QJ9j+KAkkf9As2O4oA6N/xy6RWo8OMoqLYN # 1DDipqo+joIqEGtQqDWJRibXK9oO6igMB1Uu2XeKZwwHlSuO0zue6idVGVE4VQPheeiVIc8F # sV6Bg6oRx+knkup3Kl8VR+Vb5qGru2N14SNTx2E4qNhwnH1/+chUYRROvfvjeejK6khdeLm/ # +HoFDqolHGfdX17sG5WviqPyLXBQ1WB9D/ULjSvHH9ZXUJOgOKA+UL9AZ1A4dThTftXxTOWh # qgRs7kI9gF4gwM0fnVfgjo/F19A96T9QSwECFAAUAAAACAC6Gqoso/Hf248DAACrGgAAAwAA # AAAAAAABACAAAAAAAAAARklMUEsFBgAAAAABAAEAMQAAALADAAAAAA== # ----GgOuLpDpIyE--1020998322088---- # # # gawk-4.0.1+dfsg.orig/test/messages.awk0000644000175000017500000000055511463242060016642 0ustar schotschot# This is a demo of different ways of printing with gawk. Try it # with and without -c (compatibility) flag, redirecting output # from gawk to a file or not. Some results can be quite unexpected. BEGIN { print "Goes to a file out1" > "out1" print "Normal print statement" print "This printed on stdout" > "/dev/stdout" print "You blew it!" > "/dev/stderr" } gawk-4.0.1+dfsg.orig/test/uninit3.awk0000644000175000017500000000005311463242060016415 0ustar schotschotfunction f(x){ print x } BEGIN { f(x) } gawk-4.0.1+dfsg.orig/test/aadelete1.ok0000644000175000017500000000014711463614133016510 0ustar schotschot1 1 1 1 1 0 0 1 gawk: aadelete1.awk:11: fatal: attempt to use scalar `a["1"]' as an array EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/noloop1.awk0000644000175000017500000000564111463242060016423 0ustar schotschot# From jhart@avcnet.bates.edu Sun Oct 6 16:05:21 2002 # Return-Path: # Received: from localhost (skeeve [127.0.0.1]) # by skeeve.com (8.11.6/8.11.6) with ESMTP id g96D5Jf28053 # for ; Sun, 6 Oct 2002 16:05:21 +0300 # Received: from actcom.co.il [192.114.47.1] # by localhost with POP3 (fetchmail-5.9.0) # for arnold@localhost (single-drop); Sun, 06 Oct 2002 16:05:21 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Sun Oct 6 16:06:39 2002) # X-From_: jhart@avcnet.bates.edu Sun Oct 6 15:31:59 2002 # Received: from lmail.actcom.co.il by actcom.co.il with ESMTP # (8.11.6/actcom-0.2) id g96CVrS27315 for ; # Sun, 6 Oct 2002 15:31:54 +0300 (EET DST) # (rfc931-sender: mail.actcom.co.il [192.114.47.13]) # Received: from f7.net (consort.superb.net [209.61.216.22]) # by lmail.actcom.co.il (8.11.6/8.11.6) with ESMTP id g96CVqY01629 # for ; Sun, 6 Oct 2002 15:31:52 +0300 # Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) # by f7.net (8.11.6/8.11.6) with ESMTP id g96CVp418974 # for ; Sun, 6 Oct 2002 08:31:51 -0400 # Received: from monty-python.gnu.org ([199.232.76.173]) # by fencepost.gnu.org with esmtp (Exim 4.10) # id 17yAZa-00055o-00 # for bug-gawk@gnu.org; Sun, 06 Oct 2002 08:31:50 -0400 # Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) # id 17yAZE-0007eB-00 # for bug-gawk@gnu.org; Sun, 06 Oct 2002 08:31:29 -0400 # Received: from avcnet.bates.edu ([134.181.128.62]) # by monty-python.gnu.org with esmtp (Exim 4.10) # id 17yAZ9-0007X3-00 # for bug-gawk@gnu.org; Sun, 06 Oct 2002 08:31:23 -0400 # Received: from a5514a.bates.edu (www.bates.edu [134.181.128.62]) # by avcnet.bates.edu (8.9.3/8.9.3) with ESMTP id IAA05400 # for ; Sun, 6 Oct 2002 08:31:20 -0400 # Date: Sun, 6 Oct 2002 08:36:54 -0400 # Mime-Version: 1.0 (Apple Message framework v482) # Content-Type: text/plain; charset=US-ASCII; format=flowed # Subject: Infinite loop in sub/gsub # From: jhart@avcnet.bates.edu # To: bug-gawk@gnu.org # Content-Transfer-Encoding: 7bit # Message-Id: <4BC4A4F0-D928-11D6-8E78-00039384A9CC@mail.avcnet.org> # X-Mailer: Apple Mail (2.482) # X-Spam-Status: No, hits=0.3 required=5.0 # tests=NO_REAL_NAME,SPAM_PHRASE_00_01,USER_AGENT_APPLEMAIL # version=2.41 # X-Spam-Level: # X-SpamBouncer: 1.4 (10/07/01) # X-SBClass: OK # Status: RO # # This command line: # # echo "''Italics with an apostrophe'' embedded''"|gawk -f test.awk # # where test.awk contains this instruction: # /''/ { sub(/''(.?[^']+)*''/, "&"); } # # puts gawk 3.11 into an infinite loop. Whereas, this command works: # # echo "''Italics with an apostrophe' embedded''"|gawk -f test.awk # # # # Platform: Mac OS X 10.1.5/Darwin Kernel Version 5.5: Thu May 30 14:51:26 # PDT 2002; root:xnu/xnu-201.42.3.obj~1/RELEASE_PPC # # gawk-4.0.1+dfsg.orig/test/ofmtfidl.ok0000644000175000017500000000002511463242060016456 0ustar schotschot1 2 3 4 5 6 7 8 9 10 gawk-4.0.1+dfsg.orig/test/getline.in0000644000175000017500000000000611463242060016275 0ustar schotschotA B C gawk-4.0.1+dfsg.orig/test/fnaryscl.awk0000644000175000017500000000015511463242060016650 0ustar schotschotBEGIN { foo[1] = 4 f1(foo) } function f1(a) { f2(a) } function f2(b) { f3(b) } function f3(c) { c = 6 } gawk-4.0.1+dfsg.orig/test/fnamedat.ok0000644000175000017500000000016011734665352016447 0ustar schotschotgawk: fnamedat.awk:1: (FILENAME=- FNR=1) fatal: can't use function name `foo' as variable or array EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/arynocls.ok0000644000175000017500000000000011463242060016475 0ustar schotschotgawk-4.0.1+dfsg.orig/test/negexp.awk0000644000175000017500000000003511463242060016312 0ustar schotschotBEGIN { a = -2; print 10^a } gawk-4.0.1+dfsg.orig/test/profile3.awk0000644000175000017500000000013611526012014016543 0ustar schotschotBEGIN { the_func = "p" print @the_func("Hello") } function p(str) { print "! " str " !" } gawk-4.0.1+dfsg.orig/test/longwrds.in0000644000175000017500000001005611463242060016513 0ustar schotschot.ds PX \s-1POSIX\s+1 .ds UX \s-1UNIX\s+1 .ds AN \s-1ANSI\s+1 .TH GAWK 1 "May 28 1991" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS .B gawk [ .B \-W .I gawk-options ] [ .BI \-F\^ fs ] [ .B \-v .IR var = val ] .B \-f .I program-file [ .B \-\^\- ] file .\^.\^. .br .B gawk [ .B \-W .I gawk-options ] [ .BI \-F\^ fs ] [ .B \-v .IR var = val ] [ .B \-\^\- ] .I program-text file .\^.\^. .SH DESCRIPTION .I Gawk is the GNU Project's implementation of the AWK programming language. It conforms to the definition of the language in the \*(PX 1003.2 Command Language And Utilities Standard (draft 11). This version in turn is based on the description in .IR "The AWK Programming Language" , by Aho, Kernighan, and Weinberger, with the additional features defined in the System V Release 4 version of \*(UX .IR awk . .I Gawk also provides some GNU-specific extensions. .PP The command line consists of options to .I gawk itself, the AWK program text (if not supplied via the .B \-f option), and values to be made available in the .B ARGC and .B ARGV pre-defined AWK variables. .SH OPTIONS .PP .I Gawk accepts the following options, which should be available on any implementation of the AWK language. .TP .BI \-F fs Use .I fs for the input field separator (the value of the .B FS predefined variable). .TP \fB\-v\fI var\fR\^=\^\fIval\fR Assign the value .IR val , to the variable .IR var , before execution of the program begins. Such variable values are available to the .B BEGIN block of an AWK program. .TP .BI \-f " program-file" Read the AWK program source from the file .IR program-file , instead of from the first command line argument. Multiple .B \-f options may be used. .TP .B \-\^\- Signal the end of options. This is useful to allow further arguments to the AWK program itself to start with a ``\-''. This is mainly for consistency with the argument parsing convention used by most other \*(PX programs. .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, or multiple arguments may be supplied together if they are separated by commas, or enclosed in quotes and separated by white space. Case is ignored in arguments to the .B \-W option. .PP The .B \-W option accepts the following arguments: .TP \w'\fBcopyright\fR'u+1n .B compat Run in .I compatibility mode. In compatibility mode, .I gawk behaves identically to \*(UX .IR awk ; none of the GNU-specific extensions are recognized. .TP .PD 0 .B copyleft .TP .PD .B copyright Print the short version of the GNU copyright information message on the error output. .TP .B lint Provide warnings about constructs that are dubious or non-portable to other AWK implementations. .TP .B posix This turns on .I compatibility mode, with the following additional restrictions: .RS .TP \w'\(bu'u+1n \(bu .B \ex escape sequences are not recognized. .TP \(bu The synonym .B func for the keyword .B function is not recognized. .TP \(bu The operators .B ** and .B **= cannot be used in place of .B ^ and .BR ^= . .RE .TP .B version Print version information for this particular copy of .I gawk on the error output. This is useful mainly for knowing if the current copy of .I gawk on your system is up to date with respect to whatever the Free Software Foundation is distributing. .PP Any other options are flagged as illegal, but are otherwise ignored. .SH AWK PROGRAM EXECUTION .PP An AWK program consists of a sequence of pattern-action statements and optional function definitions. .RS .PP \fIpattern\fB { \fIaction statements\fB }\fR .br \fBfunction \fIname\fB(\fIparameter list\fB) { \fIstatements\fB }\fR .RE .PP .I Gawk first reads the program source from the .IR program-file (s) if specified, or from the first non-option argument on the command line. The .B \-f option may be used multiple times on the command line. .I Gawk will read the program text as if all the .IR program-file s had been concatenated together. This is useful for building libraries of AWK functions, without having to include them in each new AWK gawk-4.0.1+dfsg.orig/test/concat4.awk0000644000175000017500000000013111463242060016354 0ustar schotschot{ a = $0 print a print index(a,"b") getline a = a $0 print a print index(a,"b") } gawk-4.0.1+dfsg.orig/test/intest.awk0000644000175000017500000000013711463242060016335 0ustar schotschotBEGIN { bool = ((b = 1) in c); print bool, b # gawk-3.0.1 prints "0 "; should print "0 1" } gawk-4.0.1+dfsg.orig/test/Makefile.am0000644000175000017500000010507111734665352016400 0ustar schotschot# # test/Makefile.am --- automake input file for gawk # # Copyright (C) 1988-2012 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 # ## process this file with automake to produce Makefile.in 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 \ argtest.awk \ argtest.ok \ arrayparm.awk \ arrayparm.ok \ arrayprm2.awk \ arrayprm2.ok \ arrayprm3.awk \ arrayprm3.ok \ arrayref.awk \ arrayref.ok \ arrymem1.awk \ arrymem1.ok \ arryref2.awk \ arryref2.ok \ arryref3.awk \ arryref3.ok \ arryref4.awk \ arryref4.ok \ arryref5.awk \ arryref5.ok \ arynasty.awk \ arynasty.ok \ arynocls.awk \ arynocls.in \ arynocls.ok \ aryprm1.awk \ aryprm1.ok \ aryprm2.awk \ aryprm2.ok \ aryprm3.awk \ aryprm3.ok \ aryprm4.awk \ aryprm4.ok \ aryprm5.awk \ aryprm5.ok \ aryprm6.awk \ aryprm6.ok \ aryprm7.awk \ aryprm7.ok \ aryprm8.awk \ aryprm8.ok \ arysubnm.awk \ arysubnm.ok \ asgext.awk \ asgext.in \ asgext.ok \ asort.awk \ asort.ok \ asorti.awk \ asorti.ok \ awkpath.ok \ back89.awk \ back89.in \ back89.ok \ backgsub.awk \ backgsub.in \ backgsub.ok \ backw.awk \ backw.in \ backw.ok \ badargs.ok \ beginfile1.awk \ beginfile1.ok \ beginfile2.in \ beginfile2.ok \ beginfile2.sh \ binmode1.ok \ childin.awk \ childin.in \ childin.ok \ clobber.awk \ clobber.ok \ clos1way.awk \ clos1way.ok \ closebad.awk \ closebad.ok \ clsflnam.awk \ clsflnam.in \ clsflnam.ok \ compare.awk \ compare.in \ compare.ok \ compare2.awk \ compare2.ok \ concat1.awk \ concat1.in \ concat1.ok \ concat2.awk \ concat2.ok \ concat3.awk \ concat3.ok \ concat4.awk \ concat4.in \ concat4.ok \ convfmt.awk \ convfmt.ok \ datanonl.awk \ datanonl.in \ 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 \ devfd.in5 \ devfd.ok \ 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 \ exitval2.ok \ exitval2.w32 \ fcall_exit.awk \ fcall_exit.ok \ fcall_exit2.awk \ fcall_exit2.ok \ fcall_exit2.in \ fflush.ok \ fflush.sh \ fieldwdth.awk \ fieldwdth.in \ fieldwdth.ok \ fldchg.awk \ fldchg.in \ fldchg.ok \ fldchgnf.awk \ fldchgnf.in \ fldchgnf.ok \ fmtspcl.awk \ fmtspcl.tok \ fmttest.awk \ fmttest.ok \ fnamedat.awk \ fnamedat.in \ fnamedat.ok \ fnarray.awk \ fnarray.ok \ fnarray2.awk \ fnarray2.ok \ fnarydel.awk \ fnarydel.ok \ fnaryscl.awk \ fnaryscl.ok \ fnasgnm.awk \ fnasgnm.in \ fnasgnm.ok \ fnmisc.awk \ 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 \ forref.ok \ forsimp.awk \ forsimp.ok \ fsbs.awk \ fsbs.in \ fsbs.ok \ fsfwfs.awk \ fsfwfs.in \ fsfwfs.ok \ fsrs.awk \ fsrs.in \ fsrs.ok \ fsspcoln.awk \ fsspcoln.in \ fsspcoln.ok \ fstabplus.awk \ fstabplus.in \ fstabplus.ok \ funlen.awk \ funlen.in \ funlen.ok \ funsemnl.awk \ funsemnl.ok \ funsmnam.awk \ funsmnam.ok \ funstack.awk \ funstack.in \ funstack.ok \ fwtest.awk \ fwtest.in \ fwtest.ok \ fwtest2.awk \ fwtest2.in \ fwtest2.ok \ fwtest3.awk \ fwtest3.in \ fwtest3.ok \ gensub.awk \ gensub.in \ gensub.ok \ gensub2.awk \ gensub2.ok \ getline.awk \ getline.in \ getline.ok \ getline2.awk \ getline2.ok \ getline3.awk \ getline3.ok \ getline4.awk \ getline4.in \ getline4.ok \ getlnbuf.awk \ getlnbuf.in \ getlnbuf.ok \ getlndir.awk \ getlndir.ok \ getlnhd.awk \ getlnhd.ok \ getnr2tb.awk \ getnr2tb.in \ getnr2tb.ok \ getnr2tm.awk \ getnr2tm.in \ getnr2tm.ok \ gnuops2.awk \ gnuops2.ok \ gnuops3.awk \ gnuops3.ok \ gnureops.awk \ gnureops.ok \ gsubasgn.awk \ gsubasgn.ok \ gsubtest.awk \ gsubtest.ok \ gsubtst2.awk \ gsubtst2.ok \ gsubtst3.awk \ gsubtst3.in \ gsubtst3.ok \ gsubtst4.awk \ gsubtst4.ok \ gsubtst5.awk \ gsubtst5.in \ gsubtst5.ok \ gsubtst6.awk \ gsubtst6.ok \ gsubtst7.awk \ gsubtst7.in \ gsubtst7.ok \ gsubtst8.awk \ gsubtst8.in \ gsubtst8.ok \ gtlnbufv.awk \ hex.awk \ hex.ok \ hsprint.awk \ hsprint.ok \ icasefs.awk \ icasefs.ok \ icasers.awk \ icasers.in \ icasers.ok \ igncdym.awk \ igncdym.in \ igncdym.ok \ igncfs.awk \ igncfs.in \ igncfs.ok \ ignrcase.awk \ ignrcase.in \ ignrcase.ok \ ignrcas2.awk \ ignrcas2.ok \ indirectcall.awk \ indirectcall.in \ indirectcall.ok \ inftest.awk \ inftest.ok \ inputred.awk \ inputred.ok \ intest.awk \ intest.ok \ intformat.awk \ intformat.ok \ intprec.awk \ intprec.ok \ iobug1.awk \ iobug1.ok \ lc_num1.awk \ lc_num1.ok \ leaddig.awk \ leaddig.ok \ leadnl.awk \ leadnl.in \ leadnl.ok \ lint.awk \ lint.ok \ lintold.awk \ lintold.in \ lintold.ok \ lintwarn.awk \ lintwarn.ok \ litoct.awk \ litoct.ok \ localenl.ok \ localenl.sh \ longdbl.awk \ longdbl.in \ longdbl.ok \ longsub.awk \ longsub.in \ longsub.ok \ longwrds.awk \ longwrds.ok \ longwrds.in \ manglprm.awk \ manglprm.in \ manglprm.ok \ manyfiles.awk \ manyfiles.ok \ match1.awk \ match1.ok \ match2.awk \ match2.ok \ match3.awk \ match3.in \ match3.ok \ math.awk \ math.ok \ mbfw1.awk \ mbfw1.in \ mbfw1.ok \ mbprintf1.awk \ mbprintf1.in \ mbprintf1.ok \ mbprintf2.awk \ mbprintf2.ok \ mbprintf3.awk \ mbprintf3.in \ mbprintf3.ok \ mbstr1.awk \ mbstr1.ok \ membug1.awk \ membug1.in \ membug1.ok \ messages.awk \ minusstr.awk \ minusstr.ok \ mixed1.ok \ mmap8k.in \ mtchi18n.awk \ mtchi18n.in \ mtchi18n.ok \ nasty.awk \ 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 \ nfneg.awk \ nfneg.ok \ nfset.awk \ nfset.in \ nfset.ok \ nlfldsep.awk \ nlfldsep.in \ nlfldsep.ok \ nlinstr.awk \ nlinstr.in \ nlinstr.ok \ nlstrina.awk \ nlstrina.ok \ noeffect.awk \ noeffect.ok \ nofile.ok \ nofmtch.awk \ nofmtch.ok \ noloop1.awk \ noloop1.in \ noloop1.ok \ noloop2.awk \ noloop2.in \ noloop2.ok \ nondec.awk \ nondec.ok \ nondec2.awk \ nondec2.ok \ nonl.awk \ nonl.ok \ noparms.awk \ noparms.ok \ nors.in \ nors.ok \ nulrsend.awk \ nulrsend.in \ nulrsend.ok \ numindex.awk \ numindex.in \ numindex.ok \ numsubstr.awk \ numsubstr.in \ numsubstr.ok \ octsub.awk \ octsub.ok \ ofmt.awk \ ofmt.in \ ofmt.ok \ ofmta.awk \ ofmta.ok \ ofmtbig.awk \ ofmtbig.in \ ofmtbig.ok \ ofmtfidl.awk \ ofmtfidl.in \ ofmtfidl.ok \ ofmts.awk \ ofmts.in \ ofmts.ok \ onlynl.awk \ onlynl.in \ onlynl.ok \ opasnidx.awk \ opasnidx.ok \ opasnslf.awk \ opasnslf.ok \ out1.ok \ out2.ok \ out3.ok \ paramdup.awk \ paramdup.ok \ paramres.awk \ paramres.ok \ paramtyp.awk \ paramtyp.ok \ parse1.awk \ parse1.in \ parse1.ok \ parsefld.awk \ parsefld.in \ parsefld.ok \ parseme.awk \ parseme.ok \ patsplit.awk \ patsplit.ok \ pcntplus.awk \ pcntplus.ok \ pid.awk \ pid.ok \ pid.sh \ pipeio1.awk \ pipeio1.ok \ pipeio2.awk \ pipeio2.in \ pipeio2.ok \ posix.awk \ posix.in \ posix.ok \ posix2008sub.awk \ posix2008sub.ok \ poundbang.awk \ prdupval.awk \ prdupval.in \ prdupval.ok \ profile2.ok \ profile3.awk \ profile3.ok \ prec.awk \ prec.ok \ printf0.awk \ printf0.ok \ printf1.awk \ printf1.ok \ printfbad1.awk \ printfbad1.ok \ printfbad2.awk \ printfbad2.in \ printfbad2.ok \ printfbad3.awk \ printfbad3.ok \ printfloat.awk \ printlang.awk \ prmarscl.awk \ prmarscl.ok \ prmreuse.awk \ prmreuse.ok \ procinfs.awk \ procinfs.ok \ prt1eval.awk \ prt1eval.ok \ prtoeval.awk \ prtoeval.ok \ pty1.awk \ pty1.ok \ rand.awk \ rand.ok \ range1.awk \ range1.in \ range1.ok \ rebt8b1.awk \ rebt8b1.ok \ rebt8b2.awk \ rebt8b2.ok \ redfilnm.awk \ redfilnm.in \ redfilnm.ok \ regeq.awk \ regeq.in \ regeq.ok \ regrange.awk \ regrange.ok \ regtest.sh \ regx8bit.awk \ regx8bit.ok \ rebuf.awk \ rebuf.in \ rebuf.ok \ reindops.awk \ reindops.in \ reindops.ok \ reint.awk \ reint.in \ reint.ok \ reint2.awk \ reint2.in \ reint2.ok \ reparse.awk \ reparse.in \ reparse.ok \ resplit.awk \ resplit.in \ resplit.ok \ rri1.awk \ rri1.in \ rri1.ok \ rs.awk \ rs.in \ rs.ok \ rsnul1nl.awk \ rsnul1nl.in \ rsnul1nl.ok \ rsnulbig.ok \ rsnulbig2.ok \ rsstart1.awk \ rsstart1.in \ rsstart1.ok \ rsstart2.awk \ rsstart2.ok \ rsstart3.ok \ rstest1.awk \ rstest1.ok \ rstest2.awk \ rstest2.ok \ rstest3.awk \ rstest3.ok \ rstest4.awk \ rstest4.ok \ rstest5.awk \ rstest5.ok \ rstest6.awk \ rstest6.in \ rstest6.ok \ rswhite.awk \ rswhite.in \ rswhite.ok \ rtlen.ok \ rtlen.sh \ rtlen01.ok \ rtlen01.sh \ scalar.awk \ scalar.ok \ sclforin.awk \ sclforin.ok \ sclifin.awk \ sclifin.ok \ shadow.awk \ shadow.ok \ sort1.awk \ 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 \ splitarr.awk \ splitarr.ok \ splitdef.awk \ splitdef.ok \ splitvar.awk \ splitvar.in \ splitvar.ok \ splitwht.awk \ splitwht.ok \ sprintfc.awk \ sprintfc.in \ sprintfc.ok \ strcat1.awk \ strcat1.ok \ strtod.awk \ strtod.in \ strtod.ok \ strnum1.awk \ strnum1.ok \ strtonum.awk \ strtonum.ok \ strftime.awk \ strftlng.awk \ strftlng.ok \ subamp.awk \ subamp.in \ subamp.ok \ subi18n.awk \ subi18n.ok \ subsepnm.awk \ subsepnm.ok \ subslash.awk \ subslash.ok \ substr.awk \ substr.ok \ swaplns.awk \ swaplns.in \ swaplns.ok \ switch2.awk \ switch2.ok \ synerr1.awk \ synerr1.ok \ synerr2.awk \ synerr2.ok \ tradanch.awk \ tradanch.in \ tradanch.ok \ tweakfld.awk \ tweakfld.in \ tweakfld.ok \ uninit2.awk \ uninit2.ok \ uninit3.awk \ uninit3.ok \ uninit4.awk \ uninit4.ok \ uninit5.awk \ uninit5.ok \ uninitialized.awk \ uninitialized.ok \ unterm.awk \ unterm.ok \ uparrfs.awk \ uparrfs.in \ uparrfs.ok \ wideidx.awk \ wideidx.in \ wideidx.ok \ wideidx2.awk \ wideidx2.ok \ widesub.awk \ widesub.ok \ widesub2.awk \ widesub2.ok \ widesub3.awk \ widesub3.in \ widesub3.ok \ widesub4.awk \ widesub4.ok \ wjposer1.awk \ wjposer1.in \ wjposer1.ok \ xref.awk \ xref.original \ zero2.awk \ zero2.ok \ zeroe0.awk \ zeroe0.ok \ zeroflag.awk \ zeroflag.ok TESTS_WE_ARE_NOT_DOING_YET_FIXME_ONE_DAY = longdbl # Get rid of core files when cleaning and generated .ok file CLEANFILES = core core.* fmtspcl.ok # 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 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 \ 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 = \ 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 = 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 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc # List of the tests which should be run with --lint option: 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 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. # # 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 # spurious errors if `make -j' in effect. check: msg \ printlang \ basic-msg-start basic basic-msg-end \ unix-msg-start unix-tests unix-msg-end \ extend-msg-start gawk-extensions extend-msg-end \ machine-msg-start machine-tests machine-msg-end \ charset-msg-start charset-tests charset-msg-end @$(MAKE) pass-fail basic: $(BASIC_TESTS) unix-tests: $(UNIX_TESTS) gawk-extensions: $(GAWK_EXT_TESTS) charset-tests: $(LOCALE_CHARSET_TESTS) extra: $(EXTRA_TESTS) inet inet: inetmesg $(INET_TESTS) machine-tests: $(MACHINE_TESTS) msg:: @echo '' @echo 'Any output from "cmp" is bad news, although some differences' @echo 'in floating point values are probably benign -- in particular,' @echo 'some systems may omit a leading zero and the floating point' @echo 'precision may lead to slightly different output in a few cases.' printlang:: @$(AWK) -f $(srcdir)/printlang.awk basic-msg-start: @echo "======== Starting basic tests ========" basic-msg-end: @echo "======== Done with basic tests ========" unix-msg-start: @echo "======== Starting Unix tests ========" unix-msg-end: @echo "======== Done with Unix tests ========" extend-msg-start: @echo "======== Starting gawk extension tests ========" extend-msg-end: @echo "======== Done with gawk extension tests ========" machine-msg-start: @echo "======== Starting machine-specific tests ========" machine-msg-end: @echo "======== Done with machine-specific tests ========" charset-msg-start: @echo "======== Starting tests that can vary based on character set or locale support ========" charset-msg-end: @echo "======== Done with tests that can vary based on character set or locale support ========" lc_num1: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # This test is a PITA because increasingly, /tmp is getting # mounted noexec. So, we'll test it locally. Sigh. # # More PITA; some systems have medium short limits on #! paths, # so this can still fail poundbang:: @echo $@ @sed "s;/tmp/gawk;`pwd`/$(AWKPROG);" < $(srcdir)/poundbang.awk > ./_pbd.awk @chmod +x ./_pbd.awk @if ./_pbd.awk $(srcdir)/poundbang.awk > _`basename $@` ; \ then : ; \ else \ sed "s;/tmp/gawk;../$(AWKPROG);" < $(srcdir)/poundbang.awk > ./_pbd.awk ; \ chmod +x ./_pbd.awk ; \ LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} ./_pbd.awk $(srcdir)/poundbang.awk > _`basename $@`; \ fi @-$(CMP) $(srcdir)/poundbang.awk _`basename $@` && rm -f _`basename $@` _pbd.awk messages:: @echo $@ @$(AWK) -f $(srcdir)/messages.awk >out2 2>out3 @-$(CMP) $(srcdir)/out1.ok out1 && $(CMP) $(srcdir)/out2.ok out2 && $(CMP) $(srcdir)/out3.ok out3 && rm -f out1 out2 out3 argarray:: @echo $@ @case $(srcdir) in \ .) : ;; \ *) cp $(srcdir)/argarray.in . ;; \ esac @TEST=test echo just a test | $(AWK) -f $(srcdir)/argarray.awk ./argarray.in - >_$@ @case $(srcdir) in \ .) : ;; \ *) rm -f ./argarray.in ;; \ esac @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regtest:: @echo 'Some of the output from regtest is very system specific, do not' @echo 'be distressed if your output differs from that distributed.' @echo 'Manual inspection is called for.' AWK=$(AWKPROG) $(srcdir)/regtest.sh manyfiles:: @echo manyfiles @rm -rf junk @mkdir junk @$(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 _$@ compare:: @echo $@ @$(AWK) -f $(srcdir)/compare.awk 0 1 $(srcdir)/compare.in >_$@ @-$(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)/$@.ok _$@ && rm -f _$@ getline2:: @echo $@ @$(AWK) -f $(srcdir)/getline2.awk $(srcdir)/getline2.awk $(srcdir)/getline2.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ awkpath:: @echo $@ @AWKPATH="$(srcdir)$(PATH_SEPARATOR)$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ argtest:: @echo $@ @$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ badargs:: @echo $@ @-$(AWK) -f 2>&1 | grep -v patchlevel >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nonl:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1 @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strftime:: @echo This test could fail on slow machines or on a minute boundary, @echo so if it does, double check the actual results: @echo $@ @GAWKLOCALE=C; export GAWKLOCALE; \ TZ=GMT0; export TZ; \ (LC_ALL=C date) | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk @-$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 litoct:: @echo $@ @echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ devfd:: @echo $@ @$(AWK) 1 /dev/fd/4 /dev/fd/5 4<$(srcdir)/devfd.in4 5<$(srcdir)/devfd.in5 >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fflush:: @echo $@ @$(srcdir)/fflush.sh >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ tweakfld:: @echo $@ @$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@ @rm -f errors.cleanup @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mmap8k:: @echo $@ @$(AWK) '{ print }' $(srcdir)/mmap8k.in >_$@ @-$(CMP) $(srcdir)/mmap8k.in _$@ && rm -f _$@ tradanch:: @echo $@ @$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # AIX /bin/sh exec's the last command in a list, therefore issue a ":" # command so that pid.sh is fork'ed as a child before being exec'ed. pid:: @echo pid @AWKPATH=$(srcdir) AWK=$(AWKPROG) $(SHELL) $(srcdir)/pid.sh $$$$ > _`basename $@` ; : @-$(CMP) $(srcdir)/pid.ok _`basename $@` && rm -f _`basename $@` strftlng:: @echo $@ @TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ @if $(CMP) $(srcdir)/strftlng.ok _$@ >/dev/null 2>&1 ; then : ; else \ TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi @-$(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)/$@.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 fmtspcl: fmtspcl.ok @echo fmtspcl @$(AWK) -f $(srcdir)/fmtspcl.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $@.ok _$@ && rm -f _$@ reint:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pipeio1:: @echo $@ @$(AWK) -f $(srcdir)/pipeio1.awk >_$@ @rm -f test1 test2 @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pipeio2:: @echo $@ @$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clobber:: @echo $@ @$(AWK) -f $(srcdir)/clobber.awk >_$@ @-$(CMP) $(srcdir)/clobber.ok seq && $(CMP) $(srcdir)/clobber.ok _$@ && rm -f _$@ @rm -f seq arynocls:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -v INPUT=$(srcdir)/arynocls.in -f arynocls.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlnbuf:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -f getlnbuf.awk $(srcdir)/getlnbuf.in > _$@ @-AWKPATH=$(srcdir) $(AWK) -f gtlnbufv.awk $(srcdir)/getlnbuf.in > _2$@ @-$(CMP) $(srcdir)/getlnbuf.ok _$@ && $(CMP) $(srcdir)/getlnbuf.ok _2$@ && rm -f _$@ _2$@ inetmesg:: @echo These tests only work if your system supports the services @echo "'discard'" at port 9 and "'daytimed'" at port 13. Check your @echo file /etc/services and do "'netstat -a'". inetechu:: @echo This test is for establishing UDP connections @$(AWK) 'BEGIN {print "" |& "/inet/udp/0/127.0.0.1/9"}' inetecht:: @echo This test is for establishing TCP connections @$(AWK) 'BEGIN {print "" |& "/inet/tcp/0/127.0.0.1/9"}' inetdayu:: @echo This test is for bidirectional UDP transmission @$(AWK) 'BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13"; \ "/inet/udp/0/127.0.0.1/13" |& getline; print $0}' inetdayt:: @echo This test is for bidirectional TCP transmission @$(AWK) 'BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13"; \ "/inet/tcp/0/127.0.0.1/13" |& getline; print $0}' redfilnm:: @echo $@ @$(AWK) -f $(srcdir)/redfilnm.awk srcdir=$(srcdir) $(srcdir)/redfilnm.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ leaddig:: @echo $@ @$(AWK) -v x=2E -f $(srcdir)/leaddig.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst3:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ space:: @echo $@ @$(AWK) -f ' ' $(srcdir)/space.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printf0:: @echo $@ @$(AWK) --posix -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsnulbig:: @echo $@ @ : Suppose that block size for pipe is at most 128kB: @$(AWK) 'BEGIN { for (i = 1; i <= 128*64+1; i++) print "abcdefgh123456\n" }' 2>&1 | \ $(AWK) 'BEGIN { RS = ""; ORS = "\n\n" }; { print }' 2>&1 | \ $(AWK) '/^[^a]/; END{ print NR }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsnulbig2:: @echo $@ @$(AWK) 'BEGIN { ORS = ""; n = "\n"; for (i = 1; i <= 10; i++) n = (n n); \ for (i = 1; i <= 128; i++) print n; print "abc\n" }' 2>&1 | \ $(AWK) 'BEGIN { RS = ""; ORS = "\n\n" };{ print }' 2>&1 | \ $(AWK) '/^[^a]/; END { print NR }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ wideidx:: @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 _$@ wideidx2:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ widesub:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ widesub2:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ widesub3:: @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 _$@ widesub4:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ignrcas2:: @echo $@ @GAWKLOCALE=en_US ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subamp:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # This test makes sure gawk exits with a zero code. # Thus, unconditionally generate the exit code. exitval1:: @echo $@ @$(AWK) -f $(srcdir)/exitval1.awk >_$@ 2>&1; echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsspcoln:: @echo $@ @$(AWK) -f $(srcdir)/$@.awk 'FS=[ :]+' $(srcdir)/$@.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsstart1:: @echo $@ @$(AWK) -f $(srcdir)/$@.awk $(srcdir)/rsstart1.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsstart2:: @echo $@ @$(AWK) -f $(srcdir)/$@.awk $(srcdir)/rsstart1.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsstart3:: @echo $@ @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 >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nofile:: @echo $@ @$(AWK) '{}' no/such/file >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ binmode1:: @echo $@ @$(AWK) -v BINMODE=3 'BEGIN { print BINMODE }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subi18n:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; $(AWK) -f $(srcdir)/$@.awk > _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat4:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in > _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ devfd1:: @echo $@ @$(AWK) -f $(srcdir)/$@.awk 4< $(srcdir)/devfd.in1 5< $(srcdir)/devfd.in2 >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # The program text is the '1' which will print each record. How compact can you get? devfd2:: @echo $@ @$(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 _$@ mixed1:: @echo $@ @$(AWK) -f /dev/null --source 'BEGIN {return junk}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mtchi18n:: @echo $@ @GAWKLOCALE=ru_RU.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ reint2:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) --re-interval -f $@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ localenl:: @echo $@ @$(srcdir)/$@.sh >_$@ 2>/dev/null @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mbprintf1:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mbprintf2:: @echo $@ @GAWKLOCALE=ja_JP.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mbprintf3:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mbfw1:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst6:: @echo $@ @GAWKLOCALE=C ; $(AWK) -f $(srcdir)/$@.awk > _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mbstr1:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printfbad2: printfbad2.ok @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 _$@ # Targets generated for other tests: include Maketests $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests files=`cd "$(srcdir)" && echo *.awk *.in`; \ $(AWK) -f $(srcdir)/Gentests "$(srcdir)/Makefile.am" $$files > $(srcdir)/Maketests clean: rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ # An attempt to print something that can be grepped for in build logs pass-fail: @COUNT=`ls _* 2>/dev/null | wc -l` ; \ if test $$COUNT = 0 ; \ then echo ALL TESTS PASSED ; \ else echo $$COUNT TESTS FAILED ; \ fi # This target for my convenience to look at all the results diffout: for i in _* ; \ do \ if [ "$$i" != "_*" ]; then \ echo ============== $$i ============= ; \ if [ -r $${i#_}.ok ]; then \ diff -c $${i#_}.ok $$i ; \ else \ diff -c $(srcdir)/$${i#_}.ok $$i ; \ fi ; \ fi ; \ done | more # convenient way to scan valgrind results for errors valgrind-scan: @echo "Scanning valgrind log files for problems:" @$(AWK) '\ function show() {if (cmd) {printf "%s: %s\n",FILENAME,cmd; cmd = ""}; \ printf "\t%s\n",$$0}; \ {$$1 = ""}; \ /Prog and args are:/ {incmd = 1; cmd = ""; next}; \ incmd {if (NF == 1) incmd = 0; else {cmd = (cmd $$0); next}}; \ /ERROR SUMMARY:/ && !/: 0 errors from 0 contexts/ {show()}; \ /definitely lost:/ && !/: 0 bytes in 0 blocks/ {show()}; \ /possibly lost:/ && !/: 0 bytes in 0 blocks/ {show()}; \ / suppressed:/ && !/: 0 bytes in 0 blocks/ {show()}; \ ' log.[0-9]* # This target is for testing with electric fence. efence: for i in $$(ls _* | sed 's;_\(.*\);\1;') ; \ do \ bad=$$(wc -l < _$$i) \ ok=$$(wc -l < $$i.ok) ; \ if (( $$bad == $$ok + 2 )) ; \ then \ rm _$$i ; \ fi ; \ done gawk-4.0.1+dfsg.orig/test/fwtest3.awk0000644000175000017500000000004711654051011016422 0ustar schotschotBEGIN { FIELDWIDTHS="5" } { print $1 } gawk-4.0.1+dfsg.orig/test/printfbad1.ok0000644000175000017500000000021211463242060016702 0ustar schotschotgawk: printfbad1.awk:35: fatal: not enough arguments to satisfy format string `%3$*10$.*1$s ' ^ ran out for this one EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/sclifin.awk0000644000175000017500000000010411463242060016450 0ustar schotschotBEGIN { j = 4 if ("foo" in j) print "ouch" else print "ok" } gawk-4.0.1+dfsg.orig/test/nested.ok0000644000175000017500000000000411463242060016131 0ustar schotschota a gawk-4.0.1+dfsg.orig/test/rebt8b1.awk0000644000175000017500000001362711463242060016306 0ustar schotschot# From hankedr@dms.auburn.edu Sun Jan 28 12:25:43 2001 # Received: from mail.actcom.co.il [192.114.47.13] # by localhost with POP3 (fetchmail-5.5.0) # for arnold@localhost (single-drop); Sun, 28 Jan 2001 12:25:43 +0200 (IST) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Sun Jan 28 12:27:08 2001) # X-From_: hankedr@dms.auburn.edu Sat Jan 27 15:15:57 2001 # Received: from lmail.actcom.co.il by actcom.co.il with ESMTP # (8.9.1a/actcom-0.2) id PAA23801 for ; # Sat, 27 Jan 2001 15:15:55 +0200 (EET) # (rfc931-sender: lmail.actcom.co.il [192.114.47.13]) # Received: from billohost.com (www.billohost.com [209.196.35.10]) # by lmail.actcom.co.il (8.9.3/8.9.1) with ESMTP id PAA15998 # for ; Sat, 27 Jan 2001 15:16:27 +0200 # Received: from yak.dms.auburn.edu (yak.dms.auburn.edu [131.204.53.2]) # by billohost.com (8.9.3/8.9.3) with ESMTP id IAA00467 # for ; Sat, 27 Jan 2001 08:15:52 -0500 # Received: (from hankedr@localhost) # by yak.dms.auburn.edu (8.9.3/8.9.3/Debian/GNU) id HAA24441; # Sat, 27 Jan 2001 07:15:44 -0600 # Date: Sat, 27 Jan 2001 07:15:44 -0600 # Message-Id: <200101271315.HAA24441@yak.dms.auburn.edu> # From: Darrel Hankerson # To: arnold@skeeve.com # Subject: [stolfi@ic.unicamp.br: Bug in [...]* matching with acute-u] # Mime-Version: 1.0 (generated by tm-edit 7.106) # Content-Type: message/rfc822 # Status: R # # From: Jorge Stolfi # To: bug-gnu-utils@gnu.org # Subject: Bug in [...]* matching with acute-u # MIME-Version: 1.0 # Reply-To: stolfi@ic.unicamp.br # X-MIME-Autoconverted: from 8bit to quoted-printable by grande.dcc.unicamp.br id GAA10716 # Sender: bug-gnu-utils-admin@gnu.org # Errors-To: bug-gnu-utils-admin@gnu.org # X-BeenThere: bug-gnu-utils@gnu.org # X-Mailman-Version: 2.0 # Precedence: bulk # List-Help: # List-Post: # List-Subscribe: , # # List-Id: Bug reports for the GNU utilities # List-Unsubscribe: , # # List-Archive: # Date: Sat, 27 Jan 2001 06:46:11 -0200 (EDT) # Content-Transfer-Encoding: 8bit # X-MIME-Autoconverted: from quoted-printable to 8bit by manatee.dms.auburn.edu id CAA14936 # Content-Type: text/plain; charset=iso-8859-1 # # # 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}} gawk-4.0.1+dfsg.orig/test/rri1.awk0000644000175000017500000000001011676156351015707 0ustar schotschot/[d-f]/ gawk-4.0.1+dfsg.orig/test/uparrfs.awk0000644000175000017500000000013011463242060016502 0ustar schotschotBEGIN { FS = "(^x+)|( +)" } { for (i = 1; i <= NF; i++) printf "-->%s<--\n", $i } gawk-4.0.1+dfsg.orig/test/swaplns.ok0000644000175000017500000000054711463242060016352 0ustar schotschotfeatures of gawk - mostly not present in an old awk. Some are from This directory contains some examples/test-cases for different Read header comments before attempting to use. Have fun and remember "The GAWK Manual", some are original, and some are mixture of the two. file. that program which consists only of BEGIN block does not need an input --mj gawk-4.0.1+dfsg.orig/test/delfunc.ok0000644000175000017500000000012111734665352016305 0ustar schotschotgawk: delfunc.awk:4: fatal: attempt to use function `f' as an array EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/widesub3.ok0000644000175000017500000000004211463242060016376 0ustar schotschotsubstr matches 0 substr matches 1 gawk-4.0.1+dfsg.orig/test/shadow.awk0000644000175000017500000000024411463242060016313 0ustar schotschotfunction foo() { print "foo" } function bar(A, Z, q) { print "bar" } function baz(C, D) { print "baz" } BEGIN { A = C = D = Z = y = 1 foo() bar() baz() } gawk-4.0.1+dfsg.orig/test/inputred.awk0000644000175000017500000000005011463242060016653 0ustar schotschotBEGIN { print getline < "file" ".txt" } gawk-4.0.1+dfsg.orig/test/parsefld.ok0000644000175000017500000000000511463242060016450 0ustar schotschota0 3 gawk-4.0.1+dfsg.orig/test/childin.awk0000644000175000017500000000005711463242060016442 0ustar schotschotBEGIN { "cat" | getline; print; close("cat") } gawk-4.0.1+dfsg.orig/test/rstest3.awk0000644000175000017500000000546711463242060016451 0ustar schotschot# From spcecdt@armory.com Tue Apr 15 17:35:01 2003 # Return-Path: # Received: from localhost (aahz [127.0.0.1]) # by skeeve.com (8.12.5/8.12.5) with ESMTP id h3FEYA6o001541 # for ; Tue, 15 Apr 2003 17:35:01 +0300 # Received: from actcom.co.il [192.114.47.1] # by localhost with POP3 (fetchmail-5.9.0) # for arnold@localhost (single-drop); Tue, 15 Apr 2003 17:35:01 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Tue Apr 15 17:38:46 2003) # X-From_: spcecdt@armory.com Tue Apr 15 11:09:12 2003 # Received: from smtp1.actcom.net.il by actcom.co.il with ESMTP # (8.11.6/actcom-0.2) id h3F88uC19825 for ; # Tue, 15 Apr 2003 11:09:04 +0300 (EET DST) # (rfc931-sender: smtp.actcom.co.il [192.114.47.13]) # Received: from f7.net (consort.superb.net [209.61.216.22]) # by smtp1.actcom.net.il (8.12.8/8.12.8) with ESMTP id h3F8CgQ7019081 # for ; Tue, 15 Apr 2003 11:12:47 +0300 # Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) # by f7.net (8.11.7/8.11.6) with ESMTP id h3F88oW23381 # for ; Tue, 15 Apr 2003 04:08:50 -0400 # Received: from monty-python.gnu.org ([199.232.76.173]) # by fencepost.gnu.org with esmtp (Exim 4.10) # id 195LUo-0001cv-00 # for bug-gawk@gnu.org; Tue, 15 Apr 2003 04:08:50 -0400 # Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) # id 195LUh-0006n0-00 # for bug-gawk@gnu.org; Tue, 15 Apr 2003 04:08:44 -0400 # Received: from deepthought.armory.com ([192.122.209.42] helo=armory.com) # by monty-python.gnu.org with smtp (Exim 4.10.13) # id 195LUC-0006JM-00 # for bug-gawk@gnu.org; Tue, 15 Apr 2003 04:08:13 -0400 # Date: Tue, 15 Apr 2003 01:08:11 -0700 # From: "John H. DuBois III" # To: bug-gawk@gnu.org # Subject: gawk 3.1.2 fatal bug # Message-ID: <20030415080811.GA14963@armory.com> # Mime-Version: 1.0 # Content-Type: text/plain; charset=us-ascii # Content-Disposition: inline # User-Agent: Mutt/1.3.28i # X-Www: http://www.armory.com./~spcecdt/ # Sender: spcecdt@armory.com # X-Spam-Status: No, hits=-7.9 required=5.0 # tests=SIGNATURE_SHORT_DENSE,SPAM_PHRASE_01_02,USER_AGENT, # USER_AGENT_MUTT # version=2.41 # X-Spam-Level: # X-SpamBouncer: 1.4 (10/07/01) # X-SBClass: OK # Status: RO # # This program: # # BEGIN { RS = ""; "/bin/echo -n x" | getline } # # fails in exactly the same way under SCO OpenServer 5.0.6a using gawk 3.1.2 # built with gcc 2.95.3 and linux using gawk 3.1.2 built with gcc 3.2.2: # # gawk: gawktest:1: fatal error: internal error # Abort # # The same program does not fail with gawk 3.1.1. # # John # -- # John DuBois spcecdt@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/ # # BEGIN { RS = "" "echo x | tr -d '\\12'" | getline } gawk-4.0.1+dfsg.orig/test/subamp.ok0000644000175000017500000000000411463242060016136 0ustar schotschotaaa gawk-4.0.1+dfsg.orig/test/eofsplit.awk0000644000175000017500000000375611463242060016666 0ustar schotschot# Date: Sat, 30 Mar 1996 12:47:17 -0800 (PST) # From: Charles Howes # To: bug-gnu-utils@prep.ai.mit.edu, arnold@gnu.ai.mit.edu # Subject: Bug in Gawk 3.0.0, sample code: # #!/usr/local/bin/gawk -f # # Hello! This is a bug report from chowes@direct.ca # # uname -a # SunOS hostname 5.5 Generic sun4m # # Gnu Awk (gawk) 3.0, patchlevel 0: BEGIN{ FS=":" while ((getline < "/etc/passwd") > 0) { r=$3 z=0 n[0]=1 } FS=" " } #gawk: fp.new:16: fatal error: internal error #Abort # #!/usr/local/bin/gawk -f # # Gnu Awk (gawk) 2.15, patchlevel 6 # # BEGIN{ # f="/etc/passwd" # while (getline < f) n[0]=1 # FS=" " # } # #gawk: /staff/chowes/bin/fp:7: fatal error: internal error # #Abort # These examples are not perfect coding style because I took a real # piece of code and tried to strip away anything that didn't make the error # message go away. # # The interesting part of the 'truss' is: # # fstat(3, 0xEFFFF278) = 0 # lseek(3, 0, SEEK_SET) = 0 # read(3, " r o o t : x : 0 : 1 : S".., 2291) = 2291 # brk(0x00050020) = 0 # brk(0x00052020) = 0 # read(3, 0x0004F4B8, 2291) = 0 # close(3) = 0 # Incurred fault #6, FLTBOUNDS %pc = 0x0001B810 # siginfo: SIGSEGV SEGV_MAPERR addr=0x00053000 # Received signal #11, SIGSEGV [caught] # siginfo: SIGSEGV SEGV_MAPERR addr=0x00053000 # write(2, " g a w k", 4) = 4 # write(2, " : ", 2) = 2 # # -- # Charles Howes -- chowes@direct.ca Voice: (604) 691-1607 # System Administrator Fax: (604) 691-1605 # Internet Direct - 1050 - 555 West Hastings St - Vancouver, BC V6B 4N6 # # A sysadmin's life is a sorry one. The only advantage he has over Emergency # Room doctors is that malpractice suits are rare. On the other hand, ER # doctors never have to deal with patients installing new versions of their # own innards! -Michael O'Brien # # "I think I know what may have gone wrong in the original s/w. # It's a bug in the way it was written." - Vagueness**n gawk-4.0.1+dfsg.orig/test/fcall_exit.ok0000644000175000017500000000007011463242060016764 0ustar schotschottrue(1, crash()) => do not crash properly. EXIT CODE: 1 gawk-4.0.1+dfsg.orig/test/leadnl.in0000644000175000017500000000015711463242060016114 0ustar schotschot Jane Doe 123 Main Street Anywhere, SE 12345-6789 John Smith 456 Tree-lined Avenue Smallville, MW 98765-4321 gawk-4.0.1+dfsg.orig/test/strtod.in0000644000175000017500000000004311463242060016166 0ustar schotschot345 0 00 0e0 0E1 00E0 000e-5 .0e+0 gawk-4.0.1+dfsg.orig/test/aryprm6.ok0000644000175000017500000000013111463242060016250 0ustar schotschotgawk: aryprm6.awk:3: fatal: attempt to use scalar parameter `x' as an array EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/regeq.in0000644000175000017500000000001711463242060015753 0ustar schotschotsdgfa asdfds=a gawk-4.0.1+dfsg.orig/test/splitargv.in0000644000175000017500000000022011463242060016657 0ustar schotschotBEGIN { for (idx = 1; idx < ARGC; idx++) split(ARGV[idx], temp, "."); } { print $0; } gawk-4.0.1+dfsg.orig/test/awkpath.ok0000644000175000017500000000001211463242060016305 0ustar schotschotFound it. gawk-4.0.1+dfsg.orig/test/arrayprm2.ok0000644000175000017500000000000011463242060016562 0ustar schotschotgawk-4.0.1+dfsg.orig/test/rsnul1nl.awk0000644000175000017500000000003411463242060016601 0ustar schotschotBEGIN { RS = "" } { print } gawk-4.0.1+dfsg.orig/test/localenl.ok0000644000175000017500000000013511463242060016445 0ustar schotschotLC_ALL=C passed LC_ALL=POSIX passed LC_ALL=en_US.ISO-8859-1 passed LC_ALL=en_US.UTF-8 passed gawk-4.0.1+dfsg.orig/test/compare.awk0000644000175000017500000000026711463242060016461 0ustar schotschotBEGIN { if (ARGV[1]) print 1 ARGV[1] = "" if (ARGV[2]) print 2 ARGV[2] = "" if ("0") print "zero" if ("") print "null" if (0) print 0 } { if ($0) print $0 if ($1) print $1 } gawk-4.0.1+dfsg.orig/test/arrymem1.awk0000644000175000017500000000564111463242060016571 0ustar schotschot# From spcecdt@armory.com Thu Jun 14 13:24:32 2001 # Received: from mail.actcom.co.il [192.114.47.13] # by localhost with POP3 (fetchmail-5.5.0) # for arnold@localhost (single-drop); Thu, 14 Jun 2001 13:24:32 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Thu Jun 14 13:25:13 2001) # X-From_: spcecdt@armory.com Thu Jun 14 06:34:47 2001 # Received: from lmail.actcom.co.il by actcom.co.il with ESMTP # (8.9.1a/actcom-0.2) id GAA29661 for ; # Thu, 14 Jun 2001 06:34:46 +0300 (EET DST) # (rfc931-sender: lmail.actcom.co.il [192.114.47.13]) # Received: from billohost.com (www.billohost.com [209.196.35.10]) # by lmail.actcom.co.il (8.11.2/8.11.2) with ESMTP id f5E3YiO27337 # for ; Thu, 14 Jun 2001 06:34:45 +0300 # Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164]) # by billohost.com (8.9.3/8.9.3) with ESMTP id XAA02681 # for ; Wed, 13 Jun 2001 23:33:57 -0400 # Received: from deepthought.armory.com ([192.122.209.42]) # by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian)) # id 15ANu2-00005C-00 # for ; Wed, 13 Jun 2001 23:34:38 -0400 # Date: Wed, 13 Jun 2001 20:32:42 -0700 # From: "John H. DuBois III" # To: bug-gawk@gnu.org # Subject: gawk 3.1.0 bug # Message-ID: <20010613203242.A29975@armory.com> # Mime-Version: 1.0 # Content-Type: text/plain; charset=us-ascii # X-Mailer: Mutt 1.0.1i # X-Www: http://www.armory.com./~spcecdt/ # Sender: spcecdt@armory.com # Status: RO # # Under SCO OpenServer 5.0.6a using gawk 3.1.0 compiled with gcc 2.95.2, this # program: BEGIN { f1(Procs,b) print "test" } function f1(Procs,a) { # a[""] a[""] = "a" # ADR: Give it a value so can trace it f2() } function f2() { # b[""] b[""] = "b" # ADR: Give it a value so can trace it } # ADR: 1/28/2003: Added this: BEGIN { for (i in b) printf("b[\"%s\"] = \"%s\"\n", i, b[i]) } # END ADR added. # gives: # # gawk: ./gtest:5: fatal error: internal error # # and dumps core. # # gdb gives me this stack backtrace: # # #0 0x80019943 in kill () from /usr/lib/libc.so.1 # #1 0x8003e754 in abort () from /usr/lib/libc.so.1 # #2 0x8062a87 in catchsig (sig=0, code=0) at main.c:947 # #3 0x80053a0c in _sigreturn () from /usr/lib/libc.so.1 # #4 0x80023d36 in cleanfree () from /usr/lib/libc.so.1 # #5 0x80023156 in _real_malloc () from /usr/lib/libc.so.1 # #6 0x80023019 in malloc () from /usr/lib/libc.so.1 # #7 0x8053b95 in do_print (tree=0x0) at builtin.c:1336 # #8 0x806b47c in interpret (tree=0x8084ee4) at eval.c:606 # #9 0x806ad8d in interpret (tree=0x8084f0c) at eval.c:384 # #10 0x806ad21 in interpret (tree=0x8084f5c) at eval.c:367 # #11 0x8061d5b in main (argc=4, argv=0x80478ac) at main.c:506 # # John # -- # John DuBois spcecdt@armory.com. KC6QKZ/AE http://www.armory.com./~spcecdt/ # gawk-4.0.1+dfsg.orig/test/posix.ok0000644000175000017500000000065511463242060016025 0ustar schotschotTest #1: "+2" compares as a string Test #2: "+2a" compares as a string Test #3: "+2 " compares as a string Test #4: " 2" compares as a string after addition Test #5: "+2" compares as a string Test #6: "+2a" compares as a string Test #7: "+2 " compares as a string Test #8: " 2" compares as a string Test #9: "3e5" <= "5" Test #10: test Test #11: test Test #12: 1.500000 1.500000e+00 Test #13: nomatch Test #14: 1:2,3 Test #15: 4 gawk-4.0.1+dfsg.orig/test/arryref5.awk0000644000175000017500000000016611463242060016570 0ustar schotschotBEGIN { foo(a) print a } function foo(b) { b[2] = "local" a = "global" # bar(b) } function bar(c) { c = 12 } gawk-4.0.1+dfsg.orig/test/longdbl.awk0000644000175000017500000001463411463242060016457 0ustar schotschot# From arnold@f7.net Wed Apr 27 09:48:37 2005 # Return-Path: # Received: from localhost (skeeve [127.0.0.1]) # by skeeve.com (8.12.11/8.12.11) with ESMTP id j3R6mZVm015791 # for ; Wed, 27 Apr 2005 09:48:37 +0300 # Received: from pop.012.net.il [84.95.5.221] # by localhost with POP3 (fetchmail-6.2.5) # for arnold@localhost (single-drop); Wed, 27 Apr 2005 09:48:37 +0300 (IDT) # Received: from mtain3.012.net.il ([10.220.5.7]) # by i_mss3.012.net.il (HyperSendmail v2004.12) # with ESMTP id <0IFK00L1DIZ02530@i_mss3.012.net.il> for arobbins@012.net.il; # Tue, 26 Apr 2005 22:18:36 +0300 (IDT) # Received: from VScan3 ([10.220.20.3]) # by i_mtain3.012.net.il (HyperSendmail v2004.12) # with ESMTP id <0IFK007U1IZ0U980@i_mtain3.012.net.il> for arobbins@012.net.il # (ORCPT arobbins@012.net.il); Tue, 26 Apr 2005 22:18:36 +0300 (IDT) # Received: from i_mtain1.012.net.il ([10.220.5.1]) # by VScan3 with InterScan Messaging Security Suite; Tue, # 26 Apr 2005 22:15:22 +0300 # Received: from f7.net ([209.61.216.22]) # by i_mtain1.012.net.il (HyperSendmail v2004.12) # with ESMTP id <0IFK009SIIYRN7G0@i_mtain1.012.net.il> for arobbins@012.net.il; # Tue, 26 Apr 2005 22:18:33 +0300 (IDT) # Received: (from arnold@localhost) by f7.net (8.11.7-20030920/8.11.7) # id j3QJFAg18376 for arobbins@012.net.il; Tue, 26 Apr 2005 15:15:10 -0400 # Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) # by f7.net (8.11.7-20030920/8.11.7) with ESMTP id j3QJF5J18304 for # ; Tue, 26 Apr 2005 15:15:06 -0400 # Received: from monty-python.gnu.org ([199.232.76.173]) # by fencepost.gnu.org with esmtp (Exim 4.34) # id 1DQVVh-0004gD-CH for bug-gawk@gnu.org; Tue, 26 Apr 2005 15:14:17 -0400 # Received: from Debian-exim by monty-python.gnu.org with spam-scanned # (Exim 4.34) id 1DQVYa-0002PR-2b for bug-gawk@gnu.org; Tue, # 26 Apr 2005 15:17:56 -0400 # Received: from [129.183.4.8] (helo=ecfrec.frec.bull.fr) # by monty-python.gnu.org with esmtp (Exim 4.34) # id 1DQVYZ-0002Lr-EF for bug-gawk@gnu.org; Tue, 26 Apr 2005 15:17:15 -0400 # Received: from localhost (localhost [127.0.0.1]) # by ecfrec.frec.bull.fr (Postfix) with ESMTP id 5782819D907 for # ; Tue, 26 Apr 2005 21:12:53 +0200 (CEST) # Received: from ecfrec.frec.bull.fr ([127.0.0.1]) # by localhost (ecfrec.frec.bull.fr [127.0.0.1]) (amavisd-new, port 10024) # with ESMTP id 06763-10 for ; Tue, # 26 Apr 2005 21:12:51 +0200 (CEST) # Received: from ecn002.frec.bull.fr (ecn002.frec.bull.fr [129.183.4.6]) # by ecfrec.frec.bull.fr (Postfix) with ESMTP id 4488B19D906 for # ; Tue, 26 Apr 2005 21:12:51 +0200 (CEST) # Received: from daphne ([129.183.192.6]) # by ecn002.frec.bull.fr (Lotus Domino Release 5.0.12) # with ESMTP id 2005042621231613:3312 ; Tue, 26 Apr 2005 21:23:16 +0200 # Date: Tue, 26 Apr 2005 21:12:49 +0200 (CEST) # From: Jean-Marc Saffroy # Subject: GNU awk unable to handle 64-bit ints on IA64 # X-X-Sender: saffroyj@daphne.frec.bull.fr # To: bug-gawk@gnu.org # Message-id: # MIME-version: 1.0 # Content-type: TEXT/PLAIN; charset=US-ASCII; format=flowed # X-MIMETrack: Itemize by SMTP Server on ECN002/FR/BULL(Release 5.0.12 |February # 13, 2003) at 26/04/2005 21:23:16, # Serialize by Router on ECN002/FR/BULL(Release 5.0.12 |February 13, # 2003) at 26/04/2005 21:23:16, Serialize complete at 26/04/2005 21:23:16 # X-Virus-Scanned: by amavisd-new at frec.bull.fr # Original-recipient: rfc822;arobbins@012.net.il # X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on skeeve.com # X-Spam-Level: # X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham # version=2.63 # Status: RO # # # Hello, # # I have rounding problems when manipulating 64-bit ints (actually they are # addresses) on Linux/IA64: # # $ echo 0xa000000100000813|./gawk '{printf("0x%lx\n",strtonum($1));}' # 0xa000000100000800 # $ echo 0xffffffffffffffff|./gawk '{printf("0x%lx\n",strtonum($1));}' # 0x8000000000000000 # $ ./gawk --version|head -1 # GNU Awk 3.1.4 # # The problem seems to be that AWKNUM is defined to be a double, which has a # 53-bit mantissa. On IA64 with gcc 3.2.3 (maybe other compilers as well) # there is a long double type with a larger mantissa: # # $ grep define.*LDBL_MANT_DIG /usr/lib/gcc-lib/ia64-redhat-linux/3.2.3/include/float.h # #define LDBL_MANT_DIG 64 # # So I changed AWKNUM to be a long double; this does not seem to be # sufficient, because of some dubious casts to double (there may be others # left, I didn't check), see patch below. Now it's much nicer: # # $ echo 0xa000000100000813|./gawk '{printf("0x%lx\n",strtonum($1));}' # 0xa000000100000813 # $ echo 0xffffffffffffffff|./gawk '{printf("0x%lx\n",strtonum($1));}' # 0xffffffffffffffff # # Maybe the gawk configure script should set AWKNUM to be a long double on # Linux/IA64? # # # Regards, # # -- # Jean-Marc Saffroy - jean-marc.saffroy@ext.bull.net # # # diff -ru gawk-3.1.4/awk.h gawk/awk.h # --- gawk-3.1.4/awk.h 2004-07-26 16:11:05.000000000 +0200 # +++ gawk/awk.h 2005-04-26 19:19:10.545419273 +0200 # @@ -273,7 +273,7 @@ # /* ------------------ Constants, Structures, Typedefs ------------------ */ # # #ifndef AWKNUM # -#define AWKNUM double # +#define AWKNUM long double # #endif # # #ifndef TRUE # diff -ru gawk-3.1.4/builtin.c gawk/builtin.c # --- gawk-3.1.4/builtin.c 2004-07-13 09:55:28.000000000 +0200 # +++ gawk/builtin.c 2005-04-26 20:53:41.211365432 +0200 # @@ -578,7 +578,7 @@ # char *cend = &cpbuf[30];/* chars, we lose, but seems unlikely */ # char *cp; # const char *fill; # - double tmpval; # + AWKNUM tmpval; # char signchar = FALSE; # size_t len; # int zero_flag = FALSE; # @@ -2773,16 +2773,16 @@ # do_strtonum(NODE *tree) # { # NODE *tmp; # - double d; # + AWKNUM d; # # tmp = tree_eval(tree->lnode); # # if ((tmp->flags & (NUMBER|NUMCUR)) != 0) # - d = (double) force_number(tmp); # + d = (AWKNUM) force_number(tmp); # else if (isnondecimal(tmp->stptr)) # d = nondec2awknum(tmp->stptr, tmp->stlen); # else # - d = (double) force_number(tmp); # + d = (AWKNUM) force_number(tmp); # # free_temp(tmp); # return tmp_number((AWKNUM) d); # # # ##################################################################################### # This Mail Was Scanned by 012.net Anti Virus Service - Powered by TrendMicro Interscan # { printf("0x%lx\n",strtonum($1)); } gawk-4.0.1+dfsg.orig/test/forsimp.ok0000644000175000017500000000000211463242060016324 0ustar schotschot9 gawk-4.0.1+dfsg.orig/test/aryprm6.awk0000644000175000017500000000005611463242060016427 0ustar schotschotfunction f(x){ a x[1] = 3 } BEGIN { f(a) } gawk-4.0.1+dfsg.orig/test/igncdym.awk0000644000175000017500000000226111463242060016461 0ustar schotschot#From Jeffrey.B.Woodward@Hitchcock.ORG Mon Feb 21 09:33:32 2000 #Message-id: <12901034@mailbox2.Hitchcock.ORG> #Date: 20 Feb 2000 18:14:11 EST #From: Jeffrey.B.Woodward@Hitchcock.ORG (Jeffrey B. Woodward) #Subject: gawk 3.0.4 bug #To: bug-gnu-utils@gnu.org #Cc: arnold@gnu.org # #O/S: Digital UNIX 4.0D # #C Compiler: DEC C # #gawk version: 3.0.4 # #Sample Program: #gawk ' BEGIN { pattern[1] = "bar" ; ignore[1] = 1 pattern[2] = "foo" ; ignore[2] = 0 } { for (i = 1 ; i <= 2 ; i++) { IGNORECASE = ignore[i] print match($0, pattern[i]) " " pattern[i] ":" $0 } } #' << -EOF- #This is foo #This is bar #-EOF- # #Program Output: #0 bar:This is foo #0 foo:This is foo #9 bar:This is bar #9 foo:This is bar # # #**Expected** Output: #0 bar:This is foo #9 foo:This is foo #9 bar:This is bar #0 foo:This is bar # # #This problem appears to be directly related to IGNORECASE. If #IGNORECASE remains constant, the program behaves as expected; #however, switching IGNORECASE seems to causes problems - it is #almost as though the pattern stored in the variable is treated #as a constant and the regexp() is not recompiled(?) - just a #guess... # # #Thanks, #-Jeff Woodward gawk-4.0.1+dfsg.orig/test/tradanch.awk0000644000175000017500000000002411463242060016606 0ustar schotschot/foo^bar/ /foo$bar/ gawk-4.0.1+dfsg.orig/test/childin.ok0000644000175000017500000000000311463242060016260 0ustar schotschothi gawk-4.0.1+dfsg.orig/test/prdupval.awk0000644000175000017500000000003511463242060016661 0ustar schotschot{ print NF, $NF, "abc" $NF } gawk-4.0.1+dfsg.orig/test/fnarydel.ok0000644000175000017500000000025711734665352016503 0ustar schotschotfirst loop 4 5 6 7 8 9 1 2 3 second loop third loop 4 5 6 7 8 9 1 2 3 call func fourth loop You should just see: 4 4 4 4 You should see nothing between this line And this one gawk-4.0.1+dfsg.orig/test/hex.awk0000644000175000017500000000042111463242060015607 0ustar schotschot# Test program from Paul Eggert, eggert@cs.ucla.edu, Jan. 14, 2005 BEGIN { e = "1(e)" ex = "3e2(ex)" x = "6e5(x)" print e+0, x+0 print 0x print 0e+x print 0ex print 010e2 print 0e9.3 } # Expected results: # 1 600000 # 06e5(x) # 0600001 # 03e2(ex) # 1000 # 00.3 gawk-4.0.1+dfsg.orig/test/forref.ok0000644000175000017500000000001611463242060016135 0ustar schotschot1 s 1 2 m 2 1 gawk-4.0.1+dfsg.orig/test/shadow.ok0000644000175000017500000000053211463242060016142 0ustar schotschotgawk: 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 gawk-4.0.1+dfsg.orig/test/rsstart3.ok0000644000175000017500000000000211463242060016432 0ustar schotschot2 gawk-4.0.1+dfsg.orig/test/noeffect.ok0000644000175000017500000000040611527020510016441 0ustar schotschotgawk: noeffect.awk:2: warning: statement may have no effect gawk: noeffect.awk:3: 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' gawk-4.0.1+dfsg.orig/test/strtod.ok0000644000175000017500000000003011463242060016165 0ustar schotschot0x345 0 345 is not zero gawk-4.0.1+dfsg.orig/test/aasorti.awk0000644000175000017500000000101411463614133016470 0ustar schotschotfunction 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]) } gawk-4.0.1+dfsg.orig/test/dtdgport.awk0000644000175000017500000002550211477513317016674 0ustar schotschot# 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"] } gawk-4.0.1+dfsg.orig/test/fnarydel.awk0000644000175000017500000000135511463242060016636 0ustar schotschot#!/usr/local/bin/gawk -f BEGIN { process() } function process(aa,a) { delete aa } BEGIN { for (i = 1; i < 10; i++) a[i] = i; print "first loop" for (i in a) print a[i] delete a print "second loop" for (i in a) print a[i] for (i = 1; i < 10; i++) a[i] = i; print "third loop" for (i in a) print a[i] print "call func" delit(a) print "fourth loop" for (i in a) print a[i] stressit() } function delit(arr) { delete arr } function stressit( array, i) { delete array array[4] = 4 array[5] = 5 delete array[5] print "You should just see: 4 4" for (i in array) print i, array[i] delete array print "You should see nothing between this line" for (i in array) print i, array[i] print "And this one" } gawk-4.0.1+dfsg.orig/test/rtlen.sh0000755000175000017500000000020211654051011015773 0ustar schotschot#! /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)}' gawk-4.0.1+dfsg.orig/test/widesub2.ok0000644000175000017500000000004011463242060016373 0ustar schotschotBefore 2 After 3 gawk-4.0.1+dfsg.orig/test/splitarr.ok0000644000175000017500000000001511463242060016511 0ustar schotschot4 l phanti 2 gawk-4.0.1+dfsg.orig/test/rstest6.awk0000644000175000017500000000016511463242060016442 0ustar schotschot# Wed Jul 14 16:02:45 IDT 2004 # Test case from John Haque mary1john8@earthlink.net BEGIN { RS = "XYZ" } { print } gawk-4.0.1+dfsg.orig/test/rstest5.ok0000644000175000017500000000002311463242060016261 0ustar schotschotfoo baz bar x = <> gawk-4.0.1+dfsg.orig/test/intprec.awk0000644000175000017500000000005011463242060016465 0ustar schotschotBEGIN { printf "%.10d:%.10x\n", 5, 14 } gawk-4.0.1+dfsg.orig/test/wjposer1.awk0000644000175000017500000000525211463242060016604 0ustar schotschot# From arnold@f7.net Sun Sep 5 12:30:53 2004 # Date: Fri, 3 Sep 2004 00:54:32 -0400 (EDT) # From: William J Poser # To: arnold@skeeve.com # Subject: gawk bug # Message-ID: <20040903004347.W80049@lorax.ldc.upenn.edu> # # Here is a revised version of my previous message, modified to describe # the accompanying files. # # IhSplit.awk should replicate every record with exactly one entry in the # IH field, delete records lacking an IH field, and produce as many copies # of records with two or more entries in the IH field as there are entries. # In the latter case, the original IH field should be relabelled OIH and # a new IH field be added at the beginning of the record. # # This has worked properly for many years, since at least 1997. It worked properly with gawk 3.0.5 # and possibly later versions. Unfortunately I didn't keep track of exactly what version it # broke on, but it was whatever came with Mandrake Linux 9.0. It continued to fail with version # 3.1.2. However, the problem was eliminated with version 3.1.3 and remains # eliminated in version 3.1.4. # # The problem was that an apparently random subset of records would loose some # or all of their fields. Running the script on the same input always produces # the same output with the same errors. # # The file Input is a subset of a real lexicon that produces errors using # gawk 3.1.2. GoodOutput is the expected output. BadOutput is the erroneous # output. A diff will show that there are actually two errors. One record # has fields stripped as described above. Another is omitted in its entirety. # # # Bill Poser, Linguistics, University of Pennsylvania # http://www.ling.upenn.edu/~wjposer/ billposer@alum.mit.edu # ---------------------------------------------------------------------------- #For each record that contains multiple items in its inverse headword (IH) #field, generate a set of new records each containing exactly one item #in the inverse headword field, otherwise copies of the original. function CleanUp() #Clean up for next input record. { for(i in rec) delete rec[i]; } BEGIN { RS = ""; FS = "\n?%" } { # First, create an associative array with the tags as indices. for(i = 2; i <= NF; i++) { # The leading FS creates an initial empty field split($i, f, ":"); rec[f[1]]=substr($i,index($i,":")+1); } if(!("IH" in rec)) next; # Parse out the inverse headwords items = split(rec["IH"],ihs,"/"); # Replace the old IH field. sub(/%IH:/,"%OIH:",$0); # Generate a new copy of the record for each inverse headword for(i = 1; i <= items; i++){ entries+=1; printf("%%IH:%s\n",ihs[i]); printf("%s\n\n",$0); } CleanUp(); } gawk-4.0.1+dfsg.orig/test/posix2008sub.awk0000644000175000017500000000031111467161451017217 0ustar schotschotBEGIN { text = "here is some text" repl = "" printf "orig = \"%s\", repl = \"%s\"\n", text, repl sub(/some/, repl, text) printf "result is \"%s\"\n", text } gawk-4.0.1+dfsg.orig/test/nors.in0000644000175000017500000000001111463242060015623 0ustar schotschotA B C D Egawk-4.0.1+dfsg.orig/test/aryprm2.awk0000644000175000017500000000006711463242060016425 0ustar schotschotfunction f(a) { delete a a *= 5 } BEGIN { f(arr) } gawk-4.0.1+dfsg.orig/test/gsubtst2.awk0000644000175000017500000001266611463242060016616 0ustar schotschot#From arnold Thu May 9 17:27:03 2002 #Return-Path: #Received: (from arnold@localhost) # by skeeve.com (8.11.6/8.11.6) id g49ER3K27925 # for arnold; Thu, 9 May 2002 17:27:03 +0300 #Date: Thu, 9 May 2002 17:27:03 +0300 #From: Aharon Robbins #Message-Id: <200205091427.g49ER3K27925@skeeve.com> #To: arnold@skeeve.com #Subject: fixme #X-SpamBouncer: 1.4 (10/07/01) #X-SBRule: Pattern Match (Other Patterns) (Score: 4850) #X-SBRule: Pattern Match (Spam Phone #) (Score: 0) #X-SBClass: Blocked #Status: O # #Path: ord-read.news.verio.net!dfw-artgen!iad-peer.news.verio.net!news.verio.net!fu-berlin.de!uni-berlin.de!host213-120-137-48.in-addr.btopenworld.COM!not-for-mail #From: laura@madonnaweb.com (laura fairhead) #Newsgroups: comp.lang.awk #Subject: bug in gawk3.1.0 regex code #Date: Wed, 08 May 2002 23:31:40 GMT #Organization: that'll be the daewooo :) #Lines: 211 #Message-ID: <3cd9b0f7.29675926@NEWS.CIS.DFN.DE> #Reply-To: laura@madonnaweb.com #NNTP-Posting-Host: host213-120-137-48.in-addr.btopenworld.com (213.120.137.48) #X-Trace: fu-berlin.de 1020900891 18168286 213.120.137.48 (16 [53286]) #X-Newsreader: Forte Free Agent 1.21/32.243 #Xref: dfw-artgen comp.lang.awk:13059 # # #I believe I've just found a bug in gawk3.1.0 implementation of #extended regular expressions. It seems to be down to the alternation #operator; when using an end anchor '$' as a subexpression in an #alternation and the entire matched RE is a nul-string it fails #to match the end of string, for example; # #gsub(/$|2/,"x") #print # #input = 12345 #expected output = 1x345x #actual output = 1x345 # #The start anchor '^' always works as expected; # #gsub(/^|2/,"x") #print # #input = 12345 #expected output = x1x345 #actual output = x1x345 # #This was with POSIX compliance enabled althought that doesn't #effect the result. # #I checked on gawk3.0.6 and got exactly the same results however #gawk2.15.6 gives the expected results. # #I'm about to post a bug report about this into gnu.utils.bug #but I thought I'd post it here first in case anyone has #any input/comments/whatever .... # #Complete test results were as follows; # #input 12345 #output gsub(/regex/,"x",input) # #regex output #(^) x12345 #($) 12345x #(^)|($) x12345x #($)|(^) x12345x #(2) 1x345 #(^)|2 x1x345 #2|(^) x1x345 #($)|2 1x345 #2|($) 1x345 #(2)|(^) x1x345 #(^)|(2) x1x345 #(2)|($) 1x345 #($)|(2) 1x345 #.((2)|(^)) x345 #.((^)|(2)) x345 #.((2)|($)) x34x #.(($)|(2)) x34x #x{0}((2)|(^)) x1x345 #x{0}((^)|(2)) x1x345 #x{0}((2)|($)) 1x345 #x{0}(($)|(2)) 1x345 #x*((2)|(^)) x1x345 #x*((^)|(2)) x1x345 #x*((2)|($)) 1x345 #x*(($)|(2)) 1x345 # #Here's the test program I used, a few of the cases use ERE {n[,[m]]} #operators so that will have to be commented out or have a check #added or something (should have put a conditional in I know... ;-) # #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # BEGIN{ TESTSTR="12345" print "input "TESTSTR print "output gsub(/regex/,\"x\",input)" print "" print "regex output" $0=TESTSTR gsub(/(^)/,"x") print "(^) "$0 $0=TESTSTR gsub(/($)/,"x") print "($) "$0 $0=TESTSTR gsub(/(^)|($)/,"x") print "(^)|($) "$0 $0=TESTSTR gsub(/($)|(^)/,"x") print "($)|(^) "$0 $0=TESTSTR gsub(/2/,"x") print "(2) "$0 $0=TESTSTR gsub(/(^)|2/,"x") print "(^)|2 "$0 $0=TESTSTR gsub(/2|(^)/,"x") print "2|(^) "$0 $0=TESTSTR gsub(/($)|2/,"x") print "($)|2 "$0 $0=TESTSTR gsub(/2|($)/,"x") print "2|($) "$0 $0=TESTSTR gsub(/(2)|(^)/,"x") print "(2)|(^) "$0 $0=TESTSTR gsub(/(^)|(2)/,"x") print "(^)|(2) "$0 $0=TESTSTR gsub(/(2)|($)/,"x") print "(2)|($) "$0 $0=TESTSTR gsub(/($)|(2)/,"x") print "($)|(2) "$0 $0=TESTSTR gsub(/.((2)|(^))/,"x") print ".((2)|(^)) "$0 $0=TESTSTR gsub(/.((^)|(2))/,"x") print ".((^)|(2)) "$0 $0=TESTSTR gsub(/.((2)|($))/,"x") print ".((2)|($)) "$0 $0=TESTSTR gsub(/.(($)|(2))/,"x") print ".(($)|(2)) "$0 # $0=TESTSTR # gsub(/x{0}((2)|(^))/,"x") # print "x{0}((2)|(^)) "$0 # # $0=TESTSTR # gsub(/x{0}((^)|(2))/,"x") # print "x{0}((^)|(2)) "$0 # # $0=TESTSTR # gsub(/x{0}((2)|($))/,"x") # print "x{0}((2)|($)) "$0 # # $0=TESTSTR # gsub(/x{0}(($)|(2))/,"x") # print "x{0}(($)|(2)) "$0 $0=TESTSTR gsub(/x*((2)|(^))/,"x") print "x*((2)|(^)) "$0 $0=TESTSTR gsub(/x*((^)|(2))/,"x") print "x*((^)|(2)) "$0 $0=TESTSTR gsub(/x*((2)|($))/,"x") print "x*((2)|($)) "$0 $0=TESTSTR gsub(/x*(($)|(2))/,"x") print "x*(($)|(2)) "$0 # $0=TESTSTR # gsub(/x{0}^/,"x") # print "x{0}^ "$0 # # $0=TESTSTR # gsub(/x{0}$/,"x") # print "x{0}$ "$0 # # $0=TESTSTR # gsub(/(x{0}^)|2/,"x") # print "(x{0}^)|2 "$0 # # $0=TESTSTR # gsub(/(x{0}$)|2/,"x") # print "(x{0}$)|2 "$0 } # #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # #byefrom # #-- #laura fairhead # laura@madonnaweb.com http://lf.8k.com # # if you are bored crack my sig. #1F8B0808CABB793C0000666667002D8E410E83300C04EF91F2877D00CA138A7A #EAA98F30C494480157B623C4EF1B508FDED1CEFA9152A23DE35D661593C5318E #630C313CD701BE92E390563326EE17A3CA818F5266E4C2461547F1F5267659CA #8EE2092F76C329ED02CA430C5373CC62FF94BAC6210B36D9F9BC4AB53378D978 #80F2978A1A6E5D6F5133B67B6113178DC1059526698AFE5C17A5187E7D930492 gawk-4.0.1+dfsg.orig/test/ofmts.in0000644000175000017500000000001011463242060015771 0ustar schotschot1.2 2.2 gawk-4.0.1+dfsg.orig/test/argtest.ok0000644000175000017500000000006711463242060016331 0ustar schotschotARGV[0] = gawk ARGV[1] = -x ARGV[2] = -y ARGV[3] = abc gawk-4.0.1+dfsg.orig/test/ofmtfidl.in0000644000175000017500000000002511463242060016453 0ustar schotschot1 2 3 4 5 6 7 8 9 10 gawk-4.0.1+dfsg.orig/test/strtod.awk0000644000175000017500000000013311463242060016342 0ustar schotschot{ x = "0x" $1 ; print x, x + 0 for (i=1; i<=NF; i++) if ($i) print $i, "is not zero" } gawk-4.0.1+dfsg.orig/test/gnureops.awk0000644000175000017500000000277111463242060016677 0ustar schotschot# test the gnu regexp ops BEGIN { if ("a rat is here" ~ /\yrat/) print "test 1 ok (\\y)" else print "test 1 failed (\\y)" if ("a rat is here" ~ /rat\y/) print "test 2 ok (\\y)" else print "test 2 failed (\\y)" if ("what a brat" !~ /\yrat/) print "test 3 ok (\\y)" else print "test 3 failed (\\y)" if ("in the crate" ~ /\Brat/) print "test 4 ok (\\B)" else print "test 4 failed (\\B)" if ("a rat" !~ /\Brat/) print "test 5 ok (\\B)" else print "test 5 failed (\\B)" if ("a word" ~ /\/) print "test 8 ok (\\>)" else print "test 8 failed (\\\\>)" if ("wordy" !~ /word\>/) print "test 9 ok (\\>)" else print "test 9 failed (\\>)" if ("a" ~ /\w/) print "test 10 ok (\\w)" else print "test 10 failed (\\\\w)" if ("+" !~ /\w/) print "test 11 ok (\\w)" else print "test 11 failed (\\w)" if ("a" !~ /\W/) print "test 12 ok (\\W)" else print "test 12 failed (\\W)" if ("+" ~ /\W/) print "test 13 ok (\\W)" else print "test 13 failed (\\W)" if ("a" ~ /\`a/) print "test 14 ok (\\`)" else print "test 14 failed (\\`)" if ("b" !~ /\`a/) print "test 15 ok (\\`)" else print "test 15 failed (\\`)" if ("a" ~ /a\'/) print "test 16 ok (\\')" else print "test 16 failed (\\')" if ("b" !~ /a\'/) print "test 17 ok (\\')" else print "test 17 failed (\\')" } gawk-4.0.1+dfsg.orig/test/ofmta.ok0000644000175000017500000000005311552021437015763 0ustar schotschot4.2 4.2345 hi hi -------- 4.234 4.2345 hi gawk-4.0.1+dfsg.orig/test/next.sh0000755000175000017500000000066211544703322015646 0ustar schotschot#!/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 gawk-4.0.1+dfsg.orig/test/intformat.awk0000644000175000017500000000356611463242060017043 0ustar schotschotfunction abs(x) { return (x+0 >= 0) ? x : -x } function check(x,what, f,res) { for (f in formats) { res = sprintf(f,x) if (formats[f] == "non-decimal") { if ((x >= 0) && (res !~ /e+/)) { if (abs(strtonum(res)-x) > 1e-5*abs(x)) printf "(sprintf(%s,%s) = %s)-%g = %g\n", f,what,res,x,strtonum(res)-x } } else if (abs(res-x) > 1e-5*abs(x)) printf "(sprintf(%s,%s) = %s)-%g = %g\n", f,what,res,x,res-x } } function check_cons(fmt,base,rot,mexp, i,j,dig,res,s) { # first off, check that zero formats properly if ((s = sprintf(fmt,0)) != "0") printf "(sprintf(%s,0) = %s) != 0\n",fmt,s res = "1" dig = 1 j = 0 for (i = 0; i <= mexp; i++) { s = sprintf(fmt,base^i) if (s ~ /e+/) return if (s != res) printf "(sprintf(%s,%d^%d) = %s) != %s\n", fmt,base,i,s,res if (++j == rot) { dig = 1 res = ("10"substr(res,2)) j = 0 } else { dig *= 2 res = (dig substr(res,2)) } } } BEGIN { # this doesn't necessarily have to be exact since we're checking # magnitude rather than precision if (!HUGEVAL) HUGEVAL = 1.7976931348623157e+308 formats["%s"] = "" formats["%d"] = "" formats["%.0f"] = "" formats["0%o"] = "non-decimal" formats["0x%x"] = "non-decimal" check(0,"0") limit = HUGEVAL / 10 value = 1 for (i = 0; ; i++) { check(10^i,"10^"i) check(-10^i,"-10^"i) #[probably should test value against 10^i here] if (value >= limit) break value *= 10 } limit = HUGEVAL / 2 value = 1 for (i = 0; ; i++) { check(2^i,"2^"i) check(-2^i,"-2^"i) #[probably should test value against 2^i here] if (value >= limit) break value *= 2 } check_cons("%d",10,1,9) check_cons("%x",2,4,31) check_cons("%o",2,3,31) # make sure basic %d and %x are working properly printf "%d %d %x\n",3.7,-3.7,23.7 # check another problem in gawk 3.1.5: precision over 30 crashes printf "%.55d\n",1 } gawk-4.0.1+dfsg.orig/test/subslash.ok0000644000175000017500000000002011463242060016471 0ustar schotschota[2] = 2.500000 gawk-4.0.1+dfsg.orig/test/rstest3.ok0000644000175000017500000000000011463242060016252 0ustar schotschotgawk-4.0.1+dfsg.orig/test/back89.ok0000644000175000017500000000000411463242060015730 0ustar schotschota8b gawk-4.0.1+dfsg.orig/test/nondec.ok0000644000175000017500000000002511463242060016120 0ustar schotschot8504296 7618584 0.34 gawk-4.0.1+dfsg.orig/test/widesub3.in0000644000175000017500000000001111463242060016367 0ustar schotschottest foo gawk-4.0.1+dfsg.orig/test/sortu.awk0000644000175000017500000000477411654051011016212 0ustar schotschot# 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]) } } gawk-4.0.1+dfsg.orig/test/paramres.awk0000644000175000017500000000007411463242060016641 0ustar schotschotBEGIN { foo() } function foo(a, FS, q) { print "a =", a } gawk-4.0.1+dfsg.orig/test/getlnbuf.ok0000644000175000017500000012215211463242060016466 0ustar schotschotEXTRA_INFO.TYP3.EC := EC; EXTRA_INFO.TYP3.TEXT:= 'CONNECT_SERVICE TO OAM FAILED'; G9PXYA1S!G9TE500_EHP_P( 'G9IBSA1C003', /*@@ID*/ G9PXYA1S!G9TE102_ERR_CLASS_SWERR, /*@@CLASS*/ ADDR(EXTRA_INFO.ERROR_HANDLER), /* EXTRA-INFO ADDR */ G9PXYA1S!G9TE100_GB_LM, /* USER-ID */ NULL /* OPTIONAL-SWET-INFO ADDR */ ); /***@@@ END OF ERROR ***/ @K@FREEZE 917596041 @K@NAME T_ERR4_1 @K@INSCRIPT ERROR_HANDLING: DB_OVERFLOW MP/NSEI @K@CODE /***@@@ ERROR ***/ /*@@ERRORTEXT *@ DB-OVERFLOW *@ *@ *@@DESCRIPTION *@ THE INSTANCE-CREATION WAS NOT POSSIBLE *@ BECAUSE THE DATABASE WOULD OVERFLOW *@ *@@EXTRA INFO *@ (EXTRA_INFO_4_STRUCT) *@ NSEI *@ NSVCI *@ TEXT *@ */ EXTRA_INFO.TYP4.NSEI := EVD_PTR->.KEYS.INT_ARR(0); EXTRA_INFO.TYP4.NSVCI:= EVD_PTR->.KEYS.INT_ARR(1); EXTRA_INFO.TYP4.TEXT := 'NSVC-HAND.: MP/NSEI-OVERFLOW'; G9PXYA1S!G9TE500_EHP_P( 'G9IBSA1C004', /*@@ID*/ G9PXYA1S!G9TE102_ERR_CLASS_ESC_MAX_ANY, /*@@CLASS*/ ADDR(EXTRA_INFO.ERROR_HANDLER), /* EXTRA-INFO ADDR */ G9PXYA1S!G9TE100_GB_LM, /* USER-ID */ NULL /* OPTIONAL-SWET-INFO ADDR */ ); /***@@@ END OF ERROR ***/ @K@FREEZE 920903219 @K@NAME T_ERR4_2 @K@INSCRIPT ERROR_HANDLING: DB_OVERFLOW MP/NSVCI @K@CODE /***@@@ ERROR ***/ /*@@ERRORTEXT *@ DB-OVERFLOW *@ *@ *@@DESCRIPTION *@ THE INSTANCE-CREATION WAS NOT POSSIBLE *@ BECAUSE THE DATABASE WOULD OVERFLOW *@ *@@EXTRA INFO *@ (EXTRA_INFO_4_STRUCT) *@ NSEI *@ NSVCI *@ TEXT *@ */ EXTRA_INFO.TYP4.NSEI := EVD_PTR->.KEYS.INT_ARR(0); EXTRA_INFO.TYP4.NSVCI:= EVD_PTR->.KEYS.INT_ARR(1); EXTRA_INFO.TYP4.TEXT := 'NSVC-HAND.: MP/NSVCI-OVERFLOW'; G9PXYA1S!G9TE500_EHP_P( 'G9IBSA1C004', /*@@ID*/ G9PXYA1S!G9TE102_ERR_CLASS_ESC_MAX_ANY, /*@@CLASS*/ ADDR(EXTRA_INFO.ERROR_HANDLER), /* EXTRA-INFO ADDR */ G9PXYA1S!G9TE100_GB_LM, /* USER-ID */ NULL /* OPTIONAL-SWET-INFO ADDR */ ); /***@@@ END OF ERROR ***/ @K@FREEZE 920903222 @K@NAME T_ERR4_3 @K@INSCRIPT ERROR_HANDLING: DB_OVERFLOW NSEI/NSVCI @K@CODE /***@@@ ERROR ***/ /*@@ERRORTEXT *@ DB-OVERFLOW *@ *@ *@@DESCRIPTION *@ THE INSTANCE-CREATION WAS NOT POSSIBLE *@ BECAUSE THE DATABASE WOULD OVERFLOW *@ *@@EXTRA INFO *@ (EXTRA_INFO_4_STRUCT) *@ NSEI *@ NSVCI *@ TEXT *@ */ EXTRA_INFO.TYP4.NSEI := EVD_PTR->.KEYS.INT_ARR(0); EXTRA_INFO.TYP4.NSVCI:= EVD_PTR->.KEYS.INT_ARR(1); EXTRA_INFO.TYP4.TEXT := 'NSVC-HAND.: NSEI/NSVC-OVERFLOW'; G9PXYA1S!G9TE500_EHP_P( 'G9IBSA1C004', /*@@ID*/ G9PXYA1S!G9TE102_ERR_CLASS_ESC_MAX_ANY, /*@@CLASS*/ ADDR(EXTRA_INFO.ERROR_HANDLER), /* EXTRA-INFO ADDR */ G9PXYA1S!G9TE100_GB_LM, /* USER-ID */ NULL /* OPTIONAL-SWET-INFO ADDR */ ); /***@@@ END OF ERROR ***/ @K@FREEZE 920903226 @K@NAME TR_RESET @K@INSCRIPT RESTART_ TNS_RESET_ TIMER @K@CODE /* TIMER EVENT DESCRIPTOR STILL THERE */ /* INITIALIZATION OF THE TIMER-EVENT-DESCRIPTOR STILL VALID */ NSVCI_CON_PTR->.TIM_EVD_PTR->.TIMER:= TNS_RESET_MAP; /* START TIMER */ G9PX508_START_TIMER_P ( NSVCI_CON_PTR->.TIM_EVD_PTR ); @K@FREEZE 924684867 @K@NAME TX_AUDIT @K@INSCRIPT FOR AUDIT @K@NAME M_BLKOACKM @K@INSCRIPT NS_ BLOCK_ACK @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9IBDF4_NS_LM_M) + G9IBD44_NS_PDU_DATA_OFFSET_C), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9IBD40_NS_LM_PDU_C; TX_EVD_PTR->.EVENT_DESTINATION:= GBDL_HANDLE; IF /* 'OTHER' ALIVE NSVC TO THIS NSEI EXISTING? */ NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR /= NULL THEN /* USE THIS 'OTHER' FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(1):= NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR TRANSPORT */ ELSE /* USE AFFECTED NSVC AGAIN FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(1):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR TRANSPORT */ FI; /* POINTER TO PDU IN POOL-ELEMENT */ NS_PDU_PTR:= NS_PDU_REF_M (INT(TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT) + G9IBD44_NS_PDU_DATA_OFFSET_C); /* OFFSET OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_OFFSET:= G9IBD44_NS_PDU_DATA_OFFSET_C; /* LENGTH OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(NS_PDU_PTR->.G9IBDF4_PDU_TYPE) + SIZE(NS_PDU_PTR->.D3); /* NOW THE POOL-ELEMENT */ NS_PDU_PTR->.G9IBDF4_PDU_TYPE:= G9IBDR2_NS_BLOCK_ACK_C; /* PDU-TYPE */ NS_PDU_PTR->.D3.NSVCI_TLV.NSVCI_VAL := NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVC TO BE BLOCKED */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 938805885 @K@NAME T_RCTRUE @K@INSCRIPT RC = TRUE @K@CODE RC:= TRUE; @K@FREEZE 922176328 @K@NAME M_AC_SBVCN @K@INSCRIPT G9IBME0_ ACT_ SIGN_BVC_C @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB512_GET_MSG_LESS_EV_DESCR_P ( SID_GBNSVC, TX_EVD_PTR ); /* COMPOSING THE EVENT */ TX_EVD_PTR->.EVENT_CMD:= G9IBME0_ACT_SIGN_BVC_C; TX_EVD_PTR->.EVENT_DESTINATION:= GBBVC_HANDLE; TX_EVD_PTR->.KEYS.INT_ARR(0):= EVD_PTR->.KEYS.INT_ARR(0); TX_EVD_PTR->.KEYS.INT_ARR(1):= SIGN_BVCI; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 938788211 @K@NAME T_RC_EOD @K@INSCRIPT RC = END OF DATA @K@CODE RC:= G9IBSM4_RC_END_OF_DATA; @K@FREEZE 921083785 @K@NAME T_RC_EMP @K@INSCRIPT RC = EMPTY @K@CODE RC:= G9IBSM4_RC_EMPTY; @K@FREEZE 921083757 @K@NAME T_RC_ERR @K@INSCRIPT RC = ERROR @K@CODE RC:= G9IBSM4_RC_ERROR; @K@FREEZE 921083731 @K@NAME S_UNUSED @K@INSCRIPT G9IBSM0_ UNUSED @K@CODE @K@FREEZE 919416670 @K@NAME TA_UNBLOCK @K@INSCRIPT START_ TNS_UNBLOCK_ TIMER @K@CODE /* GET TIMER-EVENT DESCRIPTOR */ G9PB513_GET_TIMER_EV_DESCR_P ( SID_GBNSVC, NSVCI_CON_PTR->.TIM_EVD_PTR ); /* INITIALIZATION OF THE TIMER-EVENT-DESCRIPTOR */ NSVCI_CON_PTR->.TIM_EVD_PTR->.EVENT_CMD:= G9IBSE4_TO_TNS_C; NSVCI_CON_PTR->.TIM_EVD_PTR->.EVENT_DESTINATION:= GBNSVC_HANDLE; NSVCI_CON_PTR->.TIM_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; NSVCI_CON_PTR->.TIM_EVD_PTR->.KEYS.INT_ARR(1):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; NSVCI_CON_PTR->.TIM_EVD_PTR->.TIMER:= TNS_UNBLOCK_MAP; /* START TIMER */ G9PX508_START_TIMER_P ( NSVCI_CON_PTR->.TIM_EVD_PTR ); @K@FREEZE 924686210 @K@NAME M_BLK_ACKM @K@INSCRIPT NS_ BLOCK_ACK @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9IBDF4_NS_LM_M) + G9IBD44_NS_PDU_DATA_OFFSET_C), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9IBD40_NS_LM_PDU_C; TX_EVD_PTR->.EVENT_DESTINATION:= GBDL_HANDLE; TX_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(1):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR TRANSPORT */ /* POINTER TO PDU IN POOL-ELEMENT */ NS_PDU_PTR:= NS_PDU_REF_M (INT(TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT) + G9IBD44_NS_PDU_DATA_OFFSET_C); /* OFFSET OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_OFFSET:= G9IBD44_NS_PDU_DATA_OFFSET_C; /* LENGTH OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(NS_PDU_PTR->.G9IBDF4_PDU_TYPE) + SIZE(NS_PDU_PTR->.D3); /* NOW THE POOL-ELEMENT */ NS_PDU_PTR->.G9IBDF4_PDU_TYPE:= G9IBDR2_NS_BLOCK_ACK_C; /* PDU-TYPE */ NS_PDU_PTR->.D3.NSVCI_TLV.NSVCI_VAL := NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVC TO BE BLOCKED */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 926348442 @K@NAME TA_NXTALIV @K@INSCRIPT DEFINE NEW 'NEXT_ ALIVE' @K@CODE IF /* ALIVE NSVC TO THE NSEI EXISTING? */ NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR /= NULL THEN /* TAKE NEXT ELEMENT IN THE LINKED LIST AS THE NEXT ALIVE NSVC */ NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR:= NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.NEXT_ALV_NSVCI_CON_PTR; FI; @K@FREEZE 938801086 @K@NAME M_DE_CBVCN @K@INSCRIPT G9IBME2_ DEACT_ CELL_BVC_C @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB512_GET_MSG_LESS_EV_DESCR_P ( SID_GBNSVC, TX_EVD_PTR ); /* COMPOSING THE EVENT */ TX_EVD_PTR->.EVENT_CMD:= G9IBME2_DEACT_CELL_BVC_C; TX_EVD_PTR->.EVENT_DESTINATION:= GBBVC_HANDLE; TX_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; TX_EVD_PTR->.KEYS.INT_ARR(1):= EVD_PTR->.ADD_DATA(3); /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 933318270 @K@NAME TA_NXTRESP @K@INSCRIPT DEFINE NEW 'NEXT_ RESPONSIBLE' @K@CODE NSEI_CON_PTR->.NEXT_RESP_NSVCI_CON_PTR:= NSEI_CON_PTR->.NEXT_RESP_NSVCI_CON_PTR->.NEXT_LSP_NSVCI_CON_PTR; @K@FREEZE 938005006 @K@NAME TA_NXTSUBS @K@INSCRIPT DEFINE NEW 'NEXT_ SUBSTITUTE' @K@CODE NSEI_CON_PTR->.NEXT_SUBS_NSVCI_CON_PTR:= NSEI_CON_PTR->.NEXT_SUBS_NSVCI_CON_PTR->.NEXT_UBL_NSVCI_CON_PTR; @K@NAME M_BLK_O__M @K@INSCRIPT NS_ BLOCK @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9IBDF4_NS_LM_M) + G9IBD44_NS_PDU_DATA_OFFSET_C), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9IBD40_NS_LM_PDU_C; TX_EVD_PTR->.EVENT_DESTINATION:= GBDL_HANDLE; IF /* 'OTHER' ALIVE NSVC TO THIS NSEI EXISTING? */ NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR /= NULL THEN /* USE THIS 'OTHER' FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(1):= NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR TRANSPORT */ ELSE /* USE AFFECTED NSVC AGAIN FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(1):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR TRANSPORT */ FI; /* POINTER TO PDU IN POOL-ELEMENT */ NS_PDU_PTR:= NS_PDU_REF_M (INT(TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT) + G9IBD44_NS_PDU_DATA_OFFSET_C); /* OFFSET OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_OFFSET:= G9IBD44_NS_PDU_DATA_OFFSET_C; /* LENGTH OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(NS_PDU_PTR->.G9IBDF4_PDU_TYPE) + SIZE(NS_PDU_PTR->.D2); /* NOW THE POOL-ELEMENT */ NS_PDU_PTR->.G9IBDF4_PDU_TYPE:= G9IBDR1_NS_BLOCK_C; /* PDU-TYPE */ NS_PDU_PTR->.D2.CAUSE_TLV.CAUSE_VAL:= G9IBBA2_NS_TRANSIT_NETWORK_FAILURE; /* CAUSE FOR BLOCK */ NS_PDU_PTR->.D2.NSVCI_TLV.NSVCI_VAL := NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVC TO BE BLOCKED */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@TEXT GSM 8.16 CHAP. 7.2: THE NS-BLOCK-PDU MAY BE SENT IN ANY ALIVE (BLOCKED OR UNBLOCKED) NS-VC... @K@FREEZE 938803215 @K@NAME M_DE_SBVCN @K@INSCRIPT G9IBME1_ DEACT_ SIGN_BVC_C @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB512_GET_MSG_LESS_EV_DESCR_P ( SID_GBNSVC, TX_EVD_PTR ); /* COMPOSING THE EVENT */ TX_EVD_PTR->.EVENT_CMD:= G9IBME1_DEACT_SIGN_BVC_C; TX_EVD_PTR->.EVENT_DESTINATION:= GBBVC_HANDLE; TX_EVD_PTR->.KEYS.INT_ARR(0):= EVD_PTR->.KEYS.INT_ARR(0); TX_EVD_PTR->.KEYS.INT_ARR(1):= SIGN_BVCI; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 938788201 @K@NAME M_OAME401M @K@INSCRIPT ERROR_MESSAGE: ERRONOUS_PDU RESET_PDU @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSE */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSE; OAM_MSG_PTR->.HANDLED_OBJECT.NSE_ID:= EVD_PTR->.KEYS.INT_ARR(0); /* USED NSEI (FROM ECI) */ /* ERROR-CAUSE = ERRONEOUS_PDU */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; /* ADDITIONAL_PDU_INFO */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= G9OC124_RESET_PDU; OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= EVD_PTR->.ADD_DATA(0); /* AFFECTED NSEI (FROM PDU) */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= EVD_PTR->.ADD_DATA(1); /* AFFECTED NSVCI (FROM PDU) */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 935766108 @K@NAME M_OAME402M @K@INSCRIPT ERROR_MESSAGE: ERRONOUS_PDU RESET_PDU @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= EVD_PTR->.KEYS.INT_ARR(1); /* USED NSVCI (FROM ECI) */ /* ERROR-CAUSE = ERRONEOUS_PDU */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; /* ADDITIONAL_PDU_INFO */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= G9OC124_RESET_PDU; OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= EVD_PTR->.ADD_DATA(0); /* NSEI FROM PDU */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= EVD_PTR->.ADD_DATA(1); /* NSVCI FROM PDU */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 935766407 @K@NAME M_OAME411M @K@INSCRIPT ERROR_MESSAGE: ERRONOUS_PDU RESET_ACK_PDU @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSE */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSE; OAM_MSG_PTR->.HANDLED_OBJECT.NSE_ID:= EVD_PTR->.KEYS.INT_ARR(0); /* USED NSEI (FROM ECI) */ /* ERROR-CAUSE = ERRONEOUS_PDU */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; /* ADDITIONAL_PDU_INFO */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= G9OC124_RESET_ACK_PDU; OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= EVD_PTR->.ADD_DATA(0); /* NSEI FROM PDU */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= EVD_PTR->.ADD_DATA(1); /* NSVCI FROM PDU */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 935767332 @K@NAME M_OAME412M @K@INSCRIPT ERROR_MESSAGE: ERRONOUS_PDU RESET_ACK_PDU @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= EVD_PTR->.KEYS.INT_ARR(1); /* USED NSVCI (FROM ECI) */ /* ERROR-CAUSE = ERRONEOUS_PDU */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; /* ADDITIONAL_PDU_INFO */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= G9OC124_RESET_ACK_PDU; OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= EVD_PTR->.ADD_DATA(0); /* NSEI FROM PDU */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= EVD_PTR->.ADD_DATA(1); /* NSVCI FROM PDU */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 935767189 @K@NAME C_CON @K@INSCRIPT RC_DB @K@CODE RC_DB @K@FREEZE 922176673 @K@NAME M_BLK____M @K@INSCRIPT NS_ BLOCK @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9IBDF4_NS_LM_M) + G9IBD44_NS_PDU_DATA_OFFSET_C), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9IBD40_NS_LM_PDU_C; TX_EVD_PTR->.EVENT_DESTINATION:= GBDL_HANDLE; TX_EVD_PTR->.KEYS.INT_ARR(0):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR TRANSPORT */ TX_EVD_PTR->.KEYS.INT_ARR(1):= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR TRANSPORT */ /* POINTER TO PDU IN POOL-ELEMENT */ NS_PDU_PTR:= NS_PDU_REF_M (INT(TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT) + G9IBD44_NS_PDU_DATA_OFFSET_C); /* OFFSET OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_OFFSET:= G9IBD44_NS_PDU_DATA_OFFSET_C; /* LENGTH OF THE PDU IN POOL-ELEMENT */ TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(NS_PDU_PTR->.G9IBDF4_PDU_TYPE) + SIZE(NS_PDU_PTR->.D2); /* NOW THE POOL-ELEMENT */ NS_PDU_PTR->.G9IBDF4_PDU_TYPE:= G9IBDR1_NS_BLOCK_C; /* PDU-TYPE */ NS_PDU_PTR->.D2.CAUSE_TLV.CAUSE_VAL:= G9IBBA2_NS_OAM_INTERVENTION; /* CAUSE FOR BLOCK */ NS_PDU_PTR->.D2.NSVCI_TLV.NSVCI_VAL := NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVC TO BE BLOCKED */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@TEXT GSM 8.16 CHAP. 7.2: THE NS-BLOCK-PDU MAY BE SENT IN ANY ALIVE (BLOCKED OR UNBLOCKED) NS-VC... @K@FREEZE 926348613 @K@NAME S_BLOCKED @K@INSCRIPT G9IBSM0_ BLOCKED @K@CODE @K@FREEZE 922176496 @K@NAME D_CON @K@INSCRIPT CONTEXT GOT @K@CODE RC_DB = G9IBSR0_RC_OK @K@FREEZE 921772339 @K@NAME M_OAME901M @K@INSCRIPT ERROR_MESSAGE: OPERATIONAL_STATE_CHANGE UBL->BLK @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = OPERATIONAL_STATE_CHANGE */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_OPERATIONAL_STATE_CHANGE; /* ADDITIONAL_OPERATIONAL_STATE_INFO */ OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_OLD:= G9OC101_UNBLOCKED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_OLD:= G9OC102_ENABLED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_NEW:= G9OC102_ENABLED; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 925970975 @K@NAME M_OAME902M @K@INSCRIPT ERROR_MESSAGE: OPERATIONAL_STATE_CHANGE UBL->BLK @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = OPERATIONAL_STATE_CHANGE */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_OPERATIONAL_STATE_CHANGE; /* ADDITIONAL_OPERATIONAL_STATE_INFO */ OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_OLD:= G9OC101_UNBLOCKED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_OLD:= G9OC102_ENABLED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_NEW:= G9OC102_DISABLED; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 925970987 @K@NAME M_OAME10SM @K@INSCRIPT ERROR_MESSAGE: ALARM_BEGIN_NS_ALIVE_TEST @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = ALARM_BEGIN_NS_ALIVE_TEST*/ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_BEGIN_NS_ALIVE_TEST; /* ADDITIONAL_ALARM_INFO */ OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= TRUE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= TRUE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@NAME M_OAME911M @K@INSCRIPT ERROR_MESSAGE: OPERATIONAL_STATE_CHANGE BLK->UBL @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = OPERATIONAL_STATE_CHANGE */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_OPERATIONAL_STATE_CHANGE; /* ADDITIONAL_OPERATIONAL_STATE_INFO */ OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_OLD:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_NEW:= G9OC101_UNBLOCKED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_OLD:= G9OC102_ENABLED; OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_NEW:= G9OC102_ENABLED; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 925970996 @K@NAME M_OAME20SM @K@INSCRIPT ERROR_MESSAGE: ALARM_END_NS_ALIVE_TEST @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = ALARM_END_NS_ALIVE_TEST */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_END_NS_ALIVE_TEST; /* ADDITIONAL_ALARM_INFO */ OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= TRUE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= TRUE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@NAME M_OAME10_M @K@INSCRIPT ERROR_MESSAGE: ALARM_BEGIN_NS_ALIVE_TEST @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = ALARM_BEGIN_NS_ALIVE_TEST*/ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_BEGIN_NS_ALIVE_TEST; /* ADDITIONAL_ALARM_INFO */ OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= TRUE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= TRUE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922443813 @K@NAME D_SEM @K@INSCRIPT CALL_SEM = TRUE @K@CODE CALL_SEM = TRUE @K@FREEZE 922176624 @K@NAME D_N_0 @K@INSCRIPT N = 0 @K@CODE NSVCI_CON_PTR->.N = 0 @K@FREEZE 921511000 @K@NAME M_OAME12_M @K@INSCRIPT ERROR_MESSAGE: ALARM_BEGIN_NS_ALIVE_TEST @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = ALARM_BEGIN_NS_ALIVE_TEST*/ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_BEGIN_NS_ALIVE_TEST; /* ADDITIONAL_ALARM_INFO */ OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= FALSE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= G9OC103_ALIVE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= TRUE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922443829 @K@NAME M_OAME21_M @K@INSCRIPT ERROR_MESSAGE: ALARM_END_NS_ALIVE_TEST @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = ALARM_END_NS_ALIVE_TEST */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_END_NS_ALIVE_TEST; /* ADDITIONAL_ALARM_INFO */ OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= TRUE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= FALSE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922443856 @K@NAME M_OAME13_M @K@INSCRIPT ERROR_MESSAGE: ALARM_BEGIN_NS_ALIVE_TEST @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = ALARM_BEGIN_NS_ALIVE_TEST*/ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_BEGIN_NS_ALIVE_TEST; /* ADDITIONAL_ALARM_INFO */ OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= FALSE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= G9OC101_UNBLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= G9OC103_ALIVE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= TRUE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922443838 @K@NAME M_OAME22_M @K@INSCRIPT ERROR_MESSAGE: ALARM_END_NS_ALIVE_TEST @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = ALARM_END_NS_ALIVE_TEST */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_END_NS_ALIVE_TEST; /* ADDITIONAL_ALARM_INFO */ OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= FALSE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= G9OC101_BLOCKED; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= G9OC103_DEAD; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= G9OC103_ALIVE; OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= TRUE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922443864 @K@NAME M_OAME30_M @K@INSCRIPT ERROR_MESSAGE: NO_ANSWER_FORM_BSS RESET_PROCEDURE @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = NO_ANSWER_FROM_BSS */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_NO_ANSWER_FROM_BSS; /* INITIATED_PROCEDURE */ OAM_MSG_PTR->.INITIATED_PROCEDURE:= G9OC123_RESET_PROCEDURE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922175973 @K@NAME M_OAME31_M @K@INSCRIPT ERROR_MESSAGE: NO_ANSWER_FROM_BSS BLOCK_PROCEDURE @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = NO_ANSWER_FROM_BSS */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_NO_ANSWER_FROM_BSS; /* INITIATED_PROCEDURE */ OAM_MSG_PTR->.INITIATED_PROCEDURE:= G9OC123_BLOCK_PROCEDURE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922175976 @K@NAME M_OAME32_M @K@INSCRIPT ERROR_MESSAGE: NO_ANSWER_FROM_BSS UNBLOCK_PROCEDURE @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR_CAUSE = NO_ANSWER_FROM_BSS */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_NO_ANSWER_FROM_BSS; /* INITIATED_PROCEDURE */ OAM_MSG_PTR->.INITIATED_PROCEDURE:= G9OC123_UNBLOCK_PROCEDURE; /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 922175980 @K@NAME M_OAME42_M @K@INSCRIPT ERROR_MESSAGE: ERRONOUS_PDU BLOCK_PDU @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= EVD_PTR->.ADD_DATA(1); /* USED NSVCI (FROM ECI) */ /* ERROR-CAUSE = ERRONEOUS_PDU */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; /* ADDITIONAL_PDU_INFO */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= G9OC124_BLOCK_PDU; OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= EVD_PTR->.KEYS.INT_ARR(0); /* AFFECTED NSEI (FROM PDU) */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= EVD_PTR->.KEYS.INT_ARR(1); /* AFFECTED NSVCI (FROM PDU) */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 934296141 @K@NAME M_OAME50_M @K@INSCRIPT ERROR_MESSAGE: STATUS_PDU_CONTAINS_ERROR_INFO RECEIVED @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* ERROR-CAUSE = STATUS_PDU_CONTAINS_ERROR_INFO */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_STATUS_PDU_CONTAINS_ERROR_INFO; /* ADDITIONAL_STATUS_PDU_INFO */ INT_CAUSE_PTR.INT_PTR:= ADDR(EVD_PTR->.ADD_DATA(2)); OAM_MSG_PTR->.ADDITIONAL_STATUS_PDU_INFO:= INT_CAUSE_PTR.CAUSE_PTR->; /* CAUSE */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@TEXT NICHT OK @K@FREEZE 934298924 @K@NAME M_OAME43_M @K@INSCRIPT ERROR_MESSAGE: ERRONOUS_PDU BLOCK_ACK_PDU @K@CODE /* GETTING THE EVENT DESCRIPTOR */ G9PB511_GET_MSG_BOUND_EV_DESCR_P ( SID_GBNSVC, (SIZE(G9OC109_REPORTED_EVENT_STR_M)), TX_EVD_PTR ); /* COMPOSING THE EVENT */ /* FIRST THE DESCRIPTOR */ TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); /* NOW THE POOL-ELEMENT */ /* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); /* COMPOSING THE MESSAGE */ /* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= EVD_PTR->.ADD_DATA(1); /* USED NSVCI (FROM ECI) */ /* ERROR-CAUSE = ERRONEOUS_PDU */ OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; /* ADDITIONAL_PDU_INFO */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= G9OC124_BLOCK_ACK_PDU; OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= EVD_PTR->.KEYS.INT_ARR(0); /* AFFECTED NSEI (FROM PDU) */ OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= EVD_PTR->.KEYS.INT_ARR(1); /* AFFECTED NSVCI (FROM PDU) */ /* SENDING */ G9PX503_POST_EVENT_P(TX_EVD_PTR); @K@FREEZE 934297710 gawk-4.0.1+dfsg.orig/test/fstabplus.ok0000644000175000017500000000000411463242060016652 0ustar schotschot1 2 gawk-4.0.1+dfsg.orig/test/octsub.ok0000644000175000017500000000000511463242060016147 0ustar schotschot//1/ gawk-4.0.1+dfsg.orig/test/ofmtfidl.awk0000644000175000017500000000641311463242060016636 0ustar schotschot# From djones@zoonami.com Wed Jun 13 17:46:27 2001 # Received: from mail.actcom.co.il [192.114.47.13] # by localhost with POP3 (fetchmail-5.5.0) # for arnold@localhost (single-drop); Wed, 13 Jun 2001 17:46:27 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Wed Jun 13 17:47:09 2001) # X-From_: djones@zoonami.com Wed Jun 13 17:45:40 2001 # Received: from lmail.actcom.co.il by actcom.co.il with ESMTP # (8.9.1a/actcom-0.2) id RAA07057 for ; # Wed, 13 Jun 2001 17:45:34 +0300 (EET DST) # (rfc931-sender: mail.actcom.co.il [192.114.47.13]) # Received: from billohost.com (www.billohost.com [209.196.35.10]) # by lmail.actcom.co.il (8.11.2/8.11.2) with ESMTP id f5DEjSO24028 # for ; Wed, 13 Jun 2001 17:45:33 +0300 # Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) # by billohost.com (8.9.3/8.9.3) with ESMTP id KAA24625 # for ; Wed, 13 Jun 2001 10:44:43 -0400 # Received: from topcat.zoonami.com ([193.112.141.198]) # by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian)) # id 15ABtZ-0000FQ-00 # for ; Wed, 13 Jun 2001 10:45:21 -0400 # Received: from topcat.zoonami.com (localhost [127.0.0.1]) # by topcat.zoonami.com (8.9.3/8.9.3) with ESMTP id OAA28329; # Wed, 13 Jun 2001 14:45:54 GMT # (envelope-from djones@topcat.zoonami.com) # Message-Id: <200106131445.OAA28329@topcat.zoonami.com> # To: bug-gawk@gnu.org # cc: David Jones # Subject: 3.1.0 core dumps. Fiddling with OFMT? # Date: Wed, 13 Jun 2001 14:45:54 +0000 # From: David Jones # Status: R # # The following program causes gawk to dump core: # # jot 10|./gawk '{OFMT="%."NR"f";print NR}' # # 'jot 10', if you didn't know, produces the numbers 1 to 10 each on its # own line (ie it's like awk 'BEGIN{for(i=1;i<=10;++i)print i}') # # Here's an example run: # # -- run being # 1 # 2 # 3 # 4 # gawk: cmd. line:1: (FILENAME=- FNR=5) fatal error: internal error # Abort trap - core dumped # -- run end # # Ah. print NR appears to be not interesting. The following program also # has the same problem: # # jot 10|./gawk '{OFMT="%."NR"f"}' # # Cheers, # djones # (version info follows) # # I'm running on FreeBSD 4.1, here's the output of uname -a # # FreeBSD topcat.zoonami.com 4.1-RELEASE FreeBSD 4.1-RELEASE #0: Fri Jul 28 14:30:31 GMT 2000 jkh@ref4.freebsd.org:/usr/src/sys/compile/GENERIC i386 # # And ./gnu --version # # GNU Awk 3.1.0 # Copyright (C) 1989, 1991-2001 Free Software Foundation. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # { OFMT="%."NR"f"; print NR } gawk-4.0.1+dfsg.orig/test/math.ok0000644000175000017500000000020011463242060015576 0ustar schotschotcos(0.785398) = 0.707107 sin(0.785398) = 0.707107 e = 2.718282 log(e) = 1.000000 sqrt(pi ^ 2) = 3.141593 atan2(1, 1) = 0.785398 gawk-4.0.1+dfsg.orig/test/parsefld.awk0000644000175000017500000000006311463242060016625 0ustar schotschot{ print $/= b/ c /= d/ } { print /a/ + /b/ + !/c/} gawk-4.0.1+dfsg.orig/test/nfneg.ok0000644000175000017500000000010011463242060015741 0ustar schotschotgawk: nfneg.awk:1: fatal: NF set to negative value EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/splitargv.ok0000644000175000017500000000022011463242060016662 0ustar schotschotBEGIN { for (idx = 1; idx < ARGC; idx++) split(ARGV[idx], temp, "."); } { print $0; } gawk-4.0.1+dfsg.orig/test/getline.ok0000644000175000017500000000004511463242060016303 0ustar schotschot1s A 2 B -1 C 1s A 2 B -1 C 1 D date gawk-4.0.1+dfsg.orig/test/arysubnm.awk0000644000175000017500000000005611463242060016667 0ustar schotschotBEGIN { n = 11 ; foo[n] = n; print (2 <= n) } gawk-4.0.1+dfsg.orig/test/aryprm3.ok0000644000175000017500000000014111463242060016246 0ustar schotschotgawk: aryprm3.awk:4: fatal: attempt to use array `a (from arr)' in a scalar context EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/rebuf.ok0000644000175000017500000003322311463242060015763 0ustar schotschot1 0 2 214.59 3 230.31 4 242.64 5 253.94 6 264.33 7 270.94 8 273.52 9 270.08 10 263.19 11 254.45 12 244.91 13 234.55 14 222.49 15 209.94 16 197.17 17 182.89 18 169.76 19 158.59 20 145.37 21 135.46 22 124.77 23 115.98 24 108.77 25 101.12 26 94.45 27 89.08 28 84.63 29 81.05 30 78.93 31 76.65 32 75.59 33 75.59 34 75.59 35 77.47 36 80.17 37 83.90 38 88.56 39 95.69 40 97.48 41 97.48 42 97.48 43 97.48 44 97.48 45 97.48 46 97.48 47 97.48 48 203.08 49 218.22 50 229.37 51 238.49 52 247.43 53 255.22 54 261.31 55 262.36 56 260.66 57 256.33 58 249.34 59 240.03 60 228.55 61 215.42 62 203.37 63 190.01 64 177.81 65 165.44 66 152.92 67 142.03 68 132.91 69 124.48 70 116.45 71 109.06 72 103.27 73 98.87 74 94.95 75 92.56 76 90.47 77 89.48 78 89.48 79 90.53 80 93.07 81 97.12 82 101.82 83 108.18 84 109.73 85 109.73 86 109.73 87 109.73 88 109.73 89 109.73 90 109.73 91 202.97 92 217.38 93 231.73 94 243.11 95 255.37 96 264.12 97 269.64 98 270.98 99 269.65 100 264.55 101 257.16 102 246.01 103 232.88 104 219.85 105 208.79 106 197.00 107 183.93 108 172.00 109 160.55 110 150.59 111 141.47 112 133.02 113 126.21 114 120.64 115 115.79 116 111.62 117 108.41 118 106.41 119 106.41 120 106.41 121 109.08 122 113.23 123 118.57 124 122.57 125 122.57 126 122.57 127 122.57 128 122.57 129 122.57 130 122.57 131 208.07 132 224.14 133 236.28 134 248.12 135 258.97 136 267.74 137 272.47 138 271.52 139 266.80 140 258.61 141 249.30 142 239.19 143 228.28 144 215.79 145 203.86 146 190.08 147 177.40 148 163.81 149 152.60 150 141.33 151 130.98 152 121.98 153 114.08 154 106.61 155 99.75 156 93.10 157 86.57 158 80.62 159 76.05 160 71.52 161 68.85 162 67.46 163 66.86 164 67.51 165 69.75 166 72.85 167 76.23 168 82.85 169 89.33 170 93.39 171 93.39 172 93.39 173 93.39 174 93.39 175 93.39 176 93.39 177 93.39 178 188.37 179 204.42 180 217.16 181 228.89 182 238.83 183 247.70 184 253.59 185 257.17 186 257.17 187 254.00 188 248.24 189 240.14 190 229.42 191 218.97 192 205.09 193 192.61 194 179.74 195 166.76 196 155.36 197 143.58 198 131.40 199 121.84 200 112.46 201 105.41 202 97.15 203 90.09 204 84.79 205 80.52 206 75.58 207 72.59 208 69.39 209 67.51 210 66.42 211 66.42 212 66.42 213 67.82 214 69.76 215 73.19 216 77.35 217 82.36 218 87.82 219 93.30 220 93.30 221 93.30 222 93.30 223 93.30 224 93.30 225 93.30 226 93.30 227 190.58 228 203.43 229 216.48 230 228.89 231 241.91 232 251.60 233 257.78 234 262.18 235 263.13 236 260.91 237 255.34 238 247.17 239 236.85 240 225.24 241 213.39 242 201.46 243 187.77 244 175.31 245 162.95 246 152.55 247 142.56 248 132.94 249 125.00 250 117.69 251 110.96 252 105.02 253 101.78 254 98.48 255 97.06 256 96.50 257 96.50 258 98.48 259 101.18 260 104.56 261 109.67 262 115.86 263 115.86 264 115.86 265 115.86 266 115.86 267 115.86 268 115.86 269 200.02 270 217.51 271 233.21 272 245.72 273 258.21 274 267.24 275 273.79 276 273.20 277 270.38 278 260.76 279 250.05 280 241.32 281 231.14 282 219.83 283 206.13 284 193.24 285 180.73 286 167.82 287 156.94 288 144.13 289 134.40 290 125.23 291 116.13 292 107.34 293 99.71 294 94.11 295 88.91 296 84.51 297 81.50 298 78.66 299 76.57 300 75.82 301 75.82 302 76.88 303 79.03 304 82.12 305 85.73 306 91.05 307 96.31 308 96.31 309 96.31 310 96.31 311 96.31 312 96.31 313 96.31 314 96.31 315 184.18 316 201.10 317 214.21 318 226.18 319 237.72 320 247.57 321 254.36 322 258.34 323 259.80 324 257.76 325 253.17 326 246.51 327 237.92 328 227.09 329 214.13 330 202.20 331 189.21 332 177.65 333 166.18 334 154.03 335 142.21 336 131.51 337 121.28 338 111.80 339 104.47 340 98.80 341 94.76 342 91.81 343 89.17 344 88.00 345 88.00 346 88.00 347 89.20 348 91.17 349 94.35 350 99.00 351 105.43 352 109.34 353 109.34 354 109.34 355 109.34 356 109.34 357 109.34 358 109.34 359 194.84 360 212.05 361 226.30 362 239.03 363 250.94 364 259.73 365 266.64 366 269.67 367 269.03 368 265.03 369 258.23 370 249.32 371 238.03 372 226.20 373 213.46 374 200.53 375 187.65 376 174.89 377 163.22 378 152.47 379 142.65 380 133.97 381 126.59 382 120.52 383 115.57 384 111.49 385 108.03 386 106.01 387 105.28 388 105.28 389 106.91 390 109.73 391 114.91 392 120.66 393 123.74 394 123.74 395 123.74 396 123.74 397 123.74 398 123.74 399 123.74 400 211.57 401 227.06 402 240.57 403 252.26 404 262.67 405 270.66 406 273.40 407 270.25 408 263.76 409 256.03 410 246.87 411 237.10 412 225.11 413 211.53 414 197.77 415 185.75 416 173.00 417 159.31 418 147.18 419 134.84 420 125.07 421 115.82 422 107.33 423 100.07 424 93.55 425 87.60 426 81.75 427 77.03 428 73.39 429 70.97 430 67.94 431 66.64 432 65.80 433 65.80 434 66.85 435 68.78 436 71.47 437 74.20 438 78.68 439 85.08 440 87.47 441 87.47 442 87.47 443 87.47 444 87.47 445 87.47 446 87.47 447 87.47 448 185.81 449 201.66 450 215.07 451 227.26 452 238.00 453 247.64 454 255.03 455 257.12 456 256.17 457 253.47 458 248.93 459 241.39 460 231.45 461 220.49 462 208.48 463 196.04 464 182.73 465 169.40 466 157.24 467 145.56 468 133.54 469 124.01 470 114.55 471 105.75 472 98.32 473 91.91 474 86.08 475 81.35 476 77.78 477 73.85 478 71.12 479 68.53 480 67.09 481 66.34 482 66.34 483 66.34 484 67.92 485 70.08 486 73.78 487 78.68 488 84.33 489 90.25 490 90.25 491 90.25 492 90.25 493 90.25 494 90.25 495 90.25 496 90.25 497 183.19 498 198.96 499 213.55 500 225.91 501 237.33 502 246.66 503 254.98 504 259.46 505 261.02 506 260.02 507 255.96 508 249.08 509 240.15 510 229.51 511 217.21 512 205.06 513 192.62 514 177.43 515 165.06 516 152.36 517 142.35 518 134.58 519 126.20 520 119.86 521 113.67 522 108.20 523 104.71 524 100.83 525 98.96 526 98.38 527 98.38 528 100.29 529 103.47 530 107.73 531 113.04 532 118.90 533 118.90 534 118.90 535 118.90 536 118.90 537 118.90 538 118.90 539 200.70 540 217.77 541 232.45 542 244.28 543 256.61 544 265.93 545 272.01 546 272.01 547 268.67 548 260.53 549 252.09 550 243.72 551 232.68 552 220.49 553 206.88 554 193.98 555 181.33 556 168.61 557 156.50 558 145.54 559 136.43 560 125.95 561 117.26 562 109.81 563 103.36 564 97.15 565 92.86 566 89.02 567 86.39 568 84.44 569 83.72 570 83.72 571 85.89 572 88.39 573 92.31 574 96.00 575 100.24 576 102.55 577 102.55 578 102.55 579 102.55 580 102.55 581 102.55 582 102.55 583 102.55 584 197.15 585 212.33 586 225.48 587 236.75 588 247.52 589 255.21 590 260.74 591 262.81 592 262.09 593 258.08 594 250.83 595 242.39 596 230.86 597 219.62 598 206.80 599 193.41 600 180.60 601 168.20 602 157.77 603 145.25 604 136.23 605 126.28 606 118.10 607 110.74 608 105.29 609 99.75 610 95.61 611 92.16 612 89.93 613 88.45 614 88.45 615 89.11 616 90.87 617 94.21 618 98.16 619 104.24 620 108.98 621 108.98 622 108.98 623 108.98 624 108.98 625 108.98 626 108.98 627 195.81 628 211.95 629 226.36 630 240.61 631 251.93 632 259.13 633 265.36 634 269.71 635 270.27 636 266.44 637 260.44 638 251.94 639 240.79 640 228.95 641 215.90 642 203.25 643 190.01 644 177.92 645 165.60 646 155.49 647 144.32 648 136.07 649 127.64 650 120.28 651 114.57 652 109.99 653 106.36 654 104.49 655 103.84 656 103.84 657 105.77 658 107.83 659 112.41 660 117.71 661 120.66 662 120.66 663 120.66 664 120.66 665 120.66 666 120.66 667 120.66 668 210.13 669 225.03 670 238.76 671 250.50 672 261.18 673 269.22 674 274.18 675 272.28 676 266.66 677 258.68 678 249.88 679 239.94 680 227.14 681 213.22 682 197.58 683 184.86 684 172.52 685 160.19 686 149.20 687 137.49 688 127.86 689 118.91 690 110.49 691 102.73 692 96.33 693 90.95 694 86.38 695 82.72 696 79.65 697 77.61 698 75.70 699 74.49 700 74.49 701 74.49 702 76.48 703 79.14 704 82.84 705 87.86 706 92.69 707 92.69 708 92.69 709 92.69 710 92.69 711 92.69 712 92.69 713 92.69 714 181.33 715 196.86 716 210.98 717 223.13 718 233.90 719 243.19 720 250.57 721 255.00 722 256.36 723 255.16 724 250.15 725 242.80 726 233.82 727 223.41 728 210.81 729 199.04 730 187.39 731 174.14 732 162.62 733 151.39 734 139.59 735 128.71 736 119.17 737 111.02 738 103.91 739 96.78 740 91.56 741 87.13 742 83.22 743 80.50 744 76.83 745 74.24 746 70.80 747 69.04 748 67.12 749 66.51 750 66.51 751 68.77 752 72.19 753 77.34 754 84.04 755 88.55 756 88.55 757 88.55 758 88.55 759 88.55 760 88.55 761 88.55 762 88.55 763 190.51 764 207.14 765 220.57 766 232.51 767 243.35 768 252.41 769 258.62 770 262.18 771 262.18 772 259.10 773 253.54 774 245.44 775 235.55 776 223.43 777 209.91 778 197.52 779 185.90 780 172.13 781 161.09 782 150.58 783 140.37 784 130.27 785 122.13 786 114.99 787 108.76 788 104.67 789 100.36 790 97.61 791 95.48 792 94.83 793 95.45 794 97.15 795 100.73 796 105.10 797 111.46 798 118.27 799 118.27 800 118.27 801 118.27 802 118.27 803 118.27 804 118.27 805 202.92 806 220.25 807 233.35 808 243.48 809 254.85 810 265.75 811 272.62 812 272.62 813 269.36 814 261.82 815 252.85 816 244.08 817 232.96 818 219.59 819 207.32 820 193.87 821 181.77 822 168.60 823 155.76 824 144.03 825 134.07 826 123.46 827 114.47 828 107.64 829 100.46 830 94.53 831 89.28 832 84.59 833 80.96 834 78.54 835 76.28 836 75.51 837 75.51 838 76.55 839 78.55 840 81.57 841 85.18 842 90.61 843 96.01 844 96.01 845 96.01 846 96.01 847 96.01 848 96.01 849 96.01 850 96.01 851 184.51 852 201.57 853 216.33 854 228.69 855 239.90 856 250.41 857 257.91 858 262.29 859 263.41 860 261.70 861 256.75 862 246.82 863 236.35 864 225.17 865 212.90 866 201.61 867 188.42 868 175.92 869 163.70 870 153.18 871 142.89 872 132.95 873 125.18 874 117.61 875 110.36 876 104.56 877 100.13 878 96.64 879 93.52 880 91.91 881 91.91 882 91.91 883 93.84 884 97.13 885 101.08 886 107.19 887 111.89 888 111.89 889 111.89 890 111.89 891 111.89 892 111.89 893 111.89 894 195.89 895 212.65 896 226.60 897 239.28 898 251.28 899 259.92 900 266.03 901 269.76 902 269.76 903 265.55 904 258.92 905 250.42 906 240.04 907 229.03 908 216.69 909 204.21 910 191.25 911 178.40 912 168.31 913 157.47 914 148.62 915 139.12 916 129.54 917 121.65 918 114.59 919 109.30 920 106.39 921 104.71 922 104.71 923 106.41 924 109.22 925 113.62 926 118.31 927 124.34 928 124.34 929 124.34 930 124.34 931 124.34 932 124.34 933 124.34 934 205.67 935 221.25 936 235.02 937 247.47 938 258.37 939 267.42 940 272.60 941 272.00 942 267.91 943 260.38 944 251.10 945 241.32 946 230.96 947 217.34 948 204.99 949 191.24 950 178.58 951 164.79 952 153.07 953 141.06 954 129.86 955 119.79 956 111.13 957 103.53 958 96.95 959 89.42 960 85.22 961 80.54 962 76.85 963 74.41 964 72.12 965 71.21 966 71.21 967 71.21 968 72.13 969 74.22 970 76.95 971 80.65 972 85.36 973 90.60 974 92.36 975 92.36 976 92.36 977 92.36 978 92.36 979 92.36 980 92.36 981 92.36 982 191.27 983 205.03 984 218.89 985 230.87 986 241.63 987 249.83 988 255.42 989 257.98 990 257.33 991 252.87 992 245.90 993 237.78 994 227.14 995 214.67 996 202.31 997 188.68 998 175.96 999 163.25 1000 151.43 1001 139.79 1002 130.40 1003 118.92 1004 110.88 1005 101.92 1006 94.45 1007 88.13 1008 83.19 1009 79.11 1010 74.60 1011 71.86 1012 68.77 1013 66.57 1014 65.24 1015 64.41 1016 64.41 1017 64.92 1018 66.62 1019 68.93 1020 72.77 1021 77.76 1022 83.41 1023 89.19 1024 89.19 1025 89.19 1026 89.19 1027 89.19 1028 89.19 1029 89.19 1030 89.19 1031 182.68 1032 199.88 1033 214.62 1034 227.29 1035 238.62 1036 249.01 1037 256.68 1038 262.71 1039 263.44 1040 259.87 1041 254.66 1042 248.11 1043 240.01 1044 229.30 1045 216.52 1046 205.15 1047 192.49 1048 179.70 1049 167.51 1050 156.31 1051 145.97 1052 135.93 1053 128.06 1054 119.45 1055 113.01 1056 108.31 1057 103.79 1058 100.92 1059 98.90 1060 98.28 1061 98.28 1062 100.12 1063 102.38 1064 106.07 1065 111.06 1066 117.00 1067 117.00 1068 117.00 1069 117.00 1070 117.00 1071 117.00 1072 117.00 1073 202.42 1074 217.46 1075 232.83 1076 245.05 1077 256.39 1078 265.28 1079 271.80 1080 271.80 1081 268.63 1082 261.21 1083 253.57 1084 244.41 1085 233.79 1086 220.80 1087 209.24 1088 196.54 1089 183.38 1090 170.14 1091 157.79 1092 144.31 1093 131.53 1094 122.20 1095 113.46 1096 106.57 1097 100.93 1098 96.80 1099 92.10 1100 88.77 1101 86.07 1102 83.75 1103 82.40 1104 82.40 1105 82.40 1106 82.40 1107 82.40 1108 84.82 1109 88.34 1110 92.06 1111 98.22 1112 103.08 1113 103.08 1114 103.08 1115 103.08 1116 103.08 1117 103.08 1118 196.25 1119 210.62 1120 223.53 1121 235.01 1122 245.30 1123 253.56 1124 259.86 1125 261.87 1126 261.87 1127 257.71 1128 251.10 1129 242.25 1130 232.00 1131 219.62 1132 207.54 1133 194.54 1134 182.85 1135 170.49 1136 158.24 1137 147.54 1138 137.40 1139 129.81 1140 121.07 1141 114.39 1142 109.32 1143 103.67 1144 99.51 1145 96.53 1146 94.67 1147 93.79 1148 93.79 1149 95.31 1150 98.43 1151 102.95 1152 109.01 1153 115.86 1154 115.86 1155 115.86 1156 115.86 1157 115.86 1158 115.86 1159 115.86 1160 115.86 1161 209.63 1162 224.03 1163 236.93 1164 249.17 1165 259.34 1166 267.41 1167 271.07 1168 270.51 1169 263.93 1170 255.80 1171 246.03 1172 235.96 1173 223.79 1174 209.68 1175 196.98 1176 184.70 1177 171.16 1178 157.06 1179 145.05 1180 133.80 1181 123.45 1182 114.06 1183 106.78 1184 98.12 1185 91.19 1186 84.78 1187 80.10 1188 74.95 1189 71.88 1190 68.51 1191 66.13 1192 64.64 1193 63.65 1194 63.06 1195 63.06 1196 64.29 1197 66.41 1198 68.95 1199 73.12 1200 78.00 1201 83.67 1202 85.55 1203 85.55 1204 85.55 1205 85.55 1206 85.55 1207 85.55 1208 85.55 1209 85.55 1210 187.86 1211 202.65 1212 216.23 1213 228.24 1214 239.81 1215 248.77 1216 252.97 1217 254.72 1218 254.72 1219 253.22 1220 247.80 1221 239.99 1222 229.87 1223 218.26 1224 205.99 1225 193.09 1226 180.59 1227 167.42 1228 154.33 1229 142.32 1230 131.88 1231 122.32 1232 112.84 1233 104.07 1234 96.62 1235 90.02 1236 84.43 1237 79.90 1238 74.59 1239 71.27 1240 67.37 1241 64.97 1242 62.82 1243 61.60 1244 61.60 1245 61.60 1246 62.99 1247 64.80 1248 68.51 1249 72.70 1250 77.97 1251 84.10 1252 88.07 1253 88.07 1254 88.07 1255 88.07 1256 88.07 1257 88.07 1258 88.07 1259 88.07 1260 184.25 1261 199.56 1262 212.97 1263 226.37 1264 237.23 1265 247.66 1266 254.97 1267 259.77 1268 261.89 1269 260.39 1270 255.67 1271 248.49 1272 238.75 1273 228.34 1274 215.95 1275 201.71 1276 187.12 1277 174.33 1278 162.05 1279 151.79 1280 142.67 1281 134.03 1282 126.03 1283 118.64 1284 112.00 1285 107.16 1286 103.71 1287 100.06 1288 98.59 1289 97.68 1290 97.68 gawk-4.0.1+dfsg.orig/test/indirectcall.in0000644000175000017500000000027211463242060017310 0ustar schotschotBiology_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 gawk-4.0.1+dfsg.orig/test/getnr2tm.awk0000644000175000017500000000756511463242060016605 0ustar schotschot#From dhw@gamgee.acad.emich.edu Sat Oct 31 22:54:07 1998 #Return-Path: #Received: from cssun.mathcs.emory.edu (cssun.mathcs.emory.edu [170.140.150.1]) # by amx.netvision.net.il (8.9.0.Beta5/8.8.6) with ESMTP id HAA08891 # for ; Sat, 31 Oct 1998 07:14:07 +0200 (IST) #Received: from mescaline.gnu.org (we-refuse-to-spy-on-our-users@mescaline.gnu.org [158.121.106.21]) by cssun.mathcs.emory.edu (8.7.5/8.6.9-940818.01cssun) with ESMTP id AAA14947 for ; Sat, 31 Oct 1998 00:14:32 -0500 (EST) #Received: from gamgee.acad.emich.edu (gamgee.acad.emich.edu [164.76.102.76]) # by mescaline.gnu.org (8.9.1a/8.9.1) with SMTP id AAA20645 # for ; Sat, 31 Oct 1998 00:17:54 -0500 #Received: by gamgee.acad.emich.edu (Smail3.1.29.1 #57) # id m0zZUKY-000IDSC; Sat, 31 Oct 98 00:16 CST #Message-Id: #Date: Sat, 31 Oct 98 00:16 CST #From: dhw@gamgee.acad.emich.edu (David H. West) #To: bug-gnu-utils@gnu.org #Subject: gawk 3.0.3 bug report #Cc: arnold@gnu.org #X-UIDL: 7474b825cff989adf38f13883d84fdd7 #Status: RO # #gawk version: 3.03 #System used: Linux, kernel 2.0.28, libc 5.4.33, AMD K5PR133 (i586 clone) #Remark: There seems to be at least one bug shown by the demo below. # There may also be a Dark Corner involving the value of NR in an # END block, a topic on which the info file is silent. In gawk # 3.0.3, NR often seems to have the least-surprise value in an # END block, but sometimes it doesn't - see example below. #Problem descr: the log below shows a case where: # a) (this may be a red herring) the output of the gawk script # is different depending on whether its input file is named on # the command line or catted to stdin, without any use of the # legitimate means which could produce this effect. # b) NR is clearly getting clobbered; I have tried to simplify # the 19-line script "awkerr1" below, but seemingly unrelated # changes, like shortening constant strings which appear only in # print statements, or removing unexecuted or irrelevant code, # cause the clobbering to go away. Some previous (larger) # versions of this code would clobber NR also when reading from # stdin, but I thought you'd prefer a shorter example :-). #Reproduce-By: using the gawk script "awkerr1", the contents of # which appear in the transcript below as the output of the # command "cat awkerr1". Comments following # were added # to the transcript later as explanation. #---------------------------------------------- Script started on Fri #Oct 30 20:04:16 1998 chipmunk:/ram0# ls -l a1 awkerr1 -rw-r--r-- 1 #root root 2 Oct 30 18:42 a1 -rwxr-xr-x 1 root root #389 Oct 30 19:54 awkerr1 chipmunk:/ram0# cat a1 #a1 contains #one printable char and a newline a chipmunk:/ram0# od -c xc a1 #0000000 0a61 # a \n #0000002 chipmunk:/ram0# cat a1 | awkerr1 #no surprises here #1 lines in 1 sec: 1 lines/sec; nlines=1 chipmunk:/ram0# awkerr1 a1 È #lines in 1 sec: 1 lines/sec; nlines=1 #?! first char is an uppercase #E-grave chipmunk:/ram0# awkerr1 a1 | od -N1 -xc 0000000 00c8 # 310 \0 #0000001 chipmunk:/ram0# cat awkerr1 #the apparent ^M's are not #actually in the file #!/usr/bin/awk -f function process(w) { if(w in ws) { printf " : found\n"; lc[p " " w]++; rc[w " " n]++; } } BEGIN {IGNORECASE=1; } /^/ {if(NR % 10 ==0)print "processing line " NR; process($1); nlines++; } END {p=w; w=n; n=""; if(w)process(w); t=1; print NR " lines in " t " sec: " NR+0 " lines/sec; nlines=" nlines; } #chipmunk:/ram0# exit Script done on Fri Oct 30 20:07:31 1998 #--------------------------------------------- # #-David West dhw@gamgee.acad.emich.edu # gawk-4.0.1+dfsg.orig/test/funsmnam.awk0000644000175000017500000000005711463242060016654 0ustar schotschotfunction foo( \ foo) { print foo } { foo() } gawk-4.0.1+dfsg.orig/test/concat1.ok0000644000175000017500000000006411463242060016205 0ustar schotschotInput = A ; Input = B ; Input = C ; Input = D ; gawk-4.0.1+dfsg.orig/test/clos1way.awk0000644000175000017500000000062511463242060016573 0ustar schotschotBEGIN { command = "LC_ALL=C sort" n = split("abcdefghijklmnopqrstuvwxyz", a, "") for (i = n; i > 0; i--) { # print "printing", a[i] > "/dev/stderr" print a[i] |& command } close(command, "to") # print "starting read loop" > "/dev/stderr" do { if (line) print "got", line # stopme(); } while ((command |& getline line) > 0) # print "doing final close" > "/dev/stderr" close(command) } gawk-4.0.1+dfsg.orig/test/addcomma.in0000644000175000017500000000005411463242060016416 0ustar schotschot0 -1 -12.34 12345 -1234567.89 -123. -123456 gawk-4.0.1+dfsg.orig/test/fnasgnm.ok0000644000175000017500000000016311734665352016324 0ustar schotschotgawk: fnasgnm.awk:14: (FILENAME=- FNR=1) fatal: can't use function name `ShowMe' as variable or array EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/fsfwfs.ok0000644000175000017500000000064011463242060016153 0ustar schotschot00000113000,00000000000,, 00000275000,00000000000,, 00000321334,00000000000,, 00000048709,00000010000,, 00000117000,00000100000,, 00000152000,00000138000,, 00000000000,00000150000,, 00000189425,00000000000,, 00000146128,00000000000,, 00000146128,00000000000,, 00000146128,00000000000,, 00000000000,00000050000,, 00000000000,00000050000,, 00000000000,00000000000,, 00000158014,00000000000,, 00000113656,00000000000,, gawk-4.0.1+dfsg.orig/test/rand.awk0000644000175000017500000000014211463242060015747 0ustar schotschotBEGIN { srand(2) for (i = 0; i < 19; i++) printf "%3d ", (1 + int(100 * rand())) print "" } gawk-4.0.1+dfsg.orig/test/gensub.awk0000644000175000017500000000041111463242060016305 0ustar schotschotBEGIN { a = "this is a test of gawk" b = gensub(/(this).*(test).*(gawk)/, "3 = <\\3>, 2 = <\\2>, 1 = <\\1>", 1, a) print b } NR == 1 { print gensub(/b/, "BB", 2) } NR == 2 { print gensub(/c/, "CC", "global") } END { print gensub(/foo/, "bar", 1, "DON'T PANIC") } gawk-4.0.1+dfsg.orig/test/nlfldsep.awk0000644000175000017500000000011511463242060016632 0ustar schotschotBEGIN { RS = "A" } {print NF; for (i = 1; i <= NF; i++) print $i ; print ""} gawk-4.0.1+dfsg.orig/test/paramtyp.ok0000644000175000017500000000011511463242060016507 0ustar schotschotbefore ReadPGM ReadPGM after ReadPGM before WritePGM WritePGM after WritePGM gawk-4.0.1+dfsg.orig/test/fpat1.in0000644000175000017500000000020011463242060015655 0ustar schotschotRobbins,Arnold,"1234 A Pretty Place, NE",Sometown,NY,12345-6789,USA Smith,,"1234 A Pretty Place, NE",Sometown,NY,12345-6789,USA gawk-4.0.1+dfsg.orig/test/rri1.in0000644000175000017500000000001411676156351015537 0ustar schotschotno match: è gawk-4.0.1+dfsg.orig/test/nested.in0000644000175000017500000000000411463242060016126 0ustar schotschota_b gawk-4.0.1+dfsg.orig/test/rtlen01.ok0000644000175000017500000000000611654051011016132 0ustar schotschot0 1 2 gawk-4.0.1+dfsg.orig/test/strcat1.ok0000644000175000017500000000000411463242060016230 0ustar schotschotacb gawk-4.0.1+dfsg.orig/test/next.ok0000644000175000017500000000043411544702510015635 0ustar schotschotgawk: 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 gawk-4.0.1+dfsg.orig/test/delarprm.awk0000644000175000017500000000405211463242060016635 0ustar schotschot# From dragon!unagi.cis.upenn.edu!sjanet Tue Mar 25 17:12:20 1997 # Return-Path: # Received: by skeeve.atl.ga.us (/\==/\ Smail3.1.22.1 #22.1) # id ; Tue, 25 Mar 97 17:12 EST # Received: by vecnet.com (DECUS UUCP /2.0/2.0/2.0/); # Tue, 25 Mar 97 16:58:36 EDT # Received: from gnu-life.ai.mit.edu by antaries.vec.net (MX V4.2 VAX) with SMTP; # Tue, 25 Mar 1997 16:58:26 EST # Received: from linc.cis.upenn.edu by gnu-life.ai.mit.edu (8.8.5/8.6.12GNU) with # ESMTP id QAA24350 for ; Tue, 25 Mar # 1997 16:56:59 -0500 (EST) # Received: from unagi.cis.upenn.edu (UNAGI.CIS.UPENN.EDU [158.130.8.153]) by # linc.cis.upenn.edu (8.8.5/8.8.5) with ESMTP id QAA09424; Tue, 25 Mar # 1997 16:56:54 -0500 (EST) # Received: (from sjanet@localhost) by unagi.cis.upenn.edu (8.8.5/8.8.5) id # QAA03969; Tue, 25 Mar 1997 16:56:50 -0500 (EST) # Date: Tue, 25 Mar 1997 16:56:50 -0500 (EST) # From: Stan Janet # Message-ID: <199703252156.QAA03969@unagi.cis.upenn.edu> # To: bug-gnu-utils@prep.ai.mit.edu # CC: arnold@gnu.ai.mit.edu # Subject: GNU awk 3.0.2 bug: fatal error deleting local array inside function # Status: ORf # # Version: GNU Awk 3.0.2 # Platforms: SunOS 4.1.1 (compiled with Sun cc) # IRIX 5.3 (compiled with SGI cc) # Problem: Deleting local array inside function causes fatal internal error (and # core dump. The error does not occur when the variable "x", unused in # the example, is removed or when the function is declared foo(x,p). # When the function is declared foo(p,x), adding a dummy line that uses # "x", e.g. "x=1" does not prevent the error. If "p" is not deleted, # there is no error. If "p[1]" is used to delete the lone element, there # is no error. # # ==== The program x.gawk ==== function foo(p,x) { p[1]="bar" delete p return 0 } BEGIN { foo() } # ==== The output for "gawk -f x.gawk" (SunOS) ==== # # gawk: x.gawk:4: fatal error: internal error gawk-4.0.1+dfsg.orig/test/match2.ok0000644000175000017500000000011611734665352016047 0ustar schotschotgawk: match2.awk:3: fatal: match: third argument is not an array EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/match3.ok0000644000175000017500000000001411463242060016027 0ustar schotschotOK OK OK OK gawk-4.0.1+dfsg.orig/test/rtlen01.sh0000755000175000017500000000041111654051011016136 0ustar schotschot#! /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)}' gawk-4.0.1+dfsg.orig/test/rs.ok0000644000175000017500000000001311463242060015273 0ustar schotschota b c d e gawk-4.0.1+dfsg.orig/test/subi18n.ok0000644000175000017500000000004011463242060016140 0ustar schotschot"directory" version="1.0" "1.0" gawk-4.0.1+dfsg.orig/test/printfbad2.awk0000644000175000017500000000005011463242060017054 0ustar schotschotBEGIN { FS = "a" } { printf ($2 "\n") } gawk-4.0.1+dfsg.orig/test/nlinstr.ok0000644000175000017500000000000311463242060016337 0ustar schotschotok gawk-4.0.1+dfsg.orig/test/getnr2tm.in0000644000175000017500000000000211463242060016404 0ustar schotschota gawk-4.0.1+dfsg.orig/test/paramdup.ok0000644000175000017500000000027511527020510016465 0ustar schotschotgawk: 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 gawk-4.0.1+dfsg.orig/test/zeroe0.ok0000644000175000017500000000002611463242060016057 0ustar schotschot00E0, 1, 1 00E0, 1, 1 gawk-4.0.1+dfsg.orig/test/delarprm.ok0000644000175000017500000000000011463242060016451 0ustar schotschotgawk-4.0.1+dfsg.orig/test/nulrsend.in0000644000175000017500000000001411463242060016477 0ustar schotschot1111 2222 gawk-4.0.1+dfsg.orig/test/fnaryscl.ok0000644000175000017500000000016311463242060016476 0ustar schotschotgawk: fnaryscl.awk:10: fatal: attempt to use array `c (from b, from a, from foo)' in a scalar context EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/fldchgnf.in0000644000175000017500000000001011463242060016414 0ustar schotschota b c d gawk-4.0.1+dfsg.orig/test/resplit.awk0000644000175000017500000000004011463242060016502 0ustar schotschot{ FS = ":"; $0 = $0; print $2 } gawk-4.0.1+dfsg.orig/test/switch2.awk0000644000175000017500000000434711463242060016421 0ustar schotschot# From spcecdt@armory.com Tue Jun 3 11:41:49 2003 # Return-Path: # Received: from localhost (skeeve [127.0.0.1]) # by skeeve.com (8.12.5/8.12.5) with ESMTP id h538fVuW018115 # for ; Tue, 3 Jun 2003 11:41:49 +0300 # Received: from actcom.co.il [192.114.47.1] # by localhost with POP3 (fetchmail-5.9.0) # for arnold@localhost (single-drop); Tue, 03 Jun 2003 11:41:49 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Tue Jun 3 11:41:37 2003) # X-From_: spcecdt@armory.com Mon Jun 2 20:17:30 2003 # Received: from smtp1.actcom.net.il by actcom.co.il with ESMTP # (8.11.6/actcom-0.2) id h52HHNY23516 for ; # Mon, 2 Jun 2003 20:17:24 +0300 (EET DST) # (rfc931-sender: mail.actcom.co.il [192.114.47.13]) # Received: from f7.net (consort.superb.net [209.61.216.22]) # by smtp1.actcom.net.il (8.12.8/8.12.8) with ESMTP id h52HIHqv028728 # for ; Mon, 2 Jun 2003 20:18:18 +0300 # Received: from armory.com (deepthought.armory.com [192.122.209.42]) # by f7.net (8.11.7/8.11.6) with SMTP id h52HHKl31637 # for ; Mon, 2 Jun 2003 13:17:20 -0400 # Date: Mon, 2 Jun 2003 10:17:11 -0700 # From: "John H. DuBois III" # To: arnold@skeeve.com # Subject: gawk 3.1.2c coredump # Message-ID: <20030602171711.GA3958@armory.com> # Mime-Version: 1.0 # Content-Type: text/plain; charset=us-ascii # Content-Disposition: inline # User-Agent: Mutt/1.3.28i # X-Www: http://www.armory.com./~spcecdt/ # Sender: spcecdt@armory.com # X-SpamBouncer: 1.4 (10/07/01) # X-SBClass: OK # Status: R # #!/usr/local/bin/gawk -f BEGIN { switch (substr("x",1,1)) { case /ask.com/: break case "google": break } } # # The stack says: # # #0 0x0806fac2 in r_tree_eval (tree=0x8092000, iscond=0) at eval.c:813 # #1 0x08070413 in r_tree_eval (tree=0x0, iscond=0) at eval.c:1071 # #2 0x08070413 in r_tree_eval (tree=0x8092000, iscond=0) at eval.c:1071 # #3 0x08070413 in r_tree_eval (tree=0x8092000, iscond=0) at eval.c:1071 # [ this continues on indefinitely - I suppose it ran out of stack eventually ] # # John # -- # John DuBois spcecdt@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/ # # gawk-4.0.1+dfsg.orig/test/printfbad3.awk0000644000175000017500000000073411734665352017104 0ustar schotschot# 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) } gawk-4.0.1+dfsg.orig/test/fwtest2.in0000644000175000017500000000107411463242060016252 0ustar schotschot 0.4867373206 1.3206333033 -0.2333178127 0.5668176165 1.3711756314 -0.2193558040 0.4325251781 1.3399488722 -0.1568307497 0.4900487563 1.3295759570 -0.2217392402 -0.6790064191 1.2536623801 -0.2955415433 -0.6311440220 1.2966579993 -0.2246692210 -0.7209390351 1.1783407099 -0.2539408209 -0.6782473356 1.2495242556 -0.2811436366 -0.7062054082 1.1223820964 -1.1619805834 -0.6491590119 1.1248946162 -1.0851579675 -0.7948856821 1.1208852325 -1.1259821556 -0.7102549262 1.1225121126 -1.1475381286 gawk-4.0.1+dfsg.orig/test/noloop2.awk0000644000175000017500000000564111463242060016424 0ustar schotschot# From jhart@avcnet.bates.edu Sun Oct 6 16:05:21 2002 # Return-Path: # Received: from localhost (skeeve [127.0.0.1]) # by skeeve.com (8.11.6/8.11.6) with ESMTP id g96D5Jf28053 # for ; Sun, 6 Oct 2002 16:05:21 +0300 # Received: from actcom.co.il [192.114.47.1] # by localhost with POP3 (fetchmail-5.9.0) # for arnold@localhost (single-drop); Sun, 06 Oct 2002 16:05:21 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Sun Oct 6 16:06:39 2002) # X-From_: jhart@avcnet.bates.edu Sun Oct 6 15:31:59 2002 # Received: from lmail.actcom.co.il by actcom.co.il with ESMTP # (8.11.6/actcom-0.2) id g96CVrS27315 for ; # Sun, 6 Oct 2002 15:31:54 +0300 (EET DST) # (rfc931-sender: mail.actcom.co.il [192.114.47.13]) # Received: from f7.net (consort.superb.net [209.61.216.22]) # by lmail.actcom.co.il (8.11.6/8.11.6) with ESMTP id g96CVqY01629 # for ; Sun, 6 Oct 2002 15:31:52 +0300 # Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) # by f7.net (8.11.6/8.11.6) with ESMTP id g96CVp418974 # for ; Sun, 6 Oct 2002 08:31:51 -0400 # Received: from monty-python.gnu.org ([199.232.76.173]) # by fencepost.gnu.org with esmtp (Exim 4.10) # id 17yAZa-00055o-00 # for bug-gawk@gnu.org; Sun, 06 Oct 2002 08:31:50 -0400 # Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) # id 17yAZE-0007eB-00 # for bug-gawk@gnu.org; Sun, 06 Oct 2002 08:31:29 -0400 # Received: from avcnet.bates.edu ([134.181.128.62]) # by monty-python.gnu.org with esmtp (Exim 4.10) # id 17yAZ9-0007X3-00 # for bug-gawk@gnu.org; Sun, 06 Oct 2002 08:31:23 -0400 # Received: from a5514a.bates.edu (www.bates.edu [134.181.128.62]) # by avcnet.bates.edu (8.9.3/8.9.3) with ESMTP id IAA05400 # for ; Sun, 6 Oct 2002 08:31:20 -0400 # Date: Sun, 6 Oct 2002 08:36:54 -0400 # Mime-Version: 1.0 (Apple Message framework v482) # Content-Type: text/plain; charset=US-ASCII; format=flowed # Subject: Infinite loop in sub/gsub # From: jhart@avcnet.bates.edu # To: bug-gawk@gnu.org # Content-Transfer-Encoding: 7bit # Message-Id: <4BC4A4F0-D928-11D6-8E78-00039384A9CC@mail.avcnet.org> # X-Mailer: Apple Mail (2.482) # X-Spam-Status: No, hits=0.3 required=5.0 # tests=NO_REAL_NAME,SPAM_PHRASE_00_01,USER_AGENT_APPLEMAIL # version=2.41 # X-Spam-Level: # X-SpamBouncer: 1.4 (10/07/01) # X-SBClass: OK # Status: RO # # This command line: # # echo "''Italics with an apostrophe'' embedded''"|gawk -f test.awk # # where test.awk contains this instruction: # /''/ { sub(/''(.?[^']+)*''/, "&"); } # # puts gawk 3.11 into an infinite loop. Whereas, this command works: # # echo "''Italics with an apostrophe' embedded''"|gawk -f test.awk # # # # Platform: Mac OS X 10.1.5/Darwin Kernel Version 5.5: Thu May 30 14:51:26 # PDT 2002; root:xnu/xnu-201.42.3.obj~1/RELEASE_PPC # # gawk-4.0.1+dfsg.orig/test/wideidx.in0000644000175000017500000000001011463242060016276 0ustar schotschotfoo bar gawk-4.0.1+dfsg.orig/test/indirectcall.awk0000644000175000017500000000522411463242060017466 0ustar schotschot# funcptrdemo.awk --- Demonstrate function pointers # # Arnold Robbins, arnold@skeeve.com, Public Domain # January 2009 # average --- return the average of the values in fields $first - $last function average(first, last, sum, i) { sum = 0; for (i = first; i <= last; i++) sum += $i return sum / (last - first + 1) } # sum --- return the average of the values in fields $first - $last function sum(first, last, ret, i) { ret = 0; for (i = first; i <= last; i++) ret += $i return ret } # For each record, print the class name and the requested statistics { class_name = $1 gsub(/_/, " ", class_name) # Replace _ with spaces # find start for (i = 1; i <= NF; i++) { if ($i == "data:") { start = i + 1 break } } printf("%s:\n", class_name) for (i = 2; $i != "data:"; i++) { the_function = $i printf("\t%s: <%s>\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 } gawk-4.0.1+dfsg.orig/test/fcall_exit2.in0000644000175000017500000000002111463242060017037 0ustar schotschotdummy input line gawk-4.0.1+dfsg.orig/test/backgsub.in0000644000175000017500000000000711463242060016430 0ustar schotschot\x\y\z gawk-4.0.1+dfsg.orig/test/redfilnm.ok0000644000175000017500000000016511463242060016457 0ustar schotschothello, world hello, world hello, world hello, world hello, world hello, world hello, world hello, world hello, world gawk-4.0.1+dfsg.orig/test/funlen.in0000644000175000017500000000013011463242060016133 0ustar schotschotCD NAME AT Austria BG Bulgaria CH Switzerland DE Germany EE Estonia FR France GR Greece gawk-4.0.1+dfsg.orig/test/mbprintf3.awk0000644000175000017500000000005111463242060016726 0ustar schotschotFNR == 1 { print $0; printf "%s\n", $0 } gawk-4.0.1+dfsg.orig/test/noloop2.ok0000644000175000017500000000000011463242060016233 0ustar schotschotgawk-4.0.1+dfsg.orig/test/rstest6.ok0000644000175000017500000000000511463242060016262 0ustar schotschotABCD gawk-4.0.1+dfsg.orig/test/hsprint.awk0000644000175000017500000000326211463242060016520 0ustar schotschot# Test which attempts to repeat examples of formatted output # from "C a reference manual" by Harbison and Steele. # # In the second series of outputs formats of a type "%5%" are skipped # since my old copy of H&S explicitely requires padding ("...%05% will # print 0000%..."), whereas Standard says "...the complete conversion # specification shall be %%". # # Michal Jaegermann - michal@phys.ualberta.ca BEGIN { zero = "0"; alt = "#"; spc = " "; plus = "+"; just = "-"; value[0] = 45; value[1] = 45; value[2] = 45; value[3] = 12.678; value[4] = 12.678; value[5] = 12.678; value[6] = "zap"; value[7] = "*"; value[8] = -3.4567; value[9] = -3.4567; value[10]= -3.4567; value[11]= -3.4567; oper[0] = "5d"; oper[1] = "5o"; oper[2] = "5x"; oper[3] = "7.2f"; oper[4] = "10.2e"; oper[5] = "10.4g"; oper[6] = "5s"; oper[7] = "5c"; oper[8] = "7.1G"; oper[9] = "7.2f"; oper[10] = "10.2e"; oper[11] = "10.4g"; for (r = 0; r < 12; r += 6) { for (j = 2; j > 0; --j) { for (p = 2; p > 0; --p) { for (s = 2; s > 0; --s) { for (a = 2; a > 0; --a) { for (z = 2; z > 0; --z) { fmt = "%" substr(just,j,1) substr(plus,p,1) \ substr(spc,s,1) substr(alt,a,1) substr(zero,z,1); fstr = sprintf(\ "%6s|%s%s|%s%s|%s%s|%s%s|%s%s|%s%s|\n", "%" fmt, fmt, oper[r], fmt, oper[r+1], fmt, oper[r+2], fmt, oper[r+3], fmt, oper[r+4], fmt, oper[r+5]); printf(fstr, value[r], value[r+1], value[r+2], value[r+3], value[r+4], value[r+5]); } } } } } print ""; } } gawk-4.0.1+dfsg.orig/test/synerr2.ok0000644000175000017500000000017211463242060016261 0ustar schotschotgawk: synerr2.awk:47: BEGIN { sprintf("%s", $) } gawk: synerr2.awk:47: ^ syntax error EXIT CODE: 1 gawk-4.0.1+dfsg.orig/test/back89.in0000644000175000017500000000001111463242060015723 0ustar schotschota8b a\8b gawk-4.0.1+dfsg.orig/test/fpat3.ok0000644000175000017500000000001711654051011015664 0ustar schotschot1 a 2 b 3 4 c gawk-4.0.1+dfsg.orig/test/rri1.ok0000644000175000017500000000000011676156351015535 0ustar schotschotgawk-4.0.1+dfsg.orig/test/aadelete2.awk0000644000175000017500000000015611463614133016662 0ustar schotschotBEGIN { 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] } gawk-4.0.1+dfsg.orig/test/uninit3.ok0000644000175000017500000000023111463242060016242 0ustar schotschotgawk: uninit3.awk:1: warning: function `f': parameter `x' shadows global variable gawk: uninit3.awk:2: warning: reference to uninitialized argument `x' gawk-4.0.1+dfsg.orig/test/lintold.awk0000644000175000017500000000036011463242060016472 0ustar schotschot# lintold.awk --- test --lint-old BEGIN { a[1] = 1 for (i in a) print a[i] delete a[1] if (2 in a) a[2] **= 2; if ((2,3) in a) a[2,3] ^= 2 ** 3 ^ 5; } BEGIN { FS = "ab" foo = "\b\f\r" } END { } END { print "done" } gawk-4.0.1+dfsg.orig/test/nasty2.ok0000644000175000017500000000241711463242060016101 0ustar schotschota = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, f() = X 123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123 gawk-4.0.1+dfsg.orig/test/backw.ok0000644000175000017500000000001411463242060015737 0ustar schotschot123 abc 456 gawk-4.0.1+dfsg.orig/test/fnmisc.ok0000644000175000017500000000023011463242060016127 0ustar schotschotgawk: fnmisc.awk:11: function split(x) { return x } gawk: fnmisc.awk:11: ^ `split' is a built-in function, it cannot be redefined EXIT CODE: 1 gawk-4.0.1+dfsg.orig/test/octsub.awk0000644000175000017500000000005511463242060016325 0ustar schotschotBEGIN{ ++x[03]; print "/" x[0] "/" x[3] "/"} gawk-4.0.1+dfsg.orig/test/devfd2.ok0000644000175000017500000000172611463242060016035 0ustar schotschotthis is file f1, line 1 this is file f1, line 2 this is file f1, line 3 this is file f1, line 4 this is file f1, line 5 this is file f1, line 6 this is file f1, line 7 this is file f1, line 8 this is file f1, line 9 this is file f1, line 10 this is file f1, line 11 this is file f1, line 12 this is file f1, line 13 this is file f1, line 14 this is file f1, line 15 this is file f1, line 16 this is file f1, line 17 this is file f1, line 18 this is file f1, line 19 this is file f1, line 20 this is file f2, line 1 this is file f2, line 2 this is file f2, line 3 this is file f2, line 4 this is file f2, line 5 this is file f2, line 6 this is file f2, line 7 this is file f2, line 8 this is file f2, line 9 this is file f2, line 10 this is file f2, line 11 this is file f2, line 12 this is file f2, line 13 this is file f2, line 14 this is file f2, line 15 this is file f2, line 16 this is file f2, line 17 this is file f2, line 18 this is file f2, line 19 this is file f2, line 20 gawk-4.0.1+dfsg.orig/test/fwtest3.in0000644000175000017500000000001311654051011016237 0ustar schotschot1234567890 gawk-4.0.1+dfsg.orig/test/hsprint.ok0000644000175000017500000000700411463242060016345 0ustar schotschot %| 45| 55| 2d| 12.68| 1.27e+01| 12.68| %0|00045|00055|0002d|0012.68|001.27e+01|0000012.68| %#| 45| 055| 0x2d| 12.68| 1.27e+01| 12.68| %#0|00045|00055|0x02d|0012.68|001.27e+01|0000012.68| % | 45| 55| 2d| 12.68| 1.27e+01| 12.68| % 0| 0045|00055|0002d| 012.68| 01.27e+01| 000012.68| % #| 45| 055| 0x2d| 12.68| 1.27e+01| 12.68| % #0| 0045|00055|0x02d| 012.68| 01.27e+01| 000012.68| %+| +45| 55| 2d| +12.68| +1.27e+01| +12.68| %+0|+0045|00055|0002d|+012.68|+01.27e+01|+000012.68| %+#| +45| 055| 0x2d| +12.68| +1.27e+01| +12.68| %+#0|+0045|00055|0x02d|+012.68|+01.27e+01|+000012.68| %+ | +45| 55| 2d| +12.68| +1.27e+01| +12.68| %+ 0|+0045|00055|0002d|+012.68|+01.27e+01|+000012.68| %+ #| +45| 055| 0x2d| +12.68| +1.27e+01| +12.68| %+ #0|+0045|00055|0x02d|+012.68|+01.27e+01|+000012.68| %-|45 |55 |2d |12.68 |1.27e+01 |12.68 | %-0|45 |55 |2d |12.68 |1.27e+01 |12.68 | %-#|45 |055 |0x2d |12.68 |1.27e+01 |12.68 | %-#0|45 |055 |0x2d |12.68 |1.27e+01 |12.68 | %- | 45 |55 |2d | 12.68 | 1.27e+01 | 12.68 | %- 0| 45 |55 |2d | 12.68 | 1.27e+01 | 12.68 | %- #| 45 |055 |0x2d | 12.68 | 1.27e+01 | 12.68 | %- #0| 45 |055 |0x2d | 12.68 | 1.27e+01 | 12.68 | %-+|+45 |55 |2d |+12.68 |+1.27e+01 |+12.68 | %-+0|+45 |55 |2d |+12.68 |+1.27e+01 |+12.68 | %-+#|+45 |055 |0x2d |+12.68 |+1.27e+01 |+12.68 | %-+#0|+45 |055 |0x2d |+12.68 |+1.27e+01 |+12.68 | %-+ |+45 |55 |2d |+12.68 |+1.27e+01 |+12.68 | %-+ 0|+45 |55 |2d |+12.68 |+1.27e+01 |+12.68 | %-+ #|+45 |055 |0x2d |+12.68 |+1.27e+01 |+12.68 | %-+ #0|+45 |055 |0x2d |+12.68 |+1.27e+01 |+12.68 | %| zap| *| -3| -3.46| -3.46e+00| -3.457| %0| zap| *|-000003|-003.46|-03.46e+00|-00003.457| %#| zap| *| -3.| -3.46| -3.46e+00| -3.457| %#0| zap| *|-00003.|-003.46|-03.46e+00|-00003.457| % | zap| *| -3| -3.46| -3.46e+00| -3.457| % 0| zap| *|-000003|-003.46|-03.46e+00|-00003.457| % #| zap| *| -3.| -3.46| -3.46e+00| -3.457| % #0| zap| *|-00003.|-003.46|-03.46e+00|-00003.457| %+| zap| *| -3| -3.46| -3.46e+00| -3.457| %+0| zap| *|-000003|-003.46|-03.46e+00|-00003.457| %+#| zap| *| -3.| -3.46| -3.46e+00| -3.457| %+#0| zap| *|-00003.|-003.46|-03.46e+00|-00003.457| %+ | zap| *| -3| -3.46| -3.46e+00| -3.457| %+ 0| zap| *|-000003|-003.46|-03.46e+00|-00003.457| %+ #| zap| *| -3.| -3.46| -3.46e+00| -3.457| %+ #0| zap| *|-00003.|-003.46|-03.46e+00|-00003.457| %-|zap |* |-3 |-3.46 |-3.46e+00 |-3.457 | %-0|zap |* |-3 |-3.46 |-3.46e+00 |-3.457 | %-#|zap |* |-3. |-3.46 |-3.46e+00 |-3.457 | %-#0|zap |* |-3. |-3.46 |-3.46e+00 |-3.457 | %- |zap |* |-3 |-3.46 |-3.46e+00 |-3.457 | %- 0|zap |* |-3 |-3.46 |-3.46e+00 |-3.457 | %- #|zap |* |-3. |-3.46 |-3.46e+00 |-3.457 | %- #0|zap |* |-3. |-3.46 |-3.46e+00 |-3.457 | %-+|zap |* |-3 |-3.46 |-3.46e+00 |-3.457 | %-+0|zap |* |-3 |-3.46 |-3.46e+00 |-3.457 | %-+#|zap |* |-3. |-3.46 |-3.46e+00 |-3.457 | %-+#0|zap |* |-3. |-3.46 |-3.46e+00 |-3.457 | %-+ |zap |* |-3 |-3.46 |-3.46e+00 |-3.457 | %-+ 0|zap |* |-3 |-3.46 |-3.46e+00 |-3.457 | %-+ #|zap |* |-3. |-3.46 |-3.46e+00 |-3.457 | %-+ #0|zap |* |-3. |-3.46 |-3.46e+00 |-3.457 | gawk-4.0.1+dfsg.orig/test/widesub4.ok0000644000175000017500000000022011463242060016375 0ustar schotschot16 A=1234567890abcdef. 12 A=567890abcdef. 8 A=90abcdef. 4 A=cdef. 0 A=. 16 A=1234567890abcdef. 12 A=567890abcdef. 8 A=90abcdef. 4 A=cdef. 0 A=. gawk-4.0.1+dfsg.orig/test/zero2.ok0000644000175000017500000000000611463242060015712 0ustar schotschot0 0 0 gawk-4.0.1+dfsg.orig/test/litoct.ok0000644000175000017500000000001111463242060016143 0ustar schotschotno match gawk-4.0.1+dfsg.orig/test/fflush.sh0000755000175000017500000000124211463242060016147 0ustar schotschot#! /bin/sh ../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}' ../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'|cat ../gawk 'BEGIN{print "1st";fflush("/dev/stdout");close("/dev/stdout");print "2nd"|"cat"}'|cat ../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat ../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat ../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat ../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort"}'|cat ../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort";close("sort")}'|cat gawk-4.0.1+dfsg.orig/test/arrayprm3.awk0000644000175000017500000000444211463242060016752 0ustar schotschot# From spcecdt@armory.com Fri May 2 13:24:46 2003 # Return-Path: # Received: from localhost (skeeve [127.0.0.1]) # by skeeve.com (8.12.5/8.12.5) with ESMTP id h42AChum021950 # for ; Fri, 2 May 2003 13:24:46 +0300 # Received: from actcom.co.il [192.114.47.1] # by localhost with POP3 (fetchmail-5.9.0) # for arnold@localhost (single-drop); Fri, 02 May 2003 13:24:46 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Fri May 2 13:23:37 2003) # X-From_: spcecdt@armory.com Fri May 2 00:43:51 2003 # Received: from smtp1.actcom.net.il by actcom.co.il with ESMTP # (8.11.6/actcom-0.2) id h41Lhm500217 for ; # Fri, 2 May 2003 00:43:49 +0300 (EET DST) # (rfc931-sender: lmail.actcom.co.il [192.114.47.13]) # Received: from f7.net (consort.superb.net [209.61.216.22]) # by smtp1.actcom.net.il (8.12.8/8.12.8) with ESMTP id h41LiGcO022817 # for ; Fri, 2 May 2003 00:44:18 +0300 # Received: from armory.com (deepthought.armory.com [192.122.209.42]) # by f7.net (8.11.7/8.11.6) with SMTP id h41Lhj106516 # for ; Thu, 1 May 2003 17:43:46 -0400 # Date: Thu, 1 May 2003 14:43:45 -0700 # From: "John H. DuBois III" # To: Aharon Robbins # Subject: Re: gawk 3.1.2a bug # Message-ID: <20030501214345.GA24615@armory.com> # References: <200305011738.h41Hcg76017565@localhost.localdomain> # Mime-Version: 1.0 # Content-Type: text/plain; charset=us-ascii # Content-Disposition: inline # In-Reply-To: <200305011738.h41Hcg76017565@localhost.localdomain> # User-Agent: Mutt/1.3.28i # X-Www: http://www.armory.com./~spcecdt/ # Sender: spcecdt@armory.com # X-SpamBouncer: 1.4 (10/07/01) # X-SBClass: OK # Status: RO # # On Thu, May 01, 2003 at 08:38:42PM +0300, Aharon Robbins wrote: # > > That worked, thanks. # > # > Great. Your report motivated me to find everywhere such additional # > code ought to be needed. I think I did so. --Arnold # # Here's another one (perhaps fixed by your additional work): # BEGIN { foo(a) } function foo(a) { bar(a); print "" in a } function bar(a) { a[""]; } # # Prints 1 with gawk-3.1.1; 0 with 3.1.2a. # # John # -- # John DuBois spcecdt@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/ # gawk-4.0.1+dfsg.orig/test/gsubtst4.ok0000644000175000017500000000131211463242060016431 0ustar schotschotinput 12345 output gsub(/regex/,"x",input) regex output (^) x12345 ($) 12345x (^)|($) x12345x ($)|(^) x12345x (2) 1x345 (^)|2 x1x345 2|(^) x1x345 ($)|2 1x345x 2|($) 1x345x (2)|(^) x1x345 (^)|(2) x1x345 (2)|($) 1x345x ($)|(2) 1x345x .((2)|(^)) x345 .((^)|(2)) x345 .((2)|($)) x34x .(($)|(2)) x34x x{0}((2)|(^)) 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}^ x12345 x{0}$ 12345x (x{0}^)|2 x1x345 (x{0}$)|2 1x345x gawk-4.0.1+dfsg.orig/test/splitdef.awk0000644000175000017500000000023211463242060016635 0ustar schotschotBEGIN { data = "abc:easy:as:one:two:three" FS = ":" FIELDWIDTHS = "3 1 4 1 2 1 3 1 3 1 5" n = split(data, a) printf "n = %d, a[3] = %s\n", n, a[3] } gawk-4.0.1+dfsg.orig/test/zeroflag.ok0000644000175000017500000000001011463242060016455 0ustar schotschot 2--- 2 gawk-4.0.1+dfsg.orig/test/printfbad1.awk0000644000175000017500000000322511463242060017062 0ustar schotschot#Date: Mon, 7 Jun 2004 10:40:28 -0500 #From: mary1john8@earthlink.net #To: arnold@skeeve.com #Subject: gawk internal errors #Message-ID: <20040607154028.GA2457@apollo> # #Hello, # # gawk-3.1.3i internal errors: # #[1] # #$> ./gawk 'BEGIN { for (i in a) delete a; }' #gawk: fatal error: internal error #Aborted # #------------------------------------------------------------------ #--- awkgram.y.orig 2004-06-07 09:42:14.000000000 -0500 #+++ awkgram.y 2004-06-07 09:45:58.000000000 -0500 #@@ -387,7 +387,7 @@ # * 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) { #+ if ($8 != NULL && $8->type == Node_K_delete && $8->rnode != NULL) { # NODE *arr, *sub; # # assert($8->rnode->type == Node_expression_list); #------------------------------------------------------------------ # # #[2] # #$> ./gawk 'BEGIN { printf("%3$*10$.*1$s\n", 20, 10, "hello"); }' BEGIN { printf("%3$*10$.*1$s\n", 20, 10, "hello"); } #gawk: fatal error: internal error #Aborted # #------------------------------------------------------------------ #--- builtin.c.orig 2004-06-07 10:04:20.000000000 -0500 #+++ builtin.c 2004-06-07 10:06:08.000000000 -0500 #@@ -780,7 +780,10 @@ # s1++; # n0--; # } #- #+ if (val >= num_args) { #+ toofew = TRUE; #+ break; #+ } # arg = the_args[val]; # } else { # parse_next_arg(); #------------------------------------------------------------------ # # # Finally, a test for the rewritten get_src_buf(): # #$> AWKBUFSIZE=2 make check # #I get 3 failed tests. Not sure this is of any interest. # # #Thanks, #John gawk-4.0.1+dfsg.orig/test/mbprintf3.in0000644000175000017500000000006311463242060016555 0ustar schotschotCOMPONENT suspended particulates <10 µm (air), day gawk-4.0.1+dfsg.orig/test/clsflnam.ok0000644000175000017500000000010611463242060016451 0ustar schotschotError `close of redirection that was never opened' closing input file gawk-4.0.1+dfsg.orig/test/icasefs.ok0000644000175000017500000000002411463242060016266 0ustar schotschotaCa a a aCa aCa aCa gawk-4.0.1+dfsg.orig/test/fldchg.in0000644000175000017500000000001711463242060016077 0ustar schotschotaa aab c d e f gawk-4.0.1+dfsg.orig/test/numindex.in0000644000175000017500000000014411463242060016500 0ustar schotschot322322111111112232231111 322322111111112213223111 322322111111112211132231 322322111111112211113223 gawk-4.0.1+dfsg.orig/test/beginfile2.ok0000644000175000017500000000353011654051011016660 0ustar schotschot--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 gawk-4.0.1+dfsg.orig/test/rand.ok0000644000175000017500000000011511463242060015576 0ustar schotschot 62 67 88 6 35 77 3 68 30 96 90 26 35 8 88 93 49 53 37 gawk-4.0.1+dfsg.orig/test/out1.ok0000644000175000017500000000002411463242060015541 0ustar schotschotGoes to a file out1 gawk-4.0.1+dfsg.orig/test/reindops.ok0000644000175000017500000000001311463242060016472 0ustar schotschotgawk is ok gawk-4.0.1+dfsg.orig/test/longdbl.ok0000644000175000017500000000004611463242060016276 0ustar schotschot0xa000000100000813 0xffffffffffffffff gawk-4.0.1+dfsg.orig/test/fieldwdth.awk0000644000175000017500000000005511463242060017000 0ustar schotschotBEGIN { FIELDWIDTHS = "2 3 4" } { print $2 } gawk-4.0.1+dfsg.orig/test/nors.ok0000644000175000017500000000000411463242060015630 0ustar schotschotE E gawk-4.0.1+dfsg.orig/test/rstest2.ok0000644000175000017500000000000211463242060016253 0ustar schotschota gawk-4.0.1+dfsg.orig/test/nfset.awk0000644000175000017500000000002311463242060016140 0ustar schotschot{ NF = 5 ; print } gawk-4.0.1+dfsg.orig/test/fpatnull.ok0000644000175000017500000000000311566523741016507 0ustar schotschot13 gawk-4.0.1+dfsg.orig/test/childin.in0000644000175000017500000000000311463242060016255 0ustar schotschothi gawk-4.0.1+dfsg.orig/test/fldchgnf.ok0000644000175000017500000000001111463242060016420 0ustar schotschota::c:d 4 gawk-4.0.1+dfsg.orig/test/clos1way.ok0000644000175000017500000000023411463242060016416 0ustar schotschotgot a got b got c got d got e got f got g got h got i got j got k got l got m got n got o got p got q got r got s got t got u got v got w got x got y got z gawk-4.0.1+dfsg.orig/test/procinfs.ok0000644000175000017500000000020111463242060016471 0ustar schotschotInitially, PROCINFO["FS"] = FS After assign to FIELDWIDTHS, PROCINFO["FS"] = FIELDWIDTHS After assign to FS, PROCINFO["FS"] = FS gawk-4.0.1+dfsg.orig/test/argarray.in0000644000175000017500000000003311463242060016456 0ustar schotschotthis is a simple test file gawk-4.0.1+dfsg.orig/test/fieldwdth.in0000644000175000017500000000001211463242060016615 0ustar schotschot123456789 gawk-4.0.1+dfsg.orig/test/parse1.awk0000644000175000017500000000167011463242060016225 0ustar schotschot# Date: Fri, 06 Jan 2006 14:02:17 -0800 # From: Paul Eggert # Subject: gawk misparses $expr++ if expr ends in ++ # To: bug-gawk@gnu.org # Message-id: <87irsxypzq.fsf@penguin.cs.ucla.edu> # # Here's an example of the problem: # # $ gawk 'BEGIN{a=3}{print $$a++++}' # gawk: {print $$a++++} # gawk: ^ syntax error # # But it's not a syntax error, as the expression conforms to the POSIX # spec: it should be treated like '$($a++)++'. # # Mawk, Solaris awk (old awk), and Solaris nawk all accept the # expression. For example: # # $ echo '3 4 5 6 7 8 9' | nawk 'BEGIN{a=3}{print $$a++++}' # 7 # # This is with gawk 3.1.5 on Solaris 8 (sparc). # # # ##################################################################################### # This Mail Was Scanned by 012.net AntiVirus Service1- Powered by TrendMicro Interscan # BEGIN { a = 3 } { print "in:", $0 print "a =", a print $$a++++ print "out:", $0 } gawk-4.0.1+dfsg.orig/test/gsubtst7.ok0000644000175000017500000000000511654051011016426 0ustar schotschot aaa gawk-4.0.1+dfsg.orig/test/asort.awk0000644000175000017500000000052711463242060016162 0ustar schotschotfunction init(a) { a[1] = "aardvark" a[2] = "animal" a[3] = "zebra" a[4] = "zoo" a[5] = "Iguana" a[6] = "Alligator" a[7] = "Nouns" a[8] = "people" } BEGIN { for (IGNORECASE = 0; IGNORECASE < 2; IGNORECASE++) { init(a) n = asort(a) for (i = 1; i <= n; i++) printf("a[%d] = \"%s\"\n", i, a[i]) print "============" } } gawk-4.0.1+dfsg.orig/test/widesub4.awk0000644000175000017500000000317711463242060016564 0ustar schotschot# Date: Sun, 28 May 2006 11:20:58 +0200 # From: Frantisek Hanzlik # Subject: sub() function do'nt alter string length in awk 3.1.5 # To: bug-gawk@gnu.org # Message-id: <44796B7A.3050908@hanzlici.cz> # # Hello, # I not know when it is my mistake or gawk bug - in simple example below # I delete some chars from string variable, and after this string is # modified, but its length is unchanged. # # awk 'BEGIN{A="1234567890abcdef"; # for (i=1;i<6;i++){print length(A),"A=" A ".";sub("....","",A)} # }' # 16 A=1234567890abcdef. # 16 A=567890abcdef. # 16 A=90abcdef. # 16 A=cdef. # 16 A=. # # When I use gensub() instead of sub(), result is as I expected: # # awk 'BEGIN{A="1234567890abcdef"; # for (i=1;i<6;i++){print length(A),"A=" A ".";A=gensub("....","",1,A)} # }' # 16 A=1234567890abcdef. # 12 A=567890abcdef. # 8 A=90abcdef. # 4 A=cdef. # 0 A=. # # OS/GAWK versions: # - GNU/Linux kernel 2.6.16-1.2122_FC5 #1 i686, Fedora Core 5 distro # - glibc-2.4-8 # - GNU Awk 3.1.5 # # Yours sincerely # Frantisek Hanzlík # # == Lucní 502 Linux/Unix, Novell, Internet Tel: +420-373729699 == # == 33209 Stenovice e-mail:franta@hanzlici.cz Fax: +420-373729699 == # == Czech Republic http://hanzlici.cz/ GSM: +420-604117319 == # # # # ##################################################################################### # This Mail Was Scanned by 012.net AntiVirus Service3- Powered by TrendMicro Interscan # BEGIN{A="1234567890abcdef"; for (i=1;i<6;i++){print length(A),"A=" A ".";sub("....","",A)} } BEGIN{A="1234567890abcdef"; for (i=1;i<6;i++){print length(A),"A=" A ".";A=gensub("....","",1,A)} } gawk-4.0.1+dfsg.orig/test/concat4.in0000644000175000017500000000001011463242060016174 0ustar schotschotfoo bar gawk-4.0.1+dfsg.orig/test/arryref4.awk0000644000175000017500000000016611463242060016567 0ustar schotschotBEGIN { foo(a) print a } function foo(b) { a = "global" b[2] = "local" # bar(b) } function bar(c) { c = 12 } gawk-4.0.1+dfsg.orig/test/regx8bit.awk0000644000175000017500000000172311463242060016565 0ustar schotschot# The full test will only work in a Swedish localte # Try things that should work across the board # BEGIN { # s = "så är det" # print match(s,/\yså\y/), s ~ /\yså\y/, "å" ~ /\w/ # } BEGIN { printf "\"å\" = %c\n", "å" printf "\"ä\" = %c\n", "ä" s = "så är det" printf "s = \"%s\"\n", s printf "match(s,/\\yså/) = %d\n", match(s, /\yså/) # printf "match(s,/så\\y/) = %d\n", match(s, /så\y/) # printf "match(s,/\\yså\\y/) = %d\n", match(s, /\yså\y/) printf "s ~ /å/ = %d\n", s ~ /å/ printf "s ~ /så/ = %d\n", s ~ /så/ printf "s ~ /\\yså/ = %d\n", s ~ /\yså/ # printf "s ~ /så\\y/ = %d\n", s ~ /så\y/ # printf "s ~ /\\yså\\y/ = %d\n", s ~ /\yså\y/ # printf "\"å\" ~ /\\w/ = %d\n", "å" ~ /\w/ # printf "\"ä\" ~ /\\w/ = %d\n", "ä" ~ /\w/ # printf "\"å\" ~ /\\yä\\y/ = %d\n", "å" ~ /\yå\y/ # printf "\"ä\" ~ /\\yä\\y/ = %d\n", "ä" ~ /\yä\y/ # printf "\"å\" ~ /[[:alpha:]]/ = %d\n", "å" ~ /[[:alpha:]]/ # printf "\"ä\" ~ /[[:alpha:]]/ = %d\n", "ä" ~ /[[:alpha:]]/ } gawk-4.0.1+dfsg.orig/test/arysubnm.ok0000644000175000017500000000000211463242060016505 0ustar schotschot1 gawk-4.0.1+dfsg.orig/test/xref.original0000644000175000017500000003372011477513317017034 0ustar schotschotXREF(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. gawk-4.0.1+dfsg.orig/test/mbprintf2.awk0000644000175000017500000000006311463242060016730 0ustar schotschotBEGIN { printf "%c\n", 65 printf "%c\n", "AA" } gawk-4.0.1+dfsg.orig/test/reparse.ok0000644000175000017500000000002211463242060016310 0ustar schotschot1 1 a b c 2 1 a b gawk-4.0.1+dfsg.orig/test/ofmts.ok0000644000175000017500000000001011463242060015774 0ustar schotschot1.2 2.2 gawk-4.0.1+dfsg.orig/test/uninit2.awk0000644000175000017500000000010011463242060016405 0ustar schotschotBEGIN { a = a + 1; x = a; print a} BEGIN { ++b; x = b; print b} gawk-4.0.1+dfsg.orig/test/getnr2tb.ok0000644000175000017500000000004711463242060016405 0ustar schotschot1 10 2 5 3 3.33333 4 2.5 5 2 6 1.66667 gawk-4.0.1+dfsg.orig/test/match2.awk0000644000175000017500000000011411463242060016200 0ustar schotschotfunction f(a, b, c) { print match("foo", "bar", f) } BEGIN { f(1, 2, 3) } gawk-4.0.1+dfsg.orig/test/negrange.ok0000644000175000017500000000013611524045057016450 0ustar schotschotn = 6 s[1] = "Volume" s[2] = "8" s[3] = "Numbers" s[4] = "1-2" s[5] = "January" s[6] = "1971" gawk-4.0.1+dfsg.orig/test/argarray.awk0000644000175000017500000000060111463242060016633 0ustar schotschotBEGIN { argn = " argument" (ARGC > 1 ? "s" : "") are = ARGC > 1 ? "are" : "is" print "here we have " ARGC argn print "which " are for (x = 0; x < ARGC; x++) print "\t", ARGV[x] print "Environment variable TEST=" ENVIRON["TEST"] print "and the current input file is called \"" FILENAME "\"" } FNR == 1 { print "in main loop, this input file is known as \"" FILENAME "\"" } gawk-4.0.1+dfsg.orig/test/gnureops.ok0000644000175000017500000000042011463242060016513 0ustar schotschottest 1 ok (\y) test 2 ok (\y) test 3 ok (\y) test 4 ok (\B) test 5 ok (\B) test 6 ok (\<) test 7 ok (\<) test 8 ok (\>) test 9 ok (\>) test 10 ok (\w) test 11 ok (\w) test 12 ok (\W) test 13 ok (\W) test 14 ok (\`) test 15 ok (\`) test 16 ok (\') test 17 ok (\') gawk-4.0.1+dfsg.orig/test/subsepnm.ok0000644000175000017500000000000411463242060016503 0ustar schotschot100 gawk-4.0.1+dfsg.orig/test/aryprm7.awk0000644000175000017500000000006111463242060016424 0ustar schotschotfunction f(x, y){ y[1] = x } BEGIN { f(a, a) } gawk-4.0.1+dfsg.orig/test/nlfldsep.in0000644000175000017500000000005111463242060016455 0ustar schotschotsome stuff more stuffA junk stuffA final gawk-4.0.1+dfsg.orig/test/fpat1.ok0000644000175000017500000000055411572747261015712 0ustar schotschotRobbins 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 = gawk-4.0.1+dfsg.orig/test/gsubtst3.ok0000644000175000017500000000702111463242060016433 0ustar schotschotregex input expected actual bug? ------------------------------------------------------------- (^) 12345 x12345 x12345 ($) 12345 12345x 12345x (^)|($) 12345 x12345x x12345x ($)|(^) 12345 x12345x x12345x 2 12345 1x345 1x345 (^)|2 12345 x1x345 x1x345 2|(^) 12345 x1x345 x1x345 ($)|2 12345 1x345x 1x345x 2|($) 12345 1x345x 1x345x (2)|(^) 12345 x1x345 x1x345 (^)|(2) 12345 x1x345 x1x345 (2)|($) 12345 1x345x 1x345x ($)|(2) 12345 1x345x 1x345x ((2)|(^)). 12345 xx45 xx45 ((^)|(2)). 12345 xx45 xx45 .((2)|($)) 12345 x34x x34x .(($)|(2)) 12345 x34x x34x (^)|6 12345 x12345 x12345 6|(^) 12345 x12345 x12345 ($)|6 12345 12345x 12345x 6|($) 12345 12345x 12345x 2|6|(^) 12345 x1x345 x1x345 2|(^)|6 12345 x1x345 x1x345 6|2|(^) 12345 x1x345 x1x345 6|(^)|2 12345 x1x345 x1x345 (^)|6|2 12345 x1x345 x1x345 (^)|2|6 12345 x1x345 x1x345 2|6|($) 12345 1x345x 1x345x 2|($)|6 12345 1x345x 1x345x 6|2|($) 12345 1x345x 1x345x 6|($)|2 12345 1x345x 1x345x ($)|6|2 12345 1x345x 1x345x ($)|2|6 12345 1x345x 1x345x 2|4|(^) 12345 x1x3x5 x1x3x5 2|(^)|4 12345 x1x3x5 x1x3x5 4|2|(^) 12345 x1x3x5 x1x3x5 4|(^)|2 12345 x1x3x5 x1x3x5 (^)|4|2 12345 x1x3x5 x1x3x5 (^)|2|4 12345 x1x3x5 x1x3x5 2|4|($) 12345 1x3x5x 1x3x5x 2|($)|4 12345 1x3x5x 1x3x5x 4|2|($) 12345 1x3x5x 1x3x5x 4|($)|2 12345 1x3x5x 1x3x5x ($)|4|2 12345 1x3x5x 1x3x5x ($)|2|4 12345 1x3x5x 1x3x5x x{0}((2)|(^)) 12345 x1x345 x1x345 x{0}((^)|(2)) 12345 x1x345 x1x345 x{0}((2)|($)) 12345 1x345x 1x345x x{0}(($)|(2)) 12345 1x345x 1x345x x*((2)|(^)) 12345 x1x345 x1x345 x*((^)|(2)) 12345 x1x345 x1x345 x*((2)|($)) 12345 1x345x 1x345x x*(($)|(2)) 12345 1x345x 1x345x x{0}^ 12345 x12345 x12345 x{0}$ 12345 12345x 12345x (x{0}^)|2 12345 x1x345 x1x345 (x{0}$)|2 12345 1x345x 1x345x gawk-4.0.1+dfsg.orig/test/unterm.awk0000644000175000017500000000040311463242060016335 0ustar schotschotBEGIN{x=".........................................................................................................................................................................................................................................................}gawk-4.0.1+dfsg.orig/test/swaplns.awk0000644000175000017500000000010211463242060016506 0ustar schotschot{ if ((getline tmp) > 0) { print tmp print } else print } gawk-4.0.1+dfsg.orig/test/lib/0000755000175000017500000000000011463242060015070 5ustar schotschotgawk-4.0.1+dfsg.orig/test/lib/awkpath.awk0000644000175000017500000000003411463242060017230 0ustar schotschotBEGIN { print "Found it." } gawk-4.0.1+dfsg.orig/test/patsplit.awk0000644000175000017500000000131011463242060016661 0ustar schotschotBEGIN { 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]) } } gawk-4.0.1+dfsg.orig/test/funlen.ok0000644000175000017500000000002411463242060016140 0ustar schotschotarray: 7 array_A: 7 gawk-4.0.1+dfsg.orig/test/lint.awk0000644000175000017500000000024711463242060015777 0ustar schotschot# lint.awk --- test lint variable BEGIN { a[1] = 1 LINT = 1 delete a[2] LINT = "" delete a[3] LINT = "true" delete a[4] LINT = 0 delete a[5] print "done" } gawk-4.0.1+dfsg.orig/test/reg/0000755000175000017500000000000011463242060015077 5ustar schotschotgawk-4.0.1+dfsg.orig/test/reg/func.good0000644000175000017500000000007211463242060016703 0ustar schotschotgawk: reg/func.awk:1: fatal: function `dummy' not defined gawk-4.0.1+dfsg.orig/test/reg/func.awk0000644000175000017500000000003111463242060016530 0ustar schotschotBEGIN { print dummy(1) } gawk-4.0.1+dfsg.orig/test/reg/exp-eq.good0000644000175000017500000000000711463242060017145 0ustar schotschot1 8 27 gawk-4.0.1+dfsg.orig/test/reg/exp-eq.awk0000644000175000017500000000002611463242060017000 0ustar schotschot{ $0 ^= 3 ; print $1} gawk-4.0.1+dfsg.orig/test/reg/exp-eq.in0000644000175000017500000000000611463242060016622 0ustar schotschot1 2 3 gawk-4.0.1+dfsg.orig/test/reg/func2.awk0000644000175000017500000000006111463242060016615 0ustar schotschotfunction dummy() { ; } BEGIN { print dummy (1) } gawk-4.0.1+dfsg.orig/test/reg/func.in0000644000175000017500000000000011463242060016350 0ustar schotschotgawk-4.0.1+dfsg.orig/test/reg/Obsolete/0000755000175000017500000000000011463242060016653 5ustar schotschotgawk-4.0.1+dfsg.orig/test/reg/Obsolete/log.good0000644000175000017500000000016611463242060020311 0ustar schotschotlog: SING error -Inf gawk: reg/log.awk:1: warning: log called with negative argument -1 log: DOMAIN error NaN 4.60517 gawk-4.0.1+dfsg.orig/test/reg/Obsolete/log.awk0000644000175000017500000000005211463242060020135 0ustar schotschotBEGIN { print log(0), log(-1), log(100) } gawk-4.0.1+dfsg.orig/test/reg/Obsolete/exp.awk0000644000175000017500000000005711463242060020155 0ustar schotschotBEGIN { print exp(0), exp(1000000), exp(0.5) } gawk-4.0.1+dfsg.orig/test/reg/Obsolete/exp.in0000644000175000017500000000000011463242060017765 0ustar schotschotgawk-4.0.1+dfsg.orig/test/reg/Obsolete/log.in0000644000175000017500000000000011463242060017752 0ustar schotschotgawk-4.0.1+dfsg.orig/test/reg/Obsolete/exp.good0000644000175000017500000000011711463242060020320 0ustar schotschot1 gawk: reg/exp.awk:1: warning: exp argument 1e+06 is out of range Inf 1.64872 gawk-4.0.1+dfsg.orig/test/reg/func2.good0000644000175000017500000000017111463242060016765 0ustar schotschotgawk: reg/func2.awk:2: error: function `dummy' called with space between name and `(', or used as a variable or an array gawk-4.0.1+dfsg.orig/test/reg/func2.in0000644000175000017500000000000011463242060016432 0ustar schotschotgawk-4.0.1+dfsg.orig/test/datanonl.awk0000644000175000017500000000017411463242060016630 0ustar schotschot# example program from alex@bofh.torun.pl BEGIN { IGNORECASE=1 } /\w+@([[:alnum:]]+\.)+[[:alnum:]]+[[:blank:]]+/ {print $0} gawk-4.0.1+dfsg.orig/test/wideidx2.awk0000644000175000017500000000507011463242060016547 0ustar schotschot# Date: Thu, 27 Apr 2006 20:59:03 +0100 # From: Lee Haywood # Subject: gawk multi-byte support bugs, assertion bug and fix. # To: bug-gawk@gnu.org # Message-id: <60962be00604271259na0d8fdayb9d0c69a853216e8@mail.gmail.com> # MIME-version: 1.0 # Content-type: multipart/alternative; # boundary="----=_Part_10136_920879.1146167943492" # Status: RO # # ------=_Part_10136_920879.1146167943492 # Content-Type: text/plain; charset=ISO-8859-1 # Content-Transfer-Encoding: quoted-printable # Content-Disposition: inline # # # Firstly, I have been getting the following error from version 3.1.5. # # awk: node.c:515: unref: Assertion `(tmp->flags & 4096) !=3D 0' failed. # # In mk_number() in node.c the MBS_SUPPORT code is inside the GAWKDEBUG # section - moving it outside explicitly clears the string values, which # prevents the assertion error from occurring. The corrected version is # shown at the end of this message. # # As an aside, I also noticed that n->wstptr is not cleared by # set_field() and set_record() in field.c when the flags are set to # exclude WSTRCUR. However, I do not have a test case to show if # changing them makes any difference. # # A second problem also occurs when gawk 3.1.5 is compiled with # multi-byte character support (MBS_SUPPORT). The following code should # change the index of the substring "bc" from 2 to 3, but it gets # reported as 2 in both cases - which is obviously disastrous. # # awk 'BEGIN { # Value =3D "abc" # # print "Before <" Value "> ", # index( Value, "bc" ) # # sub( /bc/, "bbc", Value ) # # print "After <" Value ">", # index( Value, "bc" ) # }' # # Compiling with MBS_SUPPORT undefined makes these problems go away. # # /* mk_number --- allocate a node with defined number */ # # NODE * # mk_number(AWKNUM x, unsigned int flags) # { # register NODE *r; # # getnode(r); # r->type =3D Node_val; # r->numbr =3D x; # r->flags =3D flags; # #if defined MBS_SUPPORT # r->wstptr =3D NULL; # r->wstlen =3D 0; # #endif /* MBS_SUPPORT */ # #ifdef GAWKDEBUG # r->stref =3D 1; # r->stptr =3D NULL; # r->stlen =3D 0; # #if defined MBS_SUPPORT # r->flags &=3D ~WSTRCUR; # #endif /* MBS_SUPPORT */ # #endif /* GAWKDEBUG */ # return r; # } # # Thanks. # # -- # Lee Haywood. BEGIN { Value = "abc" print "Before <" Value "> ", index( Value, "bc" ) sub( /bc/, "bbc", Value ) print "After <" Value ">", index( Value, "bc" ) } gawk-4.0.1+dfsg.orig/test/gsubtst4.awk0000644000175000017500000001276011463242060016613 0ustar schotschot# From arnold Thu May 9 17:27:03 2002 # Return-Path: # Received: (from arnold@localhost) # by skeeve.com (8.11.6/8.11.6) id g49ER3K27925 # for arnold; Thu, 9 May 2002 17:27:03 +0300 # Date: Thu, 9 May 2002 17:27:03 +0300 # From: Aharon Robbins # Message-Id: <200205091427.g49ER3K27925@skeeve.com> # To: arnold@skeeve.com # Subject: fixme # X-SpamBouncer: 1.4 (10/07/01) # X-SBRule: Pattern Match (Other Patterns) (Score: 4850) # X-SBRule: Pattern Match (Spam Phone #) (Score: 0) # X-SBClass: Blocked # Status: RO # # Path: ord-read.news.verio.net!dfw-artgen!iad-peer.news.verio.net!news.verio.net!fu-berlin.de!uni-berlin.de!host213-120-137-48.in-addr.btopenworld.COM!not-for-mail # From: laura@madonnaweb.com (laura fairhead) # Newsgroups: comp.lang.awk # Subject: bug in gawk3.1.0 regex code # Date: Wed, 08 May 2002 23:31:40 GMT # Organization: that'll be the daewooo :) # Lines: 211 # Message-ID: <3cd9b0f7.29675926@NEWS.CIS.DFN.DE> # Reply-To: laura@madonnaweb.com # NNTP-Posting-Host: host213-120-137-48.in-addr.btopenworld.com (213.120.137.48) # X-Trace: fu-berlin.de 1020900891 18168286 213.120.137.48 (16 [53286]) # X-Newsreader: Forte Free Agent 1.21/32.243 # Xref: dfw-artgen comp.lang.awk:13059 # # # I believe I've just found a bug in gawk3.1.0 implementation of # extended regular expressions. It seems to be down to the alternation # operator; when using an end anchor '$' as a subexpression in an # alternation and the entire matched RE is a nul-string it fails # to match the end of string, for example; # # gsub(/$|2/,"x") # print # # input = 12345 # expected output = 1x345x # actual output = 1x345 # # The start anchor '^' always works as expected; # # gsub(/^|2/,"x") # print # # input = 12345 # expected output = x1x345 # actual output = x1x345 # # This was with POSIX compliance enabled althought that doesn't # effect the result. # # I checked on gawk3.0.6 and got exactly the same results however # gawk2.15.6 gives the expected results. # # I'm about to post a bug report about this into gnu.utils.bug # but I thought I'd post it here first in case anyone has # any input/comments/whatever .... # # Complete test results were as follows; # # input 12345 # output gsub(/regex/,"x",input) # # regex output # (^) x12345 # ($) 12345x # (^)|($) x12345x # ($)|(^) x12345x # (2) 1x345 # (^)|2 x1x345 # 2|(^) x1x345 # ($)|2 1x345 # 2|($) 1x345 # (2)|(^) x1x345 # (^)|(2) x1x345 # (2)|($) 1x345 # ($)|(2) 1x345 # .((2)|(^)) x345 # .((^)|(2)) x345 # .((2)|($)) x34x # .(($)|(2)) x34x # x{0}((2)|(^)) x1x345 # x{0}((^)|(2)) x1x345 # x{0}((2)|($)) 1x345 # x{0}(($)|(2)) 1x345 # x*((2)|(^)) x1x345 # x*((^)|(2)) x1x345 # x*((2)|($)) 1x345 # x*(($)|(2)) 1x345 # # Here's the test program I used, a few of the cases use ERE {n[,[m]]} # operators so that will have to be commented out or have a check # added or something (should have put a conditional in I know... ;-) # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # BEGIN{ TESTSTR="12345" print "input "TESTSTR print "output gsub(/regex/,\"x\",input)" print "" print "regex output" $0=TESTSTR gsub(/(^)/,"x") print "(^) "$0 $0=TESTSTR gsub(/($)/,"x") print "($) "$0 $0=TESTSTR gsub(/(^)|($)/,"x") print "(^)|($) "$0 $0=TESTSTR gsub(/($)|(^)/,"x") print "($)|(^) "$0 $0=TESTSTR gsub(/2/,"x") print "(2) "$0 $0=TESTSTR gsub(/(^)|2/,"x") print "(^)|2 "$0 $0=TESTSTR gsub(/2|(^)/,"x") print "2|(^) "$0 $0=TESTSTR gsub(/($)|2/,"x") print "($)|2 "$0 $0=TESTSTR gsub(/2|($)/,"x") print "2|($) "$0 $0=TESTSTR gsub(/(2)|(^)/,"x") print "(2)|(^) "$0 $0=TESTSTR gsub(/(^)|(2)/,"x") print "(^)|(2) "$0 $0=TESTSTR gsub(/(2)|($)/,"x") print "(2)|($) "$0 $0=TESTSTR gsub(/($)|(2)/,"x") print "($)|(2) "$0 $0=TESTSTR gsub(/.((2)|(^))/,"x") print ".((2)|(^)) "$0 $0=TESTSTR gsub(/.((^)|(2))/,"x") print ".((^)|(2)) "$0 $0=TESTSTR gsub(/.((2)|($))/,"x") print ".((2)|($)) "$0 $0=TESTSTR gsub(/.(($)|(2))/,"x") print ".(($)|(2)) "$0 $0=TESTSTR gsub(/x{0}((2)|(^))/,"x") print "x{0}((2)|(^)) "$0 $0=TESTSTR gsub(/x{0}((^)|(2))/,"x") print "x{0}((^)|(2)) "$0 $0=TESTSTR gsub(/x{0}((2)|($))/,"x") print "x{0}((2)|($)) "$0 $0=TESTSTR gsub(/x{0}(($)|(2))/,"x") print "x{0}(($)|(2)) "$0 $0=TESTSTR gsub(/x*((2)|(^))/,"x") print "x*((2)|(^)) "$0 $0=TESTSTR gsub(/x*((^)|(2))/,"x") print "x*((^)|(2)) "$0 $0=TESTSTR gsub(/x*((2)|($))/,"x") print "x*((2)|($)) "$0 $0=TESTSTR gsub(/x*(($)|(2))/,"x") print "x*(($)|(2)) "$0 $0=TESTSTR gsub(/x{0}^/,"x") print "x{0}^ "$0 $0=TESTSTR gsub(/x{0}$/,"x") print "x{0}$ "$0 $0=TESTSTR gsub(/(x{0}^)|2/,"x") print "(x{0}^)|2 "$0 $0=TESTSTR gsub(/(x{0}$)|2/,"x") print "(x{0}$)|2 "$0 } # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # byefrom # # -- # laura fairhead # laura@madonnaweb.com http://lf.8k.com # # if you are bored crack my sig. # 1F8B0808CABB793C0000666667002D8E410E83300C04EF91F2877D00CA138A7A # EAA98F30C494480157B623C4EF1B508FDED1CEFA9152A23DE35D661593C5318E # 630C313CD701BE92E390563326EE17A3CA818F5266E4C2461547F1F5267659CA # 8EE2092F76C329ED02CA430C5373CC62FF94BAC6210B36D9F9BC4AB53378D978 # 80F2978A1A6E5D6F5133B67B6113178DC1059526698AFE5C17A5187E7D930492 # gawk-4.0.1+dfsg.orig/test/mbstr1.ok0000644000175000017500000000000411463242060016057 0ustar schotschot4 1 gawk-4.0.1+dfsg.orig/test/uninit5.awk0000644000175000017500000001110111463242060016413 0ustar schotschot#From gregfjohnson@yahoo.com Sun Aug 30 08:36:36 2009 #Return-Path: #Received: from aahz (localhost [127.0.0.1]) # by skeeve.com (8.14.1/8.14.1) with ESMTP id n7U5WoJ2003836 # for ; Sun, 30 Aug 2009 08:36:36 +0300 #X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on server1.f7.net #X-Spam-Level: #X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED # autolearn=ham version=3.2.4 #X-Envelope-From: gregfjohnson@yahoo.com #X-Envelope-To: #Received: from server1.f7.net [64.34.169.74] # by aahz with IMAP (fetchmail-6.3.7) # for (single-drop); Sun, 30 Aug 2009 08:36:36 +0300 (IDT) #Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) # by f7.net (8.11.7-20030920/8.11.7) with ESMTP id n7U33m709453 # for ; Sat, 29 Aug 2009 22:03:48 -0500 #Received: from mail.gnu.org ([199.232.76.166]:42095 helo=mx10.gnu.org) # by fencepost.gnu.org with esmtp (Exim 4.67) # (envelope-from ) # id 1Mhai6-0004Qt-3R # for bug-gawk@gnu.org; Sat, 29 Aug 2009 23:04:06 -0400 #Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) # (envelope-from ) # id 1Mhai5-00062I-EM # for bug-gawk@gnu.org; Sat, 29 Aug 2009 23:04:05 -0400 #Received: from web33507.mail.mud.yahoo.com ([68.142.206.156]:28597) # by monty-python.gnu.org with smtp (Exim 4.60) # (envelope-from ) # id 1Mhai5-00061w-2n # for bug-gawk@gnu.org; Sat, 29 Aug 2009 23:04:05 -0400 #Received: (qmail 68722 invoked by uid 60001); 30 Aug 2009 03:04:03 -0000 #DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1251601443; bh=9h2ZOOgxUh+s8Ow5/ZMWUxcviy2L4rpiaNamPAXxhEk=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=tWxCQq/aTOT5lhtdPc5hxtXzOjDFmLU6Ao0BSlwbeeBsd9Wl6DU3JCR4gTkoL0aVUOTdjMjgRY7I72yCht+YruDiqZrvtSKvUoAvZAKcPG26RE4jzxUlxQklEHZG9mq9h2gpTIiLYehYDiC0975wukwi/e7ePADfkFwg8eTnT44= #DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; # s=s1024; d=yahoo.com; # h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; # b=LWfhVgxojFG1eYoRrxtrS3YOfH3MTUVTYZle/4utMQEPZQfsmrn6GBwBfThryGqJyZfg38/7JfK9cz/Q3Yt+mf8+xl9/m+Srckc+Xvi42CE0OmoN439vCyhAD8A74XOJsmfKDjJ/+LtioShStUohj1iYDDmRTN4RnnP9X4xnt3c=; #Message-ID: <410222.68490.qm@web33507.mail.mud.yahoo.com> #X-YMail-OSG: mfjax.MVM1lI2q5gcl6bChbn6zHgNgj1fByHWJSzB8ZZUmI2QCH6pNwV_IaHxcqecu.VqjKUR6HQhXbziUnX.v5E2nOE61ass9AzqfdVOtKTEAzTPQJ8Z7QB7fq7BMtjn8yohDR6mwOyVTqv3RZh0m1Us7sLit6UmcgeSvJo2rROAmeceq.FBwk2XnEp2_QsljjPHak_WXyvtAK81klDv5qQORWQWqR9q79x7yxORL6fLWwb_x6mZZMSOUaA0p8.ucT453eqT1L8NGkthF.fXmOM3_EYd03zUgr9Sb.zvMvbDC3MCMnVr0JT1uroLmFtVIdTojrFJYFQEDFSB9zT3Ua80ZpGXrjQGx3rZw-- #Received: from [71.165.246.171] by web33507.mail.mud.yahoo.com via HTTP; Sat, 29 Aug 2009 20:04:03 PDT #X-Mailer: YahooMailClassic/6.1.2 YahooMailWebService/0.7.338.2 #Date: Sat, 29 Aug 2009 20:04:03 -0700 (PDT) #From: Greg Johnson #Subject: bugs in passing uninitialized array to a function #To: bug-gawk@gnu.org #MIME-Version: 1.0 #Content-Type: multipart/mixed; boundary="0-1690489838-1251601443=:68490" #X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) #Status: RO # #--0-1690489838-1251601443=:68490 #Content-Type: text/plain; charset=us-ascii # #I am using gawk version 3.1.7. # #The attached programs illustrate what look to me like two bugs #in the handling of uninitialized variables to functions that treat #them as arrays. # #Greg Johnson # # # #--0-1690489838-1251601443=:68490 #Content-Type: application/octet-stream; name=b1 #Content-Transfer-Encoding: base64 #Content-Disposition: attachment; filename="b1" # bug? on uninitialized array, length(a) prints as 3, then the loop # behaves differently, iterating once. so, length() behaves differently # on two calls to the same variable, which was not changed. function prt1(a, len) { print "length: " length(a) for (i = 1; i <= length(a); i++) printf "<" i "," a[i] "> " print "\n" } BEGIN { prt1(zzz) } #--0-1690489838-1251601443=:68490 #Content-Type: application/octet-stream; name=b2 #Content-Transfer-Encoding: base64 #Content-Disposition: attachment; filename="b2" # shouldn't an uninitialized array have length zero? # length is printed as 1, and the loop iterates once. function prt(a, len) { len = length(a) print "length: " len for (i = 1; i <= len; i++) printf "<" i "," a[i] "> " print "\n" } BEGIN { prt(zzz) } #--0-1690489838-1251601443=:68490-- gawk-4.0.1+dfsg.orig/test/tweakfld.in0000644000175000017500000000174211463242060016457 0ustar schotschot0.277 N/A N/A 1 1 ASC/Hank Donnelly N/A NONE ALL,ALL N/A N/A N/A Count Rate Linearity EIPS C-Ka 1.108 0.13484 N/A N/A C8H8 10.32 C8H8 20.64 FIXED 1000 NO 0 0 0 HRC,I 1000 N/A N/A N/A N/A N/A N/A N/A N/A N/A 0 N/A APT APT LISSAJOUS 44.7175 44.7175 1 N/A N/A N/A N/A N/A 0 N/A HRCCTRTLIN 0 N/A N/A N/A 10 N/A 180 0 0 N/A N/A FPSI rate 1.486 N/A N/A 2 1 ASC/Hank Donnelly N/A NONE ALL,ALL N/A N/A N/A Count Rate Linearity EIPS Al-Ka 4.458 0.642119 N/A N/A Al 18.38 Al 36.76 FIXED 1000 NO 0 0 0 HRC,I 1000 N/A N/A N/A N/A N/A N/A N/A N/A N/A 0 N/A APT APT LISSAJOUS 5.55556 5.55556 1 N/A N/A N/A N/A N/A 0 N/A HRCCTRTLIN 0 N/A N/A N/A 10 N/A 180 0 0 N/A N/A FPSI rate 4.51 N/A N/A 3 1 ASC/Hank Donnelly N/A NONE ALL,ALL N/A N/A N/A Count Rate Linearity EIPS Ti-Ka 22.55 3.02894 N/A N/A Ti 40.6 N/A N/A FIXED 1000 NO 0 0 0 HRC,I 1000 N/A N/A N/A N/A N/A N/A N/A N/A N/A 0 N/A APT APT LISSAJOUS 5.55556 5.55556 1 N/A N/A N/A N/A N/A 0 N/A HRCCTRTLIN 0 N/A N/A N/A 10 N/A 180 0 0 N/A N/A FPSI rate gawk-4.0.1+dfsg.orig/test/printfbad2.ok0000644000175000017500000000037011463242060016710 0ustar schotschotgawk: printfbad2.awk:2: (FILENAME=printfbad2.in FNR=1) warning: ignoring unknown format specifier character `b': no argument converted gawk: printfbad2.awk:2: (FILENAME=printfbad2.in FNR=1) warning: field width is ignored for `%%' specifier %28b%c gawk-4.0.1+dfsg.orig/test/fsbs.awk0000644000175000017500000000004411463242060015761 0ustar schotschotBEGIN { FS = "\\" } { print $1, $2} gawk-4.0.1+dfsg.orig/test/ofmt.ok0000644000175000017500000000023211463242060015617 0ustar schotschotalt/binaries/warez/crypto - - alt/fan/douglas-adams 7491 7407 alt/os/linux - - alt/security 9641 9617 alt/security/index - - alt/security/keydist 253 253 gawk-4.0.1+dfsg.orig/test/getlnhd.ok0000644000175000017500000000005611463242060016303 0ustar schotschotselect * from user where Name = 'O\'Donell' gawk-4.0.1+dfsg.orig/test/prtoeval.awk0000644000175000017500000000017311463242060016663 0ustar schotschotfunction returns_a_str() { print "" ; return "'A STRING'" } BEGIN { print "partial line:", returns_a_str() } gawk-4.0.1+dfsg.orig/test/noloop2.in0000644000175000017500000000005111463242060016236 0ustar schotschot''Italics with an apostrophe' embedded'' gawk-4.0.1+dfsg.orig/test/match1.ok0000644000175000017500000000027611463242060016037 0ustar schotschotarr[0] = "foooobazbarrrrr" arr[0, "start"] = 1, arr[0, "length"] = 15 arr[1] = "foooo" arr[1, "start"] = 1, arr[1, "length"] = 5 arr[2] = "barrrrr" arr[2, "start"] = 9, arr[2, "length"] = 7 gawk-4.0.1+dfsg.orig/test/fwtest2.awk0000644000175000017500000000457211463242060016434 0ustar schotschot# Date: Fri, 24 Mar 2006 15:17:24 +0100 # From: =?UTF-8?Q?Ram=C3=B3n_Garc=C3=ADa?= # Subject: Re: Bug when parsing FIELDWIDTHS # In-reply-to: <200603241144.k2OBiFOX030158@skeeve.com> # To: Aharon Robbins # Message-id: # MIME-version: 1.0 # Content-type: multipart/mixed; boundary="----=_Part_9022_17179442.1143209844259" # DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; # h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; # b=QVst9uUwAllKuDwXhuHbNjpRJStt3nEGc7p+BMG+HNk/qyHmnG/TYXSvIVKgZFja1thLhYbPYncw2MyEHtKyZuiTJCYqvpjWeST9qQNfxVMeu8FahqAky7n8ldsjOK6ncbCoE3hZe/g/Z9ZsVFC9LORXvM5uo7y1MGkUhgxO4qU= # # ------=_Part_9022_17179442.1143209844259 # Content-Type: text/plain; charset=UTF-8 # Content-Transfer-Encoding: base64 # Content-Disposition: inline # # DQpTdXJlLiBIZXJlIGl0IGlzLg0KDQojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj # IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjDQpUaGlz # IE1haWwgV2FzIFNjYW5uZWQgYnkgMDEyLm5ldCBBbnRpVmlydXMgU2VydmljZTItIFBvd2VyZWQg # YnkgVHJlbmRNaWNybyBJbnRlcnNjYW4NCg== # ------=_Part_9022_17179442.1143209844259 # Content-Type: application/octet-stream; name=bug_data # Content-Transfer-Encoding: 7bit # X-Attachment-Id: f_el6ll617 # Content-Disposition: attachment; filename="bug_data" # # 0.4867373206 1.3206333033 -0.2333178127 # 0.5668176165 1.3711756314 -0.2193558040 # 0.4325251781 1.3399488722 -0.1568307497 # 0.4900487563 1.3295759570 -0.2217392402 # -0.6790064191 1.2536623801 -0.2955415433 # -0.6311440220 1.2966579993 -0.2246692210 # -0.7209390351 1.1783407099 -0.2539408209 # -0.6782473356 1.2495242556 -0.2811436366 # -0.7062054082 1.1223820964 -1.1619805834 # -0.6491590119 1.1248946162 -1.0851579675 # -0.7948856821 1.1208852325 -1.1259821556 # -0.7102549262 1.1225121126 -1.1475381286 # # ------=_Part_9022_17179442.1143209844259 # Content-Type: application/octet-stream; name=bug.awk # Content-Transfer-Encoding: 7bit # X-Attachment-Id: f_el6llnjj # Content-Disposition: attachment; filename="bug.awk" # #!/usr/bin/awk -f BEGIN { FIELDWIDTHS = "15 15 15"; } { x = $1; y = $2; z = $3; print "x y z", x, y, z } # # ------=_Part_9022_17179442.1143209844259-- # gawk-4.0.1+dfsg.orig/test/dynlj.awk0000644000175000017500000000005411463242060016145 0ustar schotschotBEGIN { printf "%*sworld\n", -20, "hello" } gawk-4.0.1+dfsg.orig/test/aasort.awk0000644000175000017500000000106311463614133016323 0ustar schotschotfunction 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]) } gawk-4.0.1+dfsg.orig/test/indirectcall.ok0000644000175000017500000000047611463242060017321 0ustar schotschotBiology 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> gawk-4.0.1+dfsg.orig/test/nfldstr.awk0000644000175000017500000000022711463242060016503 0ustar schotschot$1 == 0 { print "bug" } { $0 = "0" if (!$0) print "another bug" $0 = a = "0" if (!$0) print "yet another bug" if ($1) print "a buggie" } gawk-4.0.1+dfsg.orig/test/profile3.ok0000644000175000017500000000027311526012244016401 0ustar schotschot # BEGIN block(s) BEGIN { 1 the_func = "p" 1 print @the_func("Hello") } # Functions, listed alphabetically 1 function p(str) { 1 print "! " str " !" } gawk-4.0.1+dfsg.orig/test/rebt8b1.ok0000644000175000017500000000073011463242060016124 0ustar schotschot[an]*n bANas ANd ANases iAN cAN [anú]*n bANas ANd ANases iAN cAN [aú]*n bANANas ANd ANANases iAN cANAN [an]n bANANas ANd ANANases in cANaAN [aú]n bANANas ANd ANANases in cANaAN [anú]n bANANas ANd ANANases in cANaAN [an]?n bANANas ANd ANANases iAN cANaAN [aú]?n bANANas ANd ANANases iAN cANaAN [anú]?n bANANas ANd ANANases iAN cANaAN [an]+n bANas ANd ANases in cAN [aú]+n bANANas ANd ANANases in cANAN [anú]+n bANas ANd ANases in cAN gawk-4.0.1+dfsg.orig/test/funstack.awk0000644000175000017500000006433411475002303016653 0ustar schotschot### ==================================================================== ### @Awk-file{ ### author = "Nelson H. F. Beebe", ### version = "1.00", ### date = "09 October 1996", ### time = "15:57:06 MDT", ### filename = "journal-toc.awk", ### address = "Center for Scientific Computing ### Department of Mathematics ### University of Utah ### Salt Lake City, UT 84112 ### USA", ### telephone = "+1 801 581 5254", ### FAX = "+1 801 581 4148", ### URL = "http://www.math.utah.edu/~beebe", ### checksum = "25092 977 3357 26493", ### email = "beebe@math.utah.edu (Internet)", ### codetable = "ISO/ASCII", ### keywords = "BibTeX, bibliography, HTML, journal table of ### contents", ### supported = "yes", ### docstring = "Create a journal cover table of contents from ### Article{...} entries in a journal BibTeX ### .bib file for checking the bibliography ### database against the actual journal covers. ### The output can be either plain text, or HTML. ### ### Usage: ### bibclean -max-width 0 BibTeX-file(s) | \ ### bibsort -byvolume | \ ### awk -f journal-toc.awk \ ### [-v HTML=nnn] [-v INDENT=nnn] \ ### [-v BIBFILEURL=url] >foo.toc ### ### or if the bibliography is already sorted ### by volume, ### ### bibclean -max-width 0 BibTeX-file(s) | \ ### awk -f journal-toc.awk \ ### [-v HTML=nnn] [-v INDENT=nnn] \ ### [-v BIBFILEURL=url] >foo.toc ### ### A non-zero value of the command-line option, ### HTML=nnn, results in HTML output instead of ### the default plain ASCII text (corresponding ### to HTML=0). The ### ### The INDENT=nnn command-line option specifies ### the number of blanks to indent each logical ### level of HTML. The default is INDENT=4. ### INDENT=0 suppresses indentation. The INDENT ### option has no effect when the default HTML=0 ### (plain text output) option is in effect. ### ### When HTML output is selected, the ### BIBFILEURL=url command-line option provides a ### way to request hypertext links from table of ### contents page numbers to the complete BibTeX ### entry for the article. These links are ### created by appending a sharp (#) and the ### citation label to the BIBFILEURL value, which ### conforms with the practice of ### bibtex-to-html.awk. ### ### The HTML output form may be useful as a more ### compact representation of journal article ### bibliography data than the original BibTeX ### file provides. Of course, the ### table-of-contents format provides less ### information, and is considerably more ### troublesome for a computer program to parse. ### ### When URL key values are provided, they will ### be used to create hypertext links around ### article titles. This supports journals that ### provide article contents on the World-Wide ### Web. ### ### For parsing simplicity, this program requires ### that BibTeX ### ### key = "value" ### ### and ### ### @String{name = "value"} ### ### specifications be entirely contained on ### single lines, which is readily provided by ### the `bibclean -max-width 0' filter. It also ### requires that bibliography entries begin and ### end at the start of a line, and that ### quotation marks, rather than balanced braces, ### delimit string values. This is a ### conventional format that again can be ### guaranteed by bibclean. ### ### This program requires `new' awk, as described ### in the book ### ### Alfred V. Aho, Brian W. Kernighan, and ### Peter J. Weinberger, ### ``The AWK Programming Language'', ### Addison-Wesley (1988), ISBN ### 0-201-07981-X, ### ### such as provided by programs named (GNU) ### gawk, nawk, and recent AT&T awk. ### ### The checksum field above contains a CRC-16 ### checksum as the first value, followed by the ### equivalent of the standard UNIX wc (word ### count) utility output of lines, words, and ### characters. This is produced by Robert ### Solovay's checksum utility.", ### } ### ==================================================================== BEGIN { initialize() } /^ *@ *[Ss][Tt][Rr][Ii][Nn][Gg] *\{/ { do_String(); next } /^ *@ *[Pp][Rr][Ee][Aa][Mm][Bb][Ll][Ee]/ { next } /^ *@ *[Aa][Rr][Tt][Ii][Cc][Ll][Ee]/ { do_Article(); next } /^ *@/ { do_Other(); next } /^ *author *= *\"/ { do_author(); next } /^ *journal *= */ { do_journal(); next } /^ *volume *= *\"/ { do_volume(); next } /^ *number *= *\"/ { do_number(); next } /^ *year *= *\"/ { do_year(); next } /^ *month *= */ { do_month(); next } /^ *title *= *\"/ { do_title(); next } /^ *pages *= *\"/ { do_pages(); next } /^ *URL *= *\"/ { do_URL(); next } /^ *} *$/ { if (In_Article) do_end_entry(); next } END { terminate() } ######################################################################## # NB: The programming conventions for variables in this program are: # # UPPERCASE global constants and user options # # Initialuppercase global variables # # lowercase local variables # # Any deviation is an error! # ######################################################################## function do_Article() { In_Article = 1 Citation_label = $0 sub(/^[^\{]*\{/,"",Citation_label) sub(/ *, *$/,"",Citation_label) Author = "" Title = "" Journal = "" Volume = "" Number = "" Month = "" Year = "" Pages = "" Url = "" } function do_author() { Author = TeX_to_HTML(get_value($0)) } function do_end_entry( k,n,parts) { n = split(Author,parts," and ") if (Last_number != Number) do_new_issue() for (k = 1; k < n; ++k) print_toc_line(parts[k] " and", "", "") Title_prefix = html_begin_title() Title_suffix = html_end_title() if (html_length(Title) <= (MAX_TITLE_CHARS + MIN_LEADERS)) # complete title fits on line print_toc_line(parts[n], Title, html_begin_pages() Pages html_end_pages()) else # need to split long title over multiple lines do_long_title(parts[n], Title, html_begin_pages() Pages html_end_pages()) } function do_journal() { if ($0 ~ /[=] *"/) # have journal = "quoted journal name", Journal = get_value($0) else # have journal = journal-abbreviation, { Journal = get_abbrev($0) if (Journal in String) # replace abbrev by its expansion Journal = String[Journal] } gsub(/\\-/,"",Journal) # remove discretionary hyphens } function do_long_title(author,title,pages, last_title,n) { title = trim(title) # discard leading and trailing space while (length(title) > 0) { n = html_breakpoint(title,MAX_TITLE_CHARS+MIN_LEADERS) last_title = substr(title,1,n) title = substr(title,n+1) sub(/^ +/,"",title) # discard any leading space print_toc_line(author, last_title, (length(title) == 0) ? pages : "") author = "" } } function do_month( k,n,parts) { Month = ($0 ~ /[=] *"/) ? get_value($0) : get_abbrev($0) gsub(/[\"]/,"",Month) gsub(/ *# *\\slash *# */," / ",Month) gsub(/ *# *-+ *# */," / ",Month) n = split(Month,parts," */ *") Month = "" for (k = 1; k <= n; ++k) Month = Month ((k > 1) ? " / " : "") \ ((parts[k] in Month_expansion) ? Month_expansion[parts[k]] : parts[k]) } function do_new_issue() { Last_number = Number if (HTML) { if (Last_volume != Volume) { Last_volume = Volume print_line(prefix(2) "
") } html_end_toc() html_begin_issue() print_line(prefix(2) Journal "
") } else { print_line("") print_line(Journal) } print_line(strip_html(vol_no_month_year())) if (HTML) { html_end_issue() html_toc_entry() html_begin_toc() } else print_line("") } function do_number() { Number = get_value($0) } function do_Other() { In_Article = 0 } function do_pages() { Pages = get_value($0) sub(/--[?][?]/,"",Pages) } function do_String() { sub(/^[^\{]*\{/,"",$0) # discard up to and including open brace sub(/\} *$/,"",$0) # discard from optional whitespace and trailing brace to end of line String[get_key($0)] = get_value($0) } function do_title() { Title = TeX_to_HTML(get_value($0)) } function do_URL( parts) { Url = get_value($0) split(Url,parts,"[,;]") # in case we have multiple URLs Url = trim(parts[1]) } function do_volume() { Volume = get_value($0) } function do_year() { Year = get_value($0) } function get_abbrev(s) { # return abbrev from ``key = abbrev,'' sub(/^[^=]*= */,"",s) # discard text up to start of non-blank value sub(/ *,? *$/,"",s) # discard trailing optional whitspace, quote, # optional comma, and optional space return (s) } function get_key(s) { # return kay from ``key = "value",'' sub(/^ */,"",s) # discard leading space sub(/ *=.*$/,"",s) # discard everthing after key return (s) } function get_value(s) { # return value from ``key = "value",'' sub(/^[^\"]*\" */,"",s) # discard text up to start of non-blank value sub(/ *\",? *$/,"",s) # discard trailing optional whitspace, quote, # optional comma, and optional space return (s) } function html_accents(s) { if (index(s,"\\") > 0) # important optimization { # Convert common lower-case accented letters according to the # table on p. 169 of in Peter Flynn's ``The World Wide Web # Handbook'', International Thomson Computer Press, 1995, ISBN # 1-85032-205-8. The official table of ISO Latin 1 SGML # entities used in HTML can be found in the file # /usr/local/lib/html-check/lib/ISOlat1.sgml (your path # may differ). 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(/\{\\\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) # 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) # ignore eth and thorn 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(/\{\\'Y\}/, "\\Ý", s) gsub(/\{\\ss\}/, "\\ß", s) # Others not mentioned in Flynn's book gsub(/\{\\'\\i\}/,"\\í", s) gsub(/\{\\'\\j\}/,"j", s) } return (s) } function html_begin_issue() { print_line("") print_line(prefix(2) "


") print_line("") print_line(prefix(2) "

") print_line(prefix(3) "") } function html_begin_pages() { return ((HTML && (BIBFILEURL != "")) ? ("") : "") } function html_begin_pre() { In_PRE = 1 print_line("
")
}


function html_begin_title()
{
	return ((HTML && (Url != "")) ? ("") : "")
}


function html_begin_toc()
{
	html_end_toc()
	html_begin_pre()
}


function html_body( k)
{
	for (k = 1; k <= BodyLines; ++k)
		print Body[k]
}

function html_breakpoint(title,maxlength, break_after,k)
{
	# Return the largest character position in title AFTER which we
	# can break the title across lines, without exceeding maxlength
	# visible characters.
	if (html_length(title) > maxlength)	# then need to split title across lines
	{
		# In the presence of HTML markup, the initialization of
		# k here is complicated, because we need to advance it
		# until html_length(title) is at least maxlength,
		# without invoking the expensive html_length() function
		# too frequently.  The need to split the title makes the
		# alternative of delayed insertion of HTML markup much
		# more complicated.
		break_after = 0
		for (k = min(maxlength,length(title)); k < length(title); ++k)
		{
			if (substr(title,k+1,1) == " ")
			{		# could break after position k
				if (html_length(substr(title,1,k)) <= maxlength)
					break_after = k
				else	# advanced too far, retreat back to last break_after
					break
			}
		}
		if (break_after == 0)		# no breakpoint found by forward scan
		{				# so switch to backward scan
			for (k = min(maxlength,length(title)) - 1; \
				(k > 0) && (substr(title,k+1,1) != " "); --k)
				;		# find space at which to break title
			if (k < 1)		# no break point found
				k = length(title) # so must print entire string
		}
		else
			k = break_after
	}
	else					# title fits on one line
		k = length(title)
	return (k)
}



function html_end_issue()
{
	print_line(prefix(3) "")
	print_line(prefix(2) "

") } function html_end_pages() { return ((HTML && (BIBFILEURL != "")) ? "" : "") } function html_end_pre() { if (In_PRE) { print_line("") In_PRE = 0 } } function html_end_title() { return ((HTML && (Url != "")) ? "" : "") } function html_end_toc() { html_end_pre() } function html_fonts(s, arg,control_word,k,level,n,open_brace) { open_brace = index(s,"{") if (open_brace > 0) # important optimization { level = 1 for (k = open_brace + 1; (level != 0) && (k <= length(s)); ++k) { if (substr(s,k,1) == "{") level++ else if (substr(s,k,1) == "}") level-- } # {...} is now found at open_brace ... (k-1) for (control_word in Font_decl_map) # look for {\xxx ...} { if (substr(s,open_brace+1,length(control_word)+1) ~ \ ("\\" control_word "[^A-Za-z]")) { n = open_brace + 1 + length(control_word) arg = trim(substr(s,n,k - n)) if (Font_decl_map[control_word] == "toupper") # arg -> ARG arg = toupper(arg) else if (Font_decl_map[control_word] != "") # arg -> arg arg = "<" Font_decl_map[control_word] ">" arg "" return (substr(s,1,open_brace-1) arg html_fonts(substr(s,k))) } } for (control_word in Font_cmd_map) # look for \xxx{...} { if (substr(s,open_brace - length(control_word),length(control_word)) ~ \ ("\\" control_word)) { n = open_brace + 1 arg = trim(substr(s,n,k - n)) if (Font_cmd_map[control_word] == "toupper") # arg -> ARG arg = toupper(arg) else if (Font_cmd_map[control_word] != "") # arg -> arg arg = "<" Font_cmd_map[control_word] ">" arg "" n = open_brace - length(control_word) - 1 return (substr(s,1,n) arg html_fonts(substr(s,k))) } } } return (s) } function html_header() { USER = ENVIRON["USER"] if (USER == "") USER = ENVIRON["LOGNAME"] if (USER == "") USER = "????" "hostname" | getline HOSTNAME "date" | getline DATE ("ypcat passwd | grep '^" USER ":' | awk -F: '{print $5}'") | getline PERSONAL_NAME if (PERSONAL_NAME == "") ("grep '^" USER ":' /etc/passwd | awk -F: '{print $5}'") | getline PERSONAL_NAME print "" print "" print "" print "" print "" print "" print "" print "" print "" print prefix(1) "" print prefix(2) "" print prefix(3) Journal print prefix(2) "" print prefix(2) "" print prefix(1) "" print "" print prefix(1) "" } function html_label( label) { label = Volume "(" Number "):" Month ":" Year # gsub(/[^A-Za-z0-9():,;.\/\-]/,"",label) gsub(/[^[:alnum:]():,;.\/\-]/,"",label) return (label) } function html_length(s) { # Return visible length of s, ignoring any HTML markup if (HTML) { gsub(/<\/?[^>]*>/,"",s) # remove SGML tags # gsub(/&[A-Za-z0-9]+;/,"",s) # remove SGML entities gsub(/&[[:alnum:]]+;/,"",s) # remove SGML entities } return (length(s)) } function html_toc() { print prefix(2) "

" print prefix(3) "Table of contents for issues of " Journal print prefix(2) "

" print HTML_TOC } function html_toc_entry() { HTML_TOC = HTML_TOC " " HTML_TOC = HTML_TOC vol_no_month_year() HTML_TOC = HTML_TOC "
" "\n" } function html_trailer() { html_end_pre() print prefix(1) "" print "" } function initialize() { # NB: Update these when the program changes VERSION_DATE = "[09-Oct-1996]" VERSION_NUMBER = "1.00" HTML = (HTML == "") ? 0 : (0 + HTML) if (INDENT == "") INDENT = 4 if (HTML == 0) INDENT = 0 # indentation suppressed in ASCII mode LEADERS = " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ." MAX_TITLE_CHARS = 36 # 36 produces a 79-char output line when there is # just an initial page number. If this is # increased, the LEADERS string may need to be # lengthened. MIN_LEADERS = 4 # Minimum number of characters from LEADERS # required when leaders are used. The total # number of characters that can appear in a # title line is MAX_TITLE_CHARS + MIN_LEADERS. # Leaders are omitted when the title length is # between MAX_TITLE_CHARS and this sum. MIN_LEADERS_SPACE = " " # must be at least MIN_LEADERS characters long Month_expansion["jan"] = "January" Month_expansion["feb"] = "February" Month_expansion["mar"] = "March" Month_expansion["apr"] = "April" Month_expansion["may"] = "May" Month_expansion["jun"] = "June" Month_expansion["jul"] = "July" Month_expansion["aug"] = "August" Month_expansion["sep"] = "September" Month_expansion["oct"] = "October" Month_expansion["nov"] = "November" Month_expansion["dec"] = "December" Font_cmd_map["\\emph"] = "EM" Font_cmd_map["\\textbf"] = "B" Font_cmd_map["\\textit"] = "I" Font_cmd_map["\\textmd"] = "" Font_cmd_map["\\textrm"] = "" Font_cmd_map["\\textsc"] = "toupper" Font_cmd_map["\\textsl"] = "I" Font_cmd_map["\\texttt"] = "t" Font_cmd_map["\\textup"] = "" Font_decl_map["\\bf"] = "B" Font_decl_map["\\em"] = "EM" Font_decl_map["\\it"] = "I" Font_decl_map["\\rm"] = "" Font_decl_map["\\sc"] = "toupper" Font_decl_map["\\sf"] = "" Font_decl_map["\\tt"] = "TT" Font_decl_map["\\itshape"] = "I" Font_decl_map["\\upshape"] = "" Font_decl_map["\\slshape"] = "I" Font_decl_map["\\scshape"] = "toupper" Font_decl_map["\\mdseries"] = "" Font_decl_map["\\bfseries"] = "B" Font_decl_map["\\rmfamily"] = "" Font_decl_map["\\sffamily"] = "" Font_decl_map["\\ttfamily"] = "TT" } function min(a,b) { return (a < b) ? a : b } function prefix(level) { # Return a prefix of up to 60 blanks if (In_PRE) return ("") else return (substr(" ", \ 1, INDENT * level)) } function print_line(line) { if (HTML) # must buffer in memory so that we can accumulate TOC Body[++BodyLines] = line else print line } function print_toc_line(author,title,pages, extra,leaders,n,t) { # When we have a multiline title, the hypertext link goes only # on the first line. A multiline hypertext link looks awful # because of long underlines under the leading indentation. if (pages == "") # then no leaders needed in title lines other than last one t = sprintf("%31s %s%s%s", author, Title_prefix, title, Title_suffix) else # last title line, with page number { n = html_length(title) # potentially expensive extra = n % 2 # extra space for aligned leader dots if (n <= MAX_TITLE_CHARS) # then need leaders leaders = substr(LEADERS, 1, MAX_TITLE_CHARS + MIN_LEADERS - extra - \ min(MAX_TITLE_CHARS,n)) else # title (almost) fills line, so no leaders leaders = substr(MIN_LEADERS_SPACE,1, \ (MAX_TITLE_CHARS + MIN_LEADERS - extra - n)) t = sprintf("%31s %s%s%s%s%s %4s", \ author, Title_prefix, title, Title_suffix, \ (extra ? " " : ""), leaders, pages) } Title_prefix = "" # forget any hypertext Title_suffix = "" # link material # Efficency note: an earlier version accumulated the body in a # single scalar like this: "Body = Body t". Profiling revealed # this statement as the major hot spot, and the change to array # storage made the program more than twice as fast. This # suggests that awk might benefit from an optimization of # "s = s t" that uses realloc() instead of malloc(). if (HTML) Body[++BodyLines] = t else print t } function protect_SGML_characters(s) { gsub(/&/,"\\&",s) # NB: this one MUST be first gsub(//,"\\>",s) gsub(/\"/,"\\"",s) return (s) } function strip_braces(s, k) { # strip non-backslashed braces from s and return the result return (strip_char(strip_char(s,"{"),"}")) } function strip_char(s,c, k) { # strip non-backslashed instances of c from s, and return the result k = index(s,c) if (k > 0) # then found the character { if (substr(s,k-1,1) != "\\") # then not backslashed char s = substr(s,1,k-1) strip_char(substr(s,k+1),c) # so remove it (recursively) else # preserve backslashed char s = substr(s,1,k) strip_char(s,k+1,c) } return (s) } function strip_html(s) { gsub(/<\/?[^>]*>/,"",s) return (s) } function terminate() { if (HTML) { html_end_pre() HTML = 0 # NB: stop line buffering html_header() html_toc() html_body() html_trailer() } } function TeX_to_HTML(s, k,n,parts) { # First convert the four SGML reserved characters to SGML entities if (HTML) { gsub(/>/, "\\>", s) gsub(/ 1) ? "$" : "") \ ((k % 2) ? strip_braces(TeX_to_HTML_nonmath(parts[k])) : \ TeX_to_HTML_math(parts[k])) gsub(/[$][$][$]/,"$$",s) # restore display math return (s) } function TeX_to_HTML_math(s) { # Mostly a dummy for now, but HTML 3 could support some math translation gsub(/\\&/,"\\&",s) # reduce TeX ampersands to SGML entities return (s) } function TeX_to_HTML_nonmath(s) { if (index(s,"\\") > 0) # important optimization { gsub(/\\slash +/,"/",s) # replace TeX slashes with conventional ones gsub(/ *\\emdash +/," --- ",s) # replace BibNet emdashes with conventional ones gsub(/\\%/,"%",s) # reduce TeX percents to conventional ones gsub(/\\[$]/,"$",s) # reduce TeX dollars to conventional ones gsub(/\\#/,"#",s) # reduce TeX sharps to conventional ones if (HTML) # translate TeX markup to HTML { gsub(/\\&/,"\\&",s) # reduce TeX ampersands to SGML entities s = html_accents(s) s = html_fonts(s) } else # plain ASCII text output: discard all TeX markup { gsub(/\\\&/, "\\&", s) # reduce TeX ampersands to conventional ones #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) } function trim(s) { gsub(/^[ \t]+/,"",s) gsub(/[ \t]+$/,"",s) return (s) } function vol_no_month_year() { return ("Volume " wrap(Volume) ", Number " wrap(Number) ", " wrap(Month) ", " wrap(Year)) } function wrap(value) { return (HTML ? ("" value "") : value) } gawk-4.0.1+dfsg.orig/test/splitarg4.ok0000644000175000017500000000223011463242060016563 0ustar schotschotcaccbdc {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"} {} {} {} {} gawk-4.0.1+dfsg.orig/test/uparrfs.in0000644000175000017500000000001711463242060016332 0ustar schotschotxxAA xxBxx C gawk-4.0.1+dfsg.orig/test/aryprm8.awk0000644000175000017500000000042211463242060016426 0ustar schotschotBEGIN { f(0, a) # nothing f(1, a) } function f(i, a) { if (i == 0) return g(a, a) pr(a) } function g(x, y) { h(y, x, y) } function h(b, c, d) { b[1] = 1 c[1] = 2 # rewrite print b[1], d[1] c[2] = 1 b[2] = 2 # should rewrite } function pr(x) { print x[1], x[2] } gawk-4.0.1+dfsg.orig/test/devfd.ok0000644000175000017500000000003211463242060015740 0ustar schotschotfile on fd 4 file on fd 5 gawk-4.0.1+dfsg.orig/test/compare2.ok0000644000175000017500000000005611463242060016366 0ustar schotschotOK: zero strings compare equal to number zero gawk-4.0.1+dfsg.orig/test/fieldwdth.ok0000644000175000017500000000000411463242060016621 0ustar schotschot345 gawk-4.0.1+dfsg.orig/test/intprec.ok0000644000175000017500000000002611463242060016317 0ustar schotschot0000000005:000000000e gawk-4.0.1+dfsg.orig/test/devfd.in40000644000175000017500000000001511463242060016022 0ustar schotschotfile on fd 4 gawk-4.0.1+dfsg.orig/test/fldchg.ok0000644000175000017500000000006311463242060016103 0ustar schotschot1: + +b c d e f 2: + +b d e f 2a:%+%+b%%d%e gawk-4.0.1+dfsg.orig/test/prmarscl.awk0000644000175000017500000000007311463242060016651 0ustar schotschotfunction test(a) { print a[1] } BEGIN { j = 4; test(j) } gawk-4.0.1+dfsg.orig/test/concat4.ok0000644000175000017500000000001711463242060016206 0ustar schotschotfoo 0 foobar 4 gawk-4.0.1+dfsg.orig/test/getline4.in0000644000175000017500000000001111654051011016351 0ustar schotschot aaa bbb gawk-4.0.1+dfsg.orig/test/wideidx.awk0000644000175000017500000000010511463242060016457 0ustar schotschot{ a=$0 print index(a,"b") getline a = a $0 print index(a,"b") } gawk-4.0.1+dfsg.orig/test/wjposer1.in0000644000175000017500000005012211463242060016424 0ustar schotschot%P:nut'i %G:exertion %IH:exertion %C:N %SF:abstractions-misc %S:JOPA/EDFR/VESE %ES:000088 %UID:002463 %MD:1999/03/15 %P:ts'iyantsuk t'eooninzun %G:information %IH:information %C:N %SF:abstractions-misc %S:JOPA/BRBI %UID:000986 %MD:1997/12/17 %P:k'et'uk %G:interval %IH:interval %C:N %SF:abstractions-misc %S:MAGO %ES:001077 %UID:000873 %MD:1997/12/11 %P:khunek %G:language, word, message %IH:language/word/message %POSS:ghunek %P1p:neghunek %C:N %SF:abstractions-misc %S:MAGO/BRBI/JOPA/EDFR/VESE/JEKO %UID:000928 %MD:2001/02/10 %P:gal %G:running %IH:running %C:N %R:Dugal ndesda. He got hurt while running. %SF:abstractions-misc %S:JOPA %ES:000535 %UID:002462 %MD:1999/03/15 %P:t'en %G:work %IH:work %C:N %SF:abstractions-misc %S:VESE/PEJO %ES:000672 %UID:003028 %POCKET:N %MD:2000/10/04 %P:'ut'en %G:work %IH:work %C:N %SF:abstractions-misc %P1p:neye'ut'en %S:JOPA %ES:001041 %UID:004264 %POCKET:Y %MD:2001/03/15 %P:dulkw'ah %G:Spotted Frog %IH:Spotted Frog/Frog, Spotted %SN:Rana pretiosa %MN:Lives in water and has red markings on the belly. %PICTURE:/home/poser/Research/Dakelh/Pictures/psfiles/SpottedFrog.ps %CAPTION:{\qc Tsasdli} --- Spotted Frog %PICPERMISSION:N %PICCREDIT:Drawing of Spotted Frog from {\it The Amphibians of British Columbia\/}. %C:N %SF:amphibiansandreptiles %S:EDFR %UID:004111 %POCKET:Y %MD:2001/03/07 %P:chunlai %G:salamander, lizard %IH:lizard/salamander %MN:The only species of salamander found in the region is the Long-toed Salamander {\it Ambystoma macrodactylum\/}. No lizards are found in the region. However, this term is applied to other varieties of salamander and to lizards, such as the gekkos sold as pets. %FGREF:Corkran \& Thoms (1996;39) %SN:Ambystoma macrodactylum %C:N %SF:amphibiansandreptiles %S:LITM/JOPA/BRBI %UID:000157 %MD:1998/05/16 %P:tl'ughus %G:snake %IH:snake %C:N %MN:The only snake found in the region is the Common Garter Snake {\it Thamnophis sirtalis\/}. However, the term is applied to all snakes. %SN:Thamnophis sirtalis %SF:amphibiansandreptiles %S:LITM/JOPA/BRBI/MAGO %UID:000250 %MD:1998/12/07 %P:tsasdli %G:Western Toad %SN:Bufo boreas %IH:Western Toad/Toad, Western %MN:Lives on land. %SF:amphibiansandreptiles %C:N %S:LITM/JOPA/BRBI/MAGO/STJA/EDFR %UID:000059 %MD:2001/03/07 %P:lhits'e %G:bitch, female dog %IH:bitch/dog, female %C:N %SF:animals-domestic %S:JOPA/EDFR/VESE %UID:002446 %MD:1999/03/15 %P:musdus %G:cow %IH:cow %C:N %P2s:nmusdus %ETYM:Loan from Cree {\qf mostos} ``buffalo''. %LOANSOURCE:Cree %SF:animals-domestic %S:LITM/JOPA/BRBI/MAGO %UID:000036 %MD:1997/06/12 %P:lhi %G:dog %IH:dog %C:N %DUOPLURAL:lhike %SF:animals-domestic %POSS:lik %P1s:slik %P1p:nelik %DUOPLURAL:lhike %S:LITM/JOPA/BRBI/STJA/VESE/EDFR/JEKO %UID:000270 %MD:2001/02/15 %P:budzocho %G:donkey, mule %IH:donkey/mule %SF:animals-domestic %ETYM:``big ears''. %C:N %S:JOPA/BRBI %UID:000376 %MD:1997/11/14 %P:yeztli %G:horse %IH:horse %SF:animals-domestic %ETYM:A contraction of {\qc yezihlhi} ``elk dog''. %C:N %S:LITM/JOPA/BRBI/PEJO %UID:000042 %MD:2000/10/21 %P:lhike %G:Irregular plural of {\qc lhi}, q.v. %IH:dogs %C:N %SF:animals-domestic %S:LITM/BRBI/JOPA/STJA %UID:000293 %MD:1999/01/26 %P:sbaiyaz %G:lamb %IH:lamb %C:N %SF:animals-domestic %S:LITM %UID:000254 %MD:1997/06/16 %P:gugoos %G:pig %IH:pig %C:N %ETYM:Ultimately borrowed from French {\qf coche}, probably via Cree. %LOANSOURCE:Cree %SF:animals-domestic %S:LITM/JOPA/BRBI %UID:000133 %MD:1997/06/16 %P:'ut'az %G:bat %IH:bat %SF:animals-land %C:N %S:JOPA/BRBI %UID:000390 %MD:1997/11/14 %P:liyabdut'ai %G:bat %MN:The only kind of bat found in the region is the Little Brown Myotis. %IH:bat %SF:animals-land %SN:Myotis lucifugus %ETYM:Literally, ``devil bird'', a compound of {\qc liyab} ``devil'', a loan from French {\qf le diable}, and {\qc dut'ai} ``bird''. %LOANSOURCE:French %C:N %S:JOPA/BRBI %UID:000215 %MD:1997/06/16 %P:sus %G:black bear %IH:black bear %C:N %SF:animals-land %SN:Ursus americanus %S:LITM/JOPA/BRBI/STJA/EDFR/VESE/JEKO %UID:000048 %MD:1998/12/19 %P:musduscho dughai %G:buffalo %IH:buffalo %SF:animals-land %C:N %ETYM:``big hairy cow''. %S:JOPA/EDFR %UID:003478 %POCKET:Y %MD:2000/11/04 %P:tl'ok'umusdus %G:buffalo %IH:buffalo %SF:animals-land %C:N %S:JOPA/BRBI %UID:000374 %MD:2000/11/01 %P:jenyo %G:bull moose %IH:bull moose/moose, bull %SF:animals-land %C:N %S:MAGO/JOPA/VESE/EDFR/JEKO %UID:000474 %MD:1999/05/11 %P:denyo %G:bull moose %IH:moose, bull %SF:animals-land %C:N %S:LITM/JOPA %UID:000348 %MD:1997/06/18 %P:tsiyeyaz %G:calf moose %IH:calf moose/moose, calf %SF:animals-land %C:N %S:JOPA/BRBI %UID:000380 %MD:1997/11/14 %P:duniyaz %G:calf moose %IH:calf moose/moose, calf %C:N %SF:animals-land %S:LITM/JOPA/BRBI %UID:000245 %MD:1997/06/16 %P:whudzih %G:caribou %IH:caribou %C:N %SF:animals-land %SN:Rangifer tarandus %S:JOPA/BRBI/MAGO/EDFR/VESE/JEKO %UID:000274 %MD:1999/05/11 %P:boos %G:cat %IH:cat %C:N %SN:Felis domesticus %ETYM:Loan from English {\qf puss}, possibly via Chinook Jargon. %LOANSOURCE:English %SF:animals-land %S:LITM/JOPA/BRBI %UID:000137 %MD:1997/12/17 %P:ts'uwhuljos %G:chipmunk %IH:chipmunk %C:N %SF:animals-land %S:LITM/JOPA/BRBI %UID:000146 %MD:1997/06/16 %P:booscho %G:cougar %IH:cougar %SF:animals-land %SN:Felis concolor %C:N %ETYM:Literally, ``big cat'', where {\qc boos} ``cat'' is a loan from English {\qf puss}, possibly via Chinook Jargon. %S:JOPA/BRBI %UID:000050 %MD:1997/11/14 %P:duni'at %G:cow moose %IH:cow moose/moose, cow %SF:animals-land %C:N %S:JOPA/BRBI %UID:000377 %MD:1997/11/14 %P:tintulhi %G:coyote %IH:coyote %C:N %SF:animals-land %SN:Canis latrans %S:JOPA/BRBI %R:LITM has chuntulhi. %UID:000155 %MD:1997/06/16 %P:yests'e %G:deer %IH:deer %SF:animals-land %C:N %S:LITM/JOPA/BRBI/EDFR %UID:000132 %MD:1998/12/16 %P:dets'it %G:dry cow moose %IH:dry cow moose/moose, dry cow %SF:animals-land %C:N %S:JOPA/BRBI %UID:000378 %MD:1997/11/14 %P:yezih %G:elk %IH:elk %SF:animals-land %C:N %R:STJA doesn't use this. %S:JOPA/BRBI %UID:000382 %MD:1997/11/14 %P:tsa'at %G:female beaver %IH:beaver, female %C:N %SF:animals-land %S:STJA %UID:001295 %MD:1998/12/08 %P:chunihcho %G:fisher %IH:fisher %ETYM:``big marten''. %SF:animals-land %SN:Martes pennanti %C:N %S:JOPA/BRBI/MAGO %UID:000385 %MD:2000/06/18 %P:ts'unalhbuz %G:flying squirrel %IH:flying squirrel %SF:animals-land %SN:Glaucomys sabrinus alpinus %PICTURE:/home/poser/Research/Dakelh/Pictures/psfiles/FlyingSquirrel.ps %CAPTION:{\qc ts'unulhbuz} --- Flying Squirrel %PICPERMISSION:N %PICCREDIT:Drawing of Flying Squirrel from {\it The Mammals of British Columbia\/}. %C:N %S:JOPA/BRBI %UID:000389 %MD:1997/11/14 %P:nanguz %G:fox %IH:fox %C:N %SF:animals-land %S:MAGO %UID:000139 %MD:2001/02/26 %P:shas %G:grizzly bear %IH:grizzly bear %C:N %SF:animals-land %S:LITM/JOPA/BRBI/VESE/EDFR/JEKO %UID:000039 %MD:1997/06/12 %P:shasyaz %G:grizzly bear cub %IH:grizzly bear cub/cub, grizzly bear %C:N %SF:animals-land %S:STJA %UID:002114 %MD:1999/02/20 %P:shas'at %G:grizzly bear sow %IH:grizzly bear sow/sow, grizzly bear %C:N %SF:animals-land %ETYM:``grizzly bear's wife''. %S:STJA %UID:002113 %MD:1999/02/20 %P:-lik %G:irregular possessed stem of {\qc lhi}, q.v. %C:N %SF:animals-land %S:MAGO %UID:000564 %MD:1997/12/11 %P:wasi %G:lynx %IH:lynx %C:N %SF:animals-land %SN:Felis lynx %ETYM:Loan from Gitksan {\qf wish}. %LOANSOURCE:Gitksan %S:JOPA/BRBI/STJA/EDFR/VESE/JEKO/MAGO %UID:000049 %MD:2001/04/20 %P:k'ani %G:woodchuck %IH:woodchuck %C:N %SF:animals-land %SN:Marmota monax %S:JOPA/BRBI/PEJO %R:Clarified with Josie and Peter 2001/05/28. %UID:000391 %POCKET:Y %MD:2001/05/28 %P:dutni %G:marmot %IH:marmot %SF:animals-land %C:N %SN:Marmota caligata %R:Josie and Peter are not really familiar with marmots but have heard older people talk about them. %S:JOPA/PEJO %UID:000143 %MD:1998/02/10 %P:chunih %G:marten %IH:marten %SF:animals-land %SN:Martes americana %C:N %S:JOPA/BRBI/VESE/EDFR/JEKO/MAGO %UID:000016 %MD:2001/04/20 %P:telhjoos %G:mink %IH:mink %C:N %SF:animals-land %SN:Mustela vison %S:LITM/JOPA/BRBI %UID:000167 %MD:1997/06/16 %P:duni %G:moose %IH:moose %C:N %SF:animals-land %SN:Alces alces andersoni %S:LITM-EDFR/JOPA/BRBI %UID:000346 %MD:1997/06/18 %P:dats'ooz %G:mouse %IH:mouse %SF:animals-land %C:N %S:LITM/JOPA/MAGO/VESE/JEKO %UID:000156 %MD:2001/01/22 %P:tsek'et %G:muskrat %IH:muskrat %C:N %SF:animals-land %SN:Ondatra zibethicus %S:JOPA/BRBI/STJA/MAGO %UID:000335 %MD:1998/12/08 %P:chanjo %G:newly sexually mature cow moose %IH:moose, newly sexually mature cow %SF:animals-land %C:N %S:JOPA/BRBI %UID:000379 %MD:1997/11/14 %P:looncho %G:pack rat %IH:pack rat %C:N %SF:animals-land %S:VESE/JEKO/MAGO %UID:000149 %MD:1999/05/10 %P:dlooncho %G:packrat %IH:packrat %C:N %SF:animals-land %S:JOPA %UID:002701 %MD:1999/05/11 %P:duneza %G:porcupine %IH:porcupine %SF:animals-land %C:N %S:JOPA/BRBI/MAGO %UID:000388 %MD:2001/03/06 %P:ts'it %G:porcupine %IH:porcupine %SF:animals-land %SN:Erethizon dorsatum %C:N %ETYM:Perhaps derived from the interjection {\qc ts'it} ``don't touch it!''. %S:JOPA/BRBI/MAGO/BEMC/STJA %UID:000387 %MD:1998/12/08 %P:lhiyaz %G:puppy %IH:puppy %C:N %SF:animals-land %DUOPLURAL:lhiyazke %DUOPLURAL:lhikeyaz %R:Josie prefers {\qc lhikeyaz}. %S:LITM/BRBI/JOPA/EDFR/MAGO-JEKO %UID:000182 %MD:2001/05/26 %P:nats'ildelh %G:Red Squirrel %IH:squirrel/Red Squirrel %SN:Tamiasciurus hudsonicus colum. %C:N %SF:animals-land %S:LITM/JOPA/BRBI/STJA %UID:000034 %MD:1999/02/17 %P:goh %G:rabbit %IH:rabbit %C:N %SF:animals-land %S:LITM/JOPA/VESE/EDFR/JEKO %UID:000023 %MD:1999/05/11 %P:ooch'ainischoot %G:recently weaned calf moose %IH:moose, recently weaned calf %SF:animals-land %C:N %S:JOPA/BRBI %UID:000381 %MD:1997/11/14 %P:sbai %G:sheep %IH:sheep %C:N %SF:animals-land %S:MAGO %UID:001131 %MD:1998/02/10 %P:'usbai %G:sheep %IH:sheep %SF:animals-land %C:N %S:JOPA/BRBI %UID:000375 %MD:1997/11/14 %P:'ulhguk %G:shrew %IH:shrew %SF:animals-land %C:N %S:MAGO/VESE/JEKO %UID:000526 %MD:2001/01/22 %P:hoonliz %G:skunk %IH:skunk %C:N %P2s:unhoonliz %SF:animals-land %S:LITM/JOPA/BRBI/MAGO/VESE/EDFR/JEKO %UID:000052 %MD:1997/06/12 %P:nohbai %G:weasel %IH:weasel %C:N %SF:animals-land %S:JOPA/BRBI/MAGO %UID:000141 %MD:1997/06/16 %P:yus %G:wolf %IH:wolf %C:N %SF:animals-land %SN:Canis lupus %S:LITM/JOPA/BRBI %UID:000051 %MD:1997/06/12 %P:noostel %G:wolverine %IH:wolverine %C:N %SF:animals-land %SN:Gulo gulo %S:JOPA/BRBI/MAGO/VESE/EDFR/JEKO %UID:000140 %MD:2001/04/20 %P:tsatsul %G:young beaver %IH:beaver, young %SF:animals-land %C:N %S:JOPA/BRBI/STJA %UID:000384 %MD:1998/12/08 %P:lht'at %G:beaver dam %IH:beaver dam/dam, beaver %C:N %SF:animals-misc %S:STJA %UID:001287 %MD:1998/12/08 %P:'ulh %G:beaver dam %IH:beaver dam/dam, beaver %C:N %SF:animals-misc %S:STJA %UID:001288 %MD:1998/12/08 %P:tsaken %G:beaver lodge %IH:beaver lodge %C:N %SF:animals-misc %S:JOPA/BRBI/STJA %UID:000405 %MD:1998/12/08 %P:tunyohtsati %G:beaver path under the ice %IH:beaver path under the ice %C:N %SF:animals-misc %S:JOPA/EDFR %UID:003769 %POCKET:Y %MD:2001/02/13 %P:sus'an %G:black bear den %IH:black bear den %C:N %SF:animals-misc %S:LITM/STJA %UID:000131 %MD:1998/12/08 %P:shask'oh %G:grizzly bear tracks %IH:tracks, grizzly bear %C:N %SF:animals-misc %S:MAGO %UID:001132 %MD:1998/02/10 %P:hoolht'ukw %G:leech %IH:leech %SF:animals-misc %C:N %S:JOPA/PEJO/EDFR %UID:003410 %POCKET:Y %MD:2000/11/01 %P:hoot'ub %G:leech %IH:leech %SF:bugs %C:N %S:JOPA/BRBI/MAGO %UID:000370 %MD:2000/11/01 %P:dunik'oh %G:moose tracks %IH:moose tracks %C:N %SF:animals-misc %S:PEJO/JOPA %ES:000491 %UID:003121 %POCKET:Y %MD:2000/09/28 %P:gohk'oh %G:rabbit tracks %IH:tracks, rabbit %C:N %SF:animals-misc %S:LITM %UID:000073 %MD:1997/06/12 %P:tsa %G:beaver %IH:beaver %C:N %SN:Castor canadensis %UID:000044 %SF:animals-water %S:JOPA/BRBI/STJA/EDFR/VESE/JEKO/MAGO %MD:2001/04/18 %P:tsayaz %G:beaver kit %IH:kit, beaver/beaver, baby %SF:animals-water %C:N %S:STJA %UID:001294 %MD:2000/06/18 %P:tsati %G:big beaver, old beaver %IH:beaver, big/beaver, old %C:N %SF:animals-water %S:LITM/JOPA/BRBI/STJA %UID:000206 %MD:1998/12/08 %P:tsis %G:otter %IH:otter %SF:animals-water %SN:Lutra canadensis %C:N %S:JOPA/BRBI %UID:000386 %MD:1997/11/14 %P:datsan %G:American Crow %C:N %SF:bird-gen %SN:Corvus brachyrhynchos %IH:crow/American Crow %S:LITM/PEJO %UID:000158 %MD:2000/10/21 %P:sewh %G:American Robin %IH:Robin, American %SN:Turdus migratorius %C:N %SF:bird-gen %S:LITM/JOPA/BRBI/PEJO %UID:000181 %MD:2000/10/21 %P:tsebalyan %G:Bald Eagle %IH:Bald Eagle %C:N %SF:bird-gen %SN:Haliaeetus leucocephalus %S:LITM/JOPA/BRBI %UID:000150 %MD:1997/06/16 %P:dut'ai %G:bird, duck %IH:bird/duck %C:N %SF:bird-gen %S:LITM/JOPA/BRBI/MAGO/STJA/PEJO %UID:000081 %MD:2000/09/28 %P:delh %G:crane %IH:crane %C:N %SF:bird-gen %S:LITM %UID:000255 %MD:1997/06/16 %P:khoh %G:goose %IH:goose %C:N %P1s:skhoh %P2s:nkhoh %P1p:nekhoh %POSS:khoh %SF:bird-gen %S:JOPA/BRBI/MAGO/VESE/EDFR/JEKO %UID:000031 %MD:2001/02/15 %P:ts'unalhduz %G:hummingbird %IH:hummingbird %C:N %SF:bird-gen %S:LITM/BRBI/JOPA %UID:000242 %MD:1997/06/16 %P:gagiyaz %G:little bird %IH:bird, little %C:N %QCHECK:Any little bird? %SF:bird-gen %S:PEJO %UID:003115 %POCKET:Y %MD:2000/09/28 %P:dut'aiyaz %G:little bird %IH:bird, little %C:N %SF:bird-gen %S:STJA/JOPA/EDFR/VESE/PEJO %UID:001818 %MD:2000/09/28 %P:dadzi %G:loon %IH:loon %SF:bird-gen %SN:Gavia immer %C:N %S:LITM/JOPA/BRBI %UID:000020 %MD:1997/06/12 %P:t'ugicho %G:Mallard Duck %IH:Mallard Duck %C:N %SN:Anas platyrhynchos %SF:bird-gen %S:LITM/JOPA/BRBI/MAGO/VESE/EDFR/JEKO %UID:000041 %MD:1999/05/11 %P:musdzoon %G:owl %IH:owl %C:N %SF:bird-gen %S:LITM/BRBI/JOPA/MAGO %UID:000135 %MD:1997/12/11 %P:ts'olh %G:Red-necked Grebe %MN:A variety of duck locally known as the Helldiver. %IH:Red-Necked Grebe/Helldiver/Grebe, Red-Necked %SN:Podiceps grisegena %SF:bird-gen %C:N %S:BRBI/JOPA %UID:000263 %MD:2001/03/08 %P:'utsut %G:Ruffed grouse %IH:Ruffed grouse %C:N %SF:bird-gen %S:LITM %UID:000218 %MD:1997/06/16 %P:nat'oh %G:Spruce Grouse, Fool Hen %IH:Spruce Grouse/Grouse, Spruce/Fool Hen %SF:bird-gen %SN:Dendragapus canadensis %C:N %S:MAGO/LITM %UID:000539 %MD:1997/12/04 %P:tehgwuzeh %G:Steller's Jay, commonly known locally as ``bluejay''. %IH:Steller's Jay/jay, Steller's/Bluejay (Steller's Jay) %SF:bird-gen %SN:Cyanocitta stelleri %C:N %S:JOPA/BRBI %UID:000356 %MD:1997/11/14 %P:wedlew %G:sandpiper %IH:sandpiper %C:N %SN:Eremophila alpestris et sim. %SF:bird-gen %S:LITM %UID:000237 %MD:2002/07/19 %P:besk'i %G:seagull %IH:seagull %C:N %SN:Larus species %SF:bird-gen %S:LITM %UID:000136 %MD:2002/07/19 %P:ts'incho %G:swan %IH:swan %C:N %SF:bird-gen %S:LITM %UID:000222 %MD:1997/06/16 %P:'uschas %G:Tree Swallow %IH:Tree Swallow %SF:bird-gen %SN:Tachycineta bicolor %C:N %S:MAGO %UID:000535 %MD:1997/11/22 %P:gwuzeh %G:Whiskey Jack, Gray Jay, Canadian Jay %IH:Whiskey Jack/Jay, Gray/Jay, Canadian %C:N %SN:Perisoreus canadensis %SF:bird-gen %S:LITM/JOPA/BRBI/MAGO %UID:000148 %MD:1997/11/22 %P:chundulkw'uz %G:woodpecker %IH:woodpecker %C:N %SF:bird-gen %S:JOPA/BRBI/STJA %UID:000138 %MD:1999/03/31 %P:-t'o %G:nest %IH:nest %C:N %Pind:'ut'o %P3s:but'o %Pref:dut'o %SF:bird-misc/bugs %S:STJA/PEJO/JOPA/BRBI/EDFR %ES:001353 %UID:000226 %MD:2001/03/07 %P:-nak'uz %G:a single eye %IH:eye, a single %C:N %SF:body-ext %S:JOPA/EDFR %ES:000457 %UID:003770 %POCKET:Y %MD:2001/02/13 %P:-kechunoh %G:ankle %IH:ankle %P1s:skechunoh %P2s:nkechunoh %C:N %S:MAGO/STJA %SF:body-ext %UID:000865 %MD:1999/03/03 %P:-de %G:antler, horn %IH:antler/horn %C:N %SF:body-ext %P3s:bude %S:STJA %UID:002266 %MD:1999/03/02 %P:-de_zu_s %G:antler velvet %IH:velvet, antler %C:N %SF:body-ext %P3s:bude_zu_s %S:STJA %UID:002267 %MD:1999/03/02 %P:-tsul %G:anus, asshole %IH:anus/asshole %C:N %P1s:stsul %SF:body-ext %S:STJA %UID:002171 %MD:1999/02/23 %P:-gan %G:arm %IH:arm %P1s:sgan %P2s:ngan %Pref:dugan %C:N %S:LITM/MAGO/STJA/JOPA/VESE/EDFR/JEKO %SF:body-ext %UID:000863 %MD:1999/02/22 %P:-chak'ests'oh %G:armpit %IH:armpit %P1s:schak'ests'oh %C:N %S:MAGO %UID:000859 %SF:body-ext %MD:1997/12/11 %P:-t'ak %G:back (of body) %IH:back (of body) %P1s:st'ak %P3s:but'ak %C:N %S:MAGO/EDFR/VESE/JEKO %SF:body-ext %UID:000899 %MD:1997/12/11 %P:-lat'ak %G:back of hand %IH:back of hand %P1s:slat'ak %C:N %S:MAGO %SF:body-ext %UID:000871 %MD:1997/12/11 %P:tsake %G:beaver paws %IH:beaver paws %C:N %SF:body-ext %S:LITM-EDFR %UID:000329 %MD:1997/06/18 %P:tsache %G:beaver tail %IH:beaver tail %C:N %SF:body-ext %S:LITM %UID:000207 %MD:1997/06/16 %P:-but %G:belly %IH:belly %P1s:sbut %C:N %S:MAGO %SF:body-ext %UID:000937 %MD:1997/12/11 %P:-ts'oo %G:breast %IH:breast %P1s:sts'oo %C:N %S:MAGO %UID:000855 %SF:body-ext %MD:1997/12/11 %P:-tl'a %G:bum, buttocks %IH:bum/buttocks %P1s:stl'a %C:N %S:MAGO %SF:body-ext %UID:000936 %MD:1997/12/11 %P:-kechunch'ooz %G:calf of leg %IH:calf of leg %C:N %SF:body-ext %S:JOPA/EDFR %UID:004458 %POCKET:Y %MD:2001/04/20 %P:-nembus %G:cheek %IH:cheek %P1s:snimbus %C:N %S:MAGO/JOPA/BRBI %SF:body-ext %UID:000889 %MD:1997/12/11 %P:-yoh %G:chest %IH:chest %C:N %SF:body-ext %S:JOPA/EDFR %ES:000660 %UID:003777 %POCKET:Y %MD:2001/02/13 %P:-yeda' %G:chin %IH:chin %P1s:syeda' %C:N %S:MAGO %SF:body-ext %UID:000882 %MD:1997/12/11 %P:-tsidakwhudutle %G:cranial fontanelle, baby's soft spot %IH:cranial fontanelle/baby's soft spot %C:N %P3s:butsidakwhudutle %S:MAGO %SF:body-ext %UID:000898 %MD:1997/12/11 %P:-dzo %G:ear %IH:ear %MN:This refers to the ear considered as a whole, especially the exterior. When the canal in particular is referred to, one uses {\qc -dzek}, q.v. %C:N %P1s:sdzo %S:MAGO %SF:body-ext %UID:000879 %MD:1997/12/11 %P:-dzobal %G:earlobe %IH:earlobe %C:N %P1s:sdzobal %SF:body-ext %S:BRBI/MAGO %UID:000641 %MD:1997/12/17 %P:-nints'uzti %G:elbow %IH:elbow %P1s:snints'uzti %C:N %S:MAGO %SF:body-ext %UID:000916 %MD:1997/12/11 %P:-na %G:eye %IH:eye %P1s:sna %P3s:buna %C:N %S:MAGO/JOPA/EDFR %SF:body-ext %UID:000891 %MD:1998/12/18 %P:-nak'et %G:eye socket %IH:eye socket %P1s:snak'et %C:N %S:MAGO %SF:body-ext %UID:000892 %MD:1997/12/11 %P:-nach'usdooz %G:eyebrow %IH:eyebrow %P1s:snach'usdooz %C:N %S:MAGO %SF:body-ext %UID:000896 %MD:1997/12/11 %P:-nalusgha %G:eyelash %IH:eyelash %P1s:snalusgha %C:N %S:MAGO %SF:body-ext %UID:000895 %MD:1997/12/11 %P:-nalus %G:eyelid %IH:eyelid %P1s:snalus %C:N %S:MAGO %SF:body-ext %UID:000894 %MD:1997/12/11 %P:-nen %G:face %IH:face %P1s:snen %P2s:nyunen %P3s:bunen %C:N %S:MAGO/PEJO/STJA/JOPA/VESE/EDFR %SF:body-ext %ES:000369 %UID:000890 %MD:2001/04/20 %P:ts'uz %G:feather, down %IH:feather/down %C:N %SF:body-ext %S:LITM/STJA/PEJO %UID:000271 %MD:2000/10/16 %P:dut'aits'uz %G:feathers, down %IH:feathers/down %C:N %SF:body-ext %S:STJA %UID:002647 %MD:2001/02/27 %P:-lasge %G:finger other than thumb or pinkie %IH:finger other than thumb or pinkie %P1s:slasge %C:N %S:MAGO/STJA/JOPA/PEJO/EDFR %SF:body-ext %UID:000869 %MD:2000/11/01 %P:-lagui %G:fingernails, claws of forepaws %IH:fingernails/claws of forepaws %P1s:slagui %C:N %S:MAGO %SF:body-ext %UID:000875 %MD:1997/12/11 %P:-ke %G:foot %IH:foot %C:N %P1s:ske %Pref:duke %S:MAGO/STJA/JOPA/VESE/EDFR/JEKO %UID:000851 %SF:body-ext %MD:1999/05/11 %P:-gha %G:hair %MN:This refers to hair in general and where no more specific term exists, as on the arms and chest. It is not used to refer to the hair of the head, for which the more specific term {\qc -tsigha} is always used. %IH:hair %C:N %S:MAGO %SF:body-ext %UID:000888 %MD:1997/12/11 %P:-tsigha %G:hair of the head %IH:hair of the head %P1s:stsigha %P2s:ntsigha %P3s:butsigha %C:N %S:MAGO/LITM/PEJO %SF:body-ext %UID:000887 %MD:2000/10/20 %P:-la %G:hand %IH:hand %P1s:sla %P2s:nla %C:N %S:MAGO/STJA %SF:body-ext %POCKET:Y %UID:000866 %MD:1999/02/17 %P:-tsi %G:head %IH:head %Pref:dutsi %C:N %SF:body-ext %S:STJA %UID:002965 %POCKET:Y %MD:1999/06/24 %P:-kelatsul %G:heel %IH:heel %P1s:skelatsul %C:N %S:MAGO %SF:body-ext %UID:000917 %MD:1997/12/11 %P:-k'ui %G:hip %IH:hip %P1s:sk'ui %C:N %S:MAGO/JOPA %SF:body-ext %UID:000923 %MD:2001/03/15 %P:-gwut %G:knee %IH:knee %P1s:sgwut %C:N %S:MAGO %SF:body-ext %UID:000933 %MD:1997/12/11 %P:-gwutlasi'ai %G:kneecap %IH:kneecap %P1s:sgwutlasi'ai %R:has something to do with floating at tip of knee %C:N %S:MAGO %SF:body-ext %UID:000925 %MD:1997/12/11 %P:-langwut %G:knuckles at boundary between hand and fingers %IH:knuckles at boundary between hand and fingers %P1s:slangwut %SF:body-ext %C:N %S:JOPA/BRBI %UID:000967 %MD:1997/12/17 %P:-kechun %G:leg %IH:leg %P1s:skechun %C:N %S:MAGO %UID:000852 %SF:body-ext %MD:1997/12/11 gawk-4.0.1+dfsg.orig/test/rsstart1.ok0000644000175000017500000000000211463242060016430 0ustar schotschot2 gawk-4.0.1+dfsg.orig/test/rsnulbig2.ok0000644000175000017500000000000211463242060016554 0ustar schotschot2 gawk-4.0.1+dfsg.orig/test/uninitialized.ok0000644000175000017500000000011411463242060017521 0ustar schotschotgawk: uninitialized.awk:2: warning: reference to uninitialized variable `a' gawk-4.0.1+dfsg.orig/test/concat2.ok0000644000175000017500000000004411463242060016204 0ustar schotschot31 31 31 31 31 31 31 31 31 31 31 31 gawk-4.0.1+dfsg.orig/test/gensub2.ok0000644000175000017500000000001111463242060016212 0ustar schotschotxy xy yx gawk-4.0.1+dfsg.orig/test/getline2.awk0000644000175000017500000000005011463242060016532 0ustar schotschotBEGIN { while( getline > 0) { print } } gawk-4.0.1+dfsg.orig/test/eofsplit.ok0000644000175000017500000000000011463242060016470 0ustar schotschotgawk-4.0.1+dfsg.orig/test/strcat1.awk0000644000175000017500000000015611463242060016411 0ustar schotschot function f1(b) { b = b "c"; print f(b); } function f(a) { a = a "b"; return a; } BEGIN { A = "a"; f1(A); } gawk-4.0.1+dfsg.orig/test/arrayparm.ok0000644000175000017500000000014411463242060016652 0ustar schotschotgawk: arrayparm.awk:13: fatal: attempt to use array `i (from foo)' in a scalar context EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/wideidx2.ok0000644000175000017500000000004011463242060016366 0ustar schotschotBefore 2 After 3 gawk-4.0.1+dfsg.orig/test/devfd1.awk0000644000175000017500000000022111463242060016172 0ustar schotschotBEGIN { while (1) { if ((getline l1 < "/dev/fd/4") <= 0) break print l1 if ((getline l2 < "/dev/fd/5") <= 0) break print l2 } } gawk-4.0.1+dfsg.orig/test/redfilnm.awk0000644000175000017500000000414211463242060016627 0ustar schotschot#Date: Tue, 18 May 1999 12:48:07 -0500 (CDT) #From: Darrel Hankerson #To: arnold@gnu.org #Subject: [christopher.procter@bt.com: RE: Getline bug in Gawk 3.0.3] # #Here's a reply that came directly to me. --darrel # # #From: christopher.procter@bt.com #To: hankedr@dms.auburn.edu #Subject: RE: Getline bug in Gawk 3.0.3 #Date: Tue, 18 May 1999 18:42:28 +0100 # #Sorry that was me getting carried away and cut and pasting the wrong thing #into my email # #The real problem seems to be that : #BEGIN { #for (i=1;i<10;i++){ # while((getline < "hello.txt")>0){ # print $0 # } # close("hello.txt") # } #} #works (printing the contents of hello.txt 9 times), where as:- # #END{ #for (i=1;i<10;i++){ # while((getline < "hello.txt")>0){ # print $0 # } # close("hello.txt") # } #} # #doesn't, (it prints out hello.txt once followed by the iteration numbers #from 1 to 9). #The only difference is that one is in the BEGIN block and one in the END #block. # #Sorry about the first post, I'm not a bad awk programmer, just a tired one #:) # #chris # #> -----Original Message----- #> From: Darrel Hankerson [SMTP:hankedr@dms.auburn.edu] #> Sent: 18 May 1999 18:28 #> To: christopher.procter@bt.com #> Subject: Re: Getline bug in Gawk 3.0.3 #> #> Could you clarify? Your first script uses an apparently undefined #> variable f. #> #> #> christopher.procter@bt.com writes: #> #> BEGIN { #> for (i=1;i<10;i++){ #> while((getline < "hello.txt")>0){ #> print $0 #> } #> close(f) #> } #> } #> #> refuses to close the file and so prints the contents of hello.txt just #> once. #> However:- #> #> BEGIN { #> f="hello.txt" #> for (i=1;i<10;i++){ #> while((getline < f)>0){ #> print $0 #> } #> close(f) #> } #> } #> #> works as advertised (printing the contents of hello.txt 9 times) #> It seems like a bug in the close statement. #> #> -- #> --Darrel Hankerson hankedr@mail.auburn.edu # # srcdir is assigned on command line --- ADR END { f = srcdir "/redfilnm.in" for (i = 1; i < 10; i++){ while((getline < f) > 0){ print $0 } close(f) } } gawk-4.0.1+dfsg.orig/test/pty1.ok0000644000175000017500000000001511654051011015542 0ustar schotschot123 x is abc gawk-4.0.1+dfsg.orig/test/funlen.awk0000644000175000017500000000366411463242060016326 0ustar schotschot# Date: Sat, 15 Mar 2008 16:21:19 +0100 # From: Hermann Peifer # Subject: [Fwd: Gawk length(array) bug] # To: bug-gawk@gnu.org # Cc: Aharon Robbins # Message-id: <47DBE96F.1060406@gmx.net> # # See below. Regards, Hermann # # -------- Original Message -------- # Subject: Re: Gawk length(array) question # Date: Sat, 15 Mar 2008 08:02:03 -0500 # From: Ed Morton # Newsgroups: comp.lang.awk # References: <47DBAE29.4050709@gmx.eu> # # On 3/15/2008 6:08 AM, Hermann Peifer wrote: # > Hi All, # > # > The Gawk man page says: # > > Starting with version 3.1.5, as a non-standard extension, # > > with an array argument, length() returns the number # > > of elements in the array. # > # > It looks like Gawk's length(array) extension does not work inside # > functions. Is this a bug or feature or am I missing something? See the # > example below. I am using GNU Awk 3.1.6 # > # > $ cat testdata # > CD NAME # > AT Austria # > BG Bulgaria # > CH Switzerland # > DE Germany # > EE Estonia # > FR France # > GR Greece # > # > $ cat test.awk # > # Populate array NR > 1 { array[$1] = $2 } # Print array length and call function A END { print "array:",length(array) ; A(array) } function A(array_A) { print "array_A:", length(array_A) } # > # > $ gawk -f test.awk testdata # > array: 7 # > gawk: test.awk:8: (FILENAME=data FNR=8) fatal: attempt to use array # > `array_A (from array)' in a scalar context # > # > BTW, there is no such error if I have asort(array_A) or asorti(array_A) # > inside the function. # > # > Hermann # # I get the same result with gawk 3.1.6 for cygwin. Obviously you can work # around # it since asort() returns the number of elements in an array just like # length() # is supposed to (or "for (i in array) lgth++" if you don't want to be # gawk-specific) but it does seem like a bug. Anyone know if there's a list of # known gawk bugs on-line somewhere? # # Ed. # # gawk-4.0.1+dfsg.orig/test/nfneg.awk0000644000175000017500000000003211463242060016116 0ustar schotschotBEGIN { NF -= 2 ; print } gawk-4.0.1+dfsg.orig/test/prt1eval.ok0000644000175000017500000000000211463242060016403 0ustar schotschot1 gawk-4.0.1+dfsg.orig/test/splitarg4.awk0000644000175000017500000000364211463242060016744 0ustar schotschotBEGIN { 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 } gawk-4.0.1+dfsg.orig/test/clobber.awk0000644000175000017500000000746311463242060016450 0ustar schotschotBEGIN { print "000800" > "seq" close("seq") ARGV[1] = "seq" ARGC = 2 } { printf "%06d", $1 + 1 >"seq"; printf "%06d", $1 + 1 } # Date: Mon, 20 Jan 1997 15:14:06 -0600 (CST) # From: Dave Bodenstab # To: bug-gnu-utils@prep.ai.mit.edu # Subject: GNU awk 3.0.2 core dump # Cc: arnold@gnu.ai.mit.edu # # The following program produces a core file on my FreeBSD system: # # bash$ echo 000800 >/tmp/seq # bash$ gawk '{ printf "%06d", $1 + 1 >"/tmp/seq"; # printf "%06d", $1 + 1 }' /tmp/seq # # This fragment comes from mgetty+sendfax. # # Here is the trace: # # Script started on Mon Jan 20 15:09:04 1997 # bash$ gawk --version # GNU Awk 3.0.2 # Copyright (C) 1989, 1991-1996 Free Software Foundation. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # bash$ gdb gawk # GDB is free software and you are welcome to distribute copies of it # under certain conditions; type "show copying" to see the conditions. # There is absolutely no warranty for GDB; type "show warranty" for details. # GDB 4.13 (i386-unknown-freebsd), # Copyright 1994 Free Software Foundation, Inc... # (gdb) shell echo 000800 >/tmp/seq # (gdb) r '{ printf "%06d", $1 + 1 >"/tmp/seq"; printf "%06d", $1 + 1 }(gdb) r '{ printf "%06d", $1 + 1 >"/tmp/seq"; printf "%06d", $1 + 1 }' /tmp/seq # Starting program: /scratch/archive/src/cmd/gnuawk-3.0.2/gawk '{ printf "%06d", $1 + 1 >"/tmp/seq"; printf "%06d", $1 + 1 }' /tmp/seq # # Program received signal SIGBUS, Bus error. # 0xd86f in def_parse_field (up_to=1, buf=0x37704, len=6, fs=0x3b240, rp=0x0, # set=0xce6c , n=0x0) at field.c:391 # 391 sav = *end; # (gdb) bt # #0 0xd86f in def_parse_field (up_to=1, buf=0x37704, len=6, fs=0x3b240, # rp=0x0, set=0xce6c , n=0x0) at field.c:391 # #1 0xddb1 in get_field (requested=1, assign=0x0) at field.c:669 # #2 0xc25d in r_get_lhs (ptr=0x3b9b4, assign=0x0) at eval.c:1339 # #3 0x9ab0 in r_tree_eval (tree=0x3b9b4, iscond=0) at eval.c:604 # #4 0xa5f1 in r_tree_eval (tree=0x3b9fc, iscond=0) at eval.c:745 # #5 0x4661 in format_tree (fmt_string=0x3e040 "%06d", n0=0, carg=0x3ba20) # at builtin.c:620 # #6 0x5beb in do_sprintf (tree=0x3b96c) at builtin.c:809 # #7 0x5cd5 in do_printf (tree=0x3ba8c) at builtin.c:844 # #8 0x9271 in interpret (tree=0x3ba8c) at eval.c:465 # #9 0x8ca3 in interpret (tree=0x3bbd0) at eval.c:308 # #10 0x8c34 in interpret (tree=0x3bc18) at eval.c:292 # #11 0xf069 in do_input () at io.c:312 # #12 0x12ba9 in main (argc=3, argv=0xefbfd538) at main.c:393 # (gdb) l # 386 *buf += len; # 387 return nf; # 388 } # 389 # 390 /* before doing anything save the char at *end */ # 391 sav = *end; # 392 /* because it will be destroyed now: */ # 393 # 394 *end = ' '; /* sentinel character */ # 395 for (; nf < up_to; scan++) { # (gdb) print end # $1 = 0x804d006 # (gdb) print buf # $2 = (char **) 0x37704 # (gdb) print *buf # $3 = 0x804d000 # (gdb) q # The program is running. Quit anyway (and kill it)? (y or n) y # bash$ exit # # Script done on Mon Jan 20 15:11:07 1997 # # Dave Bodenstab # imdave@synet.net gawk-4.0.1+dfsg.orig/test/sortfor.ok0000644000175000017500000001120411527140252016352 0ustar schotschotaadelete1 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 gawk-4.0.1+dfsg.orig/test/fnmisc.awk0000644000175000017500000000047411463242060016312 0ustar schotschot# Tue Feb 4 12:20:10 IST 2003 # Misc functions tests, in case we start mucking around in the grammar again. # Empty body shouldn't hurt anything: function f() {} BEGIN { f() } # Using a built-in function name should manage the symbol table # correctly: function split(x) { return x } function x(a) { return a } gawk-4.0.1+dfsg.orig/test/match3.in0000644000175000017500000000001511463242060016025 0ustar schotschot5 5.0 0.5 .5 gawk-4.0.1+dfsg.orig/test/dumpvars.in0000644000175000017500000000000611467207167016524 0ustar schotschotA B C gawk-4.0.1+dfsg.orig/test/datanonl.ok0000644000175000017500000000003511463242060016453 0ustar schotschotbleble@foo1.bh.pl deny gawk-4.0.1+dfsg.orig/test/fmtspcl.tok0000644000175000017500000000147211463242060016515 0ustar schotschotgawk: fmtspcl.awk:10: warning: sqrt: called with negative argument -1 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 gawk-4.0.1+dfsg.orig/test/hex.ok0000644000175000017500000000005411463242060015440 0ustar schotschot1 600000 06e5(x) 0600001 03e2(ex) 1000 00.3 gawk-4.0.1+dfsg.orig/test/backw.in0000644000175000017500000000001411463242060015734 0ustar schotschot123 abc 456 gawk-4.0.1+dfsg.orig/test/nested.awk0000644000175000017500000001006611463242060016313 0ustar schotschot# From james@ruari-quinn.demon.co.uk Thu Jun 5 11:43:58 2003 # Return-Path: # Received: from localhost (skeeve [127.0.0.1]) # by skeeve.com (8.12.5/8.12.5) with ESMTP id h558eVui012655 # for ; Thu, 5 Jun 2003 11:43:58 +0300 # Received: from actcom.co.il [192.114.47.1] # by localhost with POP3 (fetchmail-5.9.0) # for arnold@localhost (single-drop); Thu, 05 Jun 2003 11:43:58 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Thu Jun 5 11:43:29 2003) # X-From_: james@ruari-quinn.demon.co.uk Wed Jun 4 20:09:54 2003 # Received: from smtp1.actcom.net.il by actcom.co.il with ESMTP # (8.11.6/actcom-0.2) id h54H9oY05088 for ; # Wed, 4 Jun 2003 20:09:52 +0300 (EET DST) # (rfc931-sender: smtp.actcom.co.il [192.114.47.13]) # Received: from f7.net (consort.superb.net [209.61.216.22]) # by smtp1.actcom.net.il (8.12.8/8.12.8) with ESMTP id h54HB8To002721 # for ; Wed, 4 Jun 2003 20:11:09 +0300 # Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) # by f7.net (8.11.7/8.11.6) with ESMTP id h54H9li15411 # for ; Wed, 4 Jun 2003 13:09:47 -0400 # Received: from monty-python.gnu.org ([199.232.76.173]) # by fencepost.gnu.org with esmtp (Exim 4.20) # id 19Nbli-0001kD-BL # for bug-gawk@gnu.org; Wed, 04 Jun 2003 13:09:46 -0400 # Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) # id 19NbZ5-0004V2-71 # for bug-gawk@gnu.org; Wed, 04 Jun 2003 12:56:43 -0400 # Received: from cicero.e-mis.co.uk ([212.240.194.162]) # by monty-python.gnu.org with esmtp (Exim 4.20) # id 19NbYK-0003c7-AP # for bug-gawk@gnu.org; Wed, 04 Jun 2003 12:55:56 -0400 # Received: from [10.139.58.254] (helo=tacitus) # by cicero.e-mis.co.uk with esmtp (Exim 3.35 #1 (Debian)) # id 19NbWO-0007Qv-00 # for ; Wed, 04 Jun 2003 17:53:56 +0100 # Received: from james by tacitus with local (Exim 3.36 #1 (Debian)) # id 19NbWO-0000cK-00 # for ; Wed, 04 Jun 2003 17:53:56 +0100 # To: bug-gawk@gnu.org # Subject: 3.1.0 regression # Mail-Copies-To: never # From: James Troup # User-Agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/20.7 (gnu/linux) # Date: Wed, 04 Jun 2003 17:53:56 +0100 # Message-ID: <874r35wzq3.fsf@nocrew.org> # MIME-Version: 1.0 # Content-Type: text/plain; charset=us-ascii # Sender: James Troup # X-Spam-Status: No, hits=-3.9 required=5.0 # tests=EMAIL_ATTRIBUTION,SIGNATURE_SHORT_DENSE,SPAM_PHRASE_00_01, # USER_AGENT # version=2.41 # X-Spam-Level: # X-SpamBouncer: 1.4 (10/07/01) # X-SBClass: OK # Status: R # # Hi Aharon, # # This bug report comes from the Debian bug tracking system. You can # view the full log at: # # http://bugs.debian.org/188345 # # Like my other bug, this is a regression from 3.1.0 and I've reproduced # this problem with 3.1.2d. # # "Nikita V. Youshchenko" writes: # # | Package: gawk # | Version: 1:3.1.2-2 # | Severity: normal # | Tags: sid # | # | After upgrading gawk from woody to sid, I found one of my scripts not # | working. I explored this a little and found minimal script to reproduce # | the problem. # | # | File bug.awk is the following: # | BEGIN { WI_total = 0 } { WI_total++ { split ( $1, sws, "_" ) a = sws[1] } print(sws[1]) print(a) } # | # | The second print should output the same what first print poutputs, but # | with gawk 3.1.2-2 it outputs nothing: # | > echo a_b | gawk -f bug.awk # | a # | # | > # | # | With gawk from stable I get what expexted: # | > echo a_b | gawk -f bug.awk # | a # | a # | > # | # | If I remove "WI_total++" line, bug disapperas # | # | -- System Information: # | Debian Release: 3.0 # | Architecture: i386 # | Kernel: Linux zigzag 2.4.19 16:49:13 MSK 2003 i686 # | Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R # | # | Versions of packages gawk depends on: # | ii libc6 2.3.1-16 GNU C Library: Shared libraries an # | # | -- no debconf information # # -- # James # gawk-4.0.1+dfsg.orig/test/getnr2tb.awk0000644000175000017500000000641511463242060016563 0ustar schotschot#From vp@dmat.uevora.pt Thu Jun 18 09:10 EDT 1998 #Received: from mescaline.gnu.org (we-refuse-to-spy-on-our-users@mescaline.gnu.org [158.121.106.21]) by cssun.mathcs.emory.edu (8.7.5/8.6.9-940818.01cssun) with ESMTP id JAA23649 for ; Thu, 18 Jun 1998 09:10:54 -0400 (EDT) #Received: from khromeleque.dmat.uevora.pt by mescaline.gnu.org (8.8.5/8.6.12GNU) with ESMTP id JAA21732 for ; Thu, 18 Jun 1998 09:11:19 -0400 #Received: from khromeleque.dmat.uevora.pt (vp@localhost [127.0.0.1]) # by khromeleque.dmat.uevora.pt (8.8.8/8.8.8/Debian/GNU) with ESMTP id OAA11817 # for ; Thu, 18 Jun 1998 14:13:57 +0100 #Message-Id: <199806181313.OAA11817@khromeleque.dmat.uevora.pt> #To: arnold@gnu.org #Subject: concatenation bug in gawk 3.0.3 #Date: Thu, 18 Jun 1998 14:13:57 +0200 #From: Vasco Pedro #Content-Type: text #Content-Length: 2285 #Status: RO # #Hi, # #The gawk program '{print NR " " 10/NR}' will print: # #1 10 #5 5 #3 3.33333 #2 2.5 #2 2 #1 1.66667 # #instead of the correct: # #1 10 #2 5 #3 3.33333 #4 2.5 #5 2 #6 1.66667 # #You'll notice, on the incorrect output, that the first column is #the first digit of the second. # #I think the problem comes from the way builtin variables are handled. #Since the items to be concatenated are processed in reverse order and #the return value of tree_eval(``NR'') is a pointer to the value part #of `NR_node', the `unref()' of `NR_node' due to its second occurrence #will leave a dangling pointer in `strlist'. The reason that it doesn't #reuse the freed space with objects of the same type. (Using Electric #Fence with EF_PROTECT_FREE set confirms that freed space is being #accessed.) # #The enclosed patch (hack would be a better word to describe it) is #all I could come up with. With it installed, things seem to work ok, #but I doubt this is the correct way to do it. (If I treated the #case for `Node_field_spec' as the I did others, `make check' would #fail in several places.) # #Regards, #vasco # #*** eval.c~ Tue May 6 21:39:55 1997 #--- eval.c Thu Jun 18 13:39:25 1998 #*************** #*** 685,697 **** # return func_call(tree->rnode, tree->lnode); # # /* 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: #--- 685,700 ---- # return func_call(tree->rnode, tree->lnode); # # /* unary operations */ #+ case Node_field_spec: #+ lhs = get_lhs(tree, (Func_ptr *) NULL); #+ return *lhs; #+ # case Node_NR: # case Node_FNR: # case Node_NF: # case Node_FIELDWIDTHS: # case Node_FS: # case Node_RS: # case Node_subscript: # case Node_IGNORECASE: # case Node_OFS: #*************** #*** 699,705 **** # case Node_OFMT: # case Node_CONVFMT: # lhs = get_lhs(tree, (Func_ptr *) NULL); #! return *lhs; # # case Node_var_array: # fatal("attempt to use array `%s' in a scalar context", #--- 702,710 ---- # case Node_OFMT: # case Node_CONVFMT: # lhs = get_lhs(tree, (Func_ptr *) NULL); #! r = dupnode(*lhs); #! r->flags |= TEMP; #! return r; # # case Node_var_array: # fatal("attempt to use array `%s' in a scalar context", # { print NR " " 10/NR } gawk-4.0.1+dfsg.orig/test/lintold.in0000644000175000017500000000000111463242060016306 0ustar schotschot gawk-4.0.1+dfsg.orig/test/manyfiles.awk0000644000175000017500000000003411463242060017012 0ustar schotschot{ print $2 > ("junk/" $1) } gawk-4.0.1+dfsg.orig/test/parsefld.in0000644000175000017500000000000611463242060016446 0ustar schotschota = b gawk-4.0.1+dfsg.orig/test/rswhite.ok0000644000175000017500000000001611463242060016337 0ustar schotschot< a b c d> gawk-4.0.1+dfsg.orig/test/icasefs.awk0000644000175000017500000000102511463242060016441 0ustar schotschotBEGIN { # 1. Should print aCa IGNORECASE = 1 FS = "[c]" IGNORECASE = 0 $0 = "aCa" print $1 # 2. Should print a IGNORECASE = 1 FS = "[c]" $0 = "aCa" print $1 # 3. Should print a IGNORECASE = 1 FS = "C" IGNORECASE = 0 $0 = "aCa" print $1 # 4. Should print aCa IGNORECASE = 1 FS = "c" $0 = "aCa" print $1 # 5. Should print aCa FS = "xy" IGNORECASE = 0 FS = "c" IGNORECASE = 1 $0 = "aCa" print $1 # 6. Should print aCa FS = "xy" IGNORECASE = 0 FS = "c" IGNORECASE = 1 split("aCa",a) print a[1] } gawk-4.0.1+dfsg.orig/test/backw.awk0000644000175000017500000000000611463242060016111 0ustar schotschot/\w+/ gawk-4.0.1+dfsg.orig/test/asorti.awk0000644000175000017500000000054311463242060016331 0ustar schotschotfunction init(a) { delete a a["aardvark"] = 1 a["animal"] = 2 a["zebra"] = 3 a["zoo"] = 4 a["Iguana"] = 5 a["Alligator"] = 6 a["Nouns"] = 7 a["people"] = 8 } BEGIN { for (IGNORECASE = 0; IGNORECASE < 2; IGNORECASE++) { init(a) n = asorti(a) for (i = 1; i <= n; i++) printf("a[%d] = \"%s\"\n", i, a[i]) print "============" } } gawk-4.0.1+dfsg.orig/test/fpat1.awk0000644000175000017500000000055011572747250016055 0ustar schotschotBEGIN { # 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) } gawk-4.0.1+dfsg.orig/test/fnasgnm.awk0000644000175000017500000000076411463242060016466 0ustar schotschot# AFP_Bug1.awk - illustrate a problem with `gawk' (GNU Awk 3.0.3 on OS/2) # Arthur Pool .. pool@commerce.uq.edu.au # $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. # # Yes, I do realise that it's not a smart thing to do, but an error # message would be a kinder response than a core dump (and would make # debugging a whole lot easier). {ShowMe()} function ShowMe() {ShowMe = 1} gawk-4.0.1+dfsg.orig/test/subslash.awk0000644000175000017500000000010611463242060016647 0ustar schotschotBEGIN { i = 2 a[i] = 5 a[i] /= 2 printf "a[%s] = %f\n", i, a[i] } gawk-4.0.1+dfsg.orig/test/longwrds.awk0000644000175000017500000000111311475002530016660 0ustar schotschot# From Gawk Manual modified by bug fix and removal of punctuation # Invoker can customize sort command if necessary. BEGIN { if (!SORT) SORT = "LC_ALL=C sort" } # Record every word which is used at least once { for (i = 1; i <= NF; i++) { tmp = tolower($i) if (0 != (pos = match(tmp, /([[:lower:]]|-)+/))) used[substr(tmp, pos, RLENGTH)] = 1 } } #Find a number of distinct words longer than 10 characters END { num_long_words = 0 for (x in used) if (length(x) > 10) { ++num_long_words print x | SORT } print(num_long_words, "long words") | SORT close(SORT) } gawk-4.0.1+dfsg.orig/test/pid.sh0000755000175000017500000000013611463242060015435 0ustar schotschot#! /bin/sh AWK=${AWK-../gawk} exec $AWK -v "ok_pid=$$" -v "ok_ppid=$1" -f pid.awk 2>/dev/null gawk-4.0.1+dfsg.orig/test/double2.ok0000644000175000017500000000050111463242060016205 0ustar schotschot2^60= 1152921504606846976 1152921504606846976 1.15292e+18 100000000000000000000 2^61= 2305843009213693952 2305843009213693952 2.30584e+18 200000000000000000000 2^62= 4611686018427387904 4611686018427387904 4.61169e+18 400000000000000000000 2^63= 9223372036854775808 9223372036854775808 9.22337e+18 1000000000000000000000 gawk-4.0.1+dfsg.orig/test/getline4.ok0000644000175000017500000000001111654051011016354 0ustar schotschot aaa bbb gawk-4.0.1+dfsg.orig/test/aarray1.ok0000644000175000017500000000003111463614133016213 0ustar schotschot3 3 60 600 10 20 30 1001 gawk-4.0.1+dfsg.orig/test/ignrcas2.ok0000644000175000017500000000000311463242060016356 0ustar schotschotOK gawk-4.0.1+dfsg.orig/test/manglprm.ok0000644000175000017500000000001411463242060016465 0ustar schotschotBuffer = [] gawk-4.0.1+dfsg.orig/test/funsmnam.ok0000644000175000017500000000014411734665352016516 0ustar schotschotgawk: funsmnam.awk:1: error: function `foo': can't use function name as parameter name EXIT CODE: 1 gawk-4.0.1+dfsg.orig/test/fwtest.awk0000644000175000017500000000007211463242060016341 0ustar schotschotBEGIN { FIELDWIDTHS = "1 1 1" } { print NF, $1, $2, $3 } gawk-4.0.1+dfsg.orig/test/icasers.ok0000644000175000017500000000001211463242060016277 0ustar schotschot1111 2222 gawk-4.0.1+dfsg.orig/test/longwrds.ok0000644000175000017500000000042311463242060016513 0ustar schotschot20 long words compatibility concatenated consistency definitions description distributing fistatements gawk-options gnu-specific identically implementation implementations information non-portable pattern-action pre-defined program-file program-text programming restrictions gawk-4.0.1+dfsg.orig/test/intest.ok0000644000175000017500000000000411463242060016155 0ustar schotschot0 1 gawk-4.0.1+dfsg.orig/test/sortfor.in0000644000175000017500000000450211520355211016346 0ustar schotschotfsspcoln 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 gawk-4.0.1+dfsg.orig/test/getline3.awk0000644000175000017500000000013311463242060016535 0ustar schotschotBEGIN { cmd = "echo 3" y = 7 cmd | getline x y close(cmd) print (cmd | getline x y) } gawk-4.0.1+dfsg.orig/test/rsstart1.awk0000644000175000017500000000173611463242060016620 0ustar schotschot# From arnold@f7.net Wed Dec 15 11:32:46 2004 # Date: Tue, 14 Dec 2004 14:48:58 +0100 # From: Stepan Kasal # Subject: gawk bug with RS="^..." # To: bug-gawk@gnu.org # Message-id: <20041214134858.GA15490@matsrv.math.cas.cz> # # Hello, # I've noticed a problem with "^" in RS in gawk. In most cases, it seems # to match only the beginning of the file. But in fact it matches the # beginning of gawk's internal buffer. # # Observe the following example: # # $ gawk 'BEGIN{for(i=1;i<=100;i++) print "Axxxxxx"}' >file # $ gawk 'BEGIN{RS="^A"} END{print NR}' file # 2 # $ gawk 'BEGIN{RS="^Ax*\n"} END{print NR}' file # 100 # $ head file | gawk 'BEGIN{RS="^Ax*\n"} END{print NR}' # 10 # $ # # I think this calls for some clarification/fix. But I don't have any # fixed opinion how the solution should look like. # # Have a nice day, # Stepan Kasal # # PS: See also the discussion of the issue in the comp.lang.awk newsgroup. BEGIN { RS = "^A" } END { print NR } gawk-4.0.1+dfsg.orig/test/sortfor.awk0000644000175000017500000000022511560331365016530 0ustar schotschot{ 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 } gawk-4.0.1+dfsg.orig/test/aasorti.ok0000644000175000017500000000054011463614154016325 0ustar schotschotb[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" gawk-4.0.1+dfsg.orig/test/aryprm4.ok0000644000175000017500000000011711524325774016266 0ustar schotschotgawk: aryprm4.awk:6: fatal: attempt to use scalar `a' as an array EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/regtest.sh0000755000175000017500000000040711463242060016337 0ustar schotschot#! /bin/sh case "$AWK" in "") AWK=../gawk ;; esac #AWK=${AWK:-../gawk} for i in reg/*.awk do it=`basename $i .awk` $AWK -f $i reg/$it.out 2>&1 if diff reg/$it.out reg/$it.good then rm -f reg/$it.out else echo "regtest: $it fails" fi done gawk-4.0.1+dfsg.orig/test/nofmtch.awk0000644000175000017500000000003011463242060016455 0ustar schotschotBEGIN { printf "%3\n" } gawk-4.0.1+dfsg.orig/test/aryprm8.ok0000644000175000017500000000001011463242060016246 0ustar schotschot2 2 2 2 gawk-4.0.1+dfsg.orig/test/fnarray2.ok0000644000175000017500000000016111734665352016415 0ustar schotschotgawk: fnarray2.awk:3: r = ++pile[c] gawk: fnarray2.awk:3: ^ use of non-array as array EXIT CODE: 1 gawk-4.0.1+dfsg.orig/test/dfastress.awk0000644000175000017500000000005711577700066017041 0ustar schotschotBEGIN { print "a" ~ /(^| )*(a|b)*(c|d)( |$)/ } gawk-4.0.1+dfsg.orig/test/xref.awk0000644000175000017500000001522211715204052015773 0ustar schotschot # 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) } } } gawk-4.0.1+dfsg.orig/test/subamp.awk0000644000175000017500000000004411475002661016317 0ustar schotschot{ sub(/[[:lower:]]/, "&") ; print } gawk-4.0.1+dfsg.orig/test/fmtspcl.awk0000644000175000017500000000100611463242060016473 0ustar schotschotfunction display(x,str, i,res) { for (i = 0; i < n; i++) { if ((res = sprintf(formats[i],x)) != str) printf "sprintf(%s,%s) = %s (!= %s)\n", formats[i],x,res,str } } BEGIN { nan = sqrt(-1) nan_str = sprintf("%f",nan) nnan_str = sprintf("%f",-nan) inf = -log(0) inf_str = sprintf("%f",inf) n = 0 formats[n++] = "%f" formats[n++] = "%s" formats[n++] = "%g" formats[n++] = "%x" formats[n++] = "%d" display(nan,nan_str) display(-nan,nnan_str) display(inf,inf) display(-inf,"-"inf_str) } gawk-4.0.1+dfsg.orig/test/aryprm5.ok0000644000175000017500000000013111463242060016247 0ustar schotschotgawk: aryprm5.awk:2: fatal: attempt to use scalar parameter `x' as an array EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/mbprintf2.ok0000644000175000017500000000000411463242060016552 0ustar schotschotA A gawk-4.0.1+dfsg.orig/test/funstack.ok0000644000175000017500000000000011463242060016461 0ustar schotschotgawk-4.0.1+dfsg.orig/test/longsub.ok0000644000175000017500000060643511463242060016344 0ustar schotschotBB000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 gawk-4.0.1+dfsg.orig/test/gsubtest.ok0000644000175000017500000000006411463242060016515 0ustar schotschot1 aFOOc 4 XaXbXcX 3 XaXcX 1 abX 1 abX 1 abcX 2 aXcX gawk-4.0.1+dfsg.orig/test/parseme.awk0000644000175000017500000000004511463242060016461 0ustar schotschotBEGIN { toupper(substr*line,1,12)) } gawk-4.0.1+dfsg.orig/test/longsub.in0000644000175000017500000060650111463242060016333 0ustar schotschotAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 gawk-4.0.1+dfsg.orig/test/nlinstr.in0000644000175000017500000000001711463242060016341 0ustar schotschotline 1 @line 2 gawk-4.0.1+dfsg.orig/test/closebad.awk0000644000175000017500000000016211463242060016601 0ustar schotschotBEGIN { f = "/no/such/file/1" print (getline junk < f) print close(f) f = "/no/such/file/2" print close(f) } gawk-4.0.1+dfsg.orig/test/igncfs.awk0000644000175000017500000000021211475002433016273 0ustar schotschotBEGIN { IGNORECASE=1 FS="[^[:lower:]]+" } { for (i=1; i # Received: from localhost (skeeve [127.0.0.1]) # by skeeve.com (8.12.11/8.12.11) with ESMTP id j5F5P3VC014658 # for ; Wed, 15 Jun 2005 08:25:21 +0300 # Received: from pop.012.net.il [84.95.5.221] # by localhost with POP3 (fetchmail-6.2.5) # for arnold@localhost (single-drop); Wed, 15 Jun 2005 08:25:21 +0300 (IDT) # Received: from mtain2.012.net.il ([10.220.5.4]) # by i_mss3.012.net.il (HyperSendmail v2004.12) # with ESMTP id <0II300LQOPS7DA10@i_mss3.012.net.il> for arobbins@012.net.il; # Wed, 15 Jun 2005 04:07:19 +0300 (IDT) # Received: from VSCAN1 ([10.220.20.1]) # by i_mtain2.012.net.il (HyperSendmail v2004.12) # with ESMTP id <0II300ETQPS7IEZ4@i_mtain2.012.net.il> for arobbins@012.net.il # (ORCPT arobbins@012.net.il); Wed, 15 Jun 2005 04:07:19 +0300 (IDT) # Received: from i_mtain2.012.net.il ([10.220.5.4]) # by VSCAN1 with InterScan Messaging Security Suite; Wed, # 15 Jun 2005 04:03:15 +0300 # Received: from f7.net ([209.61.216.22]) # by i_mtain2.012.net.il (HyperSendmail v2004.12) # with ESMTP id <0II300H7VPS5P1O2@i_mtain2.012.net.il> for arobbins@012.net.il; # Wed, 15 Jun 2005 04:07:18 +0300 (IDT) # Received: (from arnold@localhost) by f7.net (8.11.7-20030920/8.11.7) # id j5F13DT21530 for arobbins@012.net.il; Tue, 14 Jun 2005 21:03:14 -0400 # Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) # by f7.net (8.11.7-20030920/8.11.7) with ESMTP id j5F136p21454 for # ; Tue, 14 Jun 2005 21:03:06 -0400 # Received: from monty-python.gnu.org ([199.232.76.173]) # by fencepost.gnu.org with esmtp (Exim 4.34) # id 1DiMJ6-0002fe-Av for bug-gawk@gnu.org; Tue, 14 Jun 2005 21:03:04 -0400 # Received: from Debian-exim by monty-python.gnu.org with spam-scanned # (Exim 4.34) id 1DiMIp-0003lM-I4 for bug-gawk@gnu.org; Tue, # 14 Jun 2005 21:02:47 -0400 # Received: from [66.187.233.31] (helo=mx1.redhat.com) # by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) # (Exim 4.34) id 1DiMIp-0003l4-8g for bug-gawk@gnu.org; Tue, # 14 Jun 2005 21:02:47 -0400 # Received: from int-mx1.corp.redhat.com # (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) # with ESMTP id j5F11EGn027669 for ; Tue, # 14 Jun 2005 21:01:14 -0400 # Received: from lacrosse.corp.redhat.com # (lacrosse.corp.redhat.com [172.16.52.154]) by int-mx1.corp.redhat.com # (8.11.6/8.11.6) with ESMTP id j5F11Eu01536 for ; Tue, # 14 Jun 2005 21:01:14 -0400 # Received: from [192.168.7.71] (vpn50-10.rdu.redhat.com [172.16.50.10]) # by lacrosse.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j5F118s03225 for # ; Tue, 14 Jun 2005 21:01:09 -0400 # Date: Tue, 14 Jun 2005 17:57:55 -0700 # From: Ulrich Drepper # Subject: non-decimal variable parameters cause crashes # To: bug-gawk@gnu.org # Message-id: <42AF7D13.5010901@redhat.com> # Organization: Red Hat, Inc. # MIME-version: 1.0 # Content-type: multipart/signed; micalg=pgp-sha1; # protocol="application/pgp-signature"; # boundary=------------enig9DEC74140126C224E7DE3E54 # X-Accept-Language: en-us, en # X-Enigmail-Version: 0.91.0.0 # User-Agent: Mozilla Thunderbird 1.0.2-6 (X11/20050513) # Original-recipient: rfc822;arobbins@012.net.il # X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on skeeve.com # X-Spam-Level: # X-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham # version=2.63 # Status: R # # This is an OpenPGP/MIME signed message (RFC 2440 and 3156) # --------------enig9DEC74140126C224E7DE3E54 # Content-Type: text/plain; charset=UTF-8 # Content-Transfer-Encoding: quoted-printable # # Running # # gawk --non-decimal-data -v a=3D0x1 'BEGIN { print a+0 }' # # currently crashes. More details including a patch at # # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=3D160421 # # --=20 # =E2=9E=A7 Ulrich Drepper =E2=9E=A7 Red Hat, Inc. =E2=9E=A7 444 Castro St = # =E2=9E=A7 Mountain View, CA =E2=9D=96 # # # --------------enig9DEC74140126C224E7DE3E54 # Content-Type: application/pgp-signature; name="signature.asc" # Content-Description: OpenPGP digital signature # Content-Disposition: attachment; filename="signature.asc" # # -----BEGIN PGP SIGNATURE----- # Version: GnuPG v1.4.1 (GNU/Linux) # Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org # # iD8DBQFCr30T2ijCOnn/RHQRAp9LAKC+w/vhXW73ps1Pxcy+VGPrT1Su+ACguPnV # VstZcFJgJ5GZ1YvDExsOZZI= # =xmXh # -----END PGP SIGNATURE----- # # --------------enig9DEC74140126C224E7DE3E54-- # BEGIN { print a+0 } gawk-4.0.1+dfsg.orig/test/getlndir.awk0000644000175000017500000000015111463242060016633 0ustar schotschotBEGIN { if (!SRCDIR) SRCDIR = "." OFS = ", " x = 4 ret = (getline x < SRCDIR) print x, ret, ERRNO } gawk-4.0.1+dfsg.orig/test/Gentests0000755000175000017500000000436111732151350016050 0ustar schotschot#!/usr/bin/gawk -f # This program should generate Maketests BEGIN { if (VMSTESTS) vmsargvfixup() # read the list of files for (i = 2; i < ARGC; i++) files[ARGV[i]] # throw it away ARGC = 2 ntests = 0 } # process the file Makefile.am: /^[[:upper:]_]*_TESTS *=/,/[^\\]$/ { gsub(/(^[[:upper:]_]*_TESTS *=|\\$)/,"") for (i = 1; i <= NF; i++) tests[++ntests] = $i next } /^NEED_LINT *=/,/[^\\]$/ { gsub(/(^NEED_LINT *=|\\$)/,"") for (i = 1; i <= NF; i++) lint[$i] next } /^NEED_LINT_OLD *=/,/[^\\]$/ { gsub(/(^NEED_LINT_OLD *=|\\$)/,"") for (i = 1; i <= NF; i++) lint_old[$i] next } /^GENTESTS_UNUSED *=/,/[^\\]$/ { gsub(/(^GENTESTS_UNUSED *=|\\$)/,"") for (i = 1; i <= NF; i++) unused[$i] next } /^[[:alpha:]_][[:alnum:]_]*:/ { # remember all targets from Makefile.am sub(/:.*/,"") targets[$0] } # Now write the output file: END { # this line tells automake to keep the comment with the rules: print "Gt-dummy:" print "# file Maketests, generated from Makefile.am by the Gentests program" for (i = 1; i <= ntests; i++) { x = tests[i] if (!(x in targets)) generate(x) } print "# end of file Maketests" } function generate(x, s) { if (!(x".awk" in files)) printf "WARNING: file `%s.awk' not found.\n", x > "/dev/stderr" else delete files[x".awk"] if (VMSTESTS) return vmsgenerate(x) print x ":" s = "" if (x in lint) { s = s " --lint" delete lint[x] } if (x in lint_old) { s = s " --lint-old" delete lint_old[x] } if (x".in" in files) { s = s " < $(srcdir)/$@.in" delete files[x".in"] } printf "\t@echo %s\n", x printf "\t@AWKPATH=$(srcdir) $(AWK) -f $@.awk %s >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n", s printf "\t@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@\n\n" } END { for (x in lint) if (!(x in targets)) printf "WARNING: --lint target `%s' is missing.\n", x > "/dev/stderr" for (x in lint_old) if (!(x in targets)) printf "WARNING: --lint-old target `%s' is missing.\n", x > "/dev/stderr" for (x in files) if (!(x in unused) && \ !(gensub(/\.(awk|in)$/,"","",x) in targets)) printf "WARNING: unused file `%s'.\n", x > "/dev/stderr" } # VMSTESTS: generate test template in vms format # gawk -v "VMSTESTS=1" -f Gentests -f Gentests.vms Makefile.am *.awk *.in >Maketests.vms gawk-4.0.1+dfsg.orig/test/synerr1.awk0000644000175000017500000000010511463242060016425 0ustar schotschot# program to make sure we don't infinite # syntax errors print "hi" gawk-4.0.1+dfsg.orig/test/arrymem1.ok0000644000175000017500000000002111463242060016403 0ustar schotschottest b[""] = "b" gawk-4.0.1+dfsg.orig/test/fnarray2.awk0000644000175000017500000000006411463242060016552 0ustar schotschotfunction pile(c, r) { r = ++pile[c] } { pile($1) } gawk-4.0.1+dfsg.orig/test/opasnslf.ok0000644000175000017500000000001011463242060016471 0ustar schotschot2 13 13 gawk-4.0.1+dfsg.orig/test/opasnidx.ok0000644000175000017500000000000411463242060016474 0ustar schotschot2 3 gawk-4.0.1+dfsg.orig/test/fmttest.ok0000644000175000017500000000506411463242060016350 0ustar schotschot Format item: c ABC with %c : A 123 with %c : { ABC with %.15c : A 123 with %.15c : { ABC with %15c : A 123 with %15c : { ABC with %-15c : A 123 with %-15c : { Format item: d ABC with %d : 0 123 with %d : 123 ABC with %.15d : 000000000000000 123 with %.15d : 000000000000123 ABC with %15d : 0 123 with %15d : 123 ABC with %-15d : 0 123 with %-15d : 123 Format item: e ABC with %e : 0.000000e+00 123 with %e : 1.230000e+02 ABC with %.25e : 0.0000000000000000000000000e+00 123 with %.25e : 1.2300000000000000000000000e+02 ABC with %25e : 0.000000e+00 123 with %25e : 1.230000e+02 ABC with %-25e : 0.000000e+00 123 with %-25e : 1.230000e+02 Format item: f ABC with %f : 0.000000 123 with %f : 123.000000 ABC with %.25f : 0.0000000000000000000000000 123 with %.25f : 123.0000000000000000000000000 ABC with %25f : 0.000000 123 with %25f : 123.000000 ABC with %-25f : 0.000000 123 with %-25f : 123.000000 Format item: g ABC with %g : 0 123 with %g : 123 ABC with %.25g : 0 123 with %.25g : 123 ABC with %25g : 0 123 with %25g : 123 ABC with %-25g : 0 123 with %-25g : 123 Format item: o ABC with %o : 0 123 with %o : 173 ABC with %.15o : 000000000000000 123 with %.15o : 000000000000173 ABC with %15o : 0 123 with %15o : 173 ABC with %-15o : 0 123 with %-15o : 173 Format item: s ABC with %s : ABC 123 with %s : 123 ABC with %.15s : ABC 123 with %.15s : 123 ABC with %15s : ABC 123 with %15s : 123 ABC with %-15s : ABC 123 with %-15s : 123 Format item: u ABC with %u : 0 123 with %u : 123 ABC with %.15u : 000000000000000 123 with %.15u : 000000000000123 ABC with %15u : 0 123 with %15u : 123 ABC with %-15u : 0 123 with %-15u : 123 Format item: x ABC with %x : 0 123 with %x : 7b ABC with %.15x : 000000000000000 123 with %.15x : 00000000000007b ABC with %15x : 0 123 with %15x : 7b ABC with %-15x : 0 123 with %-15x : 7b Format item: X ABC with %X : 0 123 with %X : 7B ABC with %.15X : 000000000000000 123 with %.15X : 00000000000007B ABC with %15X : 0 123 with %15X : 7B ABC with %-15X : 0 123 with %-15X : 7B gawk-4.0.1+dfsg.orig/test/arrayparm.awk0000644000175000017500000000045511463242060017030 0ustar schotschot# # Test program from: # # Date: Tue, 21 Feb 95 16:09:29 EST # From: emory!blackhawk.com!aaron (Aaron Sosnick) # BEGIN { foo[1]=1; foo[2]=2; bug1(foo); } function bug1(i) { for (i in foo) { bug2(i); delete foo[i]; print i,1,bot[1]; } } function bug2(arg) { bot[arg]=arg; } gawk-4.0.1+dfsg.orig/test/pty1.awk0000644000175000017500000000405511654051011015723 0ustar schotschot# 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 } gawk-4.0.1+dfsg.orig/test/prmreuse.awk0000644000175000017500000000033011463242060016664 0ustar schotschot# from Pat Rankin, rankin@eql.caltech.edu, now rankin@pactechdata.com BEGIN { dummy(1); legit(); exit } function dummy(arg) { return arg } function legit( scratch) { split("1 2 3", scratch) return "" } gawk-4.0.1+dfsg.orig/test/posix.awk0000644000175000017500000000302111463242060016164 0ustar schotschotBEGIN { a = "+2"; b = 2; c = "+2a"; d = "+2 "; e = " 2" printf "Test #1: " if (b == a) print "\"" a "\"" " compares as a number" else print "\"" a "\"" " compares as a string" printf "Test #2: " if (b == c) print "\"" c "\"" " compares as a number" else print "\"" c "\"" " compares as a string" printf "Test #3: " if (b == d) print "\"" d "\"" " compares as a number" else print "\"" d "\"" " compares as a string" printf "Test #4: " if (b == e) print "\"" e "\"" " compares as a number" else print "\"" e "\"" " compares as a string" f = a + b + c + d + e print "after addition" printf "Test #5: " if (b == a) print "\"" a "\"" " compares as a number" else print "\"" a "\"" " compares as a string" printf "Test #6: " if (b == c) print "\"" c "\"" " compares as a number" else print "\"" c "\"" " compares as a string" printf "Test #7: " if (b == d) print "\"" d "\"" " compares as a number" else print "\"" d "\"" " compares as a string" printf "Test #8: " if (b == e) print "\"" e "\"" " compares as a number" else print "\"" e "\"" " compares as a string" printf "Test #9: " if ("3e5" > "5") print "\"3e5\" > \"5\"" else print "\"3e5\" <= \"5\"" printf "Test #10: " x = 32.14 y[x] = "test" OFMT = "%e" print y[x] printf "Test #11: " x = x + 0 print y[x] printf "Test #12: " OFMT="%f" CONVFMT="%e" print 1.5, 1.5 "" printf "Test #13: " if ( 1000000 "" == 1000001 "") print "match" else print "nomatch" } { printf "Test #14: " FS = ":" print $1 FS = "," printf "Test #15: " print $2 } gawk-4.0.1+dfsg.orig/test/mixed1.ok0000644000175000017500000000013511463242060016043 0ustar schotschotgawk: BEGIN {return junk} gawk: ^ `return' used outside function context EXIT CODE: 1 gawk-4.0.1+dfsg.orig/test/procinfs.awk0000644000175000017500000000037611463242060016657 0ustar schotschotBEGIN { printf "Initially, PROCINFO[\"FS\"] = %s\n", PROCINFO["FS"] FIELDWIDTHS = "3 4 5 6" printf "After assign to FIELDWIDTHS, PROCINFO[\"FS\"] = %s\n", PROCINFO["FS"] FS = FS printf "After assign to FS, PROCINFO[\"FS\"] = %s\n", PROCINFO["FS"] } gawk-4.0.1+dfsg.orig/test/pcntplus.awk0000644000175000017500000000004211463242060016672 0ustar schotschotBEGIN { printf "%+d %d\n", 3, 4 } gawk-4.0.1+dfsg.orig/test/fordel.ok0000644000175000017500000000000011463242060016116 0ustar schotschotgawk-4.0.1+dfsg.orig/test/uparrfs.ok0000644000175000017500000000004411463242060016335 0ustar schotschot--><-- -->AA<-- -->xxBxx<-- -->C<-- gawk-4.0.1+dfsg.orig/test/sclforin.awk0000644000175000017500000000005111463242060016641 0ustar schotschotBEGIN { j = 4; for (i in j) print j[i] } gawk-4.0.1+dfsg.orig/test/synerr2.awk0000644000175000017500000000416611463242060016441 0ustar schotschot# From: =?ISO-8859-1?Q?J=FCrgen_Kahrs?= # Newsgroups: gnu.utils.bug # Subject: Re: gawk-3.1.5: syntax error, core dump # Date: Fri, 23 Jun 2006 18:12:07 +0200 # Lines: 12 # Approved: bug-gnu-utils@gnu.org # Message-ID: # References: # Reply-To: Juergen.KahrsDELETETHIS@vr-web.de # NNTP-Posting-Host: lists.gnu.org # Mime-Version: 1.0 # Content-Type: text/plain; charset=ISO-8859-1 # Content-Transfer-Encoding: 7bit # X-Trace: news.Stanford.EDU 1151079136 27033 199.232.76.165 (23 Jun 2006 16:12:16 GMT) # X-Complaints-To: news@news.stanford.edu # To: gnu-utils-bug@moderators.isc.org # Envelope-to: bug-gnu-utils@gnu.org # X-Orig-X-Trace: individual.net # vYX9N7nUUtqHxPyspweN0gZ4Blkl17z/xU01EwbykxB178O8M= # User-Agent: Thunderbird 1.5 (X11/20060317) # In-Reply-To: # X-BeenThere: bug-gnu-utils@gnu.org # X-Mailman-Version: 2.1.5 # Precedence: list # List-Id: Bug reports for the GNU utilities # List-Unsubscribe: , # # List-Archive: # List-Post: # List-Help: # List-Subscribe: , # # Path: news.012.net.il!seanews2.seabone.net!newsfeed.albacom.net!news.mailgate.org!newsfeed.stueberl.de!newsfeed.news2me.com!headwall.stanford.edu!newsfeed.stanford.edu!shelby.stanford.edu!individual.net!not-for-mail # Xref: news.012.net.il gnu.utils.bug:813 # # Karel Zak wrote: # # > it seems that gawk has problem with "syntax error" reporting: # > # > ./gawk '/^include / { system(sprintf("cd /etc; cat %s", [$]2)); skip # > = 1; } { if (!skip) print $0; skipQuit; }' < /etc/ld.so.conf # # This test case can be boiled down to # # gawk 'BEGIN {sprintf("%s", $)}' # BEGIN { sprintf("%s", $) } gawk-4.0.1+dfsg.orig/test/exit.ok0000644000175000017500000000017111544705657015645 0ustar schotschot1 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 gawk-4.0.1+dfsg.orig/test/scalar.ok0000644000175000017500000000011611524325776016136 0ustar schotschotgawk: scalar.awk:3: fatal: attempt to use scalar `a' as an array EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/math.awk0000644000175000017500000000040611463242060015757 0ustar schotschotBEGIN { pi = 3.1415927 printf "cos(%f) = %f\n", pi/4, cos(pi/4) printf "sin(%f) = %f\n", pi/4, sin(pi/4) e = exp(1) printf "e = %f\n", e printf "log(e) = %f\n", log(e) printf "sqrt(pi ^ 2) = %f\n", sqrt(pi ^ 2) printf "atan2(1, 1) = %f\n", atan2(1, 1) } gawk-4.0.1+dfsg.orig/test/beginfile1.ok0000644000175000017500000000064211463242060016664 0ustar schotschotIn 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 = "" gawk-4.0.1+dfsg.orig/test/forsimp.awk0000644000175000017500000000003511463242060016503 0ustar schotschotBEGIN { for (print 9; 0;); } gawk-4.0.1+dfsg.orig/test/defref.awk0000644000175000017500000000002011463242060016251 0ustar schotschotBEGIN { foo() } gawk-4.0.1+dfsg.orig/test/aryprm1.awk0000644000175000017500000000010311463242060016413 0ustar schotschotfunction f(a) { if (3 in a) print 7 a = 5 } BEGIN { f(arr) } gawk-4.0.1+dfsg.orig/test/igncfs.ok0000644000175000017500000000006311463242060016125 0ustar schotschotthis, is, handled, ok This, is, Not, hanDLed, Well gawk-4.0.1+dfsg.orig/test/exitval1.awk0000644000175000017500000000015311463242060016562 0ustar schotschot# This should exit 0, even though child exits 1 BEGIN { "exit 1" | getline junk ; exit 12 } END { exit 0 } gawk-4.0.1+dfsg.orig/test/arrayprm2.awk0000644000175000017500000000516311463242060016752 0ustar schotschot# From spcecdt@armory.com Wed Apr 30 11:08:48 2003 # Return-Path: # Received: from localhost (skeeve [127.0.0.1]) # by skeeve.com (8.12.5/8.12.5) with ESMTP id h3U7uZWr015489 # for ; Wed, 30 Apr 2003 11:08:48 +0300 # Received: from actcom.co.il [192.114.47.1] # by localhost with POP3 (fetchmail-5.9.0) # for arnold@localhost (single-drop); Wed, 30 Apr 2003 11:08:48 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Wed Apr 30 11:05:01 2003) # X-From_: spcecdt@armory.com Wed Apr 30 04:06:46 2003 # Received: from smtp1.actcom.net.il by actcom.co.il with ESMTP # (8.11.6/actcom-0.2) id h3U16iv04111 for ; # Wed, 30 Apr 2003 04:06:45 +0300 (EET DST) # (rfc931-sender: mail.actcom.co.il [192.114.47.13]) # Received: from f7.net (consort.superb.net [209.61.216.22]) # by smtp1.actcom.net.il (8.12.8/8.12.8) with ESMTP id h3U16nEv009589 # for ; Wed, 30 Apr 2003 04:06:50 +0300 # Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) # by f7.net (8.11.7/8.11.6) with ESMTP id h3U16gj29182 # for ; Tue, 29 Apr 2003 21:06:42 -0400 # Received: from monty-python.gnu.org ([199.232.76.173]) # by fencepost.gnu.org with esmtp (Exim 4.10) # id 19Ag3W-00029w-00 # for bug-gawk@gnu.org; Tue, 29 Apr 2003 21:06:42 -0400 # Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) # id 19Ag1V-0001AN-00 # for bug-gawk@gnu.org; Tue, 29 Apr 2003 21:04:39 -0400 # Received: from deepthought.armory.com ([192.122.209.42] helo=armory.com) # by monty-python.gnu.org with smtp (Exim 4.10.13) # id 19Ag1V-0001A3-00 # for bug-gawk@gnu.org; Tue, 29 Apr 2003 21:04:37 -0400 # Date: Tue, 29 Apr 2003 18:04:35 -0700 # From: "John H. DuBois III" # To: bug-gawk@gnu.org # Subject: gawk 3.1.2a bug # Message-ID: <20030430010434.GA4278@armory.com> # Mime-Version: 1.0 # Content-Type: text/plain; charset=us-ascii # Content-Disposition: inline # User-Agent: Mutt/1.3.28i # X-Www: http://www.armory.com./~spcecdt/ # Sender: spcecdt@armory.com # X-Spam-Status: No, hits=-7.2 required=5.0 # tests=SIGNATURE_SHORT_DENSE,SPAM_PHRASE_00_01,USER_AGENT, # USER_AGENT_MUTT # version=2.41 # X-Spam-Level: # X-SpamBouncer: 1.4 (10/07/01) # X-SBClass: OK # Status: RO # # gawk-3.1.2a 'BEGIN {foo(bar)};function foo(baz){split("x",baz)}' # gawk-3.1.2a: cmd. line:1: fatal: split: second argument is not an array # # John # -- # John DuBois spcecdt@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/ # BEGIN { foo(bar) } function foo(baz) { split("x", baz) } gawk-4.0.1+dfsg.orig/test/aadelete1.awk0000644000175000017500000000041011463614133016652 0ustar schotschotBEGIN { 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] } gawk-4.0.1+dfsg.orig/test/gsubtst8.ok0000644000175000017500000000002211654051011016426 0ustar schotschota bar bar c _ foo gawk-4.0.1+dfsg.orig/test/rsnul1nl.in0000644000175000017500000000003611463242060016427 0ustar schotschot This is... the first record. gawk-4.0.1+dfsg.orig/test/gsubtst5.ok0000644000175000017500000000002411501461642016433 0ustar schotschotThisIsaTitleMyTitle gawk-4.0.1+dfsg.orig/test/asgext.in0000644000175000017500000000002011463242060016135 0ustar schotschot1 2 3 1 1 2 3 4 gawk-4.0.1+dfsg.orig/test/strftlng.awk0000644000175000017500000000046711463242060016700 0ustar schotschot# test file from Paul Eggert, eggert@twinsun.com # modified for portability (%c doesn't cut it) BEGIN { BUFSIZ = 1024 simpleformat = format = "%m/%d/%y %H:%M:%S\n" clen = length(strftime(format, 0)) for (i = 1; i < BUFSIZ / clen + 1; i++) format = format simpleformat printf "%s", strftime(format, 0) } gawk-4.0.1+dfsg.orig/test/nondec2.ok0000644000175000017500000000000211463242060016175 0ustar schotschot1 gawk-4.0.1+dfsg.orig/test/icasers.in0000644000175000017500000000002011463242060016273 0ustar schotschot1111AAAA2222bbbbgawk-4.0.1+dfsg.orig/test/noloop1.in0000644000175000017500000000005211463242060016236 0ustar schotschot''Italics with an apostrophe'' embedded'' gawk-4.0.1+dfsg.orig/test/fsrs.awk0000644000175000017500000000015711463242060016006 0ustar schotschotBEGIN { RS=""; FS="\n"; ORS=""; OFS="\n"; } { split ($2,f," ") print $0; } gawk-4.0.1+dfsg.orig/test/mbprintf1.in0000644000175000017500000000001311463242060016546 0ustar schotschotAAA ÅÃÆ gawk-4.0.1+dfsg.orig/test/prec.awk0000644000175000017500000000012211463242060015752 0ustar schotschot# check the precedence of operators: BEGIN { $1 = i = 1 $+i++ $- -i++ print } gawk-4.0.1+dfsg.orig/test/fwtest2.ok0000644000175000017500000000121011463242060016245 0ustar schotschotx y z 0.4867373206 1.3206333033 -0.2333178127 x y z 0.5668176165 1.3711756314 -0.2193558040 x y z 0.4325251781 1.3399488722 -0.1568307497 x y z 0.4900487563 1.3295759570 -0.2217392402 x y z -0.6790064191 1.2536623801 -0.2955415433 x y z -0.6311440220 1.2966579993 -0.2246692210 x y z -0.7209390351 1.1783407099 -0.2539408209 x y z -0.6782473356 1.2495242556 -0.2811436366 x y z -0.7062054082 1.1223820964 -1.1619805834 x y z -0.6491590119 1.1248946162 -1.0851579675 x y z -0.7948856821 1.1208852325 -1.1259821556 x y z -0.7102549262 1.1225121126 -1.1475381286 gawk-4.0.1+dfsg.orig/test/range1.in0000644000175000017500000000001411463242060016022 0ustar schotschotfoobar junk gawk-4.0.1+dfsg.orig/test/pipeio2.in0000644000175000017500000000021411463242060016216 0ustar schotschot January 1997 S M Tu W Th F S 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 gawk-4.0.1+dfsg.orig/test/strftime.awk0000644000175000017500000000077011463242060016667 0ustar schotschot# strftime.awk ; test the strftime code # # input is the output of `date', see Makefile.in # # The mucking about with $0 and $N is to avoid problems # on cygwin, where the timezone field is empty and there # are two consecutive blanks. # Additional mucking about to lop off the seconds field; # helps decrease chance of difference due to a second boundary { $3 = sprintf("%02d", $3 + 0) $4 = substr($4, 1, 5) print > "strftime.ok" $0 = strftime("%a %b %d %H:%M %Z %Y") $NF = $NF print > OUTPUT } gawk-4.0.1+dfsg.orig/test/ofmt.in0000644000175000017500000000134211463242060015617 0ustar schotschotalt/binaries/warez/crypto/.: .. ... alt/fan/douglas-adams/.: .. ... 7478 7479 7480 7481 7482 7483 7484 7485 7486 7490 7488 7489 7491 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7455 7449 7450 7451 7452 7453 7454 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7475 7477 alt/os/linux/.: .. ... alt/security/.: .. ... pgp ripem keydist index 9617 9618 9619 9620 9625 9621 9626 9622 9623 9624 9627 9628 9629 9630 9631 9632 9633 9634 9636 9637 9638 9639 9640 9641 alt/security/index/.: .. ... alt/security/keydist/.: .. ... 253 /.: gawk-4.0.1+dfsg.orig/test/rstest6.in0000644000175000017500000000000411463242060016256 0ustar schotschotABCDgawk-4.0.1+dfsg.orig/test/splitarr.awk0000644000175000017500000000014511463242060016666 0ustar schotschotBEGIN { a[1] = "elephantie" a[2] = "e" print split(a[1],a,a[2]), a[2], a[3], split(a[2],a,a[2]) } gawk-4.0.1+dfsg.orig/test/leaddig.ok0000644000175000017500000000001711463242060016244 0ustar schotschotx = 2E 0 0 0 0 gawk-4.0.1+dfsg.orig/test/delarpm2.ok0000644000175000017500000000000611463242060016357 0ustar schotschot1 2 gawk-4.0.1+dfsg.orig/test/reint2.awk0000644000175000017500000000004111463242060016224 0ustar schotschot/^([[:digit:]]+[[:space:]]+){2}/ gawk-4.0.1+dfsg.orig/test/aryprm3.awk0000644000175000017500000000013311463242060016420 0ustar schotschotfunction f(a, i) { for (i in a) delete a[i] if (a == 0) print 7 } BEGIN { f(arr) } gawk-4.0.1+dfsg.orig/test/rstest4.ok0000644000175000017500000000001711463242060016263 0ustar schotschoty = x = <> gawk-4.0.1+dfsg.orig/test/forref.awk0000644000175000017500000000023411463242060016310 0ustar schotschotBEGIN { names[1] = "s" names[2] = "m" for (i in names) { x[names[i]] = i print i, names[i], x[names[i]] } print x["s"] # adump(x) # adump(names) } gawk-4.0.1+dfsg.orig/test/exitval2.ok0000644000175000017500000000000411463242060016405 0ustar schotschotfoo gawk-4.0.1+dfsg.orig/test/backgsub.awk0000644000175000017500000000006011463242060016603 0ustar schotschot{ gsub( "\\\\", "\\\\") print } gawk-4.0.1+dfsg.orig/test/mbprintf1.ok0000644000175000017500000000002511463242060016554 0ustar schotschotAAA | ÅÃÆ | gawk-4.0.1+dfsg.orig/test/asgext.awk0000644000175000017500000000003611463242060016320 0ustar schotschot{ print $3; $4 = "a"; print } gawk-4.0.1+dfsg.orig/test/double1.ok0000644000175000017500000000005011463242060016203 0ustar schotschot9223372036854775808 9223372036854775808 gawk-4.0.1+dfsg.orig/test/prec.ok0000644000175000017500000000000211463242060015576 0ustar schotschot1 gawk-4.0.1+dfsg.orig/test/fnamedat.in0000644000175000017500000000000411463242060016423 0ustar schotschotfoo gawk-4.0.1+dfsg.orig/test/gsubtst7.in0000644000175000017500000000000411654051011016422 0ustar schotschot aaagawk-4.0.1+dfsg.orig/test/parse1.in0000644000175000017500000000001611463242060016042 0ustar schotschot3 4 5 6 7 8 9 gawk-4.0.1+dfsg.orig/test/rsstart1.in0000644000175000017500000023420011463242060016436 0ustar schotschotAxxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx Axxxxxx gawk-4.0.1+dfsg.orig/test/argtest.awk0000644000175000017500000000011611463242060016475 0ustar schotschotBEGIN { for (i = 0; i < ARGC; i++) printf("ARGV[%d] = %s\n", i, ARGV[i]) } gawk-4.0.1+dfsg.orig/test/rsstart2.awk0000644000175000017500000000005111463242060016606 0ustar schotschotBEGIN { RS = "^Ax*\n" } END { print NR } gawk-4.0.1+dfsg.orig/test/aasort.ok0000644000175000017500000000074211463614154016160 0ustar schotschotb[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" gawk-4.0.1+dfsg.orig/test/longsub.awk0000644000175000017500000000003511463242060016475 0ustar schotschot{sub( "^.*AA", "BB"); print} gawk-4.0.1+dfsg.orig/test/paramtyp.awk0000644000175000017500000000054511463242060016667 0ustar schotschot# Sun Apr 25 13:28:58 IDT 1999 # from Juegen Khars. This program should not core dump. function ReadPGM(f, d) { print "ReadPGM" d[1] = 1 } function WritePGM(f, d) { print "WritePGM" d[1] = 0 } BEGIN { print "before ReadPGM" ReadPGM("", d) print "after ReadPGM" print "before WritePGM" WritePGM("", d) print "after WritePGM" } gawk-4.0.1+dfsg.orig/test/nfldstr.ok0000644000175000017500000000000011463242060016317 0ustar schotschotgawk-4.0.1+dfsg.orig/test/getline4.awk0000644000175000017500000000003111654051011016527 0ustar schotschotEND { getline $2; print} gawk-4.0.1+dfsg.orig/test/fpat2.ok0000644000175000017500000000000611567522342015676 0ustar schotschot0 0 2 gawk-4.0.1+dfsg.orig/test/igncdym.in0000644000175000017500000000003011463242060016275 0ustar schotschotThis is foo This is bar gawk-4.0.1+dfsg.orig/test/pipeio1.awk0000644000175000017500000000233411463242060016376 0ustar schotschot# From dragon!gamgee.acad.emich.edu!dhw Tue Mar 18 01:12:15 1997 # Return-Path: # Message-ID: # Date: Mon, 17 Mar 97 20:48 CST # From: dhw@gamgee.acad.emich.edu (David H. West) # To: arnold@gnu.ai.mit.edu # Subject: gawk 3.0.2 bug report (cc of msg to bug-gnu-utils) # Status: OR # Content-Length: 869 # X-Lines: 20 # X-Display-Position: 2 # # Nature of bug: operation on a pipe side-effects a different pipe. # Observed-With: gawk 3.0.2, Linux kernel 2.0.28 # Reproduce-By: running the following script, without and with the "close" # statement uncommented. # -----------------cut here-------------------------- BEGIN {FILE1="test1"; FILE2="test2"; print "1\n" > FILE1; close(FILE1); print "2\n" > FILE2; close(FILE2); cmd1="cat " FILE1; cmd2="cat " FILE2; #end of preparing commands which give easily-predictable output while( (cmd1 | getline)==1) { #terminates as file has only 1 line #and we never close cmd1 cmd2 | getline L; #BUG: uncommenting the following line causes an infinite loop close(cmd2); print $0,L; } } gawk-4.0.1+dfsg.orig/test/splitwht.ok0000644000175000017500000000000411463242060016525 0ustar schotschot4 5 gawk-4.0.1+dfsg.orig/test/fordel.awk0000644000175000017500000000320111463242060016275 0ustar schotschot#Date: Mon, 7 Jun 2004 10:40:28 -0500 #From: mary1john8@earthlink.net #To: arnold@skeeve.com #Subject: gawk internal errors #Message-ID: <20040607154028.GA2457@apollo> # #Hello, # # gawk-3.1.3i internal errors: # #[1] # #$> ./gawk 'BEGIN { for (i in a) delete a; }' BEGIN { for (i in a) delete a; } #gawk: fatal error: internal error #Aborted # #------------------------------------------------------------------ #--- awkgram.y.orig 2004-06-07 09:42:14.000000000 -0500 #+++ awkgram.y 2004-06-07 09:45:58.000000000 -0500 #@@ -387,7 +387,7 @@ # * 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) { #+ if ($8 != NULL && $8->type == Node_K_delete && $8->rnode != NULL) { # NODE *arr, *sub; # # assert($8->rnode->type == Node_expression_list); #------------------------------------------------------------------ # # #[2] # #$> ./gawk 'BEGIN { printf("%3$*10$.*1$s\n", 20, 10, "hello"); }' #gawk: fatal error: internal error #Aborted # #------------------------------------------------------------------ #--- builtin.c.orig 2004-06-07 10:04:20.000000000 -0500 #+++ builtin.c 2004-06-07 10:06:08.000000000 -0500 #@@ -780,7 +780,10 @@ # s1++; # n0--; # } #- #+ if (val >= num_args) { #+ toofew = TRUE; #+ break; #+ } # arg = the_args[val]; # } else { # parse_next_arg(); #------------------------------------------------------------------ # # # Finally, a test for the rewritten get_src_buf(): # #$> AWKBUFSIZE=2 make check # #I get 3 failed tests. Not sure this is of any interest. # # #Thanks, #John gawk-4.0.1+dfsg.orig/test/gsubtst5.in0000644000175000017500000000003311463242060016426 0ustar schotschotThis Is a Title: My Title? gawk-4.0.1+dfsg.orig/test/negrange.awk0000644000175000017500000000027711523565406016633 0ustar schotschotBEGIN { 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]) } gawk-4.0.1+dfsg.orig/test/reparse.awk0000644000175000017500000000010311463242060016461 0ustar schotschot{ gsub(/x/, " ") $0 = $0 print $1 print $0 print $1, $2, $3 } gawk-4.0.1+dfsg.orig/test/fcall_exit2.awk0000644000175000017500000000055411463242060017226 0ustar schotschot#!/bin/awk -f function crash () { exit 1 } function true (a,b,c) { return 1 } BEGIN { if (ARGV[2] == 1) { print " true(1, crash()) => crash properly." true(1, crash()) # ADR: Added: delete ARGV[2] } } { print " true(1, crash()) => do not crash properly." true(1, crash()) } # FdF gawk-4.0.1+dfsg.orig/test/printfloat.awk0000644000175000017500000000247711463242060017222 0ustar schotschot# Test program for checking sprintf operation with various floating # point formats # # Watch out - full output of this program will have 3000 * tot lines, # which will take a chunk of space if you will write it to your disk. # --mj BEGIN { just = "-" plus = "+ " alt = "#" zero = "0" spec = "feEgG" fw[1] = "" fw[2] = "1" fw[3] = "5" fw[4] = "10" fw[5] = "15" prec[1] = ".-1" prec[2] = "" prec[3] = ".2" prec[4] = ".5" prec[5] = ".10" num = 123.6 factor = 1.0e-12 tot = 8 data[1] = 0 data[2] = 1 for (i = 3; i <= tot; i++) { data[i] = num * factor factor *= 1000 } for (j = 1; j <= 2; j++) { for (p = 1; p <= 3; p++) { for (a = 1; a <= 2; a++) { for (z = 1; z <= 2; z++) { for (s = 1; s <= 5; s++) { for (w = 1; w <= 5; w++) { for (r = 1; r <= 5; r++) { frmt = "|%" substr(just, j, 1) frmt = frmt substr(plus, p, 1) frmt = frmt substr(alt, a, 1) frmt = frmt substr(zero, z, 1) frmt = frmt fw[w] prec[r] frmt = frmt substr(spec, s, 1) "|" for (i = 1; i <= tot; i++) { result = sprintf(frmt, data[i]) # "normalize" if you must # sub(/\|\./, "|0.", result) printf("%-16s %-25s\t%g\n", frmt, result,data[i]) } } } } } } } } } gawk-4.0.1+dfsg.orig/test/fnparydl.ok0000644000175000017500000000023011734665352016505 0ustar schotschotBEFORE LOOP DELETING KEY 4 DELETING KEY 5 DELETING KEY 6 DELETING KEY 7 DELETING KEY 1 DELETING KEY 2 DELETING KEY 3 AFTER LOOP 0 elements still in q[] gawk-4.0.1+dfsg.orig/test/Maketests0000644000175000017500000010715511734665352016234 0ustar schotschotGt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @echo addcomma @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ anchgsub: @echo anchgsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayparm: @echo arrayparm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayprm2: @echo arrayprm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayprm3: @echo arrayprm3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayref: @echo arrayref @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrymem1: @echo arrymem1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref2: @echo arryref2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref3: @echo arryref3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref4: @echo arryref4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref5: @echo arryref5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arynasty: @echo arynasty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm1: @echo aryprm1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm2: @echo aryprm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm3: @echo aryprm3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm4: @echo aryprm4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm5: @echo aryprm5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm6: @echo aryprm6 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm7: @echo aryprm7 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm8: @echo aryprm8 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arysubnm: @echo arysubnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asgext: @echo asgext @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ back89: @echo back89 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ backgsub: @echo backgsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ childin: @echo childin @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ closebad: @echo closebad @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clsflnam: @echo clsflnam @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ compare2: @echo compare2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat1: @echo concat1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat2: @echo concat2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat3: @echo concat3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ convfmt: @echo convfmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ datanonl: @echo datanonl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ defref: @echo defref @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ delarprm: @echo delarprm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ delfunc: @echo delfunc @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ eofsplit: @echo eofsplit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ exitval2: @echo exitval2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fcall_exit: @echo fcall_exit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fcall_exit2: @echo fcall_exit2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fldchg: @echo fldchg @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fldchgnf: @echo fldchgnf @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnamedat: @echo fnamedat @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarray: @echo fnarray @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarray2: @echo fnarray2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnaryscl: @echo fnaryscl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnasgnm: @echo fnasgnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnmisc: @echo fnmisc @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fordel: @echo fordel @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ forref: @echo forref @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ forsimp: @echo forsimp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsbs: @echo fsbs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsrs: @echo fsrs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fstabplus: @echo fstabplus @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funsemnl: @echo funsemnl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funsmnam: @echo funsmnam @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funstack: @echo funstack @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline: @echo getline @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline3: @echo getline3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getnr2tm: @echo getnr2tm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubasgn: @echo gsubasgn @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtest: @echo gsubtest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst2: @echo gsubtst2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst4: @echo gsubtst4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst5: @echo gsubtst5 @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ hsprint: @echo hsprint @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ inputred: @echo inputred @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ intest: @echo intest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ intprec: @echo intprec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ iobug1: @echo iobug1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ leadnl: @echo leadnl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ longsub: @echo longsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ longwrds: @echo longwrds @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ manglprm: @echo manglprm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ math: @echo math @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ membug1: @echo membug1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ minusstr: @echo minusstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nasty: @echo nasty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nasty2: @echo nasty2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ negexp: @echo negexp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfldstr: @echo nfldstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfneg: @echo nfneg @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfset: @echo nfset @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlfldsep: @echo nlfldsep @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlinstr: @echo nlinstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlstrina: @echo nlstrina @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noeffect: @echo noeffect @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nofmtch: @echo nofmtch @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noloop1: @echo noloop1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noloop2: @echo noloop2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noparms: @echo noparms @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nulrsend: @echo nulrsend @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ numindex: @echo numindex @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ numsubstr: @echo numsubstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ octsub: @echo octsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmt: @echo ofmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmtfidl: @echo ofmtfidl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmts: @echo ofmts @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ onlynl: @echo onlynl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ opasnidx: @echo opasnidx @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ opasnslf: @echo opasnslf @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramdup: @echo paramdup @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramres: @echo paramres @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramtyp: @echo paramtyp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ parse1: @echo parse1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ parsefld: @echo parsefld @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ parseme: @echo parseme @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pcntplus: @echo pcntplus @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prdupval: @echo prdupval @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prec: @echo prec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printf1: @echo printf1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prmarscl: @echo prmarscl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prmreuse: @echo prmreuse @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prt1eval: @echo prt1eval @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prtoeval: @echo prtoeval @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regeq: @echo regeq @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ reparse: @echo reparse @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ resplit: @echo resplit @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rs: @echo rs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsnul1nl: @echo rsnul1nl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest1: @echo rstest1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest2: @echo rstest2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest3: @echo rstest3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest4: @echo rstest4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest5: @echo rstest5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rswhite: @echo rswhite @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ scalar: @echo scalar @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sclforin: @echo sclforin @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sclifin: @echo sclifin @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sortempty: @echo sortempty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitargv: @echo splitargv @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitarr: @echo splitarr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitdef: @echo splitdef @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitvar: @echo splitvar @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitwht: @echo splitwht @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strcat1: @echo strcat1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strnum1: @echo strnum1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strtod: @echo strtod @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subsepnm: @echo subsepnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subslash: @echo subslash @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ substr: @echo substr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ swaplns: @echo swaplns @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ synerr1: @echo synerr1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ synerr2: @echo synerr2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit2: @echo uninit2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit3: @echo uninit3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit4: @echo uninit4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit5: @echo uninit5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninitialized: @echo uninitialized @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ unterm: @echo unterm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uparrfs: @echo uparrfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ wjposer1: @echo wjposer1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zero2: @echo zero2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zeroe0: @echo zeroe0 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zeroflag: @echo zeroflag @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlnhd: @echo getlnhd @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clos1way: @echo clos1way @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funlen: @echo funlen @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fwtest: @echo fwtest @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fwtest2: @echo fwtest2 @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gensub2: @echo gensub2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlndir: @echo getlndir @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnuops2: @echo gnuops2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnuops3: @echo gnuops3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnureops: @echo gnureops @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ icasefs: @echo icasefs @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ icasers: @echo icasers @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ igncdym: @echo igncdym @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ igncfs: @echo igncfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ignrcase: @echo ignrcase @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ lintold: @echo lintold @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ match2: @echo match2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ match3: @echo match3 @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printfbad1: @echo printfbad1 @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regx8bit: @echo regx8bit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest6: @echo rstest6 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ shadow: @echo shadow @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ double2: @echo double2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ intformat: @echo intformat @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asort: @echo asort @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asorti: @echo asorti @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fmttest: @echo fmttest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarydel: @echo fnarydel @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnparydl: @echo fnparydl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rebt8b2: @echo rebt8b2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sort1: @echo sort1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sprintfc: @echo sprintfc @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # end of file Maketests gawk-4.0.1+dfsg.orig/test/ChangeLog.00000644000175000017500000016163111577702334016255 0ustar schotschotMon 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. gawk-4.0.1+dfsg.orig/test/noloop1.ok0000644000175000017500000000000011463242060016232 0ustar schotschotgawk-4.0.1+dfsg.orig/test/fpat2.awk0000644000175000017500000000013111567517155016054 0ustar schotschotBEGIN { FPAT = " " $0 = "" print NF $0 = "abc" print NF $0 = "a b c" print NF } gawk-4.0.1+dfsg.orig/test/getline2.ok0000644000175000017500000000012011463242060016357 0ustar schotschotBEGIN { while( getline > 0) { print } } BEGIN { while( getline > 0) { print } } gawk-4.0.1+dfsg.orig/test/compare.ok0000644000175000017500000000001711463242060016301 0ustar schotschot2 zero 1 1 0 1 gawk-4.0.1+dfsg.orig/test/subsepnm.awk0000644000175000017500000000007311463242060016662 0ustar schotschotBEGIN { SUBSEP = 10; a[1, 1] = 100 ; print a[1 SUBSEP 1] } gawk-4.0.1+dfsg.orig/test/paramres.ok0000644000175000017500000000016211527020510016461 0ustar schotschotgawk: paramres.awk:3: error: function `foo': can't use special variable `FS' as a function parameter EXIT CODE: 1 gawk-4.0.1+dfsg.orig/test/prdupval.ok0000644000175000017500000000001511463242060016506 0ustar schotschot1 one abcone gawk-4.0.1+dfsg.orig/test/minusstr.ok0000644000175000017500000000000311463242060016532 0ustar schotschot-6 gawk-4.0.1+dfsg.orig/test/subi18n.awk0000644000175000017500000000325211463242060016321 0ustar schotschot# Date: Mon, 27 Feb 2006 12:35:30 +0900 # From: KIMURA Koichi # Subject: gawk: sub_common has multi-byte aware bug # To: bug-gawk@gnu.org # Message-id: <20060227121045.2198.KIMURA.KOICHI@canon.co.jp> # # Hi, # # A certain user faced bug of sub builtin function and report to me. # Then I investigated the bug. # # reproduce script is here. BEGIN { str = "type=\"directory\" version=\"1.0\"" #print "BEGIN:", str while (str) { sub(/^[^=]*/, "", str); s = substr(str, 2) print s sub(/^="[^"]*"/, "", str) sub(/^[ \t]*/, "", str) } } # and sample result is here (on GNU/Linux Fedora core 3) # # [kbk@skuld gawk-3.1.5]$ LC_ALL=C ./gawk -f subbug.awk # "directory" version="1.0" # "1.0" # [kbk@skuld gawk-3.1.5]$ LC_ALL=en_US.UTF-8 ./gawk -f subbug.awk # "directory" version="1.0" # "dire # [kbk@skuld gawk-3.1.5]$ # # In my investigation, this bug is cause by don't release wide-string when # sub is executed. # # patch is here. # # --- builtin.c.orig 2005-07-27 03:07:43.000000000 +0900 # +++ builtin.c 2006-02-26 02:07:52.000000000 +0900 # @@ -2463,6 +2468,15 @@ sub_common(NODE *tree, long how_many, in # t->stptr = buf; # t->stlen = textlen; # # +#ifdef MBS_SUPPORT # + if (t->flags & WSTRCUR) { # + if (t->wstptr != NULL) # + free(t->wstptr); # + t->wstptr = NULL; # + t->wstlen = 0; # + t->flags &= ~WSTRCUR; # + } # +#endif # free_temp(s); # if (matches > 0 && lhs) { # if (priv) { # # # -- # KIMURA Koichi # # # ##################################################################################### # This Mail Was Scanned by 012.net AntiVirus Service1- Powered by TrendMicro Interscan # gawk-4.0.1+dfsg.orig/test/rstest2.awk0000644000175000017500000000006511463242060016435 0ustar schotschotBEGIN { RS = "" FS = "\\" $0 = "a\\b" print $1 } gawk-4.0.1+dfsg.orig/test/redfilnm.in0000644000175000017500000000001511463242060016446 0ustar schotschothello, world gawk-4.0.1+dfsg.orig/test/opasnslf.awk0000644000175000017500000000007511463242060016655 0ustar schotschotBEGIN { print b += b += 1 b = 6 print b += b++ print b } gawk-4.0.1+dfsg.orig/test/binmode1.ok0000644000175000017500000000000211463242060016343 0ustar schotschot3 gawk-4.0.1+dfsg.orig/test/devfd.in50000644000175000017500000000001511463242060016023 0ustar schotschotfile on fd 5 gawk-4.0.1+dfsg.orig/test/pipeio1.ok0000644000175000017500000000000711463242060016220 0ustar schotschot1 2 2 gawk-4.0.1+dfsg.orig/test/wideidx.ok0000644000175000017500000000000411463242060016304 0ustar schotschot0 4 gawk-4.0.1+dfsg.orig/test/manglprm.in0000644000175000017500000000001011463242060016456 0ustar schotschotTesting gawk-4.0.1+dfsg.orig/test/fsrs.in0000644000175000017500000000003111463242060015621 0ustar schotschota b c d e f 1 2 3 4 5 6 gawk-4.0.1+dfsg.orig/test/leadnl.awk0000644000175000017500000000021711463242060016265 0ustar schotschotBEGIN { RS = ""; FS = "\n" } { print "Name is: ", $1 print "Address is: ", $2 print "City and State are: ", $3 print "" } gawk-4.0.1+dfsg.orig/test/gensub.ok0000644000175000017500000000012711463242060016140 0ustar schotschot3 = , 2 = , 1 = a b c a BB c a b c a b CC a b CC a b CC DON'T PANIC gawk-4.0.1+dfsg.orig/test/pipeio2.awk0000644000175000017500000000427711463242060016407 0ustar schotschot# From: megaadm@rina.quantum.de # Subject: Bug report - closing down pipes which read from shell com # To: bug-gnu-utils@prep.ai.mit.edu # Date: Thu, 27 Feb 1997 23:19:16 +0100 (CET) # CC: arnold@gnu.ai.mit.edu # # Hello people, # # i think i found a bug or something mysterious behaviour in # gawk Version 3.0 patchlevel 0. # # I am running on linux 2.0.25 under bash. # # Could you please have a look at the following awk program # an let me please know, if this is what i expect it to, # namely a bug. # # ----------- cut here -------------------------------------------- BEGIN { # OS is linux 2.0.25 # shell is bash # Gnu Awk (gawk) 3.0, patchlevel 0 # The command i typed on the shell was "gawk -f -" #com = "cal 01 1997" com = ("cat " SRCDIR "/pipeio2.in") # Don't use empty lines, because Windows ECHO does # something different when invoked without arguments while ((com | getline fnam) > 0 && fnam != "") { # com_tr = "echo " fnam " | tr [0-9]. ..........." # com_tr = "echo " fnam " | sed 's/[0-9]/./g'" com_tr = "echo " fnam " | sed \"s/[0-9]/./g\"" # print "\'" com_tr "\'" print "'" com_tr "'" com_tr | getline nam print nam # please run that program and take a look at the # output. I think this is what was expected. # Then comment in the following 4 lines and see # what happens. I expect the first pipe "com | getline" # not to be close, but i think this is exactly what happens # So, is this ok ? if (close(com_tr) < 0) { print ERRNO break } } close(com) } # ----------- cut here -------------------------------------------- # # There is another thing i do not understand. # Why doesn't the awk - command "close" reports an # error, if i would say close("abc") which i had never # openend ? # # Regards, # Ulrich Gvbel # -- # /********************************************************\ # * Ulrich Gvbel, goebel@quantum.de * # * Quantum Gesellschaft f|r Software mbH, Dortmund * # * phone : +49-231-9749-201 fax: +49-231-9749-3 * # * private: +49-231-803994 fax: +49-231-803994 * # \********************************************************/ gawk-4.0.1+dfsg.orig/test/onlynl.ok0000644000175000017500000000000011463242060016156 0ustar schotschotgawk-4.0.1+dfsg.orig/test/fcall_exit2.ok0000644000175000017500000000010711463242060017047 0ustar schotschot true(1, crash()) => do not crash properly. EXIT CODE: 1 gawk-4.0.1+dfsg.orig/test/ofmta.awk0000644000175000017500000000102011552021155016124 0ustar schotschot# 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] } gawk-4.0.1+dfsg.orig/test/sprintfc.in0000644000175000017500000000001211463242060016473 0ustar schotschot65 66 foo gawk-4.0.1+dfsg.orig/test/printlang.awk0000644000175000017500000000016111463242060017022 0ustar schotschotBEGIN { printf "\nLocale environment:\n\tLC_ALL=\"%s\" LANG=\"%s\"\n\n", ENVIRON["LC_ALL"], ENVIRON["LANG"] } gawk-4.0.1+dfsg.orig/test/arryref3.awk0000644000175000017500000000021411463242060016560 0ustar schotschotBEGIN { foo(a) for (i in a) print i, a[i] } function foo(b) { a[1] = "global" b[2] = "local" bar(b) } function bar(c) { c = 12 } gawk-4.0.1+dfsg.orig/test/mbprintf1.awk0000644000175000017500000000003111463242060016722 0ustar schotschot{ printf "%-7s|\n", $0 } gawk-4.0.1+dfsg.orig/test/ofmts.awk0000644000175000017500000000005711463242060016160 0ustar schotschotBEGIN { OFMT= "%s" } { $1 + $2; print $1, $2 } gawk-4.0.1+dfsg.orig/test/rsstart2.ok0000644000175000017500000000000211463242060016431 0ustar schotschot2 gawk-4.0.1+dfsg.orig/test/addcomma.awk0000644000175000017500000000065211463242060016576 0ustar schotschot# addcomma - put commas in numbers # input: a number per line # output: the input number followed by # the number with commas and two decimal places { printf("%-12s %20s\n", $0, addcomma($0)) } function addcomma(x, num) { if (x < 0) return "-" addcomma(-x) num = sprintf("%.2f", x) # num is dddddd.dd while (num ~ /[0-9][0-9][0-9][0-9]/) sub(/[0-9][0-9][0-9][,.]/, ",&", num) return num } gawk-4.0.1+dfsg.orig/test/fmttest.awk0000644000175000017500000001170011463242060016513 0ustar schotschot### /u/sy/beebe/xml/shbook/fmttest.awk, Sat May 31 09:13:52 2003 ### Edit by Nelson H. F. Beebe ### ==================================================================== ### Test the degree of support for printf format items in awk ### implementations. ### ### Usage: ### awk -f fmttest.awk ### [31-May-2003] ### ==================================================================== BEGIN { ## ----------------------------------------------------------------- print "\n\nFormat item: c\n" printf("ABC with %%c : %c\n", "ABC") printf("123 with %%c : %c\n", 123) printf("ABC with %%.15c : %.15c\n", "ABC") printf("123 with %%.15c : %.15c\n", 123) printf("ABC with %%15c : %15c\n", "ABC") printf("123 with %%15c : %15c\n", 123) printf("ABC with %%-15c : %-15c\n", "ABC") printf("123 with %%-15c : %-15c\n", 123) ## ----------------------------------------------------------------- print "\n\nFormat item: d\n" printf("ABC with %%d : %d\n", "ABC") printf("123 with %%d : %d\n", 123) printf("ABC with %%.15d : %.15d\n", "ABC") printf("123 with %%.15d : %.15d\n", 123) printf("ABC with %%15d : %15d\n", "ABC") printf("123 with %%15d : %15d\n", 123) printf("ABC with %%-15d : %-15d\n", "ABC") printf("123 with %%-15d : %-15d\n", 123) ## ----------------------------------------------------------------- print "\n\nFormat item: e\n" printf("ABC with %%e : %e\n", "ABC") printf("123 with %%e : %e\n", 123) printf("ABC with %%.25e : %.25e\n", "ABC") printf("123 with %%.25e : %.25e\n", 123) printf("ABC with %%25e : %25e\n", "ABC") printf("123 with %%25e : %25e\n", 123) printf("ABC with %%-25e : %-25e\n", "ABC") printf("123 with %%-25e : %-25e\n", 123) ## ----------------------------------------------------------------- print "\n\nFormat item: f\n" printf("ABC with %%f : %f\n", "ABC") printf("123 with %%f : %f\n", 123) printf("ABC with %%.25f : %.25f\n", "ABC") printf("123 with %%.25f : %.25f\n", 123) printf("ABC with %%25f : %25f\n", "ABC") printf("123 with %%25f : %25f\n", 123) printf("ABC with %%-25f : %-25f\n", "ABC") printf("123 with %%-25f : %-25f\n", 123) ## ----------------------------------------------------------------- print "\n\nFormat item: g\n" printf("ABC with %%g : %g\n", "ABC") printf("123 with %%g : %g\n", 123) printf("ABC with %%.25g : %.25g\n", "ABC") printf("123 with %%.25g : %.25g\n", 123) printf("ABC with %%25g : %25g\n", "ABC") printf("123 with %%25g : %25g\n", 123) printf("ABC with %%-25g : %-25g\n", "ABC") printf("123 with %%-25g : %-25g\n", 123) ## ----------------------------------------------------------------- print "\n\nFormat item: o\n" printf("ABC with %%o : %o\n", "ABC") printf("123 with %%o : %o\n", 123) printf("ABC with %%.15o : %.15o\n", "ABC") printf("123 with %%.15o : %.15o\n", 123) printf("ABC with %%15o : %15o\n", "ABC") printf("123 with %%15o : %15o\n", 123) printf("ABC with %%-15o : %-15o\n", "ABC") printf("123 with %%-15o : %-15o\n", 123) ## ----------------------------------------------------------------- print "\n\nFormat item: s\n" printf("ABC with %%s : %s\n", "ABC") printf("123 with %%s : %s\n", 123) printf("ABC with %%.15s : %.15s\n", "ABC") printf("123 with %%.15s : %.15s\n", 123) printf("ABC with %%15s : %15s\n", "ABC") printf("123 with %%15s : %15s\n", 123) printf("ABC with %%-15s : %-15s\n", "ABC") printf("123 with %%-15s : %-15s\n", 123) ## ----------------------------------------------------------------- print "\n\nFormat item: u\n" printf("ABC with %%u : %u\n", "ABC") printf("123 with %%u : %u\n", 123) printf("ABC with %%.15u : %.15u\n", "ABC") printf("123 with %%.15u : %.15u\n", 123) printf("ABC with %%15u : %15u\n", "ABC") printf("123 with %%15u : %15u\n", 123) printf("ABC with %%-15u : %-15u\n", "ABC") printf("123 with %%-15u : %-15u\n", 123) ## ----------------------------------------------------------------- print "\n\nFormat item: x\n" printf("ABC with %%x : %x\n", "ABC") printf("123 with %%x : %x\n", 123) printf("ABC with %%.15x : %.15x\n", "ABC") printf("123 with %%.15x : %.15x\n", 123) printf("ABC with %%15x : %15x\n", "ABC") printf("123 with %%15x : %15x\n", 123) printf("ABC with %%-15x : %-15x\n", "ABC") printf("123 with %%-15x : %-15x\n", 123) ## ----------------------------------------------------------------- print "\n\nFormat item: X\n" printf("ABC with %%X : %X\n", "ABC") printf("123 with %%X : %X\n", 123) printf("ABC with %%.15X : %.15X\n", "ABC") printf("123 with %%.15X : %.15X\n", 123) printf("ABC with %%15X : %15X\n", "ABC") printf("123 with %%15X : %15X\n", 123) printf("ABC with %%-15X : %-15X\n", "ABC") printf("123 with %%-15X : %-15X\n", 123) exit(0) } gawk-4.0.1+dfsg.orig/test/rsnul1nl.ok0000644000175000017500000000003511463242060016431 0ustar schotschotThis is... the first record. gawk-4.0.1+dfsg.orig/test/regrange.ok0000644000175000017500000000022011571243065016447 0ustar schotschot"." ~ /[--\/]/ --> 1 "a" ~ /[]-c]/ --> 1 "c" ~ /[[a-d]/ --> 1 "\" ~ /[\[-\]]/ --> 1 "[.c.]" ~ /[a-[.e.]]/ --> 1 "[.d.]" ~ /[[.c.]-[.z.]]/ --> 0 gawk-4.0.1+dfsg.orig/test/README0000644000175000017500000000123211463242060015200 0ustar schotschotMon Jan 22 13:08:58 EST 1996 This directory contains the tests for gawk. The tests use the following conventions. Given some aspect of gawk named `foo', there will be one or more of the following files: foo.awk --- actual code for the test if not inline in the Makefile foo.in --- the data for the test, if it needs data foo.ok --- the expected results _foo --- the actual results; generated at run time The _foo file will be left around if a test fails, allowing you to compare actual and expected results, in case they differ. If they do differ (other than strftime.ok and _strftime!), send in a bug report. See the manual for the bug report procedure. gawk-4.0.1+dfsg.orig/test/concat3.ok0000644000175000017500000000000311463242060016200 0ustar schotschotc gawk-4.0.1+dfsg.orig/test/delargv.awk0000644000175000017500000000027611563552030016461 0ustar schotschotBEGIN { 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])) } gawk-4.0.1+dfsg.orig/test/uninit4.ok0000644000175000017500000000053411463242060016251 0ustar schotschotgawk: uninit4.awk:4: warning: reference to uninitialized field `$0' gawk: uninit4.awk:9: warning: reference to uninitialized field `$0' gawk: uninit4.awk:10: warning: reference to uninitialized field `$0' gawk: uninit4.awk:11: warning: reference to uninitialized field `$1' gawk: uninit4.awk:12: warning: reference to uninitialized field `$2' gawk-4.0.1+dfsg.orig/test/closebad.ok0000644000175000017500000000001111463242060016421 0ustar schotschot-1 -1 -1 gawk-4.0.1+dfsg.orig/test/fsspcoln.awk0000644000175000017500000000175111463242060016661 0ustar schotschot# Date: Wed, 08 Dec 2004 12:59:42 +0600 # From: Alexander Sashnov # Subject: addon to gawk test suite # Sender: asashnov@sashnov.plesk.ru # To: "Arnold D. Robbins" # Message-id: # # # Hello, Arnold. # # I'm hit bug on SuSE 9.1 with awk: # # vsuse91:~ # echo "a:b:c" | awk '{ print $2 }' 'FS=[ :]' # b # vsuse91:~ # echo "a:b:c" | awk '{ print $2 }' 'FS=[ :]+' # awk: cmd. line:2: fatal: Trailing backslash: /[ :]+/ # # vsuse91:~ # awk --version # GNU Awk 3.1.3 # # # # But on my Debian machine all OK: # # asashnov@sashnov:~$ echo "a:b:c" | awk '{ print $2 }' 'FS=[ :]' # b # asashnov@sashnov:~$ echo "a:b:c" | awk '{ print $2 }' 'FS=[ :]+' # b # asashnov@sashnov:~$ awk --version # GNU Awk 3.1.4 # # # Need add test for this sample to gawk test suite for avoid this problems in future. # -- # Alexander Sashnov # Plesk QA Engineer # SWsoft, Inc. # E-mail: asashnov@sw-soft.com # ICQ UIN: 79404252 { print $2 } gawk-4.0.1+dfsg.orig/test/uninit5.ok0000644000175000017500000000035711463242060016255 0ustar schotschotgawk: uninit5.awk:75: warning: reference to uninitialized argument `a' length: 0 gawk: uninit5.awk:77: warning: reference to uninitialized argument `a' gawk: uninit5.awk:97: warning: reference to uninitialized argument `a' length: 0 gawk-4.0.1+dfsg.orig/test/prmarscl.ok0000644000175000017500000000013211463242060016474 0ustar schotschotgawk: prmarscl.awk:3: fatal: attempt to use scalar parameter `a' as an array EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/fpat3.awk0000644000175000017500000000012311654051011016033 0ustar schotschotBEGIN { FPAT = "[^,]*" } { if (x) NF for (i = 1; i <= 4; ++i) print i, $i } gawk-4.0.1+dfsg.orig/test/unterm.ok0000644000175000017500000000123211463242060016165 0ustar schotschotgawk: 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 gawk-4.0.1+dfsg.orig/test/double1.awk0000644000175000017500000000011211463242060016353 0ustar schotschotBEGIN { print 9223372036854775808 printf("%d\n", 9223372036854775808) } gawk-4.0.1+dfsg.orig/test/reint2.in0000644000175000017500000000000611463242060016051 0ustar schotschot1 2 3 gawk-4.0.1+dfsg.orig/test/compare.in0000644000175000017500000000001111463242060016270 0ustar schotschot0 1 0 1 gawk-4.0.1+dfsg.orig/test/concat3.awk0000644000175000017500000000005511463242060016360 0ustar schotschotBEGIN { a; a = a (b "c"); print a; print b } gawk-4.0.1+dfsg.orig/test/iobug1.ok0000644000175000017500000000000011463242060016031 0ustar schotschotgawk-4.0.1+dfsg.orig/test/back89.awk0000644000175000017500000000000711463242060016104 0ustar schotschot/a\8b/ gawk-4.0.1+dfsg.orig/test/printfbad3.ok0000644000175000017500000000002711734665352016726 0ustar schotschot>><< >>0xa7<< >>0xa7<< gawk-4.0.1+dfsg.orig/test/parse1.ok0000644000175000017500000000005511463242060016050 0ustar schotschotin: 3 4 5 6 7 8 9 a = 3 7 out: 3 4 6 6 8 8 9 gawk-4.0.1+dfsg.orig/test/rebt8b2.ok0000644000175000017500000002574611463242060016143 0ustar schotschot[an\000]*n bANas ANd ANases iAN cAN match [an\001]*n bANas ANd ANases iAN cAN match [an\002]*n bANas ANd ANases iAN cAN match [an\003]*n bANas ANd ANases iAN cAN match [an\004]*n bANas ANd ANases iAN cAN match [an\005]*n bANas ANd ANases iAN cAN match [an\006]*n bANas ANd ANases iAN cAN match [an\007]*n bANas ANd ANases iAN cAN match [an\010]*n bANas ANd ANases iAN cAN match [an\011]*n bANas ANd ANases iAN cAN match [an\012]*n bANas ANd ANases iAN cAN match [an\013]*n bANas ANd ANases iAN cAN match [an\014]*n bANas ANd ANases iAN cAN match [an\015]*n bANas ANd ANases iAN cAN match [an\016]*n bANas ANd ANases iAN cAN match [an\017]*n bANas ANd ANases iAN cAN match [an\020]*n bANas ANd ANases iAN cAN match [an\021]*n bANas ANd ANases iAN cAN match [an\022]*n bANas ANd ANases iAN cAN match [an\023]*n bANas ANd ANases iAN cAN match [an\024]*n bANas ANd ANases iAN cAN match [an\025]*n bANas ANd ANases iAN cAN match [an\026]*n bANas ANd ANases iAN cAN match [an\027]*n bANas ANd ANases iAN cAN match [an\030]*n bANas ANd ANases iAN cAN match [an\031]*n bANas ANd ANases iAN cAN match [an\032]*n bANas ANd ANases iAN cAN match [an\033]*n bANas ANd ANases iAN cAN match [an\034]*n bANas ANd ANases iAN cAN match [an\035]*n bANas ANd ANases iAN cAN match [an\036]*n bANas ANd ANases iAN cAN match [an\037]*n bANas ANd ANases iAN cAN match [an\040]*n bANasANdANases iAN cAN match [an\041]*n bANas ANd ANases iAN cAN match [an\042]*n bANas ANd ANases iAN cAN match [an\043]*n bANas ANd ANases iAN cAN match [an\044]*n bANas ANd ANases iAN cAN match [an\045]*n bANas ANd ANases iAN cAN match [an\046]*n bANas ANd ANases iAN cAN match [an\047]*n bANas ANd ANases iAN cAN match [an\050]*n bANas ANd ANases iAN cAN match [an\051]*n bANas ANd ANases iAN cAN match [an\052]*n bANas ANd ANases iAN cAN match [an\053]*n bANas ANd ANases iAN cAN match [an\054]*n bANas ANd ANases iAN cAN match [an\055]*n bANas ANd ANases iAN cAN match [an\056]*n bANas ANd ANases iAN cAN match [an\057]*n bANas ANd ANases iAN cAN match [an\060]*n bANas ANd ANases iAN cAN match [an\061]*n bANas ANd ANases iAN cAN match [an\062]*n bANas ANd ANases iAN cAN match [an\063]*n bANas ANd ANases iAN cAN match [an\064]*n bANas ANd ANases iAN cAN match [an\065]*n bANas ANd ANases iAN cAN match [an\066]*n bANas ANd ANases iAN cAN match [an\067]*n bANas ANd ANases iAN cAN match [an\070]*n bANas ANd ANases iAN cAN match [an\071]*n bANas ANd ANases iAN cAN match [an\072]*n bANas ANd ANases iAN cAN match [an\073]*n bANas ANd ANases iAN cAN match [an\074]*n bANas ANd ANases iAN cAN match [an\075]*n bANas ANd ANases iAN cAN match [an\076]*n bANas ANd ANases iAN cAN match [an\077]*n bANas ANd ANases iAN cAN match [an\100]*n bANas ANd ANases iAN cAN match [an\101]*n bANas ANd ANases iAN cAN match [an\102]*n bANas ANd ANases iAN cAN match [an\103]*n bANas ANd ANases iAN cAN match [an\104]*n bANas ANd ANases iAN cAN match [an\105]*n bANas ANd ANases iAN cAN match [an\106]*n bANas ANd ANases iAN cAN match [an\107]*n bANas ANd ANases iAN cAN match [an\110]*n bANas ANd ANases iAN cAN match [an\111]*n bANas ANd ANases iAN cAN match [an\112]*n bANas ANd ANases iAN cAN match [an\113]*n bANas ANd ANases iAN cAN match [an\114]*n bANas ANd ANases iAN cAN match [an\115]*n bANas ANd ANases iAN cAN match [an\116]*n bANas ANd ANases iAN cAN match [an\117]*n bANas ANd ANases iAN cAN match [an\120]*n bANas ANd ANases iAN cAN match [an\121]*n bANas ANd ANases iAN cAN match [an\122]*n bANas ANd ANases iAN cAN match [an\123]*n bANas ANd ANases iAN cAN match [an\124]*n bANas ANd ANases iAN cAN match [an\125]*n bANas ANd ANases iAN cAN match [an\126]*n bANas ANd ANases iAN cAN match [an\127]*n bANas ANd ANases iAN cAN match [an\130]*n bANas ANd ANases iAN cAN match [an\131]*n bANas ANd ANases iAN cAN match [an\132]*n bANas ANd ANases iAN cAN match [an\133]*n bANas ANd ANases iAN cAN match (error for \134) [an\135]*n bANANas ANd ANANases in cANaAN match [an\136]*n bANas ANd ANases iAN cAN match [an\137]*n bANas ANd ANases iAN cAN match [an\140]*n bANas ANd ANases iAN cAN match [an\141]*n bANas ANd ANases iAN cAN match [an\142]*n ANas ANd ANases iAN cAN match [an\143]*n bANas ANd ANases iAN AN match [an\144]*n bANas ANd ANases iAN cAN match [an\145]*n bANas ANd ANases iAN cAN match [an\146]*n bANas ANd ANases iAN cAN match [an\147]*n bANas ANd ANases iAN cAN match [an\150]*n bANas ANd ANases iAN cAN match [an\151]*n bANas ANd ANases AN cAN match [an\152]*n bANas ANd ANases iAN cAN match [an\153]*n bANas ANd ANases iAN cAN match [an\154]*n bANas ANd ANases iAN cAN match [an\155]*n bANas ANd ANases iAN cAN match [an\156]*n bANas ANd ANases iAN cAN match [an\157]*n bANas ANd ANases iAN cAN match [an\160]*n bANas ANd ANases iAN cAN match [an\161]*n bANas ANd ANases iAN cAN match [an\162]*n bANas ANd ANases iAN cAN match [an\163]*n bANas ANd ANases iAN cAN match [an\164]*n bANas ANd ANases iAN cAN match [an\165]*n bANas ANd ANases iAN cAN match [an\166]*n bANas ANd ANases iAN cAN match [an\167]*n bANas ANd ANases iAN cAN match [an\170]*n bANas ANd ANases iAN cAN match [an\171]*n bANas ANd ANases iAN cAN match [an\172]*n bANas ANd ANases iAN cAN match [an\173]*n bANas ANd ANases iAN cAN match [an\174]*n bANas ANd ANases iAN cAN match [an\175]*n bANas ANd ANases iAN cAN match [an\176]*n bANas ANd ANases iAN cAN match [an\177]*n bANas ANd ANases iAN cAN match [an\200]*n bANas ANd ANases iAN cAN match [an\201]*n bANas ANd ANases iAN cAN match [an\202]*n bANas ANd ANases iAN cAN match [an\203]*n bANas ANd ANases iAN cAN match [an\204]*n bANas ANd ANases iAN cAN match [an\205]*n bANas ANd ANases iAN cAN match [an\206]*n bANas ANd ANases iAN cAN match [an\207]*n bANas ANd ANases iAN cAN match [an\210]*n bANas ANd ANases iAN cAN match [an\211]*n bANas ANd ANases iAN cAN match [an\212]*n bANas ANd ANases iAN cAN match [an\213]*n bANas ANd ANases iAN cAN match [an\214]*n bANas ANd ANases iAN cAN match [an\215]*n bANas ANd ANases iAN cAN match [an\216]*n bANas ANd ANases iAN cAN match [an\217]*n bANas ANd ANases iAN cAN match [an\220]*n bANas ANd ANases iAN cAN match [an\221]*n bANas ANd ANases iAN cAN match [an\222]*n bANas ANd ANases iAN cAN match [an\223]*n bANas ANd ANases iAN cAN match [an\224]*n bANas ANd ANases iAN cAN match [an\225]*n bANas ANd ANases iAN cAN match [an\226]*n bANas ANd ANases iAN cAN match [an\227]*n bANas ANd ANases iAN cAN match [an\230]*n bANas ANd ANases iAN cAN match [an\231]*n bANas ANd ANases iAN cAN match [an\232]*n bANas ANd ANases iAN cAN match [an\233]*n bANas ANd ANases iAN cAN match [an\234]*n bANas ANd ANases iAN cAN match [an\235]*n bANas ANd ANases iAN cAN match [an\236]*n bANas ANd ANases iAN cAN match [an\237]*n bANas ANd ANases iAN cAN match [an\240]*n bANas ANd ANases iAN cAN match [an\241]*n bANas ANd ANases iAN cAN match [an\242]*n bANas ANd ANases iAN cAN match [an\243]*n bANas ANd ANases iAN cAN match [an\244]*n bANas ANd ANases iAN cAN match [an\245]*n bANas ANd ANases iAN cAN match [an\246]*n bANas ANd ANases iAN cAN match [an\247]*n bANas ANd ANases iAN cAN match [an\250]*n bANas ANd ANases iAN cAN match [an\251]*n bANas ANd ANases iAN cAN match [an\252]*n bANas ANd ANases iAN cAN match [an\253]*n bANas ANd ANases iAN cAN match [an\254]*n bANas ANd ANases iAN cAN match [an\255]*n bANas ANd ANases iAN cAN match [an\256]*n bANas ANd ANases iAN cAN match [an\257]*n bANas ANd ANases iAN cAN match [an\260]*n bANas ANd ANases iAN cAN match [an\261]*n bANas ANd ANases iAN cAN match [an\262]*n bANas ANd ANases iAN cAN match [an\263]*n bANas ANd ANases iAN cAN match [an\264]*n bANas ANd ANases iAN cAN match [an\265]*n bANas ANd ANases iAN cAN match [an\266]*n bANas ANd ANases iAN cAN match [an\267]*n bANas ANd ANases iAN cAN match [an\270]*n bANas ANd ANases iAN cAN match [an\271]*n bANas ANd ANases iAN cAN match [an\272]*n bANas ANd ANases iAN cAN match [an\273]*n bANas ANd ANases iAN cAN match [an\274]*n bANas ANd ANases iAN cAN match [an\275]*n bANas ANd ANases iAN cAN match [an\276]*n bANas ANd ANases iAN cAN match [an\277]*n bANas ANd ANases iAN cAN match [an\300]*n bANas ANd ANases iAN cAN match [an\301]*n bANas ANd ANases iAN cAN match [an\302]*n bANas ANd ANases iAN cAN match [an\303]*n bANas ANd ANases iAN cAN match [an\304]*n bANas ANd ANases iAN cAN match [an\305]*n bANas ANd ANases iAN cAN match [an\306]*n bANas ANd ANases iAN cAN match [an\307]*n bANas ANd ANases iAN cAN match [an\310]*n bANas ANd ANases iAN cAN match [an\311]*n bANas ANd ANases iAN cAN match [an\312]*n bANas ANd ANases iAN cAN match [an\313]*n bANas ANd ANases iAN cAN match [an\314]*n bANas ANd ANases iAN cAN match [an\315]*n bANas ANd ANases iAN cAN match [an\316]*n bANas ANd ANases iAN cAN match [an\317]*n bANas ANd ANases iAN cAN match [an\320]*n bANas ANd ANases iAN cAN match [an\321]*n bANas ANd ANases iAN cAN match [an\322]*n bANas ANd ANases iAN cAN match [an\323]*n bANas ANd ANases iAN cAN match [an\324]*n bANas ANd ANases iAN cAN match [an\325]*n bANas ANd ANases iAN cAN match [an\326]*n bANas ANd ANases iAN cAN match [an\327]*n bANas ANd ANases iAN cAN match [an\330]*n bANas ANd ANases iAN cAN match [an\331]*n bANas ANd ANases iAN cAN match [an\332]*n bANas ANd ANases iAN cAN match [an\333]*n bANas ANd ANases iAN cAN match [an\334]*n bANas ANd ANases iAN cAN match [an\335]*n bANas ANd ANases iAN cAN match [an\336]*n bANas ANd ANases iAN cAN match [an\337]*n bANas ANd ANases iAN cAN match [an\340]*n bANas ANd ANases iAN cAN match [an\341]*n bANas ANd ANases iAN cAN match [an\342]*n bANas ANd ANases iAN cAN match [an\343]*n bANas ANd ANases iAN cAN match [an\344]*n bANas ANd ANases iAN cAN match [an\345]*n bANas ANd ANases iAN cAN match [an\346]*n bANas ANd ANases iAN cAN match [an\347]*n bANas ANd ANases iAN cAN match [an\350]*n bANas ANd ANases iAN cAN match [an\351]*n bANas ANd ANases iAN cAN match [an\352]*n bANas ANd ANases iAN cAN match [an\353]*n bANas ANd ANases iAN cAN match [an\354]*n bANas ANd ANases iAN cAN match [an\355]*n bANas ANd ANases iAN cAN match [an\356]*n bANas ANd ANases iAN cAN match [an\357]*n bANas ANd ANases iAN cAN match [an\360]*n bANas ANd ANases iAN cAN match [an\361]*n bANas ANd ANases iAN cAN match [an\362]*n bANas ANd ANases iAN cAN match [an\363]*n bANas ANd ANases iAN cAN match [an\364]*n bANas ANd ANases iAN cAN match [an\365]*n bANas ANd ANases iAN cAN match [an\366]*n bANas ANd ANases iAN cAN match [an\367]*n bANas ANd ANases iAN cAN match [an\370]*n bANas ANd ANases iAN cAN match [an\371]*n bANas ANd ANases iAN cAN match [an\372]*n bANas ANd ANases iAN cAN match [an\373]*n bANas ANd ANases iAN cAN match [an\374]*n bANas ANd ANases iAN cAN match [an\375]*n bANas ANd ANases iAN cAN match [an\376]*n bANas ANd ANases iAN cAN match [an\377]*n bANas ANd ANases iAN cAN match gawk-4.0.1+dfsg.orig/test/rebt8b2.awk0000644000175000017500000000724011463242060016301 0ustar schotschot#From stolfi@ic.unicamp.br Sun Jan 28 19:02:09 2001 #Received: from mail.actcom.co.il [192.114.47.13] # by localhost with POP3 (fetchmail-5.5.0) # for arnold@localhost (single-drop); Sun, 28 Jan 2001 19:02:09 +0200 (IST) #Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Sun Jan 28 19:03:34 2001) #X-From_: stolfi@ic.unicamp.br Sun Jan 28 18:46:02 2001 #Received: from lmail.actcom.co.il by actcom.co.il with ESMTP # (8.9.1a/actcom-0.2) id SAA22932 for ; # Sun, 28 Jan 2001 18:46:00 +0200 (EET) # (rfc931-sender: lmail.actcom.co.il [192.114.47.13]) #Received: from billohost.com (www.billohost.com [209.196.35.10]) # by lmail.actcom.co.il (8.9.3/8.9.1) with ESMTP id SAA18523 # for ; Sun, 28 Jan 2001 18:46:35 +0200 #Received: from grande.dcc.unicamp.br (grande.dcc.unicamp.br [143.106.7.8]) # by billohost.com (8.9.3/8.9.3) with ESMTP id LAA20063 # for ; Sun, 28 Jan 2001 11:45:54 -0500 #Received: from amazonas.dcc.unicamp.br (amazonas.dcc.unicamp.br [143.106.7.11]) # by grande.dcc.unicamp.br (8.9.3/8.9.3) with ESMTP id OAA29726; # Sun, 28 Jan 2001 14:45:47 -0200 (EDT) #Received: from coruja.dcc.unicamp.br (coruja.dcc.unicamp.br [143.106.24.80]) # by amazonas.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id OAA06542; # Sun, 28 Jan 2001 14:45:45 -0200 (EDT) #Received: (from stolfi@localhost) # by coruja.dcc.unicamp.br (8.11.0/8.11.0) id f0SGjib16703; # Sun, 28 Jan 2001 14:45:44 -0200 (EDT) #Date: Sun, 28 Jan 2001 14:45:44 -0200 (EDT) #Message-Id: <200101281645.f0SGjib16703@coruja.dcc.unicamp.br> #From: Jorge Stolfi #To: Michal Jaegermann #Cc: Aharon Robbins , oliva@ic.unicamp.br, # celio@ic.unicamp.br, ducatte@ic.unicamp.br, machado@ic.unicamp.br #Subject: Re: a regex.c problem #MIME-Version: 1.0 #Content-Transfer-Encoding: 8bit #Content-Type: text/plain; charset=iso-8859-1 #In-Reply-To: <20010128090314.A5820@ellpspace.math.ualberta.ca> #References: <200101281207.f0SC7Un08435@skeeve.com> # <20010128090314.A5820@ellpspace.math.ualberta.ca> #Reply-To: stolfi@ic.unicamp.br #Status: RO # # # > [Michal] Are there any other examples of "certain characters" # > which would throw this regex engine off? # #I now tested [anX]*n for X ranging trough all characters from \000 and #\377, and got that unexpected result only for the following ones: # # \370 | =F8 | ø | Small o, slash # \371 | =F9 | ù | Small u, grave accent # \372 | =FA | ú | Small u, acute accent # \373 | =FB | û | Small u, circumflex accent # \374 | =FC | ü | Small u, dieresis or umlaut mark # \375 | =FD | ý | Small y, acute accent # \376 | =FE | þ | Small thorn, Icelandic # \377 | =FF | ÿ | Small y, dieresis or umlaut mark # #I have also tried those offending REs from inside emacs (20.7.1), with #query-replace-regexp, and it seems to be working fine. So presumably #the bug lies in gawk itself, or in the RE parsing code, rather than in #the matching engine? # #Could it be an underdimensioned table somewhere? # #Thanks for the help, and all the best # #--stolfi # # ---------------------------------------------------------------------- #! /usr/bin/gawk -f BEGIN { for (c = 0; c < 256; c++) { do_test(c); } } function do_test(char, pat,s,t) { if (char == 92) { printf "(error for \\%03o)\n", char; return; } pat = sprintf("[an\\%03o]*n", char); s = "bananas and ananases in canaan"; t = s; gsub(pat, "AN", t); printf "%-8s %s\n", pat, t; # ADR: Added: if (s ~ pat) printf "\tmatch\n" ; else printf "\tno-match\n" } # ---------------------------------------------------------------------- gawk-4.0.1+dfsg.orig/test/tweakfld.ok0000644000175000017500000000214311463242060016456 0ustar schotschot0.277 N/A N/A 1 1 ASC/Hank Donnelly N/A NONE ALL,ALL N/A N/A N/A Count Rate Linearity EIPS C-Ka 1.108 0.13484 N/A N/A C8H8 10.32 C8H8 20.64 FIXED-FREE 1000 NO 0 0 0 HRC,I 1000 N/A N/A N/A N/A N/A N/A N/A N/A N/A 0 N/A APT APT LISSAJOUS 44.7175 44.7175 1 N/A N/A N/A N/A N/A 0 N/A HRCCTRTLIN 0 N/A N/A N/A 10 N/A 180 0 0 N/A N/A FPSI rate HRMA/HRC,I Mar 10, 1996 0 0 0 0 0 N/A 1.486 N/A N/A 2 1 ASC/Hank Donnelly N/A NONE ALL,ALL N/A N/A N/A Count Rate Linearity EIPS Al-Ka 4.458 0.642119 N/A N/A Al 18.38 Al 36.76 FIXED-FREE 1000 NO 0 0 0 HRC,I 1000 N/A N/A N/A N/A N/A N/A N/A N/A N/A 0 N/A APT APT LISSAJOUS 5.55556 5.55556 1 N/A N/A N/A N/A N/A 0 N/A HRCCTRTLIN 0 N/A N/A N/A 10 N/A 180 0 0 N/A N/A FPSI rate HRMA/HRC,I Mar 10, 1996 0 0 0 0 0 N/A 4.51 N/A N/A 3 1 ASC/Hank Donnelly N/A NONE ALL,ALL N/A N/A N/A Count Rate Linearity EIPS Ti-Ka 22.55 3.02894 N/A N/A Ti 40.6 N/A N/A FIXED-FREE 1000 NO 0 0 0 HRC,I 1000 N/A N/A N/A N/A N/A N/A N/A N/A N/A 0 N/A APT APT LISSAJOUS 5.55556 5.55556 1 N/A N/A N/A N/A N/A 0 N/A HRCCTRTLIN 0 N/A N/A N/A 10 N/A 180 0 0 N/A N/A FPSI rate HRMA/HRC,I Mar 10, 1996 0 0 0 0 0 N/A gawk-4.0.1+dfsg.orig/test/strnum1.awk0000644000175000017500000000175511463242060016447 0ustar schotschot# Date: Tue, 04 Jul 2006 21:06:14 +0200 (MEST) # From: Heiner Marxen # Subject: conversion error # To: bug-gawk@gnu.org # Message-id: <200607041906.k64J6Eqa019360@drb9.drb.insel.de> # # Hello, # # The following awk script fails for gawk 3.1.4 and 3.1.5. # Older versions did not do this, but I cannot say, how old they were. # BEGIN { if( 0 ) { #ok t = "8" }else { #fails t = "" t = t "8" } printf("8 = %d\n", 0+t) # ok without this line t = t "8" # does not invalidate numeric interpretation printf("88 = %s\n", 0+t) ## The above prints "88 = 8" with gawk 3.1.4 and 3.1.5 } # # # The following one-liner already exhibits the bug: # # gawk 'BEGIN{t=""; t=t "8";printf("8=%d\n", 0+t);t=t "8";printf("88=%s\n", 0+t)}' # # # Preliminary observation: under somewhat strange conditions a variable # does retain its numeric interpretation although something is appended to it. # -- # Heiner Marxen http://www.drb.insel.de/~heiner/ # gawk-4.0.1+dfsg.orig/test/widesub.ok0000644000175000017500000000004011463242060016311 0ustar schotschot"directory" version="1.0" "1.0" gawk-4.0.1+dfsg.orig/test/zero2.awk0000644000175000017500000000010711463242060016065 0ustar schotschotBEGIN { printf "%d\n", -.4 printf "%d\n", -0.0 printf "%d\n", -.9 } gawk-4.0.1+dfsg.orig/test/getnr2tb.in0000644000175000017500000000005211463242060016376 0ustar schotschotline 1 line 2 line 3 line 4 line 5 line 6 gawk-4.0.1+dfsg.orig/test/getline.awk0000644000175000017500000000072211463242060016456 0ustar schotschotBEGIN { x = y = "s" a = (getline x y) print a, x a = (getline x + 1) print a, x a = (getline x - 2) print a, x cmd = "echo A" a = (cmd | getline x y) close(cmd) print a, x cmd = "echo B" a = (cmd | getline x + 1) close(cmd) print a, x cmd = "echo C" a = (cmd | getline x - 2) close(cmd) print a, x cmd = "echo D" a = cmd | getline x close(cmd) print a, x # Concatenation has higher precedence than IO. "echo " "date" | getline print } gawk-4.0.1+dfsg.orig/test/localenl.sh0000755000175000017500000000373311501461642016462 0ustar schotschot#! /bin/sh # From arnold@f7.net Sun Apr 22 20:15:25 2007 # Date: Thu, 19 Apr 2007 17:09:02 +0300 # From: Pekka Pessi # X-Face: #V(jdpv[lI!TNUU=2*oh:="#suS*ponXW"yr6G;~L}uZ\JfD\"IG#G{j`hZI;=DmT\H # pfDMyJ`i=:M;BM3R.`[>P^ER8+]i # Subject: UTF-8 locale and \n in regexps # To: bug-gawk@gnu.org # Cc: Pekka.Pessi@nokia.com # Message-id: # MIME-version: 1.0 # Content-type: multipart/mixed; boundary="=-=-=" # # --=-=-= # # Hello, # # It looks like regexp with \n in [^] behaves badly if locale has # an UTF-8 ctype. # # It looks like if there is \n and an range without \n, like /\n[^x\n]foo/, # and first \n ends an even-numbered line within the string, regexp # does not match. # # Please see the attached script for an demonstration. # # --Pekka Pessi # # # --=-=-= # Content-Disposition: inline; filename=gawk-test # #! /bin/sh AWK=${AWK:-../gawk} # April 2010: Remove UNKNOWN, causes spurious failures on some systems for LC_ALL in C POSIX en_US.ISO-8859-1 en_US.UTF-8 #UNKNOWN do export LC_ALL cat <&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 gawk-4.0.1+dfsg.orig/test/gsubtst8.awk0000644000175000017500000000012011654051011016576 0ustar schotschot{ OFS = " " $2 " " gsub("foo", "_", OFS) print $1, $2 } gawk-4.0.1+dfsg.orig/test/sprintfc.ok0000644000175000017500000000002011463242060016475 0ustar schotschotA 65 B 66 f foo gawk-4.0.1+dfsg.orig/test/ignrcas2.awk0000644000175000017500000000044711463242060016543 0ustar schotschot# Based on test program submitted by: # Date: Sun, 7 Sep 2003 23:11:51 +0200 # From: Michael Mauch # To: bug-gawk@gnu.org # Subject: Internal error in gawk-3.1.3 with character class BEGIN { IGNORECASE = 1 if ("a" ~ /[[:alnum:]]/) print "OK" else print "NOT OK" } gawk-4.0.1+dfsg.orig/test/concat1.in0000644000175000017500000000001011463242060016171 0ustar schotschotA B C D gawk-4.0.1+dfsg.orig/test/numsubstr.ok0000644000175000017500000000001511463242060016713 0ustar schotschot000 1000 000 gawk-4.0.1+dfsg.orig/test/reindops.in0000644000175000017500000000001411463242060016470 0ustar schotschot+44 123 456 gawk-4.0.1+dfsg.orig/test/fnasgnm.in0000644000175000017500000000000511463242060016276 0ustar schotschotjunk gawk-4.0.1+dfsg.orig/test/arryref5.ok0000644000175000017500000000013011463242060016406 0ustar schotschotgawk: arryref5.awk:10: fatal: attempt to use array `a' in a scalar context EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/fsfwfs.in0000644000175000017500000000060011463242060016144 0ustar schotschot00000113000 00000000000 00000275000 00000000000 00000321334 00000000000 00000048709 00000010000 00000117000 00000100000 00000152000 00000138000 00000000000 00000150000 00000189425 00000000000 00000146128 00000000000 00000146128 00000000000 00000146128 00000000000 00000000000 00000050000 00000000000 00000050000 00000000000 00000000000 00000158014 00000000000 00000113656 00000000000 gawk-4.0.1+dfsg.orig/test/splitargv.awk0000644000175000017500000000022011463242060017033 0ustar schotschotBEGIN { for (idx = 1; idx < ARGC; idx++) split(ARGV[idx], temp, "."); } { print $0; } gawk-4.0.1+dfsg.orig/test/strftlng.ok0000644000175000017500000000202411463242060016516 0ustar schotschot01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 01/01/70 00:00:00 gawk-4.0.1+dfsg.orig/test/asgext.ok0000644000175000017500000000003311463242060016144 0ustar schotschot3 1 2 3 a 1 a 3 1 2 3 a gawk-4.0.1+dfsg.orig/test/arrayref.awk0000644000175000017500000000030611463242060016640 0ustar schotschot BEGIN { # foo[10] = 0 # put this line in and it will work test(foo); print foo[1] test2(foo2); print foo2[1] } function test(foo) { test2(foo) } function test2(bar) { bar[1] = 1 } gawk-4.0.1+dfsg.orig/test/membug1.ok0000644000175000017500000000000011463242060016200 0ustar schotschotgawk-4.0.1+dfsg.orig/test/rswhite.in0000644000175000017500000000001411463242060016332 0ustar schotschot a b c d gawk-4.0.1+dfsg.orig/test/tweakfld.awk0000644000175000017500000001540411463242060016633 0ustar schotschot# To: bug-gnu-utils@prep.ai.mit.edu # Cc: arnold@gnu.ai.mit.edu # Date: Mon, 20 Nov 1995 11:39:29 -0500 # From: "R. Hank Donnelly" # # Operating system: Linux1.2.13 (Slackware distrib) # GAWK version: 2.15 (?) # compiler: GCC (?) # # The following enclosed script does not want to fully process the input data # file. It correctly executes the operations on the first record, and then dies # on the second one. My true data file is much longer but this is # representative and it does fail on a file even as short as this one. # The failure appears to occur in the declared function add2output. Between the # steps of incrementing NF by one and setting $NF to the passed variable # the passed variable appears to vanish (i.e. NF does go from 68 to 69 # and before incrementing it "variable" equals what it should but after # "variable" has no value at all.) # # The scripts have been developed using nawk on a Sun (where they run fine) # I have tried gawk there but get a different crash which I have not yet traced # down. Ideally I would like to keep the script the same so that it would run # on either gawk or nawk (that way I can step back and forth between laptop and # workstation. # # Any ideas why the laptop installation is having problems? # Hank # # # #!/usr/bin/gawk -f BEGIN { # set a few values FS = "\t" OFS = "\t" pi = atan2(0, -1) # distance from HRMA to focal plane in mm fullradius = 10260.54 # set locations of parameters on input line nf_nrg = 1 nf_order = 3 nf_item = 4 nf_suite = 5 nf_grating = 8 nf_shutter = 9 nf_type = 13 nf_src = 14 nf_target = 15 nf_voltage = 16 nf_flux = 17 nf_filt1 = 20 nf_filt1_th = 21 nf_filt2 = 22 nf_filt2_th = 23 nf_bnd = 24 nf_hrma_polar = 27 nf_hrma_az = 28 nf_detector = 30 nf_acis_read = 32 nf_acis_proc = 33 nf_acis_frame = 34 nf_hxda_aplist = 36 nf_hxda_y_range = 37 nf_hxda_z_range = 38 nf_hxda_y_step = 39 nf_hxda_z_step = 40 nf_sim_z = 41 nf_fam_polar = 43 nf_fam_az = 44 nf_fam_dither_type = 45 nf_mono_init = 51 nf_mono_range = 52 nf_mono_step = 53 nf_defocus = 54 nf_acis_temp = 55 nf_tight = 59 nf_offset_y = 64 nf_offset_z = 65 while( getline < "xrcf_mnemonics.dat" > 0 ) { mnemonic[$1] = $2 } # "date" | getline date_line # ADR: use a fixed date so that testing will work date_line = "Sun Mar 10 23:00:27 EST 1996" split(date_line, in_date, " ") out_date = in_date[2] " " in_date[3] ", " in_date[6] } function add2output( variable ) { #print("hi1") >> "debug" NF++ #print("hi2") >> "debug" $NF = variable #print("hi3") >> "debug" } function error( ekey, message ) { print "Error at input line " NR ", anode " ekey >> "errors.cleanup" print " " message "." >> "errors.cleanup" } function hxda_na() { $nf_hxda_aplist = $nf_hxda_y_range = $nf_hxda_z_range = "N/A" $nf_hxda_y_step = $nf_hxda_z_step = "N/A" } function acis_na() { $nf_acis_read = $nf_acis_proc = $nf_acis_frame = $nf_acis_temp = "N/A" } function hrc_na() { # print ("hi") >> "debug" } function fpsi_na() { acis_na() hrc_na() $nf_sim_z = $nf_fam_polar = $nf_fam_az = $nf_fam_dither_type = "N/A" } function mono_na() { $nf_mono_init = $nf_mono_range = $nf_mono_step = "N/A" } # this gives the pitch and yaw of the HRMA and FAM # positive pitch is facing the source "looking down" # positive yaw is looking left # 0 az is north 90 is up # this also adds in the FAM X,Y,Z positions function polaz2yawpitch(polar, az) { theta = az * pi / 180 phi = polar * pi / 180 / 60 if( polar == 0 ) { add2output( 0 ) add2output( 0 ) } else { if(az == 0 || az == 180) add2output( 0 ) else add2output( - polar * sin(theta) ) # x = cos (phi) # y = sin (phi) * cos (theta) # add2output( atan2(y,x)*180 / pi * 60 ) if(az == 90 || az ==270 ) add2output( 0 ) else add2output( - polar * cos(theta) ) } # x = cos (phi) # z= sin (phi) * sin (theta) # add2output( atan2(z,x)*180 / pi * 60 ) if(config !~ /HXDA/) { # negative values of defocus move us farther from the source thus # increasing radius radius = fullradius - defocus # FAM_x; FAM_y; FAM_z if((offset_y == 0) && (offset_z == 0)){ add2output( fullradius - radius * cos (phi) ) if (az == 90 || az ==270) add2output( 0 ) else add2output( radius * sin (phi) * cos (theta) ) if (az == 0 || az == 180) add2output( 0 ) else add2output( - radius * sin (phi) * sin (theta) ) } else { # ******* THIS SEGMENT OF CODE IS NOT MATHEMATICALLY CORRECT FOR **** # OFF AXIS ANGLES AND IS SUPPLIED AS A WORKAROUND SINCE IT WILL # PROBABLY ONLY BE USED ON AXIS. add2output( defocus ) add2output( offset_y ) add2output( offset_z ) } } else { add2output( "N/A" ) add2output( "N/A" ) add2output( "N/A" ) } } # set TIGHT/LOOSE to N/A if it is not one of the two allowed values function tight_na() { if( $nf_tight !~ /TIGHT|LOOSE/ ) { $nf_tight == "N/A" } } # this entry is used to give certain entries names { type = $nf_type item = $nf_item suite = $nf_suite order = $nf_order detector = $nf_detector grating = $nf_grating offset_y= $nf_offset_y offset_z= $nf_offset_z bnd = $nf_bnd defocus = $nf_defocus } { # make configuration parameter # as well as setting configuration-dependent N/A values if( $nf_bnd ~ "SCAN" ) { # BND is scanning beam config = "BND" hxda_na() fpsi_na() } else { if( grating == "NONE" ) { config = "HRMA" } else { if( grating == "HETG" ) { if( order != "Both" ) { $nf_shutter = order substr($nf_shutter, \ index($nf_shutter, ",") ) } } else { order = "N/A" } config = "HRMA/" grating } if( detector ~ /ACIS|HRC/ ) { detsys = detector nsub = sub("-", ",", detsys) config = config "/" detsys hxda_na() } else { config = config "/HXDA" fpsi_na() if( detector == "HSI" ) { hxda_na() } } } add2output( config ) if( $nf_src ~ /EIPS|Penning/ ) mono_na() if( $nf_src == "Penning" ) $nf_voltage = "N/A" itm = sprintf("%03d", item) if(config in mnemonic) { if( type in mnemonic ) { ID = mnemonic[config] "-" mnemonic[type] "-" suite "." itm add2output( ID ) } else { error(type, "measurement type not in list") } } else { error(config, "measurement configuration not in list") } # add date to output line add2output( out_date ) # Convert HRMA polar and azimuthal angles to yaw and pitch polaz2yawpitch($nf_hrma_polar, $nf_hrma_az) # set TIGHT/LOOSE to N/A if it is not one of the two allowed values tight_na() # compute number of HXDA apertures if( config ~ /HXDA/ && $nf_hxda_aplist != "N/A") add2output( split( $nf_hxda_aplist, dummy, "," ) ) else add2output( "N/A" ) # make sure the BND value is properly set if($nf_bnd == "FIXED" && detector ~ /ACIS/) $nf_bnd =bnd"-SYNC" else $nf_bnd = bnd"-FREE" print } gawk-4.0.1+dfsg.orig/test/inftest.ok0000644000175000017500000007665611463242060016355 0ustar schotschot100000 100 100000000 100000 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 gawk-4.0.1+dfsg.orig/test/membug1.in0000644000175000017500000000001011463242060016176 0ustar schotschotyes yes gawk-4.0.1+dfsg.orig/test/mbfw1.in0000644000175000017500000000032511463242060015666 0ustar schotschotCDRegion Commune Site SEVästsverige Hallands län Kungsbacka SESmÃ¥land med öarna Västra Götalands länGöteborg SEKronoberg Alvesta Stenungsund gawk-4.0.1+dfsg.orig/test/fnparydl.awk0000644000175000017500000000072611463242060016652 0ustar schotschot# fnparydl.awk --- check that deleting works with arrays # that are parameters. # # Tue Jul 11 14:20:58 EDT 2000 function delit(a, k) { print "BEFORE LOOP" for (k in a) { print "DELETING KEY", k delete a[k] } print "AFTER LOOP" } BEGIN { for (i = 1 ; i <= 7; i++) { q[i] = sprintf("element %d", i) x[i] = i y[i] = q[i] } # adump(q) delit(q) # for (i in q) # delete q[i] j = 0; for (i in q) j++ print j, "elements still in q[]" # adump(q) } gawk-4.0.1+dfsg.orig/test/uninitialized.awk0000644000175000017500000000002211463242060017670 0ustar schotschotBEGIN { a += 2 } gawk-4.0.1+dfsg.orig/test/rs.in0000644000175000017500000000002511463242060015273 0ustar schotschot a b c d e gawk-4.0.1+dfsg.orig/test/getlnhd.awk0000644000175000017500000000040211463242060016447 0ustar schotschotBEGIN { pipe = "cat < 0) print exit 0 } gawk-4.0.1+dfsg.orig/test/fnamedat.awk0000644000175000017500000000004511463242060016604 0ustar schotschotfunction foo() { print foo } {foo()} gawk-4.0.1+dfsg.orig/test/sortu.ok0000644000175000017500000000263111654051011016027 0ustar schotschot--- 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 gawk-4.0.1+dfsg.orig/test/aarray1.awk0000644000175000017500000000066111463614133016375 0ustar schotschotBEGIN { 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 } gawk-4.0.1+dfsg.orig/test/gsubtst5.awk0000644000175000017500000001003111463242060016601 0ustar schotschot# From jose@monkey.org Thu Jun 5 11:48:35 2003 # Return-Path: # Received: from localhost (skeeve [127.0.0.1]) # by skeeve.com (8.12.5/8.12.5) with ESMTP id h558eVvA012655 # for ; Thu, 5 Jun 2003 11:48:35 +0300 # Received: from actcom.co.il [192.114.47.1] # by localhost with POP3 (fetchmail-5.9.0) # for arnold@localhost (single-drop); Thu, 05 Jun 2003 11:48:35 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Thu Jun 5 11:47:59 2003) # X-From_: jose@monkey.org Thu Jun 5 07:14:45 2003 # Received: from smtp1.actcom.net.il by actcom.co.il with ESMTP # (8.11.6/actcom-0.2) id h554EdY08108 for ; # Thu, 5 Jun 2003 07:14:41 +0300 (EET DST) # (rfc931-sender: smtp.actcom.co.il [192.114.47.13]) # Received: from f7.net (consort.superb.net [209.61.216.22]) # by smtp1.actcom.net.il (8.12.8/8.12.8) with ESMTP id h554G3To008304 # for ; Thu, 5 Jun 2003 07:16:05 +0300 # Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) # by f7.net (8.11.7/8.11.6) with ESMTP id h554Ean08172 # for ; Thu, 5 Jun 2003 00:14:36 -0400 # Received: from monty-python.gnu.org ([199.232.76.173]) # by fencepost.gnu.org with esmtp (Exim 4.20) # id 19Nm96-0001xE-1i # for arnold@gnu.ai.mit.edu; Thu, 05 Jun 2003 00:14:36 -0400 # Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) # id 19Nm8x-0005ge-Dz # for arnold@gnu.ai.mit.edu; Thu, 05 Jun 2003 00:14:28 -0400 # Received: from naughty.monkey.org ([66.93.9.164]) # by monty-python.gnu.org with esmtp (Exim 4.20) # id 19Nm8w-0005VM-Ko # for arnold@gnu.ai.mit.edu; Thu, 05 Jun 2003 00:14:26 -0400 # Received: by naughty.monkey.org (Postfix, from userid 1203) # id C15511BA97B; Thu, 5 Jun 2003 00:14:19 -0400 (EDT) # Received: from localhost (localhost [127.0.0.1]) # by naughty.monkey.org (Postfix) with ESMTP # id BF9821BA969; Thu, 5 Jun 2003 00:14:19 -0400 (EDT) # Date: Thu, 5 Jun 2003 00:14:19 -0400 (EDT) # From: Jose Nazario # To: bug-gnu-utils@prep.ai.mit.edu, arnold@gnu.ai.mit.edu, # netbsd-bugs@netbsd.org # Subject: bug in gawk/gsub() (not present in nawk) # Message-ID: # MIME-Version: 1.0 # Content-Type: TEXT/PLAIN; charset=US-ASCII # X-Spam-Status: No, hits=-1.2 required=5.0 # tests=SPAM_PHRASE_00_01,USER_AGENT_PINE # version=2.41 # X-Spam-Level: # X-SpamBouncer: 1.4 (10/07/01) # X-SBClass: OK # Status: R # # while playing with some tools in data massaging, i had to migrate from an # openbsd/nawk system to a netbsd/gawk system. i found the folllowing # behavior, which seems to be a bug. # # the following gsub() pattern has a strange effect under gawk which is not # visible in nawk (at least as compiled on openbsd). the intention is to # take a string like "This Is a Title: My Title?" and turn it into a # normalized string: "ThisIsaTitleMyTitle". to do this, i wrote the # following gross gsub line in an awk script: # # gsub(/[\ \"-\/\\:;\[\]\@\?\.\,\$]/, "", $2) # print $2 # # in gawk, as found in netbsd-macppc/1.5.2, this will drop the first letter # of every word. the resulting string will be "hissitleyitle", while in nawk # as built on openbsd-3.3 this will get it correct. # # any insights? the inconsistency with this relatively naive pattern seems a # bit odd. (i would up installing nawk built from openbsd sources.) # # thanks. sorry i didn't send a better bug report, netbsd folks, i'm not # much of a netbsd user, and i dont have send-pr set up. yes, this is a # slightly older version of netbsd and gawk: # # $ uname -a # NetBSD entropy 1.5.2 NetBSD 1.5.2 (GENERIC) #0: Sun Feb 10 02:00:04 EST # 2002 jose@entropy:/usr/src/sys/arch/macppc/compile/GENERIC macppc # $ awk --version # GNU Awk 3.0.3 # Copyright (C) 1989, 1991-1997 Free Software Foundation. # # # # thanks. # # ___________________________ # jose nazario, ph.d. jose@monkey.org # http://monkey.org/~jose/ # # { gsub(/[\ \"-\/\\:;\[\]\@\?\.\,\$]/, "") print } gawk-4.0.1+dfsg.orig/test/nonl.ok0000644000175000017500000000007711463242060015627 0ustar schotschotgawk: nonl.awk:1: warning: source file does not end in newline gawk-4.0.1+dfsg.orig/test/convfmt.ok0000644000175000017500000000004311463242060016326 0ustar schotschota = 123.46 a = 123.456 a = 123.456 gawk-4.0.1+dfsg.orig/test/strtonum.ok0000644000175000017500000000001411463242060016543 0ustar schotschot19 11 13 13 gawk-4.0.1+dfsg.orig/test/arynasty.ok0000644000175000017500000000002211463242060016521 0ustar schotschottest[12.153] = hi gawk-4.0.1+dfsg.orig/test/swaplns.in0000644000175000017500000000054711463242060016347 0ustar schotschotThis directory contains some examples/test-cases for different features of gawk - mostly not present in an old awk. Some are from "The GAWK Manual", some are original, and some are mixture of the two. Read header comments before attempting to use. Have fun and remember that program which consists only of BEGIN block does not need an input file. --mj gawk-4.0.1+dfsg.orig/test/devfd.in20000644000175000017500000000075311463242060016031 0ustar schotschotthis is file f2, line 1 this is file f2, line 2 this is file f2, line 3 this is file f2, line 4 this is file f2, line 5 this is file f2, line 6 this is file f2, line 7 this is file f2, line 8 this is file f2, line 9 this is file f2, line 10 this is file f2, line 11 this is file f2, line 12 this is file f2, line 13 this is file f2, line 14 this is file f2, line 15 this is file f2, line 16 this is file f2, line 17 this is file f2, line 18 this is file f2, line 19 this is file f2, line 20 gawk-4.0.1+dfsg.orig/test/longdbl.in0000644000175000017500000000004611463242060016273 0ustar schotschot0xa000000100000813 0xffffffffffffffff gawk-4.0.1+dfsg.orig/test/sort1.awk0000644000175000017500000000501011560331365016077 0ustar schotschotBEGIN{ for (IGNORECASE=0; IGNORECASE <= 1; IGNORECASE++) { SORT_STR = -1 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) } } 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"; } # 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]) } } function proc_sort(c, s, k) { 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]) } } gawk-4.0.1+dfsg.orig/test/gsubasgn.ok0000644000175000017500000000055711734665352016513 0ustar schotschotgawk: gsubasgn.awk:4: function test1 (r) { gsub(r, "x", test1) } gawk: gsubasgn.awk:4: ^ gsub third parameter is not a changeable object gawk: gsubasgn.awk:8: function test2 () { gsub(/a/, "x", test2) } gawk: gsubasgn.awk:8: ^ gsub third parameter is not a changeable object EXIT CODE: 1 gawk-4.0.1+dfsg.orig/test/backgsub.ok0000644000175000017500000000001211654051011016423 0ustar schotschot\\x\\y\\z gawk-4.0.1+dfsg.orig/test/printf1.awk0000644000175000017500000000066711463242060016422 0ustar schotschot# Tue May 25 16:36:16 IDT 1999 # # Test cases based on email from Andreas Schwab, schwab@gnu.org BEGIN { fmt[1] = "%8.5d"; data[1] = 100 fmt[2] = "%#o"; data[2] = 0 fmt[3] = "%#.1o"; data[3] = 0 fmt[4] = "%#.0o"; data[4] = 0 fmt[5] = "%#x"; data[5] = 0 fmt[6] = "%.0d"; data[6] = 0 fmt[7] = "%5.0d"; data[7] = 0 for (i = 1; i <= 7; i++) { format = "%s, %d --- |" fmt[i] "|\n" printf(format, fmt[i], data[i], data[i]) } } gawk-4.0.1+dfsg.orig/test/rstest4.awk0000644000175000017500000000457411463242060016450 0ustar schotschot# From spcecdt@armory.com Mon May 5 14:37:09 2003 # Return-Path: # Received: from localhost (skeeve [127.0.0.1]) # by skeeve.com (8.12.5/8.12.5) with ESMTP id h45B1GvT031993 # for ; Mon, 5 May 2003 14:37:09 +0300 # Received: from actcom.co.il [192.114.47.1] # by localhost with POP3 (fetchmail-5.9.0) # for arnold@localhost (single-drop); Mon, 05 May 2003 14:37:09 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Mon May 5 14:35:11 2003) # X-From_: spcecdt@armory.com Mon May 5 12:20:20 2003 # Received: from smtp1.actcom.net.il by actcom.co.il with ESMTP # (8.11.6/actcom-0.2) id h459KC529186 for ; # Mon, 5 May 2003 12:20:15 +0300 (EET DST) # (rfc931-sender: smtp.actcom.co.il [192.114.47.13]) # Received: from f7.net (consort.superb.net [209.61.216.22]) # by smtp1.actcom.net.il (8.12.8/8.12.8) with ESMTP id h459LMfl025854 # for ; Mon, 5 May 2003 12:21:24 +0300 # Received: from armory.com (deepthought.armory.com [192.122.209.42]) # by f7.net (8.11.7/8.11.6) with SMTP id h459K9I26841 # for ; Mon, 5 May 2003 05:20:09 -0400 # Date: Mon, 5 May 2003 02:20:08 -0700 # From: "John H. DuBois III" # To: Aharon Robbins # Subject: Re: gawk 3.1.2b now available # Message-ID: <20030505092008.GA15970@armory.com> # References: <200305041149.h44BnLcm005484@localhost.localdomain> # Mime-Version: 1.0 # Content-Type: text/plain; charset=us-ascii # Content-Disposition: inline # In-Reply-To: <200305041149.h44BnLcm005484@localhost.localdomain> # User-Agent: Mutt/1.3.28i # X-Www: http://www.armory.com./~spcecdt/ # Sender: spcecdt@armory.com # X-SpamBouncer: 1.4 (10/07/01) # X-SBClass: OK # Status: RO # # This is a curious one: # # gawk-3.1.2b 'BEGIN { # while (("echo" | getline) == 1) # ; # RS = "" # "echo \"a\n\nb\"" | getline y # print x # }' | hd # # The output is: # # 0000 00 13 0a ... # 0003 # # (the uninitialized variable 'x' is somehow getting the value ) # # John # -- # John DuBois spcecdt@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/ # BEGIN { while (("echo" | getline) == 1) ; RS = "" "echo \"a\n\nb\"" | getline y printf "y = <%s>\n", y # ADR printf "x = <%s>\n", x # ADR } gawk-4.0.1+dfsg.orig/test/clsflnam.awk0000644000175000017500000000037011463242060016625 0ustar schotschot#! /usr/bin/awk -f BEGIN { getline # print ("FILENAME =", FILENAME) > "/dev/stderr" #Rewind the file if (close(FILENAME)) { print "Error `" ERRNO "' closing input file" > "/dev/stderr"; exit; } } { print "Analysing ", $0 } gawk-4.0.1+dfsg.orig/test/arraysort.ok0000644000175000017500000000116611561551450016714 0ustar schotschot--- 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| gawk-4.0.1+dfsg.orig/test/ignrcase.in0000644000175000017500000000000411463242060016437 0ustar schotschotxYz gawk-4.0.1+dfsg.orig/test/igncdym.ok0000644000175000017500000000011011463242060016277 0ustar schotschot0 bar:This is foo 9 foo:This is foo 9 bar:This is bar 0 foo:This is bar gawk-4.0.1+dfsg.orig/test/funstack.in0000644000175000017500000002632711463242060016502 0ustar schotschot%%% ==================================================================== %%% BibTeX-file{ %%% author = "Nelson H. F. Beebe", %%% version = "2.09", %%% date = "26 March 1997", %%% time = "08:21:19 MST", %%% filename = "cacm1970.bib", %%% address = "Center for Scientific Computing %%% Department of Mathematics %%% University of Utah %%% Salt Lake City, UT 84112 %%% USA", %%% telephone = "+1 801 581 5254", %%% FAX = "+1 801 581 4148", %%% checksum = "50673 40670 196033 1787829", %%% email = "beebe at math.utah.edu (Internet)", %%% codetable = "ISO/ASCII", %%% keywords = "bibliography, CACM, Communications of the %%% ACM", %%% supported = "yes", %%% docstring = "This is a bibliography of the journal %%% Communications of the ACM, covering %%% (incompletely) 1970 -- 1979. %%% %%% At version 2.09, the year coverage looked %%% like this: %%% %%% 1961 ( 1) 1972 (168) 1983 ( 0) %%% 1962 ( 1) 1973 (158) 1984 ( 0) %%% 1963 ( 2) 1974 (127) 1985 ( 2) %%% 1964 ( 2) 1975 (107) 1986 ( 0) %%% 1965 ( 1) 1976 ( 97) 1987 ( 0) %%% 1966 ( 2) 1977 (117) 1988 ( 0) %%% 1967 ( 1) 1978 (118) 1989 ( 0) %%% 1968 ( 1) 1979 ( 78) 1990 ( 2) %%% 1969 ( 3) 1980 ( 1) 1991 ( 4) %%% 1970 (157) 1981 ( 2) 1992 ( 1) %%% 1971 (104) 1982 ( 1) %%% %%% Article: 1252 %%% Book: 2 %%% InProceedings: 1 %%% Manual: 1 %%% MastersThesis: 1 %%% PhdThesis: 1 %%% %%% Total entries: 1258 %%% %%% The size of the original cacm.bib file %%% covering 1958--1996 became too large (about %%% 4000 entries) for BibTeX and TeX to handle, %%% so at version 1.44, it was split into %%% cacm1950.bib, cacm1960.bib, cacm1970.bib, %%% cacm1980.bib, and cacm1990.bib, each covering %%% the decade starting with the year embedded in %%% the filename. Version numbers for these %%% files begin at 2.00. %%% %%% Volumes from the 1990s average more than 200 %%% articles yearly, so a complete bibliography %%% for this journal could contain more than 6000 %%% entries from 1958 to 2000. %%% %%% These bibliographies also include ACM %%% Algorithms 1--492. For Algorithms 493--686, %%% including Algorithm 568, published in ACM %%% Transactions on Programming Languages and %%% Systems (TOPLAS), see the companion %%% bibliographies, toms.bib and toplas.bib. %%% %%% All published Remarks and Corrigenda are %%% cross-referenced in both directions, so %%% that citing a paper will automatically %%% generate citations for those Remarks and %%% Corrigenda. Cross-referenced entries are %%% duplicated in cacm19*.bib and toms.bib, so %%% that each is completely self-contained. %%% %%% Source code for ACM Algorithms from 380 %%% onwards, with some omissions, is available %%% via the Netlib service at %%% http://netlib.ornl.gov/, and %%% ftp://netlib.bell-labs.com/netlib/toms. %%% %%% There is a World Wide Web search facility %%% for articles published in this journal from %%% 1959 to 1979 at %%% http://ciir.cs.umass.edu/cgi-bin/web_query_form/public/cacm2.1. %%% %%% The initial draft of entries for 1981 -- %%% 1990 was extracted from the ACM Computing %%% Archive CD ROM for the 1980s, with manual %%% corrections and additions. Additions were %%% then made from all of the bibliographies in %%% the TeX User Group collection, from %%% bibliographies in the author's personal %%% files, from the Compendex database %%% (1970--1979), from the IEEE INSPEC database %%% (1970--1979), from tables of contents %%% information at http://www.acm.org/pubs/cacm/, %%% from Zentralblatt fur Mathematik Mathematics %%% Abstracts at %%% http://www.emis.de/cgi-bin/MATH/, from %%% bibliographies at Internet host %%% netlib.bell-labs.com, and from the computer %%% science bibliography collection on %%% ftp.ira.uka.de in /pub/bibliography to which %%% many people of have contributed. The %%% snapshot of this collection was taken on %%% 5-May-1994, and it consists of 441 BibTeX %%% files, 2,672,675 lines, 205,289 entries, and %%% 6,375 String{} abbreviations, occupying %%% 94.8MB of disk space. %%% %%% Numerous errors in the sources noted above %%% have been corrected. Spelling has been %%% verified with the UNIX spell and GNU ispell %%% programs using the exception dictionary %%% stored in the companion file with extension %%% .sok. %%% %%% BibTeX citation tags are uniformly chosen %%% as name:year:abbrev, where name is the %%% family name of the first author or editor, %%% year is a 4-digit number, and abbrev is a %%% 3-letter condensation of important title %%% words. Citation tags were automatically %%% generated by software developed for the %%% BibNet Project. %%% %%% In this bibliography, entries are sorted in %%% publication order within each journal, %%% using bibsort -byvolume. %%% %%% The checksum field above contains a CRC-16 %%% checksum as the first value, followed by the %%% equivalent of the standard UNIX wc (word %%% count) utility output of lines, words, and %%% characters. This is produced by Robert %%% Solovay's checksum utility.", %%% } %%% ==================================================================== @Preamble{"\input bibnames.sty " # "\input path.sty " # "\def \TM {${}^{\sc TM}$} " # "\hyphenation{ al-pha-mer-ic Balz-er Blom-quist Bo-ta-fo-go Bran-din Brans-comb Bu-tera Chris-tina Christ-o-fi-des Col-lins Cor-dell data-base econ-omies Fletch-er flow-chart flow-charts Fry-styk ge-dank-en Gar-fink-el Ge-ha-ni Glush-ko Goud-reau Gua-dan-go Hari-di Haw-thorn Hem-men-ding-er Hor-o-witz Hour-vitz Hirsch-berg Ike-da Ka-chi-tvi-chyan-u-kul Kat-ze-nel-son Kitz-miller Ko-ba-yashi Le-Me-tay-er Ken-ne-dy Law-rence Mac-kay Mai-net-ti Mar-sa-glia Max-well Mer-ner Mo-ran-di Na-ray-an New-ell Nich-ols para-digm pat-ent-ed Phi-lo-kyp-rou Prep-a-ra-ta pseu-do-chain-ing QUIK-SCRIPT Rad-e-mach-er re-eval-u-a-tion re-wind Ros-witha Scheu-er-mann Schwach-heim Schob-bens Schon-berg Sho-sha-ni Si-tha-ra-ma Skwa-rec-ki Streck-er Strin-gi-ni Tes-ler Te-zu-ka Teu-ho-la Till-quist Town-send Tsi-chri-tzis Tur-ski Vuille-min Wald-ing-er Za-bo-row-ski Za-mora }"} %======================================================================= % Acknowledgement abbreviations: @String{ack-nhfb = "Nelson H. F. Beebe, Center for Scientific Computing, Department of Mathematics, University of Utah, Salt Lake City, UT 84112, USA, Tel: +1 801 581 5254, FAX: +1 801 581 4148, e-mail: \path|beebe@math.utah.edu|"} @String{ack-nj = "Norbert Juffa, 2445 Mission College Blvd. Santa Clara, CA 95054 USA email: \path=norbert@iit.com="} %======================================================================= % Journal abbreviations: @String{j-CACM = "Communications of the ACM"} @String{j-COMP-SURV = "Computing Surveys"} @String{j-J-ACM = "Journal of the ACM"} @String{j-MANAGEMENT-SCIENCE = "Management Science"} @String{j-SIAM-J-COMPUT = "SIAM Journal of Computing"} @String{j-SPE = "Software --- Practice and Experience"} @String{j-TOMS = "ACM Transactions on Mathematical Software"} %======================================================================= % Publisher abbreviations: @String{pub-ANSI = "American National Standards Institute"} @String{pub-ANSI:adr = "1430 Broadway, New York, NY 10018, USA"} @String{pub-AW = "Ad{\-d}i{\-s}on-Wes{\-l}ey"} @String{pub-AW:adr = "Reading, MA, USA"} @String{pub-SUCSLI = "Stanford University Center for the Study of Language and Information"} @String{pub-SUCSLI:adr = "Stanford, CA, USA"} @String{pub-SV = "Spring{\-}er-Ver{\-}lag"} @String{pub-SV:adr = "Berlin, Germany~/ Heidelberg, Germany~/ London, UK~/ etc."} @MastersThesis{Dittmer:1976:IEP, author = "Ingo Dittmer", title = "{Implementation eines Einschrittcompilers f{\"u}r die Progammiersprache PASCAL auf der Rechenanlage IBM\slash 360 der Universit{\"a}t M{\"u}nster}. ({English} title: Implementation of a One-Step Compiler for the Programming Language {PASCAL} on the {IBM}\slash 360 of the {University of Muenster})", type = "Diplomearbeit", school = "Universit{\"a}t M{\"u}nster", address = "M{\"u}nster, Germany", pages = "??", month = "??", year = "1976", bibdate = "Sat Feb 17 13:24:29 1996", note = "Diplomearbeit M{\"u}nster 1976 und doert angegebene Literatur (English: Muenster diploma work 1976 and the literature cited therein). The hashing method was rediscovered fourteen years later by Pearson \cite{Pearson:1990:FHV}, and then commented on by several authors \cite{Dittmer:1991:NFH,Savoy:1991:NFH,Litsios:1991:NFH,Pearson:1991:NFH}.", acknowledgement = ack-nhfb, xxnote = "Cannot find in Dissertation Abstracts, European.", } gawk-4.0.1+dfsg.orig/test/regrange.awk0000644000175000017500000000103511571243124016621 0ustar schotschot# 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]) } } gawk-4.0.1+dfsg.orig/test/splitvar.in0000644000175000017500000000003011463242060016507 0ustar schotschotHere===Is=Some=====Data gawk-4.0.1+dfsg.orig/test/membug1.awk0000644000175000017500000000002411463242060016357 0ustar schotschot{ one != one = $1 } gawk-4.0.1+dfsg.orig/test/mbfw1.awk0000644000175000017500000000204611463242060016044 0ustar schotschot# Date: Sun, 16 Mar 2008 18:51:14 +0100 # From: Hermann Peifer # Subject: [Fwd: Gawk FIELDWIDTHS and multibyte characters] # To: bug-gawk@gnu.org # Message-id: <47DD5E12.2010403@gmx.eu> # # See below. Regards, Hermann # # --- Original Message --- # # Newsgroups: comp.lang.awk # From: Hermann Peifer # Date: Sun, 16 Mar 2008 01:23:38 -0700 (PDT) # Subject: Gawk FIELDWIDTHS and multibyte characters # # Hi, # # It looks to me that Gawk's FIELDWIDTHS extension is not aware of # multibyte characters, see my example below. # # $ cat testdata # CDRegion Commune Site # SEVästsverige Hallands län Kungsbacka # SESmÃ¥land med öarna Västra Götalands länGöteborg # SEKronoberg Alvesta Stenungsund # # $ file testdata # testdata: UTF-8 Unicode text # # $ awk 'BEGIN{FIELDWIDTHS = "2 20 20 20"}{print $4}' testdata # Site # Kungsbacka # länGöteborg # Stenungsund # # Can someone confirm? # # Hermann BEGIN { FIELDWIDTHS = "2 20 20 20" } { print $4 } gawk-4.0.1+dfsg.orig/test/arryref4.ok0000644000175000017500000000013311463242060016410 0ustar schotschotgawk: arryref4.awk:10: fatal: attempt to use scalar parameter `b' as an array EXIT CODE: 2 gawk-4.0.1+dfsg.orig/test/devfd.in10000644000175000017500000000075311463242060016030 0ustar schotschotthis is file f1, line 1 this is file f1, line 2 this is file f1, line 3 this is file f1, line 4 this is file f1, line 5 this is file f1, line 6 this is file f1, line 7 this is file f1, line 8 this is file f1, line 9 this is file f1, line 10 this is file f1, line 11 this is file f1, line 12 this is file f1, line 13 this is file f1, line 14 this is file f1, line 15 this is file f1, line 16 this is file f1, line 17 this is file f1, line 18 this is file f1, line 19 this is file f1, line 20 gawk-4.0.1+dfsg.orig/test/negexp.ok0000644000175000017500000000000511463242060016136 0ustar schotschot0.01 gawk-4.0.1+dfsg.orig/test/exitval2.awk0000644000175000017500000000022411463242060016562 0ustar schotschotBEGIN { print "foo" | "read x ; echo $x ; exit 12" } # this should still exit 0, as pointed out by kenny mccormack in # comp.lang.awk on 2 feb 2005 gawk-4.0.1+dfsg.orig/test/fnarray.ok0000644000175000017500000000034411734665352016336 0ustar schotschotgawk: fnarray.awk:5: Num = foo[c] gawk: fnarray.awk:5: ^ use of non-array as array gawk: fnarray.awk:5: error: function `foo' called with space between name and `(', or used as a variable or an array EXIT CODE: 1 gawk-4.0.1+dfsg.orig/test/delsub.awk0000644000175000017500000000014111560330263016301 0ustar schotschotfunction f(c, d, x) { delete c; x = d[0] } BEGIN { a[0][0] = 1; f(a, a[0]); print "still here" } gawk-4.0.1+dfsg.orig/test/beginfile2.in0000644000175000017500000000577311654051011016670 0ustar schotschot#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 } gawk-4.0.1+dfsg.orig/test/nlfldsep.ok0000644000175000017500000000006011463242060016460 0ustar schotschot4 some stuff more stuff 2 junk stuff 1 final gawk-4.0.1+dfsg.orig/test/funsemnl.awk0000644000175000017500000000014511463242060016655 0ustar schotschot# make sure that ; + \n at end after function works function foo() { print "foo" } ; BEGIN { foo() } gawk-4.0.1+dfsg.orig/test/out3.ok0000644000175000017500000000001511463242060015543 0ustar schotschotYou blew it! gawk-4.0.1+dfsg.orig/test/fnarray.awk0000644000175000017500000000007111463242060016466 0ustar schotschotfunction foo(N) { return 0 } BEGIN { Num = foo[c] } gawk-4.0.1+dfsg.orig/test/intformat.ok0000644000175000017500000000010011463242060016647 0ustar schotschot3 -3 17 0000000000000000000000000000000000000000000000000000001 gawk-4.0.1+dfsg.orig/test/litoct.awk0000644000175000017500000000006711463242060016327 0ustar schotschot{ if (/a\52b/) print "match" ; else print "no match" } gawk-4.0.1+dfsg.orig/test/getline3.ok0000644000175000017500000000000311463242060016360 0ustar schotschot17 gawk-4.0.1+dfsg.orig/test/range1.ok0000644000175000017500000000000711463242060016027 0ustar schotschotfoobar gawk-4.0.1+dfsg.orig/test/sortempty.awk0000644000175000017500000000003111463242060017066 0ustar schotschotBEGIN { print asort(a) } gawk-4.0.1+dfsg.orig/test/arraysort.awk0000644000175000017500000000313611560333421017057 0ustar schotschot# 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]"|" } gawk-4.0.1+dfsg.orig/test/substr.awk0000644000175000017500000000051611463242060016352 0ustar schotschotBEGIN { x = "A" printf("%-39s\n", substr(x,1,39)) print substr("abcdef", 0, 2) print substr("abcdef", 2.3, 2) print substr("abcdef", -1, 2) print substr("abcdef", 1, 0) print substr("abcdef", 1, -3) print substr("abcdef", 1, 2.3) print substr("", 1, 2) print substr("abcdef", 5, 5) print substr("abcdef", 7, 2) exit (0) } gawk-4.0.1+dfsg.orig/test/rswhite.awk0000644000175000017500000000005311463242060016511 0ustar schotschotBEGIN { RS = "" } { printf("<%s>\n", $0) } gawk-4.0.1+dfsg.orig/test/profile2.ok0000644000175000017500000001144511526300625016406 0ustar schotschot # 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) } } } } } } } } gawk-4.0.1+dfsg.orig/test/paramdup.awk0000644000175000017500000000015011463242060016633 0ustar schotschotBEGIN { foo(0, 1, 2) } function foo(a, b, c, b, a) { print "a =", a print "b =", b print "c =", c } gawk-4.0.1+dfsg.orig/test/pcntplus.ok0000644000175000017500000000000511463242060016520 0ustar schotschot+3 4 gawk-4.0.1+dfsg.orig/test/mbprintf3.ok0000644000175000017500000000014611463242060016562 0ustar schotschotCOMPONENT suspended particulates <10 µm (air), day COMPONENT suspended particulates <10 µm (air), day gawk-4.0.1+dfsg.orig/test/ignrcase.awk0000644000175000017500000000006111463242060016616 0ustar schotschotBEGIN { IGNORECASE = 1 } { sub(/y/, ""); print } gawk-4.0.1+dfsg.orig/test/concat1.awk0000644000175000017500000000420711463242060016361 0ustar schotschot#From deep@cicada-semi.com Wed Jan 23 13:15:52 2002 #X-From_: deep@cicada-semi.com Wed Jan 23 01:24:54 2002 #From: "Mandeep Chadha" #To: #Subject: gawk version 3.1.0 will not print a ";" #Date: Tue, 22 Jan 2002 17:23:57 -0600 #Message-ID: #MIME-Version: 1.0 #Content-Type: text/plain; # charset="iso-8859-1" #Content-Transfer-Encoding: 7bit #X-Priority: 3 (Normal) #X-MSMail-Priority: Normal #X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) #Importance: Normal #X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 # # #The file "tmp" contains the following lines: # #A #B #C #D # #and when I run the command: # # gawk '{print "Input = "$_" ; "}' tmp {print "Input = "$_" ; "} # #I get the following output: # #Input = A #Input = B #Input = C #Input = D # #while I expect the following output: # #Input = A ; #Input = B ; #Input = C ; #Input = D ; # #Running gawk --version produces the following output: # #GNU Awk 3.1.0 #Copyright (C) 1989, 1991-2001 Free Software Foundation. # #This program is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with this program; if not, write to the Free Software #Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # #I am running this on a i686 machine that is running RedHat 7.2 (out of the box). # #Thanks, # #Mandeep Chadha # #---------------------------------------- #Mandeep Chadha #Cicada Semiconductor Corp. #811 Barton Springs Road, Suite 550 #Austin, TX 78704 #Ph: (512) 327-3500 x111 #E-mail: deep@cicada-semi.com #URL: http://www.cicada-semi.com #---------------------------------------- gawk-4.0.1+dfsg.orig/test/arynasty.awk0000644000175000017500000000102311463242060016674 0ustar schotschotBEGIN { a = 12.153 #print "-- stroring test[a]" > "/dev/stderr" ; fflush("/dev/stderr") test[a] = "hi" #print "-- setting CONVFMT" > "/dev/stderr" ; fflush("/dev/stderr") CONVFMT = "%.0f" #print "-- setting a" > "/dev/stderr" ; fflush("/dev/stderr") a = 5 #stopme() #print "-- starting loop" > "/dev/stderr" ; fflush("/dev/stderr") for (i in test) { #print("-- i =", i) > "/dev/stderr" ; fflush("/dev/stderr"); #printf("-- i = <%s>\n", i) > "/dev/stderr" ; fflush("/dev/stderr"); printf ("test[%s] = %s\n", i, test[i]) } } gawk-4.0.1+dfsg.orig/test/ignrcase.ok0000644000175000017500000000000311463242060016441 0ustar schotschotxz gawk-4.0.1+dfsg.orig/test/Gentests.vms0000644000175000017500000000502011463242060016642 0ustar schotschot# Gentests.vms - supplements Gentests to generate tests in vms format # gawk -v "VMSTESTS=1" -f Gentests -f Gentests.vms Makefile.am *.awk *.in >Maketests.vms /^FAIL_CODE1 *=/,/[^\\]$/ { gsub(/(^FAIL_CODE1 *=|\\$)/,"") for (i = 1; i <= NF; i++) fail_code1[$i] next } END { if (VMSTESTS) vmsepilog() } # wildcard expansion done by gawk's vms_arg_fixup() to simulate shell # globbing produces full filenames: device:[directory]name.type;# # and by default also forces the value into upper case function vmsargvfixup( i, f) { # we're forcing lowercase below; need to override for some files vmscasefixup["makefile.in"] = "Makefile.in" for (i = 2; i < ARGC; i++) { f = ARGV[i] sub(/^.+[]>]/, "", f) # strip dev+dir prefix sub(/\;[0-9]+$/, "", f) # strip version suffix f = tolower(f) if (f in vmscasefixup) f = vmscasefixup[f] ARGV[i] = f } vmsprolog() # insert some stuff into the output file } # output sufficient for the simplest tests in vms/vmstest.com function vmsgenerate(x, s, o) { # generate a gosub-style subroutine; start with its label printf "$" x ":" s = "" if (x in lint) { s = s " --lint" delete lint[x] } if (x in lint_old) { s = s " --lint-old" delete lint_old[x] } if (x".in" in files) { s = s " <" x ".in" delete files[x".in"] } o = "_" x ".tmp" print "\techo \"" x "\"" print "$\tAWKPATH_srcdir" print "$\tgawk -f " x ".awk" s " >" o " 2>&1" print "$\tif .not.$status then call exit_code \"" o "\" " \ ((x in fail_code1) ? "1" : "2") print "$\tcmp " x ".ok " o print "$\tif $status" print "$\tthen\trm " o ";" print "$\telse\techo \"test \"\"" x "\"\" failed\"" print "$\tendif" print "$\treturn" return } # prolog for Maketests.vms function vmsprolog() { print "$" print "$\techo\t= \"write sys$output\"" print "$\tcmp\t= \"diff/Output=_NL:/Maximum=1\"" print "$\trm\t= \"delete/noConfirm/noLog\"" print "$\tgawk\t= \"$sys$disk:[-]gawk.exe\"" print "$\tAWKPATH_srcdir = \"define/User AWKPATH sys$disk:[]\"" print "$" print "$\tset noOn" print "$ gosub 'p1'" print "$\tset On" print "$ exit" print "$" } # epilog for Maketests.vms function vmsepilog() { print "$" print "$! add a fake \"EXIT CODE\" record to the end of temporary output file" print "$! to simulate the ``|| echo EXIT CODE $$? >>_$@'' shell script usage" print "$exit_code: subroutine" print "$\tif f$trnlnm(\"FTMP\").nes.\"\" then close/noLog ftmp" print "$\topen/Append ftmp 'p1'" print "$\twrite ftmp \"EXIT CODE: \",p2" print "$\tclose ftmp" print "$ endsubroutine !exit_code" print "$" } gawk-4.0.1+dfsg.orig/test/gsubasgn.awk0000644000175000017500000000045611463242060016644 0ustar schotschot# tests for assigning to a function within that function #1 - should be bad function test1 (r) { gsub(r, "x", test1) } BEGIN { test1("") } #2 - should be bad function test2 () { gsub(/a/, "x", test2) } BEGIN { test2() } #3 - should be ok function test3 (r) { gsub(/a/, "x", r) } BEGIN { test3("") } gawk-4.0.1+dfsg.orig/test/uninit4.awk0000644000175000017500000000022011463242060016412 0ustar schotschot# test whether --lint catches uninitialized fields: function pr() { print } BEGIN { pr() print $0 print $(1-1) print $1 NF=3; print $2 } gawk-4.0.1+dfsg.orig/test/ofmtbig.in0000644000175000017500000000000611463242060016275 0ustar schotschota 1 b gawk-4.0.1+dfsg.orig/test/range1.awk0000755000175000017500000000002611463242060016204 0ustar schotschot/foo/,/bar/ { print } gawk-4.0.1+dfsg.orig/test/prmreuse.ok0000644000175000017500000000000011463242060016505 0ustar schotschotgawk-4.0.1+dfsg.orig/test/match3.awk0000644000175000017500000000213411463242060016205 0ustar schotschot# Date: Mon, 28 Jul 2008 17:25:32 +0200 # From: Dirk Zimoch # Subject: match() prevents numeric strings from beeing treated numerically # To: bug-gawk@gnu.org # Message-id: <488DE4EC.6020400@psi.ch> # # In gawk version 3.1.5, numeric user input that is parsed with match() is not # recognized as "numeric string" any more. I.e. mixed string-numeric comparison # does not work any more. In version 3.1.1, it worked. (Even though the # documentation never explicitly mentioned this behavior for match(), as it does # for split(). But is says that "user input" should be treated that way.) # # awk 'BEGIN{match(".5",/.*/,a);print a[0]==.5?"OK":"FAULT"}' # # Version 3.1.1 prints OK, version 3.1.5 prints FAULT. # # awk '{match($0,/.*/,a);print a[0]==a[0]+0?"OK":"FAULT"}' << EOF # 5 # 5.0 # 0.5 # .5 # EOF # # Version 3.1.1 prints # OK # OK # OK # OK # # Version 3.1.5 prints # OK # FAULT # OK # FAULT # # # -- # Dr. Dirk Zimoch # Paul Scherrer Institut, WBGB/006 # 5232 Villigen PSI, Switzerland # Phone +41 56 310 5182 # { match($0,/.*/,a) print a[0] == a[0]+0 ? "OK" : "FAULT" } gawk-4.0.1+dfsg.orig/test/manyfiles.ok0000644000175000017500000000000211463242060016634 0ustar schotschot1 gawk-4.0.1+dfsg.orig/test/gtlnbufv.awk0000644000175000017500000000007611463242060016660 0ustar schotschot/@K@CODE/ { print ; getline temp ; print temp ;next } {print} gawk-4.0.1+dfsg.orig/test/switch2.ok0000644000175000017500000000000011463355043016234 0ustar schotschotgawk-4.0.1+dfsg.orig/test/match1.awk0000644000175000017500000000037611463242060016211 0ustar schotschotBEGIN { data = "foooobazbarrrrr" match(data, /(fo+).+(bar*)/, arr) for (i = 0; i in arr; i++) { printf("arr[%d] = \"%s\"\n", i, arr[i]) printf("arr[%d, \"start\"] = %s, arr[%d, \"length\"] = %s\n", i, arr[i, "start"], i, arr[i, "length"]) } } gawk-4.0.1+dfsg.orig/test/ofmtbig.awk0000644000175000017500000000540311475002611016456 0ustar schotschot# # [USEMAP] # # Problem Report gnu/7821 # # awk in free(): warning: chunk is already free. # # Confidential # no # # Severity # serious # # Priority # medium # # Responsible # freebsd-bugs@freebsd.org # # State # suspended # # Class # sw-bug # # Submitter-Id # current-users # # Arrival-Date # Thu Sep 3 10:30:00 PDT 1998 # # Last-Modified # Thu Sep 17 02:04:26 PDT 1998 # # Originator # Alexander Litvin archer@lucky.net # # Organization # # #Lucky Net ltd. # # Release # FreeBSD 3.0-CURRENT i386 # # Environment # # #FreeBSD grape.carrier.kiev.ua 3.0-CURRENT FreeBSD 3.0-CURRENT #121: Thu Sep 3 #1 #1:21:44 EEST 1998 archer@grape.carrier.kiev.ua:/usr/src/sys/compile/GRAPE #i #386 # # Description # # #The problem first appeared when GNU awk in 3.0-CURRENT was apgraded to #3.0.3. I run C-News, which uses awk extensively. After awk apgrade C-News #expire stopped to work. It appeared that some GNU awk 3.0.3 programms when #given absolutely legitimate input fail, giving out a number of messages: # #awk in free(): warning: chunk is already free. # # How-To-Repeat # # #Run the following awk program (it is cut out of C-News expire scripts). #I was not able to cut it down more -- omitting some portions of the #code (e.g. OFMT line), make error go away in this case, though it #certainly does not fix awk. # #----------------cut-here---------------- #!/usr/bin/awk -f BEGIN { OFMT = "%.12g" big = 99999999999 lowest = big small = 0 highest = small } $0 ~ /^[0-9]+$/ { if ($1 < lowest) lowest = $1 if ($1 > highest) highest = $1 next } # $0 ~ /^[a-z]+/ { $0 ~ /^[[:lower:]]+/ { print dir, highest, lowest dir = $0 lowest = big highest = small } #----------------cut-here---------------- # #To get the error, just give this script the following input: #----------------cut-here---------------- #a #1 #b #----------------cut-here---------------- # # Fix # # #I was not able to track the error in awk sources. As a workaround, #I just reverted to GNU awk 2.15.5. # # Audit-Trail # # #State-Changed-From-To: open-suspended #State-Changed-By: phk #State-Changed-When: Thu Sep 17 02:04:08 PDT 1998 #State-Changed-Why: #reported to GNU maintainer. # # Submit Followup # _________________________________________________________________ # # # www@freebsd.org gawk-4.0.1+dfsg.orig/test/splitarg4.in0000644000175000017500000000011511463242060016560 0ustar schotschotcaccbdc acbcd a b def a b dwf a b dwf a b dwf abc a aabaabbabbbaabbb ab gawk-4.0.1+dfsg.orig/test/widesub2.awk0000644000175000017500000000023411463242060016551 0ustar schotschotBEGIN { Value = "abc" print "Before <" Value "> ", index( Value, "bc" ) sub( /bc/, "bbc", Value ) print "After <" Value ">", index( Value, "bc" ) } gawk-4.0.1+dfsg.orig/test/printf0.awk0000644000175000017500000000007311463242060016410 0ustar schotschotBEGIN { # bwk accepts this silently: printf print "X" } gawk-4.0.1+dfsg.orig/test/numsubstr.in0000644000175000017500000000002011463242060016704 0ustar schotschot5000 10000 5000 gawk-4.0.1+dfsg.orig/test/tradanch.in0000644000175000017500000000002011463242060016426 0ustar schotschotfoo^bar foo$bar gawk-4.0.1+dfsg.orig/test/nulrsend.awk0000644000175000017500000000626211463242060016666 0ustar schotschot# From murata@nips.ac.jp Tue Aug 6 08:02:14 2002 # Return-Path: # Received: from localhost (aahz [127.0.0.1]) # by skeeve.com (8.11.2/8.11.2) with ESMTP id g7652Ej01784 # for ; Tue, 6 Aug 2002 08:02:14 +0300 # Received: from actcom.co.il [192.114.47.1] # by localhost with POP3 (fetchmail-5.7.4) # for arnold@localhost (single-drop); Mon, 05 Aug 2002 22:02:14 -0700 (PDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Tue Aug 6 08:13:06 2002) # X-From_: murata@nips.ac.jp Tue Aug 6 07:26:32 2002 # Received: from lmail.actcom.co.il by actcom.co.il with ESMTP # (8.11.6/actcom-0.2) id g764QTu27770 for ; # Tue, 6 Aug 2002 07:26:30 +0300 (EET DST) # (rfc931-sender: mail.actcom.co.il [192.114.47.13]) # Received: from f7.net (consort.superb.net [209.61.216.22]) # by lmail.actcom.co.il (8.11.6/8.11.6) with ESMTP id g764QRi04673 # for ; Tue, 6 Aug 2002 07:26:28 +0300 # Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) # by f7.net (8.11.6/8.11.6) with ESMTP id g764QQ920486 # for ; Tue, 6 Aug 2002 00:26:26 -0400 # Received: from ccms.nips.ac.jp ([133.48.72.2]) # by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) # id 17bvvL-00011b-00 # for ; Tue, 06 Aug 2002 00:26:23 -0400 # Received: (from murata@localhost) # by ccms.nips.ac.jp (8.9.3+3.2W/3.7W) id NAA01026; # Tue, 6 Aug 2002 13:26:21 +0900 # Date: Tue, 6 Aug 2002 13:26:21 +0900 # Message-Id: <200208060426.NAA01026@ccms.nips.ac.jp> # To: bug-gawk@gnu.org # Cc: murata@nips.ac.jp # Subject: Bug Report (gawk) # From: murata@nips.ac.jp (MURATA Yasuhisa) # Mime-Version: 1.0 # Content-Type: text/plain; charset=US-ASCII # X-Mailer: mnews [version 1.21PL5] 1999-04/04(Sun) # # Hello, I report a bug. # # # == PROGRAM (filename: atest.awk) == BEGIN { RS="" } NR==1 { print 1 RS="\n" next } NR==2 { print 2 RS="" next } NR==3 { print 3 RS="\n" next } # ==== # # == DATA (filename: atest.txt) == # 1111 # # 2222 # # ==== # note: last line is "\n". # # # == RUN (gawk) == # > gawk -f atest.awk atest.txt # 1 # 2 # (no stop!) # ==== # # == RUN (nawk) == # > nawk -f atest.awk atest.txt # 1 # 2 # 3 # ==== # # == VERSION == # > gawk --version # GNU Awk 3.1.1 # Copyright (C) 1989, 1991-2002 Free Software Foundation. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # == # # -- # MURATA Yasuhisa, Technical Staff # National Institute for Physiological Sciences # E-mail: murata@nips.ac.jp gawk-4.0.1+dfsg.orig/test/reint2.ok0000644000175000017500000000000611463242060016054 0ustar schotschot1 2 3 gawk-4.0.1+dfsg.orig/test/exitval1.ok0000644000175000017500000000001511463242060016406 0ustar schotschotEXIT CODE: 0 gawk-4.0.1+dfsg.orig/test/reint.ok0000644000175000017500000000000311463242060015767 0ustar schotschot13 gawk-4.0.1+dfsg.orig/test/nastyparm.awk0000644000175000017500000000103511560327656017060 0ustar schotschotfunction 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, "")) } gawk-4.0.1+dfsg.orig/test/substr.ok0000644000175000017500000000007311463242060016177 0ustar schotschotA ab bc ab ab ef gawk-4.0.1+dfsg.orig/test/gnuops2.awk0000644000175000017500000000571711463242060016435 0ustar schotschot# From Servatius.Brandt@fujitsu-siemens.com Fri Dec 1 13:44:48 2000 # Received: from mail.actcom.co.il # by localhost with POP3 (fetchmail-5.1.0) # for arnold@localhost (single-drop); Fri, 01 Dec 2000 13:44:48 +0200 (IST) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Fri Dec 1 13:44:10 2000) # X-From_: Servatius.Brandt@fujitsu-siemens.com Fri Dec 1 13:11:23 2000 # Received: from lmail.actcom.co.il by actcom.co.il with ESMTP # (8.9.1a/actcom-0.2) id NAA11033 for ; # Fri, 1 Dec 2000 13:11:21 +0200 (EET) # (rfc931-sender: lmail.actcom.co.il [192.114.47.13]) # Received: from billohost.com (10-209.196.35.dellhost.com [209.196.35.10] (may be forged)) # by lmail.actcom.co.il (8.9.3/8.9.1) with ESMTP id NAA30286 # for ; Fri, 1 Dec 2000 13:12:25 +0200 # Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164]) # by billohost.com (8.9.3/8.9.3) with ESMTP id GAA26074 # for ; Fri, 1 Dec 2000 06:09:08 -0500 # Received: from energy.pdb.sbs.de ([192.109.2.19]) # by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian)) # id 141o5z-0000RJ-00; Fri, 01 Dec 2000 06:11:16 -0500 # Received: from trulli.pdb.fsc.net ([172.25.96.20]) # by energy.pdb.sbs.de (8.9.3/8.9.3) with ESMTP id MAA32687; # Fri, 1 Dec 2000 12:11:13 +0100 # Received: from pdbrd02e.pdb.fsc.net (pdbrd02e.pdb.fsc.net [172.25.96.15]) # by trulli.pdb.fsc.net (8.9.3/8.9.3) with ESMTP id MAA27384; # Fri, 1 Dec 2000 12:11:13 +0100 # Received: from Fujitsu-Siemens.com (pgtd1181.mch.fsc.net [172.25.126.152]) by pdbrd02e.pdb.fsc.net with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) # id XC2QLXS2; Fri, 1 Dec 2000 12:11:13 +0100 # Message-ID: <3A2786CF.1000903@Fujitsu-Siemens.com> # Date: Fri, 01 Dec 2000 12:09:03 +0100 # From: Servatius Brandt # Organization: Fujitsu Siemens Computers # User-Agent: Mozilla/5.0 (Windows; U; Win95; en-US; m18) Gecko/20001108 Netscape6/6.0 # X-Accept-Language: de, en # MIME-Version: 1.0 # To: bug-gnu-utils@gnu.org # CC: arnold@gnu.org # Subject: Bug Report: \y, \B, \<, \> do not work with _ # Content-Type: text/plain; charset=us-ascii; format=flowed # Content-Transfer-Encoding: 7bit # Status: R # # Hello, # # The \y, \B, \<, \> patterns do not regard _ as # word-constituent (unlike \w and \W, which do). # # Operating system: ReliantUNIX-Y 5.44 C2001 RM600 R10000 # Version of gawk: 3.0.6 # C-Compiler: Fujitsu Siemens Computers CDS++ V2.0C0004 # # Test program: # #!/usr/local/bin/gawk -f BEGIN { print match("X _abc Y", /\<_abc/) # bug print match("X _abc Y", /\y_abc/) # bug print match("X abc_ Y", /abc_\>/) # bug print match("X abc_ Y", /abc_\y/) # bug print match("X abc_def Y", /abc_\Bdef/) # bug print match("X a_c Y", /a\wc/) # ok! print match("X a.c Y", /a\Wc/) # ok! exit } # # # Regards, # Servatius Brandt # # gawk-4.0.1+dfsg.orig/test/mtchi18n.awk0000644000175000017500000000002711463242060016460 0ustar schotschot{print match(""," *")} gawk-4.0.1+dfsg.orig/test/gsubtest.awk0000644000175000017500000000051711463242060016671 0ustar schotschotBEGIN { str = "abc"; print gsub("b+", "FOO", str), str str = "abc"; print gsub("x*", "X", str), str str = "abc"; print gsub("b*", "X", str), str str = "abc"; print gsub("c", "X", str), str str = "abc"; print gsub("c+", "X", str), str str = "abc"; print gsub("x*$", "X", str), str str = "abc"; print gsub("b|$", "X", str), str } gawk-4.0.1+dfsg.orig/test/reint.in0000644000175000017500000000002011463242060015763 0ustar schotschotmatch this: aaa gawk-4.0.1+dfsg.orig/test/tradanch.ok0000644000175000017500000000000011463242060016427 0ustar schotschotgawk-4.0.1+dfsg.orig/test/gensub2.awk0000644000175000017500000000015011463242060016367 0ustar schotschotBEGIN { print gensub("x","y",2,"xx") print gensub("x","y","2","xx") print gensub("x","y","a","xx") } gawk-4.0.1+dfsg.orig/test/fpatnull.in0000644000175000017500000000001511566523741016507 0ustar schotschothello, world gawk-4.0.1+dfsg.orig/test/lc_num1.ok0000644000175000017500000000005711463242060016215 0ustar schotschotok, or at least the quote flag isn't supported gawk-4.0.1+dfsg.orig/test/clobber.ok0000644000175000017500000000000611463242060016261 0ustar schotschot000801gawk-4.0.1+dfsg.orig/test/numsubstr.awk0000644000175000017500000000003511463242060017066 0ustar schotschot{ print substr(1000+$1, 2) } gawk-4.0.1+dfsg.orig/test/fsbs.ok0000644000175000017500000000000411463242060015604 0ustar schotschot1 2 gawk-4.0.1+dfsg.orig/test/anchgsub.awk0000644000175000017500000000004311463242060016615 0ustar schotschot{ gsub(/^[ ]*/, "", $0) ; print } gawk-4.0.1+dfsg.orig/test/gensub.in0000644000175000017500000000004411463242060016133 0ustar schotschota b c a b c a b c a b c a b c a b c gawk-4.0.1+dfsg.orig/test/delarpm2.awk0000644000175000017500000000757311463242060016550 0ustar schotschot# From beebe@math.utah.edu Sat May 17 21:31:27 2003 # Return-Path: # Received: from localhost (aahz [127.0.0.1]) # by skeeve.com (8.12.5/8.12.5) with ESMTP id h4HIQmCw001380 # for ; Sat, 17 May 2003 21:31:27 +0300 # Received: from actcom.co.il [192.114.47.1] # by localhost with POP3 (fetchmail-5.9.0) # for arnold@localhost (single-drop); Sat, 17 May 2003 21:31:27 +0300 (IDT) # Received: by actcom.co.il (mbox arobbins) # (with Cubic Circle's cucipop (v1.31 1998/05/13) Sat May 17 21:34:07 2003) # X-From_: beebe@sunshine.math.utah.edu Fri May 16 20:38:45 2003 # Received: from smtp1.actcom.net.il by actcom.co.il with ESMTP # (8.11.6/actcom-0.2) id h4GHcd226764 for ; # Fri, 16 May 2003 20:38:40 +0300 (EET DST) # (rfc931-sender: mail.actcom.co.il [192.114.47.13]) # Received: from f7.net (consort.superb.net [209.61.216.22]) # by smtp1.actcom.net.il (8.12.8/8.12.8) with ESMTP id h4GHgBc2023067 # for ; Fri, 16 May 2003 20:42:13 +0300 # Received: from sunshine.math.utah.edu (sunshine.math.utah.edu [128.110.198.2]) # by f7.net (8.11.7/8.11.6) with ESMTP id h4GHcbf09202 # for ; Fri, 16 May 2003 13:38:37 -0400 # Received: from suncore.math.utah.edu (IDENT:r8KQWmkF4jVMLBhxpojXGNCAnBZB38ET@suncore.math.utah.edu [128.110.198.5]) # by sunshine.math.utah.edu (8.9.3p2/8.9.3) with ESMTP id LAA09111; # Fri, 16 May 2003 11:38:34 -0600 (MDT) # Received: (from beebe@localhost) # by suncore.math.utah.edu (8.9.3p2/8.9.3) id LAA01743; # Fri, 16 May 2003 11:38:34 -0600 (MDT) # Date: Fri, 16 May 2003 11:38:34 -0600 (MDT) # From: "Nelson H. F. Beebe" # To: "Arnold Robbins" # Cc: beebe@math.utah.edu # X-US-Mail: "Center for Scientific Computing, Department of Mathematics, 110 # LCB, University of Utah, 155 S 1400 E RM 233, Salt Lake City, UT # 84112-0090, USA" # X-Telephone: +1 801 581 5254 # X-FAX: +1 801 585 1640, +1 801 581 4148 # X-URL: http://www.math.utah.edu/~beebe # Subject: gawk-3.1.2[ab]: bug in delete # Message-ID: # # I discovered yesterday that one of my tools got broken by the upgrade # to gawk-3.1.2a and gawk-3.1.2b. For now, I've temporarily reset # /usr/local/bin/gawk on the Sun Solaris and Intel GNU/Linux systems # back to be gawk-3.1.2. # # This morning, I isolated the problem to the following small test case: # # % cat bug.awk BEGIN { clear_array(table) foo(table) for (key in table) print key, table[k] clear_array(table) exit(0) } function clear_array(array, key) { for (key in array) delete array[key] } function foo(a) { a[1] = "one" a[2] = "two" } # # With nawk, mawk, and also gawk-3.1.2 or earlier, I get this: # # % mawk -f bug.awk # 1 # 2 # # However, with the two most recent gawk releases, I get: # # % gawk-3.1.2b -f bug.awk # gawk-3.1.2b: bug.awk:12: fatal: delete: illegal use of variable `table' as # array # # If the first clear_array() statement is commented out, it runs. # However, the problem is that in a large program, it may not be easy to # identify places where it is safe to invoke delete, so I believe the # old behavior is more desirable. # # ------------------------------------------------------------------------------- # - Nelson H. F. Beebe Tel: +1 801 581 5254 - # - Center for Scientific Computing FAX: +1 801 581 4148 - # - University of Utah Internet e-mail: beebe@math.utah.edu - # - Department of Mathematics, 110 LCB beebe@acm.org beebe@computer.org - # - 155 S 1400 E RM 233 beebe@ieee.org - # - Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe - # ------------------------------------------------------------------------------- # gawk-4.0.1+dfsg.orig/test/fwtest.ok0000644000175000017500000000001011463242060016160 0ustar schotschot3 a b c gawk-4.0.1+dfsg.orig/test/rtlen.ok0000644000175000017500000000000611654051011015771 0ustar schotschot3 5 2 gawk-4.0.1+dfsg.orig/test/gsubtst6.awk0000644000175000017500000000127011463242060016607 0ustar schotschot# From: "T. X. G." # Subject: Bug in regular expression \B using DFA # Date: Wed, 16 Jul 2008 05:23:09 -0700 (PDT) # To: bug-gawk@gnu.org # # ~ gawk --version # GNU Awk 3.1.6 # Copyright (C) 1989, 1991-2007 Free Software Foundation. # # ...... # # You should have received a copy of the GNU General Public License # along with this program. If not, see http://www.gnu.org/licenses/. # # ~ LC_ALL=C gawk 'BEGIN{x="abcd";gsub(/\B/,":",x);print x}' # a:b:cd # # ~ LC_ALL=en_US.UTF-8 gawk 'BEGIN{x="abcd";gsub(/\B/,":",x);print x}' # a:b:c:d # # ~ GAWK_NO_DFA=1 gawk 'BEGIN{x="abcd";gsub(/\B/,":",x);print x}' # a:b:c:d BEGIN { x = "abcd"; gsub(/\B/,":",x); print x } gawk-4.0.1+dfsg.orig/test/Makefile.in0000644000175000017500000024013511734667213016410 0ustar schotschot# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # test/Makefile.am --- automake input file for gawk # # Copyright (C) 1988-2012 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 # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/Maketests ChangeLog subdir = test 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/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) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ # This business forces the locale to be C for running the tests, # unless we override it to something else for testing. # # 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) CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBSIGSEGV = @LIBSIGSEGV@ LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LTLIBSIGSEGV = @LTLIBSIGSEGV@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ 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 \ argtest.awk \ argtest.ok \ arrayparm.awk \ arrayparm.ok \ arrayprm2.awk \ arrayprm2.ok \ arrayprm3.awk \ arrayprm3.ok \ arrayref.awk \ arrayref.ok \ arrymem1.awk \ arrymem1.ok \ arryref2.awk \ arryref2.ok \ arryref3.awk \ arryref3.ok \ arryref4.awk \ arryref4.ok \ arryref5.awk \ arryref5.ok \ arynasty.awk \ arynasty.ok \ arynocls.awk \ arynocls.in \ arynocls.ok \ aryprm1.awk \ aryprm1.ok \ aryprm2.awk \ aryprm2.ok \ aryprm3.awk \ aryprm3.ok \ aryprm4.awk \ aryprm4.ok \ aryprm5.awk \ aryprm5.ok \ aryprm6.awk \ aryprm6.ok \ aryprm7.awk \ aryprm7.ok \ aryprm8.awk \ aryprm8.ok \ arysubnm.awk \ arysubnm.ok \ asgext.awk \ asgext.in \ asgext.ok \ asort.awk \ asort.ok \ asorti.awk \ asorti.ok \ awkpath.ok \ back89.awk \ back89.in \ back89.ok \ backgsub.awk \ backgsub.in \ backgsub.ok \ backw.awk \ backw.in \ backw.ok \ badargs.ok \ beginfile1.awk \ beginfile1.ok \ beginfile2.in \ beginfile2.ok \ beginfile2.sh \ binmode1.ok \ childin.awk \ childin.in \ childin.ok \ clobber.awk \ clobber.ok \ clos1way.awk \ clos1way.ok \ closebad.awk \ closebad.ok \ clsflnam.awk \ clsflnam.in \ clsflnam.ok \ compare.awk \ compare.in \ compare.ok \ compare2.awk \ compare2.ok \ concat1.awk \ concat1.in \ concat1.ok \ concat2.awk \ concat2.ok \ concat3.awk \ concat3.ok \ concat4.awk \ concat4.in \ concat4.ok \ convfmt.awk \ convfmt.ok \ datanonl.awk \ datanonl.in \ 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 \ devfd.in5 \ devfd.ok \ 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 \ exitval2.ok \ exitval2.w32 \ fcall_exit.awk \ fcall_exit.ok \ fcall_exit2.awk \ fcall_exit2.ok \ fcall_exit2.in \ fflush.ok \ fflush.sh \ fieldwdth.awk \ fieldwdth.in \ fieldwdth.ok \ fldchg.awk \ fldchg.in \ fldchg.ok \ fldchgnf.awk \ fldchgnf.in \ fldchgnf.ok \ fmtspcl.awk \ fmtspcl.tok \ fmttest.awk \ fmttest.ok \ fnamedat.awk \ fnamedat.in \ fnamedat.ok \ fnarray.awk \ fnarray.ok \ fnarray2.awk \ fnarray2.ok \ fnarydel.awk \ fnarydel.ok \ fnaryscl.awk \ fnaryscl.ok \ fnasgnm.awk \ fnasgnm.in \ fnasgnm.ok \ fnmisc.awk \ 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 \ forref.ok \ forsimp.awk \ forsimp.ok \ fsbs.awk \ fsbs.in \ fsbs.ok \ fsfwfs.awk \ fsfwfs.in \ fsfwfs.ok \ fsrs.awk \ fsrs.in \ fsrs.ok \ fsspcoln.awk \ fsspcoln.in \ fsspcoln.ok \ fstabplus.awk \ fstabplus.in \ fstabplus.ok \ funlen.awk \ funlen.in \ funlen.ok \ funsemnl.awk \ funsemnl.ok \ funsmnam.awk \ funsmnam.ok \ funstack.awk \ funstack.in \ funstack.ok \ fwtest.awk \ fwtest.in \ fwtest.ok \ fwtest2.awk \ fwtest2.in \ fwtest2.ok \ fwtest3.awk \ fwtest3.in \ fwtest3.ok \ gensub.awk \ gensub.in \ gensub.ok \ gensub2.awk \ gensub2.ok \ getline.awk \ getline.in \ getline.ok \ getline2.awk \ getline2.ok \ getline3.awk \ getline3.ok \ getline4.awk \ getline4.in \ getline4.ok \ getlnbuf.awk \ getlnbuf.in \ getlnbuf.ok \ getlndir.awk \ getlndir.ok \ getlnhd.awk \ getlnhd.ok \ getnr2tb.awk \ getnr2tb.in \ getnr2tb.ok \ getnr2tm.awk \ getnr2tm.in \ getnr2tm.ok \ gnuops2.awk \ gnuops2.ok \ gnuops3.awk \ gnuops3.ok \ gnureops.awk \ gnureops.ok \ gsubasgn.awk \ gsubasgn.ok \ gsubtest.awk \ gsubtest.ok \ gsubtst2.awk \ gsubtst2.ok \ gsubtst3.awk \ gsubtst3.in \ gsubtst3.ok \ gsubtst4.awk \ gsubtst4.ok \ gsubtst5.awk \ gsubtst5.in \ gsubtst5.ok \ gsubtst6.awk \ gsubtst6.ok \ gsubtst7.awk \ gsubtst7.in \ gsubtst7.ok \ gsubtst8.awk \ gsubtst8.in \ gsubtst8.ok \ gtlnbufv.awk \ hex.awk \ hex.ok \ hsprint.awk \ hsprint.ok \ icasefs.awk \ icasefs.ok \ icasers.awk \ icasers.in \ icasers.ok \ igncdym.awk \ igncdym.in \ igncdym.ok \ igncfs.awk \ igncfs.in \ igncfs.ok \ ignrcase.awk \ ignrcase.in \ ignrcase.ok \ ignrcas2.awk \ ignrcas2.ok \ indirectcall.awk \ indirectcall.in \ indirectcall.ok \ inftest.awk \ inftest.ok \ inputred.awk \ inputred.ok \ intest.awk \ intest.ok \ intformat.awk \ intformat.ok \ intprec.awk \ intprec.ok \ iobug1.awk \ iobug1.ok \ lc_num1.awk \ lc_num1.ok \ leaddig.awk \ leaddig.ok \ leadnl.awk \ leadnl.in \ leadnl.ok \ lint.awk \ lint.ok \ lintold.awk \ lintold.in \ lintold.ok \ lintwarn.awk \ lintwarn.ok \ litoct.awk \ litoct.ok \ localenl.ok \ localenl.sh \ longdbl.awk \ longdbl.in \ longdbl.ok \ longsub.awk \ longsub.in \ longsub.ok \ longwrds.awk \ longwrds.ok \ longwrds.in \ manglprm.awk \ manglprm.in \ manglprm.ok \ manyfiles.awk \ manyfiles.ok \ match1.awk \ match1.ok \ match2.awk \ match2.ok \ match3.awk \ match3.in \ match3.ok \ math.awk \ math.ok \ mbfw1.awk \ mbfw1.in \ mbfw1.ok \ mbprintf1.awk \ mbprintf1.in \ mbprintf1.ok \ mbprintf2.awk \ mbprintf2.ok \ mbprintf3.awk \ mbprintf3.in \ mbprintf3.ok \ mbstr1.awk \ mbstr1.ok \ membug1.awk \ membug1.in \ membug1.ok \ messages.awk \ minusstr.awk \ minusstr.ok \ mixed1.ok \ mmap8k.in \ mtchi18n.awk \ mtchi18n.in \ mtchi18n.ok \ nasty.awk \ 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 \ nfneg.awk \ nfneg.ok \ nfset.awk \ nfset.in \ nfset.ok \ nlfldsep.awk \ nlfldsep.in \ nlfldsep.ok \ nlinstr.awk \ nlinstr.in \ nlinstr.ok \ nlstrina.awk \ nlstrina.ok \ noeffect.awk \ noeffect.ok \ nofile.ok \ nofmtch.awk \ nofmtch.ok \ noloop1.awk \ noloop1.in \ noloop1.ok \ noloop2.awk \ noloop2.in \ noloop2.ok \ nondec.awk \ nondec.ok \ nondec2.awk \ nondec2.ok \ nonl.awk \ nonl.ok \ noparms.awk \ noparms.ok \ nors.in \ nors.ok \ nulrsend.awk \ nulrsend.in \ nulrsend.ok \ numindex.awk \ numindex.in \ numindex.ok \ numsubstr.awk \ numsubstr.in \ numsubstr.ok \ octsub.awk \ octsub.ok \ ofmt.awk \ ofmt.in \ ofmt.ok \ ofmta.awk \ ofmta.ok \ ofmtbig.awk \ ofmtbig.in \ ofmtbig.ok \ ofmtfidl.awk \ ofmtfidl.in \ ofmtfidl.ok \ ofmts.awk \ ofmts.in \ ofmts.ok \ onlynl.awk \ onlynl.in \ onlynl.ok \ opasnidx.awk \ opasnidx.ok \ opasnslf.awk \ opasnslf.ok \ out1.ok \ out2.ok \ out3.ok \ paramdup.awk \ paramdup.ok \ paramres.awk \ paramres.ok \ paramtyp.awk \ paramtyp.ok \ parse1.awk \ parse1.in \ parse1.ok \ parsefld.awk \ parsefld.in \ parsefld.ok \ parseme.awk \ parseme.ok \ patsplit.awk \ patsplit.ok \ pcntplus.awk \ pcntplus.ok \ pid.awk \ pid.ok \ pid.sh \ pipeio1.awk \ pipeio1.ok \ pipeio2.awk \ pipeio2.in \ pipeio2.ok \ posix.awk \ posix.in \ posix.ok \ posix2008sub.awk \ posix2008sub.ok \ poundbang.awk \ prdupval.awk \ prdupval.in \ prdupval.ok \ profile2.ok \ profile3.awk \ profile3.ok \ prec.awk \ prec.ok \ printf0.awk \ printf0.ok \ printf1.awk \ printf1.ok \ printfbad1.awk \ printfbad1.ok \ printfbad2.awk \ printfbad2.in \ printfbad2.ok \ printfbad3.awk \ printfbad3.ok \ printfloat.awk \ printlang.awk \ prmarscl.awk \ prmarscl.ok \ prmreuse.awk \ prmreuse.ok \ procinfs.awk \ procinfs.ok \ prt1eval.awk \ prt1eval.ok \ prtoeval.awk \ prtoeval.ok \ pty1.awk \ pty1.ok \ rand.awk \ rand.ok \ range1.awk \ range1.in \ range1.ok \ rebt8b1.awk \ rebt8b1.ok \ rebt8b2.awk \ rebt8b2.ok \ redfilnm.awk \ redfilnm.in \ redfilnm.ok \ regeq.awk \ regeq.in \ regeq.ok \ regrange.awk \ regrange.ok \ regtest.sh \ regx8bit.awk \ regx8bit.ok \ rebuf.awk \ rebuf.in \ rebuf.ok \ reindops.awk \ reindops.in \ reindops.ok \ reint.awk \ reint.in \ reint.ok \ reint2.awk \ reint2.in \ reint2.ok \ reparse.awk \ reparse.in \ reparse.ok \ resplit.awk \ resplit.in \ resplit.ok \ rri1.awk \ rri1.in \ rri1.ok \ rs.awk \ rs.in \ rs.ok \ rsnul1nl.awk \ rsnul1nl.in \ rsnul1nl.ok \ rsnulbig.ok \ rsnulbig2.ok \ rsstart1.awk \ rsstart1.in \ rsstart1.ok \ rsstart2.awk \ rsstart2.ok \ rsstart3.ok \ rstest1.awk \ rstest1.ok \ rstest2.awk \ rstest2.ok \ rstest3.awk \ rstest3.ok \ rstest4.awk \ rstest4.ok \ rstest5.awk \ rstest5.ok \ rstest6.awk \ rstest6.in \ rstest6.ok \ rswhite.awk \ rswhite.in \ rswhite.ok \ rtlen.ok \ rtlen.sh \ rtlen01.ok \ rtlen01.sh \ scalar.awk \ scalar.ok \ sclforin.awk \ sclforin.ok \ sclifin.awk \ sclifin.ok \ shadow.awk \ shadow.ok \ sort1.awk \ 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 \ splitarr.awk \ splitarr.ok \ splitdef.awk \ splitdef.ok \ splitvar.awk \ splitvar.in \ splitvar.ok \ splitwht.awk \ splitwht.ok \ sprintfc.awk \ sprintfc.in \ sprintfc.ok \ strcat1.awk \ strcat1.ok \ strtod.awk \ strtod.in \ strtod.ok \ strnum1.awk \ strnum1.ok \ strtonum.awk \ strtonum.ok \ strftime.awk \ strftlng.awk \ strftlng.ok \ subamp.awk \ subamp.in \ subamp.ok \ subi18n.awk \ subi18n.ok \ subsepnm.awk \ subsepnm.ok \ subslash.awk \ subslash.ok \ substr.awk \ substr.ok \ swaplns.awk \ swaplns.in \ swaplns.ok \ switch2.awk \ switch2.ok \ synerr1.awk \ synerr1.ok \ synerr2.awk \ synerr2.ok \ tradanch.awk \ tradanch.in \ tradanch.ok \ tweakfld.awk \ tweakfld.in \ tweakfld.ok \ uninit2.awk \ uninit2.ok \ uninit3.awk \ uninit3.ok \ uninit4.awk \ uninit4.ok \ uninit5.awk \ uninit5.ok \ uninitialized.awk \ uninitialized.ok \ unterm.awk \ unterm.ok \ uparrfs.awk \ uparrfs.in \ uparrfs.ok \ wideidx.awk \ wideidx.in \ wideidx.ok \ wideidx2.awk \ wideidx2.ok \ widesub.awk \ widesub.ok \ widesub2.awk \ widesub2.ok \ widesub3.awk \ widesub3.in \ widesub3.ok \ widesub4.awk \ widesub4.ok \ wjposer1.awk \ wjposer1.in \ wjposer1.ok \ xref.awk \ xref.original \ zero2.awk \ zero2.ok \ zeroe0.awk \ zeroe0.ok \ zeroflag.awk \ zeroflag.ok TESTS_WE_ARE_NOT_DOING_YET_FIXME_ONE_DAY = longdbl # Get rid of core files when cleaning and generated .ok file CLEANFILES = core core.* fmtspcl.ok # 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 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 \ 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 = \ 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 = 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 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc # List of the tests which should be run with --lint option: 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 CMP = cmp AWKPROG = ../gawk$(EXEEXT) PGAWKPROG = ../pgawk$(EXEEXT) PGAWK = LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} $(PGAWKPROG) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/Maketests $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am # Message stuff is to make it a little easier to follow. # Make the pass-fail last and dependent on others to avoid # spurious errors if `make -j' in effect. check: msg \ printlang \ basic-msg-start basic basic-msg-end \ unix-msg-start unix-tests unix-msg-end \ extend-msg-start gawk-extensions extend-msg-end \ machine-msg-start machine-tests machine-msg-end \ charset-msg-start charset-tests charset-msg-end @$(MAKE) pass-fail basic: $(BASIC_TESTS) unix-tests: $(UNIX_TESTS) gawk-extensions: $(GAWK_EXT_TESTS) charset-tests: $(LOCALE_CHARSET_TESTS) extra: $(EXTRA_TESTS) inet inet: inetmesg $(INET_TESTS) machine-tests: $(MACHINE_TESTS) msg:: @echo '' @echo 'Any output from "cmp" is bad news, although some differences' @echo 'in floating point values are probably benign -- in particular,' @echo 'some systems may omit a leading zero and the floating point' @echo 'precision may lead to slightly different output in a few cases.' printlang:: @$(AWK) -f $(srcdir)/printlang.awk basic-msg-start: @echo "======== Starting basic tests ========" basic-msg-end: @echo "======== Done with basic tests ========" unix-msg-start: @echo "======== Starting Unix tests ========" unix-msg-end: @echo "======== Done with Unix tests ========" extend-msg-start: @echo "======== Starting gawk extension tests ========" extend-msg-end: @echo "======== Done with gawk extension tests ========" machine-msg-start: @echo "======== Starting machine-specific tests ========" machine-msg-end: @echo "======== Done with machine-specific tests ========" charset-msg-start: @echo "======== Starting tests that can vary based on character set or locale support ========" charset-msg-end: @echo "======== Done with tests that can vary based on character set or locale support ========" lc_num1: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # This test is a PITA because increasingly, /tmp is getting # mounted noexec. So, we'll test it locally. Sigh. # # More PITA; some systems have medium short limits on #! paths, # so this can still fail poundbang:: @echo $@ @sed "s;/tmp/gawk;`pwd`/$(AWKPROG);" < $(srcdir)/poundbang.awk > ./_pbd.awk @chmod +x ./_pbd.awk @if ./_pbd.awk $(srcdir)/poundbang.awk > _`basename $@` ; \ then : ; \ else \ sed "s;/tmp/gawk;../$(AWKPROG);" < $(srcdir)/poundbang.awk > ./_pbd.awk ; \ chmod +x ./_pbd.awk ; \ LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} ./_pbd.awk $(srcdir)/poundbang.awk > _`basename $@`; \ fi @-$(CMP) $(srcdir)/poundbang.awk _`basename $@` && rm -f _`basename $@` _pbd.awk messages:: @echo $@ @$(AWK) -f $(srcdir)/messages.awk >out2 2>out3 @-$(CMP) $(srcdir)/out1.ok out1 && $(CMP) $(srcdir)/out2.ok out2 && $(CMP) $(srcdir)/out3.ok out3 && rm -f out1 out2 out3 argarray:: @echo $@ @case $(srcdir) in \ .) : ;; \ *) cp $(srcdir)/argarray.in . ;; \ esac @TEST=test echo just a test | $(AWK) -f $(srcdir)/argarray.awk ./argarray.in - >_$@ @case $(srcdir) in \ .) : ;; \ *) rm -f ./argarray.in ;; \ esac @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regtest:: @echo 'Some of the output from regtest is very system specific, do not' @echo 'be distressed if your output differs from that distributed.' @echo 'Manual inspection is called for.' AWK=$(AWKPROG) $(srcdir)/regtest.sh manyfiles:: @echo manyfiles @rm -rf junk @mkdir junk @$(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 _$@ compare:: @echo $@ @$(AWK) -f $(srcdir)/compare.awk 0 1 $(srcdir)/compare.in >_$@ @-$(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)/$@.ok _$@ && rm -f _$@ getline2:: @echo $@ @$(AWK) -f $(srcdir)/getline2.awk $(srcdir)/getline2.awk $(srcdir)/getline2.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ awkpath:: @echo $@ @AWKPATH="$(srcdir)$(PATH_SEPARATOR)$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ argtest:: @echo $@ @$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ badargs:: @echo $@ @-$(AWK) -f 2>&1 | grep -v patchlevel >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nonl:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1 @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strftime:: @echo This test could fail on slow machines or on a minute boundary, @echo so if it does, double check the actual results: @echo $@ @GAWKLOCALE=C; export GAWKLOCALE; \ TZ=GMT0; export TZ; \ (LC_ALL=C date) | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk @-$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 litoct:: @echo $@ @echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ devfd:: @echo $@ @$(AWK) 1 /dev/fd/4 /dev/fd/5 4<$(srcdir)/devfd.in4 5<$(srcdir)/devfd.in5 >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fflush:: @echo $@ @$(srcdir)/fflush.sh >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ tweakfld:: @echo $@ @$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@ @rm -f errors.cleanup @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mmap8k:: @echo $@ @$(AWK) '{ print }' $(srcdir)/mmap8k.in >_$@ @-$(CMP) $(srcdir)/mmap8k.in _$@ && rm -f _$@ tradanch:: @echo $@ @$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # AIX /bin/sh exec's the last command in a list, therefore issue a ":" # command so that pid.sh is fork'ed as a child before being exec'ed. pid:: @echo pid @AWKPATH=$(srcdir) AWK=$(AWKPROG) $(SHELL) $(srcdir)/pid.sh $$$$ > _`basename $@` ; : @-$(CMP) $(srcdir)/pid.ok _`basename $@` && rm -f _`basename $@` strftlng:: @echo $@ @TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ @if $(CMP) $(srcdir)/strftlng.ok _$@ >/dev/null 2>&1 ; then : ; else \ TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi @-$(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)/$@.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 fmtspcl: fmtspcl.ok @echo fmtspcl @$(AWK) -f $(srcdir)/fmtspcl.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $@.ok _$@ && rm -f _$@ reint:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pipeio1:: @echo $@ @$(AWK) -f $(srcdir)/pipeio1.awk >_$@ @rm -f test1 test2 @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pipeio2:: @echo $@ @$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clobber:: @echo $@ @$(AWK) -f $(srcdir)/clobber.awk >_$@ @-$(CMP) $(srcdir)/clobber.ok seq && $(CMP) $(srcdir)/clobber.ok _$@ && rm -f _$@ @rm -f seq arynocls:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -v INPUT=$(srcdir)/arynocls.in -f arynocls.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlnbuf:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -f getlnbuf.awk $(srcdir)/getlnbuf.in > _$@ @-AWKPATH=$(srcdir) $(AWK) -f gtlnbufv.awk $(srcdir)/getlnbuf.in > _2$@ @-$(CMP) $(srcdir)/getlnbuf.ok _$@ && $(CMP) $(srcdir)/getlnbuf.ok _2$@ && rm -f _$@ _2$@ inetmesg:: @echo These tests only work if your system supports the services @echo "'discard'" at port 9 and "'daytimed'" at port 13. Check your @echo file /etc/services and do "'netstat -a'". inetechu:: @echo This test is for establishing UDP connections @$(AWK) 'BEGIN {print "" |& "/inet/udp/0/127.0.0.1/9"}' inetecht:: @echo This test is for establishing TCP connections @$(AWK) 'BEGIN {print "" |& "/inet/tcp/0/127.0.0.1/9"}' inetdayu:: @echo This test is for bidirectional UDP transmission @$(AWK) 'BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13"; \ "/inet/udp/0/127.0.0.1/13" |& getline; print $0}' inetdayt:: @echo This test is for bidirectional TCP transmission @$(AWK) 'BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13"; \ "/inet/tcp/0/127.0.0.1/13" |& getline; print $0}' redfilnm:: @echo $@ @$(AWK) -f $(srcdir)/redfilnm.awk srcdir=$(srcdir) $(srcdir)/redfilnm.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ leaddig:: @echo $@ @$(AWK) -v x=2E -f $(srcdir)/leaddig.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst3:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ space:: @echo $@ @$(AWK) -f ' ' $(srcdir)/space.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printf0:: @echo $@ @$(AWK) --posix -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsnulbig:: @echo $@ @ : Suppose that block size for pipe is at most 128kB: @$(AWK) 'BEGIN { for (i = 1; i <= 128*64+1; i++) print "abcdefgh123456\n" }' 2>&1 | \ $(AWK) 'BEGIN { RS = ""; ORS = "\n\n" }; { print }' 2>&1 | \ $(AWK) '/^[^a]/; END{ print NR }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsnulbig2:: @echo $@ @$(AWK) 'BEGIN { ORS = ""; n = "\n"; for (i = 1; i <= 10; i++) n = (n n); \ for (i = 1; i <= 128; i++) print n; print "abc\n" }' 2>&1 | \ $(AWK) 'BEGIN { RS = ""; ORS = "\n\n" };{ print }' 2>&1 | \ $(AWK) '/^[^a]/; END { print NR }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ wideidx:: @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 _$@ wideidx2:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ widesub:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ widesub2:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ widesub3:: @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 _$@ widesub4:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ignrcas2:: @echo $@ @GAWKLOCALE=en_US ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subamp:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # This test makes sure gawk exits with a zero code. # Thus, unconditionally generate the exit code. exitval1:: @echo $@ @$(AWK) -f $(srcdir)/exitval1.awk >_$@ 2>&1; echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsspcoln:: @echo $@ @$(AWK) -f $(srcdir)/$@.awk 'FS=[ :]+' $(srcdir)/$@.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsstart1:: @echo $@ @$(AWK) -f $(srcdir)/$@.awk $(srcdir)/rsstart1.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsstart2:: @echo $@ @$(AWK) -f $(srcdir)/$@.awk $(srcdir)/rsstart1.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsstart3:: @echo $@ @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 >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nofile:: @echo $@ @$(AWK) '{}' no/such/file >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ binmode1:: @echo $@ @$(AWK) -v BINMODE=3 'BEGIN { print BINMODE }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subi18n:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; $(AWK) -f $(srcdir)/$@.awk > _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat4:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in > _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ devfd1:: @echo $@ @$(AWK) -f $(srcdir)/$@.awk 4< $(srcdir)/devfd.in1 5< $(srcdir)/devfd.in2 >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # The program text is the '1' which will print each record. How compact can you get? devfd2:: @echo $@ @$(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 _$@ mixed1:: @echo $@ @$(AWK) -f /dev/null --source 'BEGIN {return junk}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mtchi18n:: @echo $@ @GAWKLOCALE=ru_RU.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ reint2:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) --re-interval -f $@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ localenl:: @echo $@ @$(srcdir)/$@.sh >_$@ 2>/dev/null @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mbprintf1:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mbprintf2:: @echo $@ @GAWKLOCALE=ja_JP.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mbprintf3:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mbfw1:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst6:: @echo $@ @GAWKLOCALE=C ; $(AWK) -f $(srcdir)/$@.awk > _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mbstr1:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printfbad2: printfbad2.ok @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: @echo addcomma @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ anchgsub: @echo anchgsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayparm: @echo arrayparm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayprm2: @echo arrayprm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayprm3: @echo arrayprm3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayref: @echo arrayref @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrymem1: @echo arrymem1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref2: @echo arryref2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref3: @echo arryref3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref4: @echo arryref4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref5: @echo arryref5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arynasty: @echo arynasty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm1: @echo aryprm1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm2: @echo aryprm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm3: @echo aryprm3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm4: @echo aryprm4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm5: @echo aryprm5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm6: @echo aryprm6 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm7: @echo aryprm7 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm8: @echo aryprm8 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arysubnm: @echo arysubnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asgext: @echo asgext @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ back89: @echo back89 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ backgsub: @echo backgsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ childin: @echo childin @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ closebad: @echo closebad @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clsflnam: @echo clsflnam @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ compare2: @echo compare2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat1: @echo concat1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat2: @echo concat2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat3: @echo concat3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ convfmt: @echo convfmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ datanonl: @echo datanonl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ defref: @echo defref @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ delarprm: @echo delarprm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ delfunc: @echo delfunc @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ eofsplit: @echo eofsplit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ exitval2: @echo exitval2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fcall_exit: @echo fcall_exit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fcall_exit2: @echo fcall_exit2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fldchg: @echo fldchg @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fldchgnf: @echo fldchgnf @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnamedat: @echo fnamedat @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarray: @echo fnarray @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarray2: @echo fnarray2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnaryscl: @echo fnaryscl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnasgnm: @echo fnasgnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnmisc: @echo fnmisc @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fordel: @echo fordel @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ forref: @echo forref @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ forsimp: @echo forsimp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsbs: @echo fsbs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsrs: @echo fsrs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fstabplus: @echo fstabplus @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funsemnl: @echo funsemnl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funsmnam: @echo funsmnam @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funstack: @echo funstack @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline: @echo getline @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline3: @echo getline3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getnr2tm: @echo getnr2tm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubasgn: @echo gsubasgn @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtest: @echo gsubtest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst2: @echo gsubtst2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst4: @echo gsubtst4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst5: @echo gsubtst5 @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ hsprint: @echo hsprint @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ inputred: @echo inputred @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ intest: @echo intest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ intprec: @echo intprec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ iobug1: @echo iobug1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ leadnl: @echo leadnl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ longsub: @echo longsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ longwrds: @echo longwrds @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ manglprm: @echo manglprm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ math: @echo math @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ membug1: @echo membug1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ minusstr: @echo minusstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nasty: @echo nasty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nasty2: @echo nasty2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ negexp: @echo negexp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfldstr: @echo nfldstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfneg: @echo nfneg @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfset: @echo nfset @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlfldsep: @echo nlfldsep @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlinstr: @echo nlinstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlstrina: @echo nlstrina @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noeffect: @echo noeffect @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nofmtch: @echo nofmtch @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noloop1: @echo noloop1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noloop2: @echo noloop2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noparms: @echo noparms @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nulrsend: @echo nulrsend @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ numindex: @echo numindex @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ numsubstr: @echo numsubstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ octsub: @echo octsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmt: @echo ofmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmtfidl: @echo ofmtfidl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmts: @echo ofmts @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ onlynl: @echo onlynl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ opasnidx: @echo opasnidx @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ opasnslf: @echo opasnslf @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramdup: @echo paramdup @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramres: @echo paramres @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramtyp: @echo paramtyp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ parse1: @echo parse1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ parsefld: @echo parsefld @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ parseme: @echo parseme @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pcntplus: @echo pcntplus @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prdupval: @echo prdupval @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prec: @echo prec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printf1: @echo printf1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prmarscl: @echo prmarscl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prmreuse: @echo prmreuse @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prt1eval: @echo prt1eval @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prtoeval: @echo prtoeval @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regeq: @echo regeq @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ reparse: @echo reparse @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ resplit: @echo resplit @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rs: @echo rs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsnul1nl: @echo rsnul1nl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest1: @echo rstest1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest2: @echo rstest2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest3: @echo rstest3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest4: @echo rstest4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest5: @echo rstest5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rswhite: @echo rswhite @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ scalar: @echo scalar @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sclforin: @echo sclforin @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sclifin: @echo sclifin @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sortempty: @echo sortempty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitargv: @echo splitargv @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitarr: @echo splitarr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitdef: @echo splitdef @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitvar: @echo splitvar @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitwht: @echo splitwht @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strcat1: @echo strcat1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strnum1: @echo strnum1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strtod: @echo strtod @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subsepnm: @echo subsepnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subslash: @echo subslash @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ substr: @echo substr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ swaplns: @echo swaplns @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ synerr1: @echo synerr1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ synerr2: @echo synerr2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit2: @echo uninit2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit3: @echo uninit3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit4: @echo uninit4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit5: @echo uninit5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninitialized: @echo uninitialized @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ unterm: @echo unterm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uparrfs: @echo uparrfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ wjposer1: @echo wjposer1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zero2: @echo zero2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zeroe0: @echo zeroe0 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zeroflag: @echo zeroflag @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlnhd: @echo getlnhd @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clos1way: @echo clos1way @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funlen: @echo funlen @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fwtest: @echo fwtest @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fwtest2: @echo fwtest2 @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gensub2: @echo gensub2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlndir: @echo getlndir @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnuops2: @echo gnuops2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnuops3: @echo gnuops3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnureops: @echo gnureops @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ icasefs: @echo icasefs @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ icasers: @echo icasers @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ igncdym: @echo igncdym @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ igncfs: @echo igncfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ignrcase: @echo ignrcase @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ lintold: @echo lintold @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ match2: @echo match2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ match3: @echo match3 @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printfbad1: @echo printfbad1 @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regx8bit: @echo regx8bit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest6: @echo rstest6 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ shadow: @echo shadow @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ double2: @echo double2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ intformat: @echo intformat @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asort: @echo asort @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asorti: @echo asorti @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fmttest: @echo fmttest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarydel: @echo fnarydel @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnparydl: @echo fnparydl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rebt8b2: @echo rebt8b2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sort1: @echo sort1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sprintfc: @echo sprintfc @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # end of file Maketests # Targets generated for other tests: $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests files=`cd "$(srcdir)" && echo *.awk *.in`; \ $(AWK) -f $(srcdir)/Gentests "$(srcdir)/Makefile.am" $$files > $(srcdir)/Maketests clean: rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ # An attempt to print something that can be grepped for in build logs pass-fail: @COUNT=`ls _* 2>/dev/null | wc -l` ; \ if test $$COUNT = 0 ; \ then echo ALL TESTS PASSED ; \ else echo $$COUNT TESTS FAILED ; \ fi # This target for my convenience to look at all the results diffout: for i in _* ; \ do \ if [ "$$i" != "_*" ]; then \ echo ============== $$i ============= ; \ if [ -r $${i#_}.ok ]; then \ diff -c $${i#_}.ok $$i ; \ else \ diff -c $(srcdir)/$${i#_}.ok $$i ; \ fi ; \ fi ; \ done | more # convenient way to scan valgrind results for errors valgrind-scan: @echo "Scanning valgrind log files for problems:" @$(AWK) '\ function show() {if (cmd) {printf "%s: %s\n",FILENAME,cmd; cmd = ""}; \ printf "\t%s\n",$$0}; \ {$$1 = ""}; \ /Prog and args are:/ {incmd = 1; cmd = ""; next}; \ incmd {if (NF == 1) incmd = 0; else {cmd = (cmd $$0); next}}; \ /ERROR SUMMARY:/ && !/: 0 errors from 0 contexts/ {show()}; \ /definitely lost:/ && !/: 0 bytes in 0 blocks/ {show()}; \ /possibly lost:/ && !/: 0 bytes in 0 blocks/ {show()}; \ / suppressed:/ && !/: 0 bytes in 0 blocks/ {show()}; \ ' log.[0-9]* # This target is for testing with electric fence. efence: for i in $$(ls _* | sed 's;_\(.*\);\1;') ; \ do \ bad=$$(wc -l < _$$i) \ ok=$$(wc -l < $$i.ok) ; \ if (( $$bad == $$ok + 2 )) ; \ then \ rm _$$i ; \ fi ; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gawk-4.0.1+dfsg.orig/test/sprintfc.awk0000644000175000017500000000004011463242060016650 0ustar schotschot{ print sprintf("%c", $1), $1 } gawk-4.0.1+dfsg.orig/test/strtonum.awk0000644000175000017500000000014311463242060016717 0ustar schotschotBEGIN { print strtonum("0x13") print strtonum("013") print strtonum("13") print strtonum(13) } gawk-4.0.1+dfsg.orig/test/exit.sh0000755000175000017500000000304311561754171015644 0ustar schotschot#!/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" gawk-4.0.1+dfsg.orig/test/nasty.awk0000644000175000017500000000603311463242060016166 0ustar schotschot#From hankedr@manatee.dms.auburn.edu Tue Oct 13 22:15:59 1998 #Return-Path: #Received: from cssun.mathcs.emory.edu (cssun.mathcs.emory.edu [170.140.150.1]) # by dmx.netvision.net.il (8.9.0.Beta5/8.8.6) with ESMTP id PAA03924 # for ; Tue, 13 Oct 1998 15:32:13 +0200 (IST) #Received: from mescaline.gnu.org (we-refuse-to-spy-on-our-users@mescaline.gnu.org [158.121.106.21]) by cssun.mathcs.emory.edu (8.7.5/8.6.9-940818.01cssun) with ESMTP id KAA11644 for ; Tue, 13 Oct 1998 10:22:32 -0400 (EDT) #Received: from manatee.dms.auburn.edu (manatee.dms.auburn.edu [131.204.53.104]) # by mescaline.gnu.org (8.9.1a/8.9.1) with ESMTP id KAA03250 # for ; Tue, 13 Oct 1998 10:25:32 -0400 #Received: (from hankedr@localhost) # by manatee.dms.auburn.edu (8.9.1a/8.9.1) id JAA13348; # Tue, 13 Oct 1998 09:22:29 -0500 (CDT) #Date: Tue, 13 Oct 1998 09:22:29 -0500 (CDT) #Message-Id: <199810131422.JAA13348@manatee.dms.auburn.edu> #From: Darrel Hankerson #To: arnold@gnu.org #In-reply-to: <199810131313.QAA31784@alpha.netvision.net.il> (message from # Aharon Robbins on Tue, 13 Oct 1998 16:10:36 +0200) #Subject: Re: full text of bug report? #Mime-Version: 1.0 #Content-Type: text/plain; charset=US-ASCII #X-UIDL: bf3fce492dad4ab030c561e7b2f27d0a #Status: RO # # Do you have the full text of the a = a "\n" f() bug report? # I can't find it.... I'm not sure there really is a bug. # #Yes, see below. # #His example has unnecessary fragments (in particular, the use of #gensub is irrelevant). As I wrote to you earlier, the interesting #question for me is: # # Is the concatenation result undefined? If the result is defined or # implementation-dependent, then gawk has a bug. # # #=== Original report ===================================================== #From: Attila Torcsvari #To: "'bug-gnu-utils@prep.ai.mit.edu'" #Subject: gawk 3.0.3 bug #Date: Thu, 17 Sep 1998 18:12:13 +0200 #MIME-Version: 1.0 #Content-Transfer-Encoding: 7bit #Resent-From: bug-gnu-utils@gnu.org #X-Mailing-List: archive/latest/3396 #X-Loop: bug-gnu-utils@gnu.org #Precedence: list #Resent-Sender: bug-gnu-utils-request@gnu.org #Content-Transfer-Encoding: 7bit #Content-Type: text/plain; charset="us-ascii" #Content-Length: 618 # #Bug-gnuers, #please pass it to the responsible. # #The following generates something interesting: # BEGIN{ a="aaaaa" a=a a #10 a=a a #20 a=a a #40 a=a a #80 a=a a #160 a=a a # i.e. a is long enough a=a"\n"f() # this causes the trouble print a # guess the result } function f() { #print "a before: ", a #a=gensub("a","123,","g",a) # 'a' will be just a bit longer (4 times, but still should fit: 4*160=640) gsub(/a/, "123", a) #print "a after: ", a return "X" } # #Possible reason: #during f the a is modified, #it can be even freed, because gensub modifies its size #the printout contains trash. # #Used version: VC compiled WinNT 32 bit Intel. # #Regards, # #Attila Torcsvari #Arcanum Development # gawk-4.0.1+dfsg.orig/test/fpatnull.awk0000644000175000017500000000004111566523741016662 0ustar schotschotBEGIN { FPAT = "" } { print NF } gawk-4.0.1+dfsg.orig/test/delargv.ok0000644000175000017500000000010511563553674016316 0ustar schotschotlength of ARGV[0] is 4 length of ARGV[1] is 9 length of ARGV[3] is 9 gawk-4.0.1+dfsg.orig/test/asort.ok0000644000175000017500000000043211463242060016004 0ustar schotschota[1] = "Alligator" a[2] = "Iguana" a[3] = "Nouns" a[4] = "aardvark" a[5] = "animal" a[6] = "people" a[7] = "zebra" a[8] = "zoo" ============ a[1] = "aardvark" a[2] = "Alligator" a[3] = "animal" a[4] = "Iguana" a[5] = "Nouns" a[6] = "people" a[7] = "zebra" a[8] = "zoo" ============ gawk-4.0.1+dfsg.orig/test/noparms.awk0000644000175000017500000000003311463242060016501 0ustar schotschotfunction x(a, b, c , ,) {} gawk-4.0.1+dfsg.orig/test/strnum1.ok0000644000175000017500000000001711463242060016264 0ustar schotschot8 = 8 88 = 88 gawk-4.0.1+dfsg.orig/test/nasty.ok0000644000175000017500000000050311463242060016011 0ustar schotschotaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X gawk-4.0.1+dfsg.orig/test/nfldstr.in0000644000175000017500000000000111463242060016315 0ustar schotschot gawk-4.0.1+dfsg.orig/test/manglprm.awk0000644000175000017500000000211111463242060016636 0ustar schotschot# From beebe@sunshine.math.utah.edu Thu Jul 10 00:36:16 2003 # Date: Wed, 9 Jul 2003 06:42:54 -0600 (MDT) # From: "Nelson H. F. Beebe" # To: "Arnold Robbins" # Cc: beebe@math.utah.edu # X-US-Mail: "Center for Scientific Computing, Department of Mathematics, 110 # LCB, University of Utah, 155 S 1400 E RM 233, Salt Lake City, UT # 84112-0090, USA" # X-Telephone: +1 801 581 5254 # X-FAX: +1 801 585 1640, +1 801 581 4148 # X-URL: http://www.math.utah.edu/~beebe # Subject: gawk-3.1.3 (and earlier): reproducible core dump # X-SpamBouncer: 1.4 (10/07/01) # X-SBClass: OK # # I have a reproducible core dump in gawk-3.1.3, and recent gawk # versions. # # Consider the following test program, reduced from a much larger one: # # % cat gawk-dump.awk { process($0) } function out_debug(s) { print s } function process(s, n,parts) { out_debug("Buffer = [" protect(Buffer) "]") Buffer = Buffer s n = split(Buffer,parts,"\n") } function protect(s) { gsub("\n", "\\n", s) return (s) } gawk-4.0.1+dfsg.orig/test/noeffect.awk0000644000175000017500000000005311463242060016615 0ustar schotschotBEGIN { s == "hello, world"; s + 1 ;; } gawk-4.0.1+dfsg.orig/config.guess0000755000175000017500000012626011733031307015672 0ustar schotschot#! /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. timestamp='2006-07-02' # 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. # # 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. # # 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. # # 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. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ 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. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # 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*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in 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 then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; 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 # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *: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:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; 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/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # 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} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # 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 ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[45]) 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 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 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" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #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); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 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 ;; 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}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # 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 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-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 # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`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 exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #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; } ;; 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 exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu 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} 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 ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu 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 # sysname and nodename. 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, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; 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 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' 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; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi 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 echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) 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` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos 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 < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gawk-4.0.1+dfsg.orig/Makefile.am0000644000175000017500000001241011734665351015412 0ustar schotschot# # Makefile.am --- automake input file for gawk # # Copyright (C) 2000-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 # ## process this file with automake to produce Makefile.in # This variable insures that aclocal runs # correctly after changing configure.ac ACLOCAL_AMFLAGS = -I m4 # This insures that make flags get passed down to child makes. AM_MAKEFLAGS = 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)' # Stuff to include in the dist that doesn't need it's own # Makefile.am files EXTRA_DIST = \ ChangeLog.0 \ COPYING \ FUTURES \ INSTALL \ LIMITATIONS \ NEWS \ NEWS.0 \ POSIX.STD \ PROBLEMS \ README_d \ bisonfix.awk \ config.guess \ config.rpath \ config.sub \ depcomp \ extension \ m4 \ missing \ missing_d \ po/README \ pc \ posix \ regcomp.c \ regex_internal.c \ regex_internal.h \ regexec.c \ 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. SUBDIRS = \ . \ awklib \ doc \ po \ test # what to make and install bin_PROGRAMS = gawk pgawk dgawk # sources for both gawk and pgawk base_sources = \ array.c \ awk.h \ awkgram.y \ builtin.c \ custom.h \ dfa.c \ dfa.h \ ext.c \ field.c \ floatcomp.c \ floatmagic.h \ gawkmisc.c \ getopt.c \ getopt.h \ getopt1.c \ getopt_int.h \ gettext.h \ io.c \ mbsupport.h \ main.c \ msg.c \ node.c \ protos.h \ random.c \ random.h \ re.c \ regex.c \ regex.h \ replace.c \ version.c \ xalloc.h 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 # stuff for compiling gawk/pgawk DEFPATH='".$(PATH_SEPARATOR)$(pkgdatadir)"' DEFS= -DDEFPATH=$(DEFPATH) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"$(datadir)/locale"' # Get rid of core files when cleaning CLEANFILES = core core.* MAINTAINERCLEANFILES = version.c # We want hard links for install-exec-hook, below LN= ln # First, add a link from gawk to gawk-X.Y.Z. # Same for pgawk. # # For GNU systems where gawk is awk, add a link to awk. # (This is done universally, which may not always be right, but # there's no easy way to distinguish GNU from non-GNU systems.) install-exec-hook: (cd $(DESTDIR)$(bindir); \ $(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ $(LN) pgawk$(EXEEXT) pgawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ 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 ] && 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 # force there to be a gawk executable before running tests 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 $(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 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 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 diffout valgrind-scan: @cd test && $(MAKE) $(AM_MAKEFLAGS) $@ valgrind: cd test; rm -f log.[0-9]*; \ make check AWK="valgrind --leak-check=full --log-file=log.%p ../gawk"; \ make valgrind-scan gawk-4.0.1+dfsg.orig/replace.c0000644000175000017500000000530011670206020015114 0ustar schotschot/* * replace.c -- Get replacement versions of functions. */ /* * Copyright (C) 1989, 1991-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 */ /* * Do all necessary includes here, so that we don't have to worry about * overlapping includes in the files in missing.d. */ #include "config.h" #include "awk.h" #ifndef HAVE_SYSTEM #include "missing_d/system.c" #endif /* HAVE_SYSTEM */ #ifndef HAVE_MEMCMP #include "missing_d/memcmp.c" #endif /* HAVE_MEMCMP */ #ifndef HAVE_MEMCPY #include "missing_d/memcpy.c" #endif /* HAVE_MEMCPY */ #ifndef HAVE_MEMSET #include "missing_d/memset.c" #endif /* HAVE_MEMSET */ #ifndef HAVE_MEMMOVE #include "missing_d/memmove.c" #endif /* HAVE_MEMMOVE */ #ifndef HAVE_STRNCASECMP #include "missing_d/strncasecmp.c" #endif /* HAVE_STRCASE */ #ifndef HAVE_STRERROR #include "missing_d/strerror.c" #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 #include "missing_d/strchr.c" #endif /* HAVE_STRCHR */ #if !defined(HAVE_STRTOD) #include "missing_d/strtod.c" #endif /* HAVE_STRTOD */ #ifndef HAVE_STRTOUL #include "missing_d/strtoul.c" #endif /* HAVE_STRTOUL */ #ifndef HAVE_TZSET #include "missing_d/tzset.c" #endif /* HAVE_TZSET */ #ifndef HAVE_MKTIME /* mktime.c defines main() if DEBUG is set */ #undef DEBUG #include "missing_d/mktime.c" #endif /* HAVE_MKTIME */ #ifndef HAVE_SNPRINTF #include "missing_d/snprintf.c" #endif #if defined(HAVE_SOCKETS) && ! defined(HAVE_GETADDRINFO) #include "missing_d/getaddrinfo.c" #endif #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 gawk-4.0.1+dfsg.orig/field.c0000644000175000017500000012336211734665352014617 0ustar schotschot/* * field.c - routines for dealing with fields and record parsing */ /* * 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. * * 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 "awk.h" /* * In case that the system doesn't have isblank(). * Don't bother with autoconf ifdef junk, just force it. * See dfa.c and regex_internal.h and regcomp.c. Bleah. */ static int is_blank(int c) { return c == ' ' || c == '\t'; } 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 */ static long nf_high_water = 0; /* size of fields_arr */ static int resave_fs; static NODE *save_FS; /* save current value of FS when line is read, * to be used in deferred parsing */ static int *FIELDWIDTHS = NULL; NODE **fields_arr; /* array of pointers to the field nodes */ int field0_valid; /* $(>0) has not been changed yet */ int default_FS; /* TRUE when FS == " " */ Regexp *FS_re_yes_case = NULL; Regexp *FS_re_no_case = NULL; Regexp *FS_regexp = NULL; Regexp *FPAT_re_yes_case = NULL; Regexp *FPAT_re_no_case = NULL; Regexp *FPAT_regexp = NULL; NODE *Null_field = NULL; /* init_fields --- set up the fields array to start with */ void init_fields() { emalloc(fields_arr, NODE **, sizeof(NODE *), "init_fields"); fields_arr[0] = Nnull_string; parse_extent = fields_arr[0]->stptr; save_FS = dupnode(FS_node->var_value); getnode(Null_field); *Null_field = *Nnull_string; Null_field->flags |= FIELD; Null_field->flags &= ~(NUMCUR|NUMBER|MAYBE_NUM|PERM|MALLOC); field0_valid = TRUE; } /* grow_fields --- acquire new fields as needed */ static void grow_fields_arr(long num) { int t; NODE *n; erealloc(fields_arr, NODE **, (num + 1) * sizeof(NODE *), "grow_fields_arr"); for (t = nf_high_water + 1; t <= num; t++) { getnode(n); *n = *Null_field; fields_arr[t] = n; } nf_high_water = num; } /* set_field --- set the value of a particular field */ /*ARGSUSED*/ static void set_field(long num, char *str, long len, NODE *dummy ATTRIBUTE_UNUSED) /* just to make interface same as set_element */ { NODE *n; if (num > nf_high_water) grow_fields_arr(num); n = fields_arr[num]; n->stptr = str; n->stlen = len; n->flags = (STRCUR|STRING|MAYBE_NUM|FIELD); } /* rebuild_record --- Someone assigned a value to $(something). Fix up $0 to be right */ static void rebuild_record() { /* * use explicit unsigned longs for lengths, in case * a size_t isn't big enough. */ unsigned long tlen; unsigned long ofslen; NODE *tmp; NODE *ofs; char *ops; char *cops; long i; assert(NF != -1); tlen = 0; ofs = force_string(OFS_node->var_value); ofslen = ofs->stlen; for (i = NF; i > 0; i--) { tmp = fields_arr[i]; tmp = force_string(tmp); tlen += tmp->stlen; } tlen += (NF - 1) * ofslen; if ((long) tlen < 0) tlen = 0; emalloc(ops, char *, tlen + 2, "rebuild_record"); cops = ops; ops[0] = '\0'; for (i = 1; i <= NF; i++) { free_wstr(fields_arr[i]); tmp = fields_arr[i]; /* copy field */ if (tmp->stlen == 1) *cops++ = tmp->stptr[0]; else if (tmp->stlen != 0) { memcpy(cops, tmp->stptr, tmp->stlen); cops += tmp->stlen; } /* copy OFS */ if (i != NF) { if (ofslen == 1) *cops++ = ofs->stptr[0]; else if (ofslen != 0) { memcpy(cops, ofs->stptr, ofslen); cops += ofslen; } } } tmp = make_str_node(ops, tlen, ALREADY_MALLOCED); /* * Since we are about to unref fields_arr[0], we want to find * any fields that still point into it, and have them point * into the new field zero. This has to be done intelligently, * so that unrefing a field doesn't try to unref into the old $0. */ for (cops = ops, i = 1; i <= NF; i++) { if (fields_arr[i]->stlen > 0) { NODE *n; getnode(n); if ((fields_arr[i]->flags & FIELD) == 0) { *n = *Null_field; n->stlen = fields_arr[i]->stlen; if ((fields_arr[i]->flags & (NUMCUR|NUMBER)) != 0) { n->flags |= (fields_arr[i]->flags & (NUMCUR|NUMBER)); n->numbr = fields_arr[i]->numbr; } } else { *n = *(fields_arr[i]); n->flags &= ~(MALLOC|PERM|STRING); } n->stptr = cops; unref(fields_arr[i]); fields_arr[i] = n; assert((n->flags & WSTRCUR) == 0); } cops += fields_arr[i]->stlen + ofslen; } unref(fields_arr[0]); fields_arr[0] = tmp; field0_valid = TRUE; } /* * set_record: * setup $0, but defer parsing rest of line until reference is made to $(>0) * or to NF. At that point, parse only as much as necessary. * * Manage a private buffer for the contents of $0. Doing so keeps us safe * if `getline var' decides to rearrange the contents of the IOBUF that * $0 might have been pointing into. The cost is the copying of the buffer; * but better correct than fast. */ void set_record(const char *buf, int cnt) { NODE *n; static char *databuf; static unsigned long databuf_size; #define INITIAL_SIZE 512 #define MAX_SIZE ((unsigned long) ~0) /* maximally portable ... */ reset_record(); /* buffer management: */ if (databuf_size == 0) { /* first time */ emalloc(databuf, char *, INITIAL_SIZE, "set_record"); databuf_size = INITIAL_SIZE; memset(databuf, '\0', INITIAL_SIZE); } /* * Make sure there's enough room. Since we sometimes need * to place a sentinel at the end, we make sure * databuf_size is > cnt after allocation. */ if (cnt >= databuf_size) { while (cnt >= databuf_size && databuf_size <= MAX_SIZE) databuf_size *= 2; erealloc(databuf, char *, databuf_size, "set_record"); memset(databuf, '\0', databuf_size); } /* copy the data */ memcpy(databuf, buf, cnt); /* manage field 0: */ unref(fields_arr[0]); getnode(n); n->stptr = databuf; n->stlen = cnt; n->valref = 1; n->type = Node_val; n->stfmt = -1; n->flags = (STRING|STRCUR|MAYBE_NUM|FIELD); fields_arr[0] = n; #undef INITIAL_SIZE #undef MAX_SIZE } /* reset_record --- start over again with current $0 */ void reset_record() { int i; NODE *n; (void) force_string(fields_arr[0]); NF = -1; for (i = 1; i <= parse_high_water; i++) { unref(fields_arr[i]); getnode(n); *n = *Null_field; fields_arr[i] = n; } parse_high_water = 0; /* * $0 = $0 should resplit using the current value of FS. */ if (resave_fs) { resave_fs = FALSE; unref(save_FS); save_FS = dupnode(FS_node->var_value); } field0_valid = TRUE; } /* set_NF --- handle what happens to $0 and fields when NF is changed */ void set_NF() { int i; long nf; NODE *n; assert(NF != -1); 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); if (parse_high_water < NF) { for (i = parse_high_water + 1; i >= 0 && i <= NF; i++) { unref(fields_arr[i]); getnode(n); *n = *Null_field; fields_arr[i] = n; } } else if (parse_high_water > 0) { for (i = NF + 1; i >= 0 && i <= parse_high_water; i++) { unref(fields_arr[i]); getnode(n); *n = *Null_field; fields_arr[i] = n; } parse_high_water = NF; } field0_valid = FALSE; } /* * re_parse_field --- parse fields using a regexp. * * This is called both from get_field() and from do_split() * via (*parse_field)(). This variation is for when FS is a regular * expression -- either user-defined or because RS=="" and FS==" " */ static long re_parse_field(long up_to, /* parse only up to this field number */ char **buf, /* on input: string to parse; on output: point to start next */ int len, NODE *fs ATTRIBUTE_UNUSED, 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) { char *scan = *buf; long nf = parse_high_water; char *field; char *end = scan + len; int regex_flags = RE_NEED_START; char *sep; #if MBS_SUPPORT size_t mbclen = 0; mbstate_t mbs; if (gawk_mb_cur_max > 1) memset(&mbs, 0, sizeof(mbstate_t)); #endif if (in_middle) regex_flags |= RE_NO_BOL; if (up_to == UNLIMITED) nf = 0; if (len == 0) return nf; 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 */ #if MBS_SUPPORT if (gawk_mb_cur_max > 1) { mbclen = mbrlen(scan, end-scan, &mbs); if ((mbclen == 1) || (mbclen == (size_t) -1) || (mbclen == (size_t) -2) || (mbclen == 0)) { /* We treat it as a singlebyte character. */ mbclen = 1; } scan += mbclen; } else #endif scan++; if (scan == end) { (*set)(++nf, field, (long)(scan - field), n); up_to = nf; break; } continue; } (*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 */ (*set)(++nf, field, 0L, n); } if (nf != up_to && scan < end) { (*set)(++nf, scan, (long)(end - scan), n); scan = end; } *buf = scan; return nf; } /* * def_parse_field --- default field parsing. * * This is called both from get_field() and from do_split() * via (*parse_field)(). This variation is for when FS is a single space * character. */ static long def_parse_field(long up_to, /* parse only up to this field number */ char **buf, /* on input: string to parse; on output: point to start next */ int len, NODE *fs, Regexp *rp 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) { char *scan = *buf; long nf = parse_high_water; char *field; char *end = scan + len; char sav; char *sep; if (up_to == UNLIMITED) nf = 0; if (len == 0) return nf; /* * Nasty special case. If FS set to "", return whole record * as first field. This is not worth a separate function. */ if (fs->stlen == 0) { (*set)(++nf, *buf, len, n); *buf += len; return nf; } /* before doing anything save the char at *end */ sav = *end; /* 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 */ *end = sav; *buf = scan; return nf; } /* * posix_def_parse_field --- default field parsing. * * This is called both from get_field() and from do_split() * via (*parse_field)(). This variation is for when FS is a single space * character. The only difference between this and def_parse_field() * is that this one does not allow newlines to separate fields. */ static long posix_def_parse_field(long up_to, /* parse only up to this field number */ char **buf, /* on input: string to parse; on output: point to start next */ int len, NODE *fs, Regexp *rp 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) { char *scan = *buf; long nf = parse_high_water; char *field; char *end = scan + len; char sav; if (up_to == UNLIMITED) nf = 0; if (len == 0) return nf; /* * Nasty special case. If FS set to "", return whole record * as first field. This is not worth a separate function. */ if (fs->stlen == 0) { (*set)(++nf, *buf, len, n); *buf += len; return nf; } /* before doing anything save the char at *end */ sav = *end; /* because it will be destroyed now: */ *end = ' '; /* sentinel character */ for (; nf < up_to; scan++) { /* * special case: fs is single space, strip leading whitespace */ while (scan < end && (*scan == ' ' || *scan == '\t')) scan++; if (scan >= end) break; field = scan; while (*scan != ' ' && *scan != '\t') scan++; (*set)(++nf, field, (long)(scan - field), n); if (scan == end) break; } /* everything done, restore original char at *end */ *end = sav; *buf = scan; return nf; } /* * null_parse_field --- each character is a separate field * * This is called both from get_field() and from do_split() * via (*parse_field)(). This variation is for when FS is the null string. */ static long null_parse_field(long up_to, /* parse only up to this field number */ char **buf, /* on input: string to parse; on output: point to start next */ int len, NODE *fs ATTRIBUTE_UNUSED, 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) { char *scan = *buf; long nf = parse_high_water; char *end = scan + len; if (up_to == UNLIMITED) nf = 0; if (len == 0) return nf; #if MBS_SUPPORT if (gawk_mb_cur_max > 1) { mbstate_t mbs; memset(&mbs, 0, sizeof(mbstate_t)); for (; nf < up_to && scan < end;) { size_t mbclen = mbrlen(scan, end-scan, &mbs); if ((mbclen == 1) || (mbclen == (size_t) -1) || (mbclen == (size_t) -2) || (mbclen == 0)) { /* We treat it as a singlebyte character. */ mbclen = 1; } 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++) { if (sep_arr != NULL && nf > 0) set_element(nf, scan, 0L, sep_arr); (*set)(++nf, scan, 1L, n); } *buf = scan; return nf; } /* * sc_parse_field --- single character field separator * * This is called both from get_field() and from do_split() * via (*parse_field)(). This variation is for when FS is a single character * other than space. */ static long sc_parse_field(long up_to, /* parse only up to this field number */ char **buf, /* on input: string to parse; on output: point to start next */ int len, NODE *fs, Regexp *rp 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) { char *scan = *buf; char fschar; long nf = parse_high_water; char *field; char *end = scan + len; char sav; #if MBS_SUPPORT size_t mbclen = 0; 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 (RS_is_null && fs->stlen == 0) fschar = '\n'; else fschar = fs->stptr[0]; /* before doing anything save the char at *end */ sav = *end; /* because it will be destroyed now: */ *end = fschar; /* sentinel character */ for (; nf < up_to;) { field = scan; #if MBS_SUPPORT if (gawk_mb_cur_max > 1) { while (*scan != fschar) { mbclen = mbrlen(scan, end-scan, &mbs); if ((mbclen == 1) || (mbclen == (size_t) -1) || (mbclen == (size_t) -2) || (mbclen == 0)) { /* We treat it as a singlebyte character. */ mbclen = 1; } scan += mbclen; } } else #endif while (*scan != fschar) scan++; (*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); break; } } /* everything done, restore original char at *end */ *end = sav; *buf = scan; return nf; } /* * fw_parse_field --- field parsing using FIELDWIDTHS spec * * This is called from get_field() via (*parse_field)(). * This variation is for fields are fixed widths. */ static long fw_parse_field(long up_to, /* parse only up to this field number */ char **buf, /* on input: string to parse; on output: point to start next */ int len, NODE *fs ATTRIBUTE_UNUSED, 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) { char *scan = *buf; long nf = parse_high_water; char *end = scan + len; #if MBS_SUPPORT int nmbc; size_t mbclen; size_t mbslen; size_t lenrest; char *mbscan; mbstate_t mbs; memset(&mbs, 0, sizeof(mbstate_t)); #endif if (up_to == UNLIMITED) nf = 0; if (len == 0) return nf; for (; nf < up_to && (len = FIELDWIDTHS[nf+1]) != -1; ) { #if MBS_SUPPORT if (gawk_mb_cur_max > 1) { nmbc = 0; mbslen = 0; mbscan = scan; lenrest = end - scan; while (nmbc < len && mbslen < lenrest) { mbclen = mbrlen(mbscan, end - mbscan, &mbs); if ( mbclen == 1 || mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0) { /* We treat it as a singlebyte character. */ mbclen = 1; } if (mbclen <= end - mbscan) { mbscan += mbclen; mbslen += mbclen; ++nmbc; } } (*set)(++nf, scan, (long) mbslen, n); scan += mbslen; } else #endif { if (len > end - scan) len = end - scan; (*set)(++nf, scan, (long) len, n); scan += len; } } if (len == -1) *buf = end; else *buf = scan; 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(long requested, Func_ptr *assign) { int in_middle = FALSE; /* * if requesting whole line but some other field has been altered, * then the whole line must be rebuilt */ if (requested == 0) { if (! field0_valid) { /* first, parse remainder of input record */ if (NF == -1) { 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, (NODE *) NULL, in_middle); parse_high_water = NF; } rebuild_record(); } if (assign != NULL) *assign = reset_record; return &fields_arr[0]; } /* 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]; if (NF == -1) { /* have not yet parsed to end of record */ /* * parse up to requested fields, calling set_field() for each, * saving in parse_extent the point where the parse left off */ if (parse_high_water == 0) /* starting at the beginning */ parse_extent = fields_arr[0]->stptr; else in_middle = TRUE; parse_high_water = (*parse_field)(requested, &parse_extent, fields_arr[0]->stlen - (parse_extent - fields_arr[0]->stptr), 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 * fields so far. Note that requested might actually refer to * a field that is beyond the end of the record, but we won't * set NF to that value at this point, since this is only a * reference to the field and NF only gets set if the field * is assigned to -- this case is handled below */ if (parse_extent == fields_arr[0]->stptr + fields_arr[0]->stlen) NF = parse_high_water; 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 */ if (assign != NULL) { /* expand record */ if (requested > nf_high_water) grow_fields_arr(requested); NF = requested; parse_high_water = requested; } else return &Null_field; } return &fields_arr[requested]; } /* set_element --- set an array element, used by do_split() */ static void set_element(long num, char *s, long len, NODE *n) { NODE *it; NODE **lhs; NODE *sub; it = make_string(s, len); it->flags |= MAYBE_NUM; 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(int nargs) { NODE *src, *arr, *sep, *fs, *tmp, *sep_arr = NULL; char *s; long (*parseit)(long, char **, int, NODE *, Regexp *, Setfunc, NODE *, NODE *, int); Regexp *rp = NULL; 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")); } } sep = POP(); arr = POP_PARAM(); if (arr->type != Node_var_array) fatal(_("split: second argument is not an array")); 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. */ decr_sp(); DEREF(src); return make_number((AWKNUM) 0); } 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 = sep->re_exp; if (fs->stlen == 0) { static short warned = FALSE; parseit = null_parse_field; if (do_lint && ! warned) { warned = TRUE; lintwarn(_("split: null string for third arg is a gawk extension")); } } else if (fs->stlen == 1 && (sep->re_flags & CONSTANT) == 0) { if (fs->stptr[0] == ' ') { if (do_posix) parseit = posix_def_parse_field; else parseit = def_parse_field; } else parseit = sc_parse_field; } else { parseit = re_parse_field; rp = re_update(sep); } } s = src->stptr; tmp = make_number((AWKNUM) (*parseit)(UNLIMITED, &s, (int) src->stlen, fs, rp, set_element, arr, sep_arr, FALSE)); 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); 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; } /* set_FIELDWIDTHS --- handle an assignment to FIELDWIDTHS */ void set_FIELDWIDTHS() { char *scan; char *end; int i; static int fw_alloc = 4; static short warned = FALSE; int fatal_error = FALSE; if (do_lint && ! warned) { warned = TRUE; lintwarn(_("`FIELDWIDTHS' 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); parse_field = fw_parse_field; scan = force_string(FIELDWIDTHS_node->var_value)->stptr; if (FIELDWIDTHS == NULL) emalloc(FIELDWIDTHS, int *, fw_alloc * sizeof(int), "set_FIELDWIDTHS"); FIELDWIDTHS[0] = 0; for (i = 1; ; i++) { unsigned long int tmp; 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_error = TRUE; break; } if (*scan == '\0') break; /* Detect an invalid base-10 integer, a valid value that is followed by something other than a blank or '\0', or a value that is not in the range [1..INT_MAX]. */ errno = 0; tmp = strtoul(scan, &end, 10); if (errno != 0 || (*end != '\0' && ! is_blank(*end)) || !(0 < tmp && tmp <= INT_MAX) ) { fatal_error = TRUE; break; } FIELDWIDTHS[i] = tmp; scan = end; /* Skip past any trailing blanks. */ while (is_blank(*scan)) { ++scan; } if (*scan == '\0') break; } FIELDWIDTHS[i+1] = -1; update_PROCINFO_str("FS", "FIELDWIDTHS"); if (fatal_error) fatal(_("invalid FIELDWIDTHS value, near `%s'"), scan); } /* set_FS --- handle things when FS is assigned to */ void set_FS() { char buf[10]; NODE *fs; static NODE *save_fs = NULL; static NODE *save_rs = NULL; int remake_re = TRUE; /* * If changing the way fields are split, obey least-surprise * 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 FS = FS */ /* * This comparison can't use cmp_nodes(), which pays attention * to IGNORECASE, and that's not what we want. */ if (save_fs && FS_node->var_value->stlen == save_fs->stlen && memcmp(FS_node->var_value->stptr, save_fs->stptr, save_fs->stlen) == 0 && save_rs && RS_node->var_value->stlen == save_rs->stlen && memcmp(RS_node->var_value->stptr, save_rs->stptr, save_rs->stlen) == 0) { if (FS_regexp != NULL) FS_regexp = (IGNORECASE ? FS_re_no_case : FS_re_yes_case); /* FS = FS */ if (current_field_sep() == Using_FS) { return; } else { remake_re = FALSE; goto choose_fs_function; } } unref(save_fs); save_fs = dupnode(FS_node->var_value); unref(save_rs); save_rs = dupnode(RS_node->var_value); resave_fs = TRUE; /* If FS_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: buf[0] = '\0'; default_FS = FALSE; fs = force_string(FS_node->var_value); if (! do_traditional && fs->stlen == 0) { static short warned = FALSE; parse_field = null_parse_field; if (do_lint && ! warned) { warned = TRUE; lintwarn(_("null string for `FS' is a gawk extension")); } } else if (fs->stlen > 1) { if (do_lint_old) warning(_("old awk does not support regexps as value of `FS'")); parse_field = re_parse_field; } else if (RS_is_null) { /* we know that fs->stlen <= 1 */ parse_field = sc_parse_field; if (fs->stlen == 1) { if (fs->stptr[0] == ' ') { default_FS = TRUE; strcpy(buf, "[ \t\n]+"); } else if (fs->stptr[0] == '\\') { /* yet another special case */ strcpy(buf, "[\\\\\n]"); } else if (fs->stptr[0] != '\n') sprintf(buf, "[%c\n]", fs->stptr[0]); } } else { if (do_posix) parse_field = posix_def_parse_field; else parse_field = def_parse_field; if (fs->stlen == 1) { if (fs->stptr[0] == ' ') default_FS = TRUE; else if (fs->stptr[0] == '\\') /* same special case */ strcpy(buf, "[\\\\]"); else parse_field = sc_parse_field; } } if (remake_re) { 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, 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, 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; } /* * For FS = "c", we don't use IGNORECASE. But we must use * re_parse_field to get the character and the newline as * field separators. */ if (fs->stlen == 1 && parse_field == re_parse_field) FS_regexp = FS_re_yes_case; update_PROCINFO_str("FS", "FS"); } /* current_field_sep --- return what field separator is */ field_sep_type current_field_sep() { 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_str --- update PROCINFO[sub] with string value */ 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); } 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; } gawk-4.0.1+dfsg.orig/config.sub0000755000175000017500000007746011733031307015344 0ustar schotschot#! /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 # 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, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # 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. # 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. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." 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. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # 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* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -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) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | 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 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | 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 \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-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. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | 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-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; 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 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) 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 ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # 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* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -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* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gawk-4.0.1+dfsg.orig/bisonfix.awk0000644000175000017500000000230011463242060015663 0ustar schotschot# bisonfix.awk --- tweak awkgram.c for stupid compilers. # Copyright (C) 2005, 2009 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 BEGIN { sfile = ARGV[1] ; delete ARGV[1] } /^#if.*\\$/ { line = $0 sub(/\\$/, "", line) getline line2 while (line2 ~ /\\$/) { line = line line2 sub(/\\$/, "", line) getline line2 } line = line line2 sub(/\\$/, "", line) print line next } /^#line.*y\.tab\.c/ { sub(/y.tab/, sfile) } { print } gawk-4.0.1+dfsg.orig/eval_p.c0000644000175000017500000000171011734665352014772 0ustar schotschot/* * eval_p.c - compile eval.c with profiling 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 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 PROFILING 1 #include "eval.c" gawk-4.0.1+dfsg.orig/gettext.h0000644000175000017500000002356211504447172015217 0ustar schotschot/* Convenience header for conditional use of GNU . 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 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 Library 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 _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* ADR: Need this so gcc -g without -O works. */ #ifdef HAVE_LOCALE_H #include #endif /* HAVE_LOCALE_H */ /* Get declarations of GNU message catalog functions. */ # include /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ /* ADR: Include even if not ENABLE_NLS so can pay attention * to locale number formats, etc. */ #if defined(__sun) || defined(HAVE_LOCALE_H) # include #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include , which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include # if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H # include # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. 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)) # 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 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # undef dngettext # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # undef dcngettext # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((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 /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #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 *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #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) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); 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); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) return translation; } return (n == 1 ? msgid : msgid_plural); } #endif /* _LIBGETTEXT_H */ gawk-4.0.1+dfsg.orig/io.c0000644000175000017500000023753411734665352014152 0ustar schotschot/* * io.c --- routines for dealing with input and output and records */ /* * 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. * * 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 */ /* 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_ACCMODE #define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) #endif #ifdef HAVE_TERMIOS_H #include #endif #ifdef HAVE_STROPTS_H #include #endif #ifdef HAVE_SOCKETS #ifdef HAVE_SYS_SOCKET_H #include #else #include #endif /* HAVE_SYS_SOCKET_H */ #ifdef HAVE_NETINET_IN_H #include #ifdef HAVE_ARPA_INET_H #include #endif #else /* ! HAVE_NETINET_IN_H */ #include #endif /* HAVE_NETINET_IN_H */ #ifdef HAVE_NETDB_H #include #endif /* HAVE_NETDB_H */ #ifndef HAVE_GETADDRINFO #include "missing_d/getaddrinfo.h" #endif #ifndef AI_ADDRCONFIG /* This is a recent symbol, not everyone has it */ #define AI_ADDRCONFIG 0 #endif /* AI_ADDRCONFIG */ #ifndef HAVE_SOCKADDR_STORAGE #define sockaddr_storage sockaddr /* for older systems */ #endif /* HAVE_SOCKADDR_STORAGE */ #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 #ifdef __EMX__ #include #endif #ifndef ENFILE #define ENFILE EMFILE #endif #ifdef HAVE_SOCKETS #ifndef SHUT_RD #define SHUT_RD 0 #endif #ifndef SHUT_WR #define SHUT_WR 1 #endif #ifndef SHUT_RDWR #define SHUT_RDWR 2 #endif #endif /* HAVE_SOCKETS */ #if defined(GAWK_AIX) #undef TANDEM /* AIX defines this in one of its header files */ #endif #if defined(__DJGPP__) || defined(__MINGW32__) #define PIPES_SIMULATED #endif typedef enum { CLOSE_ALL, CLOSE_TO, CLOSE_FROM } two_way_close_type; /* 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) /* 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. */ /* This makes the code easier to manage; the buffering code is the same independent */ /* of how we find a record. Communication is via the return value: */ /* */ /* */ /* = */ typedef enum recvalues { REC_OK, /* record and terminator found, recmatch struct filled in */ NOTERM, /* no terminator found, give me more input data */ TERMATEND, /* found terminator at end of buffer */ TERMNEAREND /* found terminator close to end of buffer, for RE might be bigger */ } RECVALUE; /* Between calls to a scanning routine, the state is stored in */ /* an [[enum scanstate]] variable. Not all states apply to all */ /* variants, but the higher code doesn't really care. */ /* */ /* */ /* = */ typedef enum scanstate { NOSTATE, /* scanning not started yet (all) */ INLEADER, /* skipping leading data (RS = "") */ INDATA, /* in body of record (all) */ INTERM /* scanning terminator (RS = "", RS = regexp) */ } SCANSTATE; /* When a record is seen ([[REC_OK]] or [[TERMATEND]]), the following */ /* structure is filled in. */ /* */ /* */ /* = */ struct recmatch { char *start; /* record start */ size_t len; /* length of record */ char *rt_start; /* start of terminator */ size_t rt_len; /* length of terminator */ }; 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(int interesting); #endif 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)(IOBUF *iop, struct recmatch *recm, SCANSTATE *state) = rs1scan; static int get_a_record(char **out, IOBUF *iop, int *errcode); 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" #endif static struct redirect *red_head = NULL; static NODE *RS; static Regexp *RS_re_yes_case; static Regexp *RS_re_no_case; static Regexp *RS_regexp; int RS_is_null; extern int output_is_tty; extern NODE *ARGC_node; extern NODE *ARGV_node; extern NODE *ARGIND_node; extern NODE *ERRNO_node; extern NODE **fields_arr; #if defined(__DJGPP__) || defined(__MINGW32__) || defined(__EMX__) || defined(__CYGWIN__) /* binmode --- convert BINMODE to string for fopen */ static const char * binmode(const char *mode) { switch (mode[0]) { case 'r': if ((BINMODE & 1) != 0) mode = "rb"; break; case 'w': case 'a': if ((BINMODE & 2) != 0) mode = (mode[0] == 'w' ? "wb" : "ab"); break; } return mode; } #else #define binmode(mode) (mode) #endif #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(FILE *); static int vmsrtl_fileno(fp) FILE *fp; { return fileno(fp); } #undef fileno #define fileno(FP) (((FP) && *(FP)) ? vmsrtl_fileno(FP) : -1) #endif /* VMS */ void after_beginfile(IOBUF **curfile) { 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 */ int nextfile(IOBUF **curfile, int skipping) { static long i = 1; static int files = FALSE; NODE *arg, *tmp; static IOBUF mybuf; const char *fname; int fd = INVALID_HANDLE; int errcode; IOBUF *iop = *curfile; if (skipping) { /* for 'nextfile' call */ errcode = 0; if (iop != NULL) { errcode = iop->errcode; (void) iop_close(iop); } *curfile = NULL; return (errcode == 0); } 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++) { 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)) { files = TRUE; fname = arg->stptr; 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; 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 = "-"; 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 */ void set_FNR() { FNR = (long) FNR_node->var_value->numbr; } /* set_NR --- update internal NR from awk variable */ void set_NR() { NR = (long) NR_node->var_value->numbr; } /* inrec --- This reads in a record from the input file */ int inrec(IOBUF *iop, int *errcode) { char *begin; int cnt; int retval = 0; 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, errcode); if (cnt == EOF) { retval = 1; if (*errcode > 0) update_ERRNO_saved(*errcode); } else { NR += 1; FNR += 1; set_record(begin, cnt); } 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 iop_close(IOBUF *iop) { int ret; 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; /* * 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 = remap_std_file(iop->fd); else ret = close(iop->fd); if (iop->close_func != NULL) (*iop->close_func)(iop); if (ret == -1) warning(_("close of fd %d (`%s') failed (%s)"), iop->fd, iop->name, strerror(errno)); /* * 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. */ } efree(iop->buf); iop->buf = NULL; } if ((iop->flag & IOP_NOFREE_OBJ) == 0) efree(iop); return ret == -1 ? 1 : 0; } /* redflags2str --- turn redirection flags into a string, for debugging */ const char * redflags2str(int flags) { static const struct flagtab redtab[] = { { RED_FILE, "RED_FILE" }, { RED_PIPE, "RED_PIPE" }, { RED_READ, "RED_READ" }, { RED_WRITE, "RED_WRITE" }, { RED_APPEND, "RED_APPEND" }, { RED_NOBUF, "RED_NOBUF" }, { RED_EOF, "RED_EOF" }, { RED_TWOWAY, "RED_TWOWAY" }, { RED_PTY, "RED_PTY" }, { RED_SOCKET, "RED_SOCKET" }, { RED_TCP, "RED_TCP" }, { 0, NULL } }; return genflags2str(flags, redtab); } /* redirect --- Redirection for printf and print commands */ struct redirect * redirect(NODE *redir_exp, int redirtype, int *errflg) { 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 new_rp = FALSE; int len; /* used with /inet */ static struct redirect *save_rp = NULL; /* hold onto rp that should * be freed for reuse */ if (do_sandbox) fatal(_("redirection not allowed in sandbox mode")); switch (redirtype) { case redirect_append: tflag = RED_APPEND; /* FALL THROUGH */ case redirect_output: outflag = (RED_FILE|RED_WRITE); tflag |= outflag; if (redirtype == redirect_output) what = ">"; else what = ">>"; break; case redirect_pipe: tflag = (RED_PIPE|RED_WRITE); what = "|"; break; case redirect_pipein: tflag = (RED_PIPE|RED_READ); what = "|"; break; case redirect_input: tflag = (RED_FILE|RED_READ); what = "<"; break; case redirect_twoway: tflag = (RED_READ|RED_WRITE|RED_TWOWAY); what = "|&"; break; default: cant_happen(); } if (do_lint && (redir_exp->flags & STRCUR) == 0) lintwarn(_("expression in `%s' redirection only has numeric value"), what); 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 && (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 (inetfile(str, & len, NULL)) { tflag |= RED_SOCKET; if (strncmp(str + len, "tcp/", 4) == 0) tflag |= RED_TCP; /* use shutdown when closing */ } #endif /* HAVE_SOCKETS */ for (rp = red_head; rp != NULL; rp = rp->next) { #ifndef PIPES_SIMULATED /* * This is an efficiency hack. We want to * recover the process slot for dead children, * if at all possible. Messing with signal() for * SIGCLD leads to lots of headaches. However, if * 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) && redirtype == redirect_pipein) { if (rp->pid != -1) wait_any(0); } #endif /* PIPES_SIMULATED */ /* now check for a match */ 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))) { int rpflag = (rp->flag & ~(RED_NOBUF|RED_EOF|RED_PTY)); int newflag = (tflag & ~(RED_NOBUF|RED_EOF|RED_PTY)); if (do_lint && rpflag != newflag) lintwarn( _("unnecessary mixing of `>' and `>>' for file `%.*s'"), (int) redir_exp->stlen, rp->value); break; } } if (rp == NULL) { new_rp = TRUE; 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; rp->iop = NULL; rp->pid = -1; 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) { /* * 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 (redirtype) { case redirect_output: mode = binmode("w"); if ((rp->flag & RED_USED) != 0) mode = (rp->mode[1] == 'b') ? "ab" : "a"; break; case redirect_append: mode = binmode("a"); break; 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)); /* set close-on-exec */ os_close_on_exec(fileno(rp->fp), str, "pipe", "to"); rp->flag |= RED_NOBUF; break; 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 redirect_input: direction = "from"; fd = devopen(str, binmode("r")); if (fd == INVALID_HANDLE && errno == EISDIR) { *errflg = EISDIR; /* do not free rp, saving it for reuse (save_rp = rp) */ return NULL; } rp->iop = iop_alloc(fd, str, NULL, TRUE); break; case redirect_twoway: direction = "to/from"; if (! two_way_open(str, rp)) { #ifdef HAVE_SOCKETS if (inetfile(str, NULL, NULL)) { *errflg = errno; /* 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)); } break; default: cant_happen(); } if (mode != NULL) { errno = 0; fd = devopen(str, mode); if (fd > INVALID_HANDLE) { if (fd == fileno(stdin)) rp->fp = stdin; else if (fd == fileno(stdout)) rp->fp = stdout; else if (fd == fileno(stderr)) rp->fp = stderr; else { const char *omode = mode; #if defined(F_GETFL) && defined(O_APPEND) int fd_flags; fd_flags = fcntl(fd, F_GETFL); if (fd_flags != -1 && (fd_flags & O_APPEND) == O_APPEND) omode = binmode("a"); #endif os_close_on_exec(fd, str, "file", ""); rp->fp = fdopen(fd, (const char *) omode); rp->mode = (const char *) mode; /* don't leak file descriptors */ if (rp->fp == NULL) close(fd); } if (rp->fp != NULL && os_isatty(fd)) rp->flag |= RED_NOBUF; /* Move rp to the head of the list. */ if (! new_rp && red_head != rp) { if ((rp->prev->next = rp->next) != NULL) rp->next->prev = rp->prev; red_head->prev = rp; rp->prev = NULL; rp->next = red_head; red_head = rp; } } } if (rp->fp == NULL && rp->iop == NULL) { /* too many files open -- close one and try again */ if (errno == EMFILE || errno == ENFILE) close_one(); #if defined __MINGW32__ || defined __sun else if (errno == 0) /* HACK! */ close_one(); #endif #ifdef VMS /* Alpha/VMS V7.1's C RTL is returning this instead of EMFILE (haven't tried other post-V6.2 systems) */ #define SS$_EXQUOTA 0x001C else if (errno == EIO && vaxc$errno == SS$_EXQUOTA) close_one(); #endif else { /* * Some other reason for failure. * * On redirection of input from a file, * just return an error, so e.g. getline * can return -1. For output to file, * complain. The shell will complain on * a bad command to a pipe. */ if (errflg != NULL) *errflg = errno; if (redirtype == redirect_output || redirtype == redirect_append ) { /* multiple messages make life easier for translators */ if (*direction == 'f') fatal(_("can't redirect from `%s' (%s)"), str, strerror(errno)); else fatal(_("can't redirect to `%s' (%s)"), str, strerror(errno)); } else { /* do not free rp, saving it for reuse (save_rp = rp) */ return NULL; } } } } if (new_rp) { /* * It opened successfully, hook it into the list. * Maintain the list in most-recently-used first order. */ if (red_head != NULL) red_head->prev = rp; rp->prev = NULL; rp->next = red_head; red_head = rp; } save_rp = NULL; return rp; } /* getredirect --- find the struct redirect for this file or pipe */ struct redirect * getredirect(const char *str, int len) { struct redirect *rp; for (rp = red_head; rp != NULL; rp = rp->next) if (strlen(rp->value) == len && memcmp(rp->value, str, len) == 0) return rp; return NULL; } /* close_one --- temporarily close an open file to re-use the fd */ static void close_one() { struct redirect *rp; struct redirect *rplast = NULL; static short warned = FALSE; if (do_lint && ! warned) { warned = TRUE; lintwarn(_("reached system limit for open files: starting to multiplex file descriptors")); } /* go to end of list first, to pick up least recently used entry */ for (rp = red_head; rp != NULL; rp = rp->next) rplast = rp; /* now work back up through the list */ for (rp = rplast; rp != NULL; rp = rp->prev) { /* don't close standard files! */ if (rp->fp == NULL || rp->fp == stderr || rp->fp == stdout) continue; if ((rp->flag & (RED_FILE|RED_WRITE)) == (RED_FILE|RED_WRITE)) { rp->flag |= RED_USED; errno = 0; if (/* do_lint && */ fclose(rp->fp) != 0) warning(_("close of `%s' failed (%s)."), rp->value, strerror(errno)); rp->fp = NULL; break; } } if (rp == NULL) /* surely this is the only reason ??? */ fatal(_("too many pipes or input files open")); } /* do_close --- completely close an open file or pipe */ NODE * do_close(int nargs) { NODE *tmp, *tmp2; struct redirect *rp; two_way_close_type how = CLOSE_ALL; /* default */ if (nargs == 2) { /* 2nd arg if present: "to" or "from" for two-way pipe */ /* DO NOT use _() on the strings here! */ tmp2 = POP_STRING(); if (strcasecmp(tmp2->stptr, "to") == 0) how = CLOSE_TO; else if (strcasecmp(tmp2->stptr, "from") == 0) how = CLOSE_FROM; else { DEREF(tmp2); fatal(_("close: second argument must be `to' or `from'")); } 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) break; } if (rp == NULL) { /* no match, return -1 */ char *cp; if (do_lint) lintwarn(_("close: `%.*s' is not an open file, pipe or co-process"), (int) tmp->stlen, tmp->stptr); if (! do_traditional) { /* update ERRNO manually, using errno = ENOENT is a stretch. */ cp = _("close of redirection that was never opened"); unref(ERRNO_node->var_value); ERRNO_node->var_value = make_string(cp, strlen(cp)); } DEREF(tmp); return make_number((AWKNUM) -1.0); } DEREF(tmp); fflush(stdout); /* synchronize regular output */ tmp = make_number((AWKNUM) close_redir(rp, FALSE, how)); rp = NULL; /* * POSIX says close() returns 0 on success, non-zero otherwise. * For POSIX, at this point we just return 0. Otherwise we * return the exit status of the process or of pclose(), depending. * This whole business is a mess. */ if (do_posix) { unref(tmp); return make_number((AWKNUM) 0); } return tmp; } /* close_rp --- separate function to just do closing */ static int close_rp(struct redirect *rp, two_way_close_type how) { int status = 0; errno = 0; if ((rp->flag & RED_TWOWAY) != 0) { /* two-way pipe */ /* write end: */ if ((how == CLOSE_ALL || how == CLOSE_TO) && rp->fp != NULL) { #ifdef HAVE_SOCKETS if ((rp->flag & RED_TCP) != 0) (void) shutdown(fileno(rp->fp), SHUT_WR); #endif /* HAVE_SOCKETS */ if ((rp->flag & RED_PTY) != 0) { fwrite("\004\n", sizeof("\004\n") - 1, 1, rp->fp); fflush(rp->fp); } status = fclose(rp->fp); rp->fp = NULL; } /* read end: */ if (how == CLOSE_ALL || how == CLOSE_FROM) { if ((rp->flag & RED_SOCKET) != 0 && rp->iop != NULL) { #ifdef HAVE_SOCKETS if ((rp->flag & RED_TCP) != 0) (void) shutdown(rp->iop->fd, SHUT_RD); #endif /* HAVE_SOCKETS */ (void) iop_close(rp->iop); } else status = gawk_pclose(rp); rp->iop = NULL; } } else if ((rp->flag & (RED_PIPE|RED_WRITE)) == (RED_PIPE|RED_WRITE)) { /* write to pipe */ status = pclose(rp->fp); if ((BINMODE & 1) != 0) os_setbinmode(fileno(stdin), O_BINARY); rp->fp = NULL; } else if (rp->fp != NULL) { /* write to file */ status = fclose(rp->fp); rp->fp = NULL; } else if (rp->iop != NULL) { /* read from pipe/file */ if ((rp->flag & RED_PIPE) != 0) /* read from pipe */ status = gawk_pclose(rp); /* gawk_pclose sets rp->iop to null */ else { /* read from file */ status = iop_close(rp->iop); rp->iop = NULL; } } return status; } /* close_redir --- close an open file or pipe */ static int close_redir(struct redirect *rp, int exitwarn, two_way_close_type how) { int status = 0; if (rp == NULL) return 0; if (rp->fp == stdout || rp->fp == stderr) goto checkwarn; /* bypass closing, remove from list */ if (do_lint && (rp->flag & RED_TWOWAY) == 0 && how != CLOSE_ALL) lintwarn(_("close: redirection `%s' not opened with `|&', second argument ignored"), rp->value); status = close_rp(rp, how); /* SVR4 awk checks and warns about status of close */ if (status != 0) { int save_errno = errno; char *s = strerror(save_errno); /* * Too many people have complained about this. * As of 2.15.6, it is now under lint control. */ if (do_lint) { if ((rp->flag & RED_PIPE) != 0) lintwarn(_("failure status (%d) on pipe close of `%s' (%s)"), status, rp->value, s); else lintwarn(_("failure status (%d) on file close of `%s' (%s)"), status, rp->value, s); } if (! do_traditional) { /* set ERRNO too so that program can get at it */ update_ERRNO_saved(save_errno); } } checkwarn: if (exitwarn) { /* * Don't use lintwarn() here. If lint warnings are fatal, * doing so prevents us from closing other open redirections. * * Using multiple full messages instead of string parameters * for the types makes message translation easier. */ if ((rp->flag & RED_SOCKET) != 0) warning(_("no explicit close of socket `%s' provided"), rp->value); else if ((rp->flag & RED_TWOWAY) != 0) warning(_("no explicit close of co-process `%s' provided"), rp->value); else if ((rp->flag & RED_PIPE) != 0) warning(_("no explicit close of pipe `%s' provided"), rp->value); else warning(_("no explicit close of file `%s' provided"), rp->value); } /* remove it from the list if closing both or both ends have been closed */ if (how == CLOSE_ALL || (rp->iop == NULL && rp->fp == NULL)) { if (rp->next != NULL) rp->next->prev = rp->prev; if (rp->prev != NULL) rp->prev->next = rp->next; else red_head = rp->next; free_rp(rp); } return status; } /* flush_io --- flush all open output files */ int flush_io() { struct redirect *rp; int status = 0; errno = 0; if (fflush(stdout)) { warning(_("error writing standard output (%s)"), strerror(errno)); status++; } if (fflush(stderr)) { warning(_("error writing standard error (%s)"), strerror(errno)); status++; } for (rp = red_head; rp != NULL; rp = rp->next) /* flush both files and pipes, what the heck */ if ((rp->flag & RED_WRITE) && rp->fp != NULL) { if (fflush(rp->fp)) { if (rp->flag & RED_PIPE) warning(_("pipe flush of `%s' failed (%s)."), rp->value, strerror(errno)); else if (rp->flag & RED_TWOWAY) warning(_("co-process flush of pipe to `%s' failed (%s)."), rp->value, strerror(errno)); else warning(_("file flush of `%s' failed (%s)."), rp->value, strerror(errno)); status++; } } if (status != 0) status = -1; /* canonicalize it */ return status; } /* close_io --- close all open files, called when exiting */ int close_io(int *stdio_problem) { struct redirect *rp; struct redirect *next; int status = 0; errno = 0; for (rp = red_head; rp != NULL; rp = next) { next = rp->next; /* * close_redir() will print a message if needed * if do_lint, warn about lack of explicit close */ if (close_redir(rp, do_lint, CLOSE_ALL)) status++; rp = NULL; } /* * Some of the non-Unix os's have problems doing an fclose * on stdout and stderr. Since we don't really need to close * them, we just flush them, and do that across the board. */ *stdio_problem = FALSE; if (fflush(stdout)) { warning(_("error writing standard output (%s)"), strerror(errno)); status++; *stdio_problem = TRUE; } if (fflush(stderr)) { warning(_("error writing standard error (%s)"), strerror(errno)); status++; *stdio_problem = TRUE; } return status; } /* str2mode --- convert a string mode to an integer mode */ static int str2mode(const char *mode) { int ret; const char *second = & mode[1]; if (*second == 'b') second++; switch(mode[0]) { case 'r': ret = O_RDONLY; if (*second == '+' || *second == 'w') ret = O_RDWR; break; case 'w': ret = O_WRONLY|O_CREAT|O_TRUNC; if (*second == '+' || *second == 'r') ret = O_RDWR|O_CREAT|O_TRUNC; break; case 'a': ret = O_WRONLY|O_APPEND|O_CREAT; if (*second == '+') ret = O_RDWR|O_APPEND|O_CREAT; break; default: ret = 0; /* lint */ cant_happen(); } if (strchr(mode, 'b') != NULL) ret |= O_BINARY; return ret; } #ifdef HAVE_SOCKETS /* socketopen --- open a socket and set it into connected state */ static int socketopen(int family, int type, const char *localpname, const char *remotepname, const char *remotehostname) { struct addrinfo *lres, *lres0; struct addrinfo lhints; struct addrinfo *rres, *rres0; struct addrinfo rhints; int lerror; int rerror; int socket_fd = INVALID_HANDLE; int any_remote_host = (strcmp(remotehostname, "0") == 0); 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) { if (strcmp(localpname, "0") != 0) fatal(_("local port %s invalid in `/inet'"), localpname); lres0 = NULL; lres = &lhints; } else lres0 = lres; while (lres != NULL) { memset (&rhints, '\0', sizeof (rhints)); rhints.ai_flags = lhints.ai_flags; rhints.ai_socktype = lhints.ai_socktype; rhints.ai_family = lhints.ai_family; rhints.ai_protocol = lhints.ai_protocol; rerror = getaddrinfo (any_remote_host ? NULL : remotehostname, remotepname, &rhints, &rres); if (rerror) { if (lres0 != NULL) freeaddrinfo(lres0); fatal(_("remote host and port information (%s, %s) invalid"), remotehostname, remotepname); } rres0 = rres; socket_fd = INVALID_HANDLE; while (rres != NULL) { socket_fd = socket(rres->ai_family, rres->ai_socktype, rres->ai_protocol); if (socket_fd < 0 || socket_fd == INVALID_HANDLE) goto nextrres; if (type == SOCK_STREAM) { int on = 1; #ifdef SO_LINGER struct linger linger; memset(& linger, '\0', sizeof(linger)); #endif setsockopt(socket_fd, SOL_SOCKET, SO_REUSEADDR, (char *) & on, sizeof(on)); #ifdef SO_LINGER linger.l_onoff = 1; linger.l_linger = 30; /* linger for 30/100 second */ setsockopt(socket_fd, SOL_SOCKET, SO_LINGER, (char *) & linger, sizeof(linger)); #endif } if (bind(socket_fd, lres->ai_addr, lres->ai_addrlen) != 0) goto nextrres; if (! any_remote_host) { /* not ANY => create a client */ 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; struct sockaddr_storage remote_addr; socklen_t namelen = sizeof (remote_addr); if (listen(socket_fd, 1) >= 0 && (clientsocket_fd = accept(socket_fd, (struct sockaddr *) &remote_addr, &namelen)) >= 0) { close(socket_fd); socket_fd = clientsocket_fd; break; } } else if (type == SOCK_DGRAM) { #ifdef MSG_PEEK char buf[10]; struct sockaddr_storage remote_addr; socklen_t readle; if (recvfrom(socket_fd, buf, 1, MSG_PEEK, (struct sockaddr *) & remote_addr, & readle) >= 0 && readle && connect(socket_fd, (struct sockaddr *)& remote_addr, readle) == 0) break; #endif } } nextrres: if (socket_fd != INVALID_HANDLE) close(socket_fd); socket_fd = INVALID_HANDLE; rres = rres->ai_next; } freeaddrinfo(rres0); if (socket_fd != INVALID_HANDLE) break; lres = lres->ai_next; } if (lres0) freeaddrinfo(lres0); return socket_fd; } #endif /* HAVE_SOCKETS */ /* devopen --- handle /dev/std{in,out,err}, /dev/fd/N, regular files */ /* * Strictly speaking, "name" is not a "const char *" because we temporarily * change the string. */ int devopen(const char *name, const char *mode) { int openfd; char *cp; char *ptr; int flag = 0; int len; int family; flag = str2mode(mode); if (strcmp(name, "-") == 0) return fileno(stdin); openfd = INVALID_HANDLE; if (do_traditional) goto strictopen; if ((openfd = os_devopen(name, flag)) != INVALID_HANDLE) { os_close_on_exec(openfd, name, "file", ""); return openfd; } if (strncmp(name, "/dev/", 5) == 0) { cp = (char *) name + 5; if (strcmp(cp, "stdin") == 0 && (flag & O_ACCMODE) == O_RDONLY) openfd = fileno(stdin); else if (strcmp(cp, "stdout") == 0 && (flag & O_ACCMODE) == O_WRONLY) openfd = fileno(stdout); else if (strcmp(cp, "stderr") == 0 && (flag & O_ACCMODE) == O_WRONLY) openfd = fileno(stderr); else if (strncmp(cp, "fd/", 3) == 0) { struct stat sbuf; cp += 3; openfd = (int) strtoul(cp, &ptr, 10); 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 (inetfile(name, & len, & family)) { #ifdef HAVE_SOCKETS /* /inet/protocol/localport/hostname/remoteport */ int protocol; char *hostname; char *hostnameslastcharp; char *localpname; char *localpnamelastcharp; cp = (char *) name + len; /* which protocol? */ if (strncmp(cp, "tcp/", 4) == 0) protocol = SOCK_STREAM; else if (strncmp(cp, "udp/", 4) == 0) protocol = SOCK_DGRAM; else { protocol = SOCK_STREAM; /* shut up the compiler */ fatal(_("no (known) protocol supplied in special filename `%s'"), name); } cp += 4; /* which localport? */ localpname = cp; while (*cp != '/' && *cp != '\0') cp++; /* * Require a port, let them explicitly put 0 if * they don't care. */ if (*cp != '/' || cp == localpname) fatal(_("special file name `%s' is incomplete"), name); /* * 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. */ *cp = '\0'; localpnamelastcharp = cp; /* which hostname? */ cp++; hostname = cp; while (*cp != '/' && *cp != '\0') cp++; if (*cp != '/' || cp == hostname) { *localpnamelastcharp = '/'; fatal(_("must supply a remote hostname to `/inet'")); } *cp = '\0'; hostnameslastcharp = cp; /* which remoteport? */ cp++; /* * The remote port ends the special file name. * This means there already is a 0 at the end of the string. * Therefore no need to patch any string ending. * * Here too, require a port, let them explicitly put 0 if * they don't care. */ if (*cp == '\0') { *localpnamelastcharp = '/'; *hostnameslastcharp = '/'; fatal(_("must supply a remote port to `/inet'")); } { #define DEFAULT_RETRIES 20 static unsigned long def_retries = DEFAULT_RETRIES; static int first_time = TRUE; unsigned long retries = 0; static long msleep = 1000; if (first_time) { char *cp, *end; unsigned long count = 0; char *ms2; first_time = FALSE; if ((cp = getenv("GAWK_SOCK_RETRIES")) != NULL) { count = strtoul(cp, &end, 10); if (end != cp && count > 0) def_retries = count; } /* * Env var is in milliseconds, paramter to usleep() * is microseconds, make the conversion. Default is * 1 millisecond. */ if ((ms2 = getenv("GAWK_MSEC_SLEEP")) != NULL) { msleep = strtol(ms2, &end, 10); if (end == ms2 || msleep < 0) msleep = 1000; else msleep *= 1000; } } retries = def_retries; do { openfd = socketopen(family, protocol, localpname, cp, hostname); retries--; } while (openfd == INVALID_HANDLE && retries > 0 && usleep(msleep) == 0); } *localpnamelastcharp = '/'; *hostnameslastcharp = '/'; #else /* ! HAVE_SOCKETS */ fatal(_("TCP/IP communications are not supported")); #endif /* HAVE_SOCKETS */ } strictopen: if (openfd == INVALID_HANDLE) openfd = open(name, flag, 0666); #ifdef __EMX__ if (openfd == INVALID_HANDLE && errno == EACCES) { /* on OS/2 directory access via open() is not permitted */ struct stat buf; if (stat(name, &buf) == 0 && S_ISDIR(buf.st_mode)) errno = EISDIR; } #endif if (openfd != INVALID_HANDLE) { if (os_isdir(openfd)) { (void) close(openfd); /* don't leak fds */ /* Set useful error number. */ errno = EISDIR; return INVALID_HANDLE; } if (openfd > fileno(stderr)) os_close_on_exec(openfd, name, "file", ""); } /* * XXX: FIXME: if fd is INVALID_HANDLE, see if an open hook * can do something. */ return openfd; } /* two_way_open --- open a two way communications channel */ static int two_way_open(const char *str, struct redirect *rp) { static int no_ptys = FALSE; #ifdef HAVE_SOCKETS /* case 1: socket */ if (inetfile(str, NULL, NULL)) { int fd, newfd; fd = devopen(str, "rw"); 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, "socket", "to/from"); rp->iop = iop_alloc(newfd, str, NULL, TRUE); if (rp->iop == NULL) { fclose(rp->fp); return FALSE; } rp->flag |= RED_SOCKET; return TRUE; } #endif /* HAVE_SOCKETS */ #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; static char first_pty_letter; #ifdef HAVE_GRANTPT static int have_dev_ptmx; #endif char slavenam[32]; char c; int master, dup_master; int slave; int save_errno; pid_t pid; struct stat statb; struct termios st; /* Use array of chars to avoid ascii / ebcdic issues */ static char pty_chars[] = "pqrstuvwxyzabcdefghijklmno"; int i; if (! initialized) { initialized = TRUE; #ifdef HAVE_GRANTPT have_dev_ptmx = (stat("/dev/ptmx", &statb) >= 0); #endif i = 0; do { c = pty_chars[i++]; sprintf(slavenam, "/dev/pty%c0", c); if (stat(slavenam, &statb) >= 0) { first_pty_letter = c; break; } } while (pty_chars[i] != '\0'); } #ifdef HAVE_GRANTPT if (have_dev_ptmx) { master = open("/dev/ptmx", O_RDWR); if (master >= 0) { char *tem; grantpt(master); unlockpt(master); tem = ptsname(master); if (tem != NULL) { strcpy(slavenam, tem); goto got_the_pty; } (void) close(master); } } #endif if (first_pty_letter) { /* * Assume /dev/ptyXNN and /dev/ttyXN naming system. * The FIRST_PTY_LETTER gives the first X to try. We try in the * sequence FIRST_PTY_LETTER, .., 'z', 'a', .., FIRST_PTY_LETTER. * Is this worthwhile, or just over-zealous? */ c = first_pty_letter; do { int i; char *cp; for (i = 0; i < 16; i++) { sprintf(slavenam, "/dev/pty%c%x", c, i); if (stat(slavenam, &statb) < 0) { no_ptys = TRUE; /* bypass all this next time */ goto use_pipes; } if ((master = open(slavenam, O_RDWR)) >= 0) { slavenam[sizeof("/dev/") - 1] = 't'; if (access(slavenam, R_OK | W_OK) == 0) goto got_the_pty; close(master); } } /* move to next character */ cp = strchr(pty_chars, c); if (cp[1] != '\0') cp++; else cp = pty_chars; c = *cp; } while (c != first_pty_letter); } else no_ptys = TRUE; /* Couldn't find a pty. Fall back to using pipes. */ goto use_pipes; got_the_pty: if ((slave = open(slavenam, O_RDWR)) < 0) { close(master); fatal(_("could not open `%s', mode `%s'"), slavenam, "r+"); } #ifdef I_PUSH /* * Push the necessary modules onto the slave to * get terminal semantics. */ ioctl(slave, I_PUSH, "ptem"); ioctl(slave, I_PUSH, "ldterm"); #endif tcgetattr(slave, &st); st.c_iflag &= ~(ISTRIP | IGNCR | INLCR | IXOFF); st.c_iflag |= (ICRNL | IGNPAR | BRKINT | IXON); st.c_oflag &= ~OPOST; st.c_cflag &= ~CSIZE; st.c_cflag |= CREAD | CS8 | CLOCAL; st.c_lflag &= ~(ECHO | ECHOE | ECHOK | NOFLSH | TOSTOP); st.c_lflag |= ISIG; #if 0 st.c_cc[VMIN] = 1; st.c_cc[VTIME] = 0; #endif /* Set some control codes to default values */ #ifdef VINTR st.c_cc[VINTR] = '\003'; /* ^c */ #endif #ifdef VQUIT st.c_cc[VQUIT] = '\034'; /* ^| */ #endif #ifdef VERASE st.c_cc[VERASE] = '\177'; /* ^? */ #endif #ifdef VKILL st.c_cc[VKILL] = '\025'; /* ^u */ #endif #ifdef VEOF st.c_cc[VEOF] = '\004'; /* ^d */ #endif tcsetattr(slave, TCSANOW, &st); switch (pid = fork ()) { case 0: /* Child process */ 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) fatal(_("close of stdout in child failed (%s)"), strerror(errno)); if (dup(slave) != 1) fatal(_("moving slave pty to stdout in child failed (dup: %s)"), strerror(errno)); if (close(0) == -1) fatal(_("close of stdin in child failed (%s)"), strerror(errno)); if (dup(slave) != 0) fatal(_("moving slave pty to stdin in child failed (dup: %s)"), strerror(errno)); if (close(slave)) fatal(_("close of slave pty failed (%s)"), strerror(errno)); /* stderr does NOT get dup'ed onto child's stdout */ signal(SIGPIPE, SIG_DFL); execl("/bin/sh", "sh", "-c", str, NULL); _exit(errno == ENOENT ? 127 : 126); case -1: save_errno = errno; close(master); errno = save_errno; return FALSE; } /* parent */ 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, TRUE); if (rp->iop == NULL) { (void) close(master); (void) kill(pid, SIGKILL); /* overkill? (pardon pun) */ return FALSE; } /* * Force read and write ends of two-way connection to * be different fd's so they can be closed independently. */ if ((dup_master = dup(master)) < 0 || (rp->fp = fdopen(dup_master, "w")) == NULL) { iop_close(rp->iop); rp->iop = NULL; (void) close(master); (void) kill(pid, SIGKILL); /* overkill? (pardon pun) */ if (dup_master > 0) (void) close(dup_master); return FALSE; } rp->flag |= RED_PTY; os_close_on_exec(master, str, "pipe", "from"); os_close_on_exec(dup_master, str, "pipe", "to"); first_pty_letter = '\0'; /* reset for next command */ return TRUE; } #endif /* defined(HAVE_TERMIOS_H) && ! defined(ZOS_USS) */ use_pipes: #ifndef PIPES_SIMULATED /* real pipes */ /* case 3: two way pipe to a child process */ { int ptoc[2], ctop[2]; int pid; int save_errno; #ifdef __EMX__ int save_stdout, save_stdin; #endif if (pipe(ptoc) < 0) return FALSE; /* errno set, diagnostic from caller */ if (pipe(ctop) < 0) { save_errno = errno; close(ptoc[0]); close(ptoc[1]); errno = save_errno; return FALSE; } #ifdef __EMX__ save_stdin = dup(0); /* duplicate stdin */ save_stdout = dup(1); /* duplicate stdout */ if (save_stdout == -1 || save_stdin == -1) { /* if an error occurrs close all open file handles */ save_errno = errno; if (save_stdin != -1) close(save_stdin); if (save_stdout != -1) close(save_stdout); close(ptoc[0]); close(ptoc[1]); close(ctop[0]); close(ctop[1]); errno = save_errno; return FALSE; } /* connect pipes to stdin and stdout */ close(1); /* close 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 */ 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 */ os_close_on_exec(ptoc[1], str, "pipe", "from"); /* pipe input: output of the parent process */ os_close_on_exec(ctop[0], str, "pipe", "from"); /* pipe output: input of the parent process */ os_close_on_exec(save_stdin, str, "pipe", "from"); /* saved stdin of the parent process */ os_close_on_exec(save_stdout, str, "pipe", "from"); /* saved stdout of the parent process */ /* stderr does NOT get dup'ed onto child's stdout */ pid = spawnl(P_NOWAIT, "/bin/sh", "sh", "-c", str, NULL); /* restore stdin and stdout */ close(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) { 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 */ save_errno = errno; close(ptoc[1]); close(ctop[0]); errno = save_errno; return FALSE; } #else /* NOT __EMX__ */ if ((pid = fork()) < 0) { save_errno = errno; close(ptoc[0]); close(ptoc[1]); close(ctop[0]); close(ctop[1]); errno = save_errno; return FALSE; } if (pid == 0) { /* child */ if (close(1) == -1) fatal(_("close of stdout in child failed (%s)"), strerror(errno)); if (dup(ctop[1]) != 1) fatal(_("moving pipe to stdout in child failed (dup: %s)"), strerror(errno)); if (close(0) == -1) fatal(_("close of stdin in child failed (%s)"), strerror(errno)); if (dup(ptoc[0]) != 0) fatal(_("moving pipe to stdin in child failed (dup: %s)"), strerror(errno)); if ( close(ptoc[0]) == -1 || close(ptoc[1]) == -1 || close(ctop[0]) == -1 || close(ctop[1]) == -1) fatal(_("close of pipe failed (%s)"), strerror(errno)); /* stderr does NOT get dup'ed onto child's stdout */ execl("/bin/sh", "sh", "-c", str, NULL); _exit(errno == ENOENT ? 127 : 126); } #endif /* NOT __EMX__ */ /* parent */ rp->pid = pid; rp->iop = iop_alloc(ctop[0], str, NULL, TRUE); if (rp->iop == NULL) { (void) close(ctop[0]); (void) close(ctop[1]); (void) close(ptoc[0]); (void) close(ptoc[1]); (void) kill(pid, SIGKILL); /* overkill? (pardon pun) */ return FALSE; } rp->fp = fdopen(ptoc[1], "w"); if (rp->fp == NULL) { iop_close(rp->iop); rp->iop = NULL; (void) close(ctop[0]); (void) close(ctop[1]); (void) close(ptoc[0]); (void) close(ptoc[1]); (void) kill(pid, SIGKILL); /* overkill? (pardon pun) */ return FALSE; } #ifndef __EMX__ os_close_on_exec(ctop[0], str, "pipe", "from"); os_close_on_exec(ptoc[1], str, "pipe", "from"); (void) close(ptoc[0]); (void) close(ctop[1]); #endif return TRUE; } #else /*PIPES_SIMULATED*/ fatal(_("`|&' not supported")); /*NOTREACHED*/ return FALSE; #endif } #ifndef PIPES_SIMULATED /* real pipes */ /* wait_any --- wait for a child process, close associated pipe */ static int wait_any(int interesting) /* pid of interest, if any */ { RETSIGTYPE (*hstat)(int), (*istat)(int), (*qstat)(int); int pid; int status = 0; struct redirect *redp; hstat = signal(SIGHUP, SIG_IGN); istat = signal(SIGINT, SIG_IGN); qstat = signal(SIGQUIT, SIG_IGN); for (;;) { #ifdef HAVE_SYS_WAIT_H /* POSIX compatible sys/wait.h */ pid = wait(&status); #else pid = wait((union wait *)&status); #endif if (interesting && pid == interesting) { break; } else if (pid != -1) { for (redp = red_head; redp != NULL; redp = redp->next) if (pid == redp->pid) { redp->pid = -1; redp->status = status; break; } } if (pid == -1 && errno == ECHILD) break; } signal(SIGHUP, hstat); signal(SIGINT, istat); signal(SIGQUIT, qstat); return status; } /* gawk_popen --- open an IOBUF on a child process */ static IOBUF * gawk_popen(const char *cmd, struct redirect *rp) { int p[2]; int pid; #ifdef __EMX__ int save_stdout; #endif /* * 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 dependent) */ /*(void) wait_any(0);*/ /* wait for outstanding processes */ if (pipe(p) < 0) fatal(_("cannot open pipe `%s' (%s)"), cmd, strerror(errno)); #ifdef __EMX__ save_stdout = dup(1); /* save stdout */ rp->iop = NULL; if (save_stdout == -1) { close(p[0]); close(p[1]); return rp->iop; /* failed */ } close(1); /* close stdout */ 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 */ os_close_on_exec(p[0], cmd, "pipe", "from"); /* pipe output: input of the parent process */ os_close_on_exec(save_stdout, cmd, "pipe", "from"); /* saved stdout of the parent process */ pid = spawnl(P_NOWAIT, "/bin/sh", "sh", "-c", cmd, NULL); /* restore stdout */ close(1); if (dup(save_stdout) != 1) { close(p[0]); fatal(_("restoring stdout in parent process failed\n")); } close(save_stdout); #else /* NOT __EMX__ */ if ((pid = fork()) == 0) { if (close(1) == -1) fatal(_("close of stdout in child failed (%s)"), strerror(errno)); if (dup(p[1]) != 1) fatal(_("moving pipe to stdout in child failed (dup: %s)"), strerror(errno)); if (close(p[0]) == -1 || close(p[1]) == -1) fatal(_("close of pipe failed (%s)"), strerror(errno)); execl("/bin/sh", "sh", "-c", cmd, NULL); _exit(errno == ENOENT ? 127 : 126); } #endif /* NOT __EMX__ */ 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) { 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, TRUE); if (rp->iop == NULL) (void) close(p[0]); return rp->iop; } /* gawk_pclose --- close an open child pipe */ static int gawk_pclose(struct redirect *rp) { if (rp->iop != NULL) (void) iop_close(rp->iop); rp->iop = NULL; /* process previously found, return stored status */ if (rp->pid == -1) return rp->status; rp->status = wait_any(rp->pid); rp->pid = -1; return rp->status; } #else /* PIPES_SIMULATED */ /* * use temporary file rather than pipe * except if popen() provides real pipes too */ /* gawk_popen --- open an IOBUF on a child process */ static IOBUF * gawk_popen(const char *cmd, struct redirect *rp) { FILE *current; os_restore_mode(fileno(stdin)); current = popen(cmd, binmode("r")); if ((BINMODE & 1) != 0) os_setbinmode(fileno(stdin), O_BINARY); if (current == NULL) return NULL; os_close_on_exec(fileno(current), cmd, "pipe", "from"); rp->iop = iop_alloc(fileno(current), cmd, NULL, TRUE); if (rp->iop == NULL) { (void) pclose(current); current = NULL; } rp->ifp = current; return rp->iop; } /* gawk_pclose --- close an open child pipe */ static int gawk_pclose(struct redirect *rp) { int rval, aval, fd = rp->iop->fd; if (rp->iop != NULL) { rp->iop->fd = dup(fd); /* kludge to allow close() + pclose() */ rval = iop_close(rp->iop); } rp->iop = NULL; aval = pclose(rp->ifp); rp->ifp = NULL; return (rval < 0 ? rval : aval); } #endif /* PIPES_SIMULATED */ /* do_getline --- read in a line, into var and with redirection */ NODE * do_getline_redir(int intovar, int redirtype) { 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); } 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 (lhs == NULL) /* no optional var. */ set_record(s, cnt); else { /* assignment to variable */ unref(*lhs); *lhs = make_string(s, cnt); (*lhs)->flags |= MAYBE_NUM; } return make_number((AWKNUM) 1.0); } /* do_getline --- read in a line, into var and without redirection */ NODE * do_getline(int intovar, IOBUF *iop) { int cnt = EOF; char *s = NULL; int errcode; if (iop == NULL) { /* end of input */ if (intovar) (void) POP_ADDRESS(); 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); 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 */ 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 *)); } awkpath[i++] = p; if (len > max_pathlen) max_pathlen = len; } /* skip one or more envsep char */ while (*end && *end == envsep) end++; start = end; } awkpath[i] = NULL; #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; } 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; } /* find_source --- find source file with default file extension handling */ char * find_source(const char *src, struct stat *stb, int *errcode) { char *path; *errcode = 0; if (src == NULL || *src == '\0') return NULL; path = do_find_source(src, stb, errcode); #ifdef DEFAULT_FILETYPE if (! do_traditional && path == NULL) { char *file_awk; int save = errno; #ifdef VMS int vms_save = vaxc$errno; #endif /* append ".awk" and try again */ 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; #endif } } #endif /*DEFAULT_FILETYPE*/ return path; } /* srcopen --- open source file */ int srcopen(SRCFILE *s) { 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 int bufsize = 8192; void fatal(const char *s) { printf("%s\n", s); exit(EXIT_FAILURE); } #endif /* open hooks, mainly for use by extension functions */ static struct open_hook { struct open_hook *next; void *(*open_func)(IOBUF *); } *open_hooks; /* register_open_hook --- add an open hook to the list */ void register_open_hook(void *(*open_func)(IOBUF *)) { struct open_hook *oh; emalloc(oh, struct open_hook *, sizeof(*oh), "register_open_hook"); oh->open_func = open_func; oh->next = open_hooks; 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, int do_openhooks) { struct stat sbuf; int iop_malloced = FALSE; if (iop == NULL) { emalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc"); iop_malloced = TRUE; } memset(iop, '\0', sizeof(IOBUF)); iop->flag = 0; iop->fd = fd; iop->name = name; 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) efree(iop); return NULL; } if (os_isatty(iop->fd)) iop->flag |= IOP_IS_TTY; iop->readsize = iop->size = optimal_bufsize(iop->fd, & sbuf); iop->sbuf = sbuf; if (do_lint && S_ISREG(sbuf.st_mode) && sbuf.st_size == 0) lintwarn(_("data file `%s' is empty"), name); errno = 0; iop->count = iop->scanoff = 0; emalloc(iop->buf, char *, iop->size += 2, "iop_alloc"); iop->off = iop->buf; iop->dataend = NULL; iop->end = iop->buf + iop->size; iop->flag |= IOP_AT_START; return iop; } #define set_RT_to_null() \ (void)(! do_traditional && (unref(RT_node->var_value), \ RT_node->var_value = Nnull_string)) #define set_RT(str, len) \ (void)(! do_traditional && (unref(RT_node->var_value), \ RT_node->var_value = make_string(str, len))) /* grow must increase size of buffer, set end, make sure off and dataend point at */ /* right spot. */ /* */ /* */ /* = */ /* grow_iop_buffer --- grow the buffer */ static void grow_iop_buffer(IOBUF *iop) { 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; /* 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; /* 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; } /* Here are the routines. */ /* */ /* */ /* = */ /* rs1scan --- scan for a single character record terminator */ static RECVALUE rs1scan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state) { 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; #if MBS_SUPPORT /* * From: Bruno Haible * To: Aharon Robbins , gnits@gnits.org * Subject: Re: multibyte locales: any way to find if a character isn't multibyte? * Date: Mon, 23 Jun 2003 12:20:16 +0200 * Cc: isamu@yamato.ibm.com * * Hi, * * > Is there any way to make the following query to the current locale? * > * > Given an 8-bit value, can this value ever appear as part of * > a multibyte character? * * There is no simple answer here. The easiest solution I see is to * get the current locale's codeset (via locale_charset() which is a * wrapper around nl_langinfo(CODESET)), and then perform a case-by-case * treatment of the known multibyte encodings, from GB2312 to EUC-JISX0213; * for the unibyte encodings, a single btowc() call will tell you. * * > This is particularly critical for me for ASCII newline ('\n'). If I * > can be guaranteed that it never shows up as part of a multibyte character, * > I can speed up gawk considerably in mulitbyte locales. * * This is much simpler to answer! * In all ASCII based multibyte encodings used for locales today (this * excludes EBCDIC based doublebyte encodings from IBM, and also excludes * ISO-2022-JP which is used for email exchange but not as a locale encoding) * ALL bytes in the range 0x00..0x2F occur only as a single character, not * as part of a multibyte character. * * So it's safe to assume, but deserves a comment in the source. * * Bruno *************************************************************** * From: Bruno Haible * To: Aharon Robbins * Subject: Re: multibyte locales: any way to find if a character isn't multibyte? * Date: Mon, 23 Jun 2003 14:27:49 +0200 * * On Monday 23 June 2003 14:11, you wrote: * * > if (rs != '\n' && MB_CUR_MAX > 1) { * * If you assume ASCII, you can even write * * if (rs >= 0x30 && MB_CUR_MAX > 1) { * * (this catches also the space character) but if portability to EBCDIC * systems is desired, your code is fine as is. * * 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; 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) { /* * 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 { /* 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; } } /* = */ /* rsrescan --- search for a regex match in the buffer */ static RECVALUE rsrescan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state) { 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; 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; } /* * 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; /* * 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 * the next input buffer. * * Consider an RS of xyz(abc)? where the * exact end of the buffer is xyza and the * next two, unread, characters are bc. * * This matches the "xyz" and ends up putting the * "abc" into the front of the next record. Ooops. * * The remaybelong() function looks to see if the * regex contains one of: + * ? |. This is a very * simple heuristic, but in combination with the * "end of match within a few bytes of end of buffer" * check, should keep things reasonable. */ /* * XXX: The reisstring and remaybelong tests should * really be done once when RS is assigned to and * then tested as flags here. Maybe one day. */ /* succession of tests is easier to trace in GDB. */ if (remaybelong(RS->stptr, RS->stlen)) { char *matchend = iop->off + reend; if (iop->dataend - matchend < RS->stlen) return TERMNEAREND; } return REC_OK; } /* = */ /* rsnullscan --- handle RS = "" */ static RECVALUE rsnullscan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state) { char *bp; if (*state == NOSTATE || *state == INLEADER) memset(recm, '\0', sizeof(struct recmatch)); 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 */ /* 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; } iop->off = recm->start = bp; /* real start of record */ scan_data: while (*bp++ != '\n') continue; 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++; recm->rt_len = bp - recm->rt_start; iop->scanoff = bp - iop->off; if (bp >= iop->dataend) return TERMATEND; return REC_OK; } /* = */ /* get_a_record --- read a record from IOP into out, return length of EOF, set RT */ static int get_a_record(char **out, /* pointer to pointer to data */ 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)(IOBUF *iop, struct recmatch *recm, SCANSTATE *state) = NULL; 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)) { 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; } } /* = */ state = NOSTATE; for (;;) { size_t dataend_off; ret = (*matchrec)(iop, & recm, & state); iop->flag &= ~IOP_AT_START; 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; /* = */ { #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; #ifdef SSIZE_MAX /* * POSIX limits read to SSIZE_MAX. There are (bizarre) * systems where this amount is small. */ amt_to_read = min(amt_to_read, SSIZE_MAX); #endif 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; 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. * * 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; free_wstr(rtval); } 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; } 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 */ void set_RS() { static NODE *save_rs = NULL; /* * Don't use cmp_nodes(), which pays attention to IGNORECASE. */ if (save_rs && RS_node->var_value->stlen == save_rs->stlen && memcmp(RS_node->var_value->stptr, save_rs->stptr, save_rs->stlen) == 0) { /* * It could be that just IGNORECASE changed. If so, * update the regex and then do the same for FS. * set_IGNORECASE() relies on this routine to call * set_FS(). */ RS_regexp = (IGNORECASE ? RS_re_no_case : RS_re_yes_case); goto set_FS; } unref(save_rs); save_rs = dupnode(RS_node->var_value); RS_is_null = FALSE; RS = force_string(RS_node->var_value); /* * 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, 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; if (do_lint && ! warned) { lintwarn(_("multicharacter value of `RS' is a gawk extension")); warned = TRUE; } } else matchrec = rs1scan; set_FS: if (current_field_sep() == Using_FS) set_FS(); } /* pty_vs_pipe --- return true if should use pty instead of pipes for `|&' */ /* * This works by checking if PROCINFO["command", "pty"] exists and is true. */ static int pty_vs_pipe(const char *command) { #ifdef HAVE_TERMIOS_H char *full_index; size_t full_len; NODE *val; NODE *sub; if (PROCINFO_node == NULL) return FALSE; full_len = strlen(command) + SUBSEP_node->var_value->stlen + 3 /* strlen("pty") */ + 1; /* string terminator */ emalloc(full_index, char *, full_len, "pty_vs_pipe"); sprintf(full_index, "%s%.*spty", command, (int) SUBSEP_node->var_value->stlen, SUBSEP_node->var_value->stptr); sub = make_string(full_index, strlen(full_index)); val = in_array(PROCINFO_node, sub); unref(sub); efree(full_index); if (val) { if (val->flags & MAYBE_NUM) (void) force_number(val); if (val->flags & NUMBER) return (val->numbr != 0.0); else return (val->stlen != 0); } #endif /* HAVE_TERMIOS_H */ return FALSE; } /* iopflags2str --- make IOP flags printable */ const char * iopflags2str(int flag) { static const struct flagtab values[] = { { IOP_IS_TTY, "IOP_IS_TTY" }, { IOP_NOFREE_OBJ, "IOP_NOFREE_OBJ" }, { IOP_AT_EOF, "IOP_AT_EOF" }, { IOP_CLOSED, "IOP_CLOSED" }, { IOP_AT_START, "IOP_AT_START" }, { 0, NULL } }; return genflags2str(flag, values); } /* free_rp --- release the memory used by rp */ static void free_rp(struct redirect *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; } gawk-4.0.1+dfsg.orig/NEWS.00000644000175000017500000024617411555014662014225 0ustar schotschot 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. gawk-4.0.1+dfsg.orig/INSTALL0000644000175000017500000002231011463242060014372 0ustar schotschotInstallation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. gawk-4.0.1+dfsg.orig/configh.in0000644000175000017500000003111211734667225015325 0ustar schotschot/* configh.in. Generated from configure.ac by autoheader. */ /* dynamic loading is possible */ #undef DYNAMIC /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Define to the type of elements in the array set by `getgroups'. Usually this is either `int' or `gid_t'. */ #undef GETGROUPS_T /* Define to 1 if the `getpgrp' function requires zero arguments. */ #undef GETPGRP_VOID /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the `atexit' function. */ #undef HAVE_ATEXIT /* Define to 1 if you have the `btowc' function. */ #undef HAVE_BTOWC /* 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. */ #undef HAVE_DECL_TZNAME /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `fmod' function. */ #undef HAVE_FMOD /* 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 . */ #undef HAVE_INTMAX_T /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_INTTYPES_H_WITH_UINTMAX /* Define to 1 if you have the `isascii' function. */ #undef HAVE_ISASCII /* Define to 1 if you have the `iswctype' function. */ #undef HAVE_ISWCTYPE /* Define to 1 if you have the `iswlower' function. */ #undef HAVE_ISWLOWER /* Define to 1 if you have the `iswupper' function. */ #undef HAVE_ISWUPPER /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have 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. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define if you have the 'long long' type. */ #undef HAVE_LONG_LONG /* Define to 1 if the system has the type `long long int'. */ #undef HAVE_LONG_LONG_INT /* Define to 1 if you have the `mbrlen' function. */ #undef HAVE_MBRLEN /* Define to 1 if mbrtowc and mbstate_t are properly declared. */ #undef HAVE_MBRTOWC /* Define to 1 if you have the header file. */ #undef HAVE_MCHECK_H /* Define to 1 if you have the `memcmp' function. */ #undef HAVE_MEMCMP /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY /* Define to 1 if you have the `memcpy_ulong' function. */ #undef HAVE_MEMCPY_ULONG /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `memset_ulong' function. */ #undef HAVE_MEMSET_ULONG /* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP /* we have the mktime function */ #undef HAVE_MKTIME /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the `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 /* 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_STDARG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_STDINT_H_WITH_UINTMAX /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `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 /* Define to 1 if you have the `strftime' function. */ #undef HAVE_STRFTIME /* Define to 1 if cpp supports the ANSI # stringizing operator. */ #undef HAVE_STRINGIZE /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H /* Define to 1 if you have the `strtod' function. */ #undef HAVE_STRTOD /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if `st_blksize' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE /* Define to 1 if `tm_zone' is a member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE /* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ #undef HAVE_ST_BLKSIZE /* Define to 1 if you have the `system' function. */ #undef HAVE_SYSTEM /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H /* Define to 1 if 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. */ #undef HAVE_TOWLOWER /* Define to 1 if you have the `towupper' function. */ #undef HAVE_TOWUPPER /* Define to 1 if you don't have `tm_zone' but do have the external array `tzname'. */ #undef HAVE_TZNAME /* Define to 1 if you have the `tzset' function. */ #undef HAVE_TZSET /* Define if you have the 'uintmax_t' type in or . */ #undef HAVE_UINTMAX_T /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define if you have the 'unsigned long long' type. */ #undef HAVE_UNSIGNED_LONG_LONG /* Define to 1 if the system has the type `unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define to 1 if you have the `usleep' function. */ #undef HAVE_USLEEP /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define to 1 if you have the `wcrtomb' function. */ #undef HAVE_WCRTOMB /* Define to 1 if you have the `wcscoll' function. */ #undef HAVE_WCSCOLL /* Define to 1 if you have the `wctype' function. */ #undef HAVE_WCTYPE /* Define to 1 if you have the header file. */ #undef HAVE_WCTYPE_H /* systems should define this type here */ #undef HAVE_WCTYPE_T /* systems should define this type here */ #undef HAVE_WINT_T /* disable lint checks */ #undef NO_LINT /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if *printf supports %F format */ #undef PRINTF_HAS_F_FORMAT /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* The size of `unsigned int', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_INT /* The size of `unsigned long', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_LONG /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* some systems define this type here */ #undef TIME_T_IN_SYS_TYPES_H /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* force use of our version of strftime */ #undef USE_INCLUDED_STRFTIME /* 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 /* Version number of package */ #undef VERSION /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to 1 if type `char' is unsigned and you are not using gcc. */ #ifndef __CHAR_UNSIGNED__ # undef __CHAR_UNSIGNED__ #endif /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if doesn't define. */ #undef gid_t /* Define 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 #undef inline #endif /* Define to long or long long if and don't define. */ #undef intmax_t /* 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. */ #undef restrict /* 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. */ #undef uintmax_t #include "custom.h" gawk-4.0.1+dfsg.orig/getopt1.c0000644000175000017500000001124211734665352015110 0ustar schotschot/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987-1994,1996-1998,2004,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifdef HAVE_CONFIG_H #include #endif #ifdef _LIBC # include #else # include "getopt.h" #endif #include "getopt_int.h" #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #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__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long (int argc, char *const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, argv, options, long_options, opt_index, 0, 0); } int _getopt_long_r (int argc, char *const *argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 0, d, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (int argc, char *const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, argv, options, long_options, opt_index, 1, 0); } int _getopt_long_only_r (int argc, char *const *argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 1, d, 0); } #endif /* Not ELIDE_CODE. */ #ifdef TEST #include int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ gawk-4.0.1+dfsg.orig/mkinstalldirs0000755000175000017500000000664711463242060016166 0ustar schotschot#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2006-05-11.19 # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: gawk-4.0.1+dfsg.orig/awkgram.c0000644000175000017500000072454611734667225015201 0ustar schotschot/* 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 /* Copy the first part of user declarations. */ /* Line 268 of yacc.c */ #line 26 "awkgram.y" #ifdef GAWKDEBUG #define YYDEBUG 12 #endif #include "awk.h" #if defined(__STDC__) && __STDC__ < 1 /* VMS weirdness, maybe elsewhere */ #define signed /**/ #endif static void yyerror(const char *m, ...) ATTRIBUTE_PRINTF_1; 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(const char *name, enum defref how); static void check_funcs(void); static void free_bcpool(INSTRUCTION *pl); static ssize_t read_one_line(int fd, void *buffer, size_t count); static int one_line_close(int fd); 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 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 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 */ #define HASHSIZE 1021 /* this constant only used here */ NODE *variables[HASHSIZE]; static int var_count; /* total number of global variables */ extern char *source; extern int sourceline; 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 * uniform, but if it's seen, don't install the function. * e.g. * function split(x) { return x } * function x(a) { return a } * should only produce one error message, and not core dump. */ static char builtin_func[] = "@builtin"; #define YYSTYPE INSTRUCTION * /* Line 268 of yacc.c */ #line 225 "awkgram.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 { FUNC_CALL = 258, NAME = 259, REGEXP = 260, FILENAME = 261, YNUMBER = 262, YSTRING = 263, RELOP = 264, IO_OUT = 265, IO_IN = 266, ASSIGNOP = 267, ASSIGN = 268, MATCHOP = 269, CONCAT_OP = 270, 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 FILENAME 261 #define YNUMBER 262 #define YSTRING 263 #define RELOP 264 #define IO_OUT 265 #define IO_IN 266 #define ASSIGNOP 267 #define ASSIGN 268 #define MATCHOP 269 #define CONCAT_OP 270 #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 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 371 "awkgram.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 1157 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 74 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 65 /* YYNRULES -- Number of rules. */ #define YYNRULES 185 /* YYNRULES -- Number of states. */ #define YYNSTATES 330 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 307 #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, 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, 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, 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, 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, 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, 49, 50, 51, 63 }; #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, 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_int16 yyrhs[] = { 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, 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 #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", "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", "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 # 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, 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, 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, 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 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, 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, 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 -269 static const yytype_int16 yypact[] = { -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[] = { -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 YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -101 static const yytype_int16 yytable[] = { 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, 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[] = { 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, 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, 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) #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 221 "awkgram.y" { rule = 0; yyerrok; } break; case 5: /* Line 1806 of yacc.c */ #line 227 "awkgram.y" { next_sourcefile(); } break; case 6: /* Line 1806 of yacc.c */ #line 231 "awkgram.y" { rule = 0; /* * If errors, give up, don't produce an infinite * stream of syntax error messages. */ /* yyerrok; */ } break; case 7: /* Line 1806 of yacc.c */ #line 243 "awkgram.y" { (void) append_rule((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); } break; case 8: /* Line 1806 of yacc.c */ #line 247 "awkgram.y" { 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 9: /* Line 1806 of yacc.c */ #line 258 "awkgram.y" { can_return = FALSE; if ((yyvsp[(1) - (2)]) && func_install((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])) < 0) YYABORT; func_params = NULL; yyerrok; } break; case 10: /* Line 1806 of yacc.c */ #line 266 "awkgram.y" { want_source = FALSE; yyerrok; } break; case 11: /* Line 1806 of yacc.c */ #line 274 "awkgram.y" { if (include_source((yyvsp[(1) - (1)])) < 0) YYABORT; efree((yyvsp[(1) - (1)])->lextok); bcfree((yyvsp[(1) - (1)])); (yyval) = NULL; } break; 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 1806 of yacc.c */ #line 293 "awkgram.y" { INSTRUCTION *tp; add_lint((yyvsp[(1) - (4)]), LINT_assign_in_cond); add_lint((yyvsp[(4) - (4)]), LINT_assign_in_cond); 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 17: /* Line 1806 of yacc.c */ #line 319 "awkgram.y" { static int begin_seen = 0; if (do_lint_old && ++begin_seen == 2) warning_ln((yyvsp[(1) - (1)])->source_line, _("old awk does not support multiple `BEGIN' or `END' rules")); (yyvsp[(1) - (1)])->in_rule = rule = BEGIN; (yyvsp[(1) - (1)])->source_file = source; (yyval) = (yyvsp[(1) - (1)]); } break; case 18: /* Line 1806 of yacc.c */ #line 330 "awkgram.y" { static int end_seen = 0; if (do_lint_old && ++end_seen == 2) warning_ln((yyvsp[(1) - (1)])->source_line, _("old awk does not support multiple `BEGIN' or `END' rules")); (yyvsp[(1) - (1)])->in_rule = rule = END; (yyvsp[(1) - (1)])->source_file = source; (yyval) = (yyvsp[(1) - (1)]); } break; case 19: /* 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 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 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 22: /* Line 1806 of yacc.c */ #line 366 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 23: /* 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); (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 25: /* Line 1806 of yacc.c */ #line 381 "awkgram.y" { (yyval) = (yyvsp[(2) - (2)]); } break; case 28: /* Line 1806 of yacc.c */ #line 391 "awkgram.y" { param_counter = 0; func_params = NULL; } break; case 29: /* Line 1806 of yacc.c */ #line 396 "awkgram.y" { NODE *t; (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; t->rnode = func_params; func_params = t; (yyval) = (yyvsp[(1) - (7)]); can_return = TRUE; /* check for duplicate parameter names */ if (dup_parms((yyvsp[(1) - (7)]), t)) errcount++; } break; case 30: /* Line 1806 of yacc.c */ #line 420 "awkgram.y" { ++want_regexp; } break; case 31: /* Line 1806 of yacc.c */ #line 422 "awkgram.y" { NODE *n, *exp; char *re; size_t len; re = (yyvsp[(3) - (3)])->lextok; len = strlen(re); if (do_lint) { if (len == 0) 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_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; } (yyval) = (yyvsp[(3) - (3)]); (yyval)->opcode = Op_match_rec; (yyval)->memory = n; } break; case 32: /* Line 1806 of yacc.c */ #line 453 "awkgram.y" { bcfree((yyvsp[(1) - (1)])); } break; case 34: /* Line 1806 of yacc.c */ #line 459 "awkgram.y" { (yyval) = NULL; } break; case 35: /* Line 1806 of yacc.c */ #line 461 "awkgram.y" { if ((yyvsp[(2) - (2)]) == NULL) (yyval) = (yyvsp[(1) - (2)]); else { add_lint((yyvsp[(2) - (2)]), LINT_no_effect); if ((yyvsp[(1) - (2)]) == NULL) (yyval) = (yyvsp[(2) - (2)]); else (yyval) = list_merge((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); } yyerrok; } break; case 36: /* Line 1806 of yacc.c */ #line 474 "awkgram.y" { (yyval) = NULL; } break; case 39: /* Line 1806 of yacc.c */ #line 484 "awkgram.y" { (yyval) = NULL; } break; case 40: /* Line 1806 of yacc.c */ #line 486 "awkgram.y" { (yyval) = (yyvsp[(2) - (3)]); } break; case 41: /* 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 42: /* 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; 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); break_allowed--; fix_break_continue(ip, tbreak, NULL); } break; 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; 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 44: /* Line 1806 of yacc.c */ #line 627 "awkgram.y" { /* * ----------------- * 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] * * and treat it as if it were * * delete foo * * Check that the body is a `delete a[i]' statement, * and that both the loop var and array names match. */ NODE *arr = NULL; 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 { 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 = (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 */ /* 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 46: /* Line 1806 of yacc.c */ #line 782 "awkgram.y" { (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 47: /* 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 48: /* 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 49: /* 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 50: /* Line 1806 of yacc.c */ #line 815 "awkgram.y" { 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)])); } break; case 51: /* 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 52: /* Line 1806 of yacc.c */ #line 833 "awkgram.y" { 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 53: /* Line 1806 of yacc.c */ #line 848 "awkgram.y" { /* 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 */ 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 54: /* Line 1806 of yacc.c */ #line 863 "awkgram.y" { if (! can_return) yyerror(_("`return' used outside function context")); } break; case 55: /* 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 57: /* Line 1806 of yacc.c */ #line 886 "awkgram.y" { in_print = TRUE; in_parens = 0; } break; case 58: /* Line 1806 of yacc.c */ #line 887 "awkgram.y" { /* * 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 ((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] */ 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 \"\"'")); } } (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] * */ 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 59: /* Line 1806 of yacc.c */ #line 982 "awkgram.y" { sub_counter = 0; } break; case 60: /* Line 1806 of yacc.c */ #line 983 "awkgram.y" { char *arr = (yyvsp[(2) - (4)])->lextok; (yyvsp[(2) - (4)])->opcode = Op_push_array; (yyvsp[(2) - (4)])->memory = variable(arr, Node_var_new); if ((yyvsp[(4) - (4)]) == NULL) { static short warned = FALSE; if (do_lint && ! warned) { warned = TRUE; lintwarn_ln((yyvsp[(1) - (4)])->source_line, _("`delete array' is a gawk extension")); } 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 61: /* Line 1806 of yacc.c */ #line 1012 "awkgram.y" { 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")); } 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 62: /* Line 1806 of yacc.c */ #line 1031 "awkgram.y" { (yyval) = optimize_assignment((yyvsp[(1) - (1)])); } break; case 63: /* Line 1806 of yacc.c */ #line 1036 "awkgram.y" { (yyval) = NULL; } break; case 64: /* Line 1806 of yacc.c */ #line 1038 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 65: /* Line 1806 of yacc.c */ #line 1043 "awkgram.y" { (yyval) = NULL; } break; case 66: /* Line 1806 of yacc.c */ #line 1045 "awkgram.y" { if ((yyvsp[(1) - (2)]) == NULL) (yyval) = list_create((yyvsp[(2) - (2)])); else (yyval) = list_prepend((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); } break; case 67: /* 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 69: /* 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 1806 of yacc.c */ #line 1083 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 71: /* 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 1806 of yacc.c */ #line 1091 "awkgram.y" { bcfree((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); } break; case 73: /* Line 1806 of yacc.c */ #line 1096 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 74: /* Line 1806 of yacc.c */ #line 1098 "awkgram.y" { (yyvsp[(1) - (1)])->opcode = Op_push_re; (yyval) = (yyvsp[(1) - (1)]); } break; case 75: /* Line 1806 of yacc.c */ #line 1106 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 76: /* Line 1806 of yacc.c */ #line 1108 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 78: /* Line 1806 of yacc.c */ #line 1118 "awkgram.y" { (yyval) = (yyvsp[(2) - (3)]); } break; case 79: /* Line 1806 of yacc.c */ #line 1125 "awkgram.y" { in_print = FALSE; in_parens = 0; (yyval) = NULL; } break; case 80: /* Line 1806 of yacc.c */ #line 1130 "awkgram.y" { in_print = FALSE; in_parens = 0; } break; case 81: /* 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 82: /* 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 83: /* 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 1806 of yacc.c */ #line 1164 "awkgram.y" { (yyval) = NULL; } break; case 89: /* Line 1806 of yacc.c */ #line 1166 "awkgram.y" { bcfree((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); } break; case 92: /* 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 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 1806 of yacc.c */ #line 1192 "awkgram.y" { /* func_params = NULL; */ } break; case 95: /* Line 1806 of yacc.c */ #line 1194 "awkgram.y" { /* func_params = NULL; */ } break; case 96: /* Line 1806 of yacc.c */ #line 1196 "awkgram.y" { /* func_params = NULL; */ } break; case 97: /* Line 1806 of yacc.c */ #line 1202 "awkgram.y" { (yyval) = NULL; } break; case 98: /* Line 1806 of yacc.c */ #line 1204 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 99: /* Line 1806 of yacc.c */ #line 1209 "awkgram.y" { (yyval) = NULL; } break; case 100: /* Line 1806 of yacc.c */ #line 1211 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 101: /* Line 1806 of yacc.c */ #line 1216 "awkgram.y" { (yyval) = mk_expression_list(NULL, (yyvsp[(1) - (1)])); } break; case 102: /* Line 1806 of yacc.c */ #line 1218 "awkgram.y" { (yyval) = mk_expression_list((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); yyerrok; } break; case 103: /* Line 1806 of yacc.c */ #line 1223 "awkgram.y" { (yyval) = NULL; } break; case 104: /* Line 1806 of yacc.c */ #line 1225 "awkgram.y" { (yyval) = NULL; } break; case 105: /* Line 1806 of yacc.c */ #line 1227 "awkgram.y" { (yyval) = NULL; } break; case 106: /* Line 1806 of yacc.c */ #line 1229 "awkgram.y" { (yyval) = NULL; } break; case 107: /* 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 1806 of yacc.c */ #line 1242 "awkgram.y" { (yyval) = mk_boolean((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 109: /* 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 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 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 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 1806 of yacc.c */ #line 1281 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 115: /* Line 1806 of yacc.c */ #line 1286 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 116: /* 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 1806 of yacc.c */ #line 1298 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 119: /* Line 1806 of yacc.c */ #line 1300 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 120: /* Line 1806 of yacc.c */ #line 1305 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 121: /* Line 1806 of yacc.c */ #line 1307 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 122: /* Line 1806 of yacc.c */ #line 1312 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 123: /* Line 1806 of yacc.c */ #line 1314 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 124: /* Line 1806 of yacc.c */ #line 1316 "awkgram.y" { int count = 2; int is_simple_var = FALSE; 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. */ } 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 1806 of yacc.c */ #line 1371 "awkgram.y" { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 127: /* 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 1806 of yacc.c */ #line 1375 "awkgram.y" { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 129: /* 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 1806 of yacc.c */ #line 1379 "awkgram.y" { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 131: /* 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 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 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 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 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 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 1806 of yacc.c */ #line 1447 "awkgram.y" { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 138: /* 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 1806 of yacc.c */ #line 1451 "awkgram.y" { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 140: /* 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; if (do_lint && ! warned1) { warned1 = TRUE; 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 151: /* Line 1806 of yacc.c */ #line 1526 "awkgram.y" { (yyvsp[(1) - (2)])->opcode = Op_preincrement; (yyval) = mk_assignment((yyvsp[(2) - (2)]), NULL, (yyvsp[(1) - (2)])); } break; case 152: /* 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 153: /* Line 1806 of yacc.c */ #line 1536 "awkgram.y" { (yyval) = list_create((yyvsp[(1) - (1)])); } break; case 154: /* Line 1806 of yacc.c */ #line 1540 "awkgram.y" { (yyval) = list_create((yyvsp[(1) - (1)])); } break; case 155: /* 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 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; case 158: /* Line 1806 of yacc.c */ #line 1574 "awkgram.y" { /* 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 159: /* Line 1806 of yacc.c */ #line 1610 "awkgram.y" { 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 160: /* Line 1806 of yacc.c */ #line 1627 "awkgram.y" { (yyval) = NULL; } break; case 161: /* Line 1806 of yacc.c */ #line 1629 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 162: /* Line 1806 of yacc.c */ #line 1634 "awkgram.y" { (yyval) = NULL; } break; 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; case 172: /* Line 1806 of yacc.c */ #line 1706 "awkgram.y" { NODE *n; char *arr = (yyvsp[(1) - (2)])->lextok; if ((n = lookup(arr)) != NULL && ! isarray(n)) yyerror(_("use of non-array as array")); (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 173: /* 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 174: /* Line 1806 of yacc.c */ #line 1732 "awkgram.y" { (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 175: /* Line 1806 of yacc.c */ #line 1741 "awkgram.y" { (yyvsp[(1) - (1)])->opcode = Op_postincrement; } break; case 176: /* Line 1806 of yacc.c */ #line 1745 "awkgram.y" { (yyvsp[(1) - (1)])->opcode = Op_postdecrement; } break; case 177: /* Line 1806 of yacc.c */ #line 1748 "awkgram.y" { (yyval) = NULL; } break; case 179: /* Line 1806 of yacc.c */ #line 1756 "awkgram.y" { yyerrok; } break; case 180: /* Line 1806 of yacc.c */ #line 1760 "awkgram.y" { yyerrok; } break; case 183: /* Line 1806 of yacc.c */ #line 1769 "awkgram.y" { yyerrok; } break; case 184: /* Line 1806 of yacc.c */ #line 1773 "awkgram.y" { (yyval) = (yyvsp[(1) - (1)]); yyerrok; } break; case 185: /* Line 1806 of yacc.c */ #line 1777 "awkgram.y" { yyerrok; } break; /* 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); 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 1779 "awkgram.y" struct token { 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 */ # define NOT_OLD 0x0100 /* feature not in old awk */ # define NOT_POSIX 0x0200 /* feature not in POSIX */ # define GAWKX 0x0400 /* gawk extension */ # define RESX 0x0800 /* Bell Labs Research extension */ # 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(const void *l, const void *r) { struct token *lhs, *rhs; lhs = (struct token *) l; rhs = (struct token *) r; return strcmp(lhs->operator, rhs->operator); } #endif /* * Tokentab is sorted ASCII ascending order, so it can be binary searched. * See check_special(), which sorts the table on EBCDIC systems. * Function pointers come from declarations in awk.h. */ static const struct token tokentab[] = { {"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", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_adump}, #endif {"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", Op_builtin, LEX_BUILTIN, GAWKX|A(0), stopme}, #endif {"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}, }; #if MBS_SUPPORT /* Variable containing the current shift state. */ static mbstate_t cur_mbstate; /* Ring buffer containing current characters. */ #define MAX_CHAR_IN_RING_BUFFER 8 #define RING_BUFFER_SIZE (MAX_CHAR_IN_RING_BUFFER * MB_LEN_MAX) static char cur_char_ring[RING_BUFFER_SIZE]; /* Index for ring buffers. */ static int cur_ring_idx; /* This macro means that last nextc() return a singlebyte character or 1st byte of a multibyte character. */ #define nextc_is_1stbyte (cur_char_ring[cur_ring_idx] == 1) #else /* MBS_SUPPORT */ /* a dummy */ #define nextc_is_1stbyte 1 #endif /* MBS_SUPPORT */ /* getfname --- return name of a builtin function (for pretty printing) */ const char * getfname(NODE *(*fptr)(int)) { int i, j; j = sizeof(tokentab) / sizeof(tokentab[0]); /* linear search, no other way to do it */ for (i = 0; i < j; i++) if (tokentab[i].ptr == fptr) return tokentab[i].operator; return NULL; } /* print_included_from --- print `Included from ..' file names and locations */ 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 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; 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) { if (thisline == NULL) { cp = lexeme; if (*cp == '\n') { cp--; mesg = _("unexpected newline or end of string"); } for (; cp != lexptr_begin && *cp != '\n'; --cp) continue; if (*cp == '\n') cp++; thisline = cp; } /* NL isn't guaranteed */ bp = lexeme; while (bp < lexend && *bp && *bp != '\n') bp++; } else { thisline = end_of_file_line; bp = thisline + strlen(thisline); } /* * Saving and restoring *bp keeps valgrind happy, * since the guts of glibc uses strlen, even though * we're passing an explict precision. Sigh. * * 8/2003: We may not need this anymore. */ save = *bp; *bp = '\0'; msg("%.*s", (int) (bp - thisline), thisline); *bp = save; va_start(args, m); if (mesg == NULL) mesg = m; count = (bp - thisline) + strlen(mesg) + 2 + 1; emalloc(buf, char *, count, "yyerror"); bp = buf; if (lexptr != NULL) { scan = thisline; while (scan < lexeme) if (*scan++ == '\t') *bp++ = '\t'; else *bp++ = ' '; *bp++ = '^'; *bp++ = ' '; } strcpy(bp, mesg); err("", buf, args); va_end(args); efree(buf); } /* mk_program --- create a single list of instructions */ static INSTRUCTION * mk_program() { INSTRUCTION *cp, *tmp; #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] 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; 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); } 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) 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; error(_("can't open source file `%s' for reading (%s)"), in, strerror(errno)); errcount++; lexeof = TRUE; return sourcefile->src; } sourcefile->fd = fd; l = optimal_bufsize(fd, &sbuf); /* * Make sure that something silly like * AWKBUFSIZE=8 make check * works ok. */ #define A_DECENT_BUFFER_SIZE 128 if (l < A_DECENT_BUFFER_SIZE) l = A_DECENT_BUFFER_SIZE; #undef A_DECENT_BUFFER_SIZE sourcefile->bufsize = l; newfile = TRUE; emalloc(sourcefile->buf, char *, sourcefile->bufsize, "get_src_buf"); lexptr = lexptr_begin = lexeme = sourcefile->buf; savelen = 0; sourceline = 1; thisline = NULL; } else { /* * Here, we retain the current source line in the beginning of the buffer. */ int offset; for (scan = lexeme; scan > lexptr_begin; scan--) if (*scan == '\n') { scan++; break; } savelen = lexptr - scan; offset = lexptr - lexeme; if (savelen > 0) { /* * 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. */ 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; } } return sourcefile->buf; } /* tokadd --- add a character to the token buffer */ #define tokadd(x) (*tok++ = (x), tok == tokend ? tokexpand() : tok) /* tokexpand --- grow the token buffer */ static char * tokexpand() { static int toksize; int tokoffset; if (tokstart != NULL) { tokoffset = tok - tokstart; toksize *= 2; erealloc(tokstart, char *, toksize, "tokexpand"); tok = tokstart + tokoffset; } else { toksize = 60; emalloc(tokstart, char *, toksize, "tokexpand"); tok = tokstart; } tokend = tokstart + toksize; return tok; } /* nextc --- get the next input character */ #if MBS_SUPPORT static int nextc(void) { if (gawk_mb_cur_max > 1) { again: if (lexeof) return END_FILE; if (lexptr == NULL || lexptr >= lexend) { if (get_src_buf()) goto again; return END_SRC; } /* Update the buffer index. */ cur_ring_idx = (cur_ring_idx == RING_BUFFER_SIZE - 1)? 0 : cur_ring_idx + 1; /* Did we already check the current character? */ if (cur_char_ring[cur_ring_idx] == 0) { /* No, we need to check the next character on the buffer. */ 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); if (mbclen == 1 || mbclen == (size_t)-1 || mbclen == 0) { /* It is a singlebyte character, non-complete multibyte character or EOF. We treat it as a singlebyte character. */ cur_char_ring[work_ring_idx] = 1; break; } else if (mbclen == (size_t)-2) { /* It is not a complete multibyte character. */ cur_char_ring[work_ring_idx] = idx + 1; } else { /* mbclen > 1 */ cur_char_ring[work_ring_idx] = mbclen; break; } work_ring_idx = (work_ring_idx == RING_BUFFER_SIZE - 1)? 0 : work_ring_idx + 1; } cur_mbstate = tmp_state; /* Put a mark on the position on which we write next character. */ work_ring_idx = (work_ring_idx == RING_BUFFER_SIZE - 1)? 0 : work_ring_idx + 1; cur_char_ring[work_ring_idx] = 0; } return (int) (unsigned char) *lexptr++; } 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 */ int nextc() { do { if (lexeof) return END_FILE; if (lexptr && lexptr < lexend) return ((int) (unsigned char) *lexptr++); } while (get_src_buf()); return END_SRC; } #endif /* MBS_SUPPORT */ /* pushback --- push a character back on the input */ static inline void pushback(void) { #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 (! lexeof && lexptr && lexptr > lexptr_begin ? lexptr-- : lexptr); } /* allow_newline --- allow newline after &&, ||, ? and : */ static void allow_newline(void) { int c; for (;;) { c = nextc(); if (c == END_FILE) { pushback(); break; } if (c == '#') { while ((c = nextc()) != '\n' && c != END_FILE) continue; if (c == END_FILE) { pushback(); break; } } if (c == '\n') sourceline++; if (! isspace(c)) { pushback(); break; } } } /* 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) { 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; int inhex = FALSE; int intlstr = FALSE; #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 __EMX__ /* * added for OS/2's extproc feature of cmd.exe * (like #! in BSD sh) */ if (strncasecmp(lexptr, "extproc ", 8) == 0) { while (*lexptr && *lexptr != '\n') lexptr++; } #endif lexeme = lexptr; thisline = NULL; if (want_regexp) { int in_brack = 0; /* count brackets, [[:alnum:]] allowed */ /* * Counting brackets is non-trivial. [[] is ok, * and so is [\]], with a point being that /[/]/ as a regexp * constant has to work. * * Do not count [ or ] if either one is preceded by a \. * A `[' should be counted if * a) it is the first one so far (in_brack == 0) * b) it is the `[' in `[:' * A ']' should be counted if not preceded by a \, since * it is either closing `:]' or just a plain list. * According to POSIX, []] is how you put a ] into a set. * Try to handle that too. * * The code for \ handles \[ and \]. */ want_regexp = FALSE; tok = tokstart; for (;;) { c = nextc(); if (gawk_mb_cur_max == 1 || nextc_is_1stbyte) switch (c) { case '[': /* one day check for `.' and `=' too */ if (nextc() == ':' || in_brack == 0) in_brack++; pushback(); break; case ']': if (tokstart[0] == '[' && (tok == tokstart + 1 || (tok == tokstart + 2 && tokstart[1] == '^'))) /* do nothing */; else in_brack--; break; case '\\': if ((c = nextc()) == END_FILE) { pushback(); yyerror(_("unterminated regexp ends with `\\' at end of file")); goto end_regexp; /* kludge */ } else if (c == '\n') { sourceline++; continue; } else { tokadd('\\'); tokadd(c); continue; } break; case '/': /* end of the regexp */ if (in_brack > 0) break; end_regexp: yylval = GET_INSTRUCTION(Op_token); yylval->lextok = estrdup(tokstart, tok - tokstart); if (do_lint) { int peek = nextc(); pushback(); if (peek == 'i' || peek == 's') { if (source) lintwarn( _("%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"), source, sourceline, peek); else lintwarn( _("tawk regex modifier `/.../%c' doesn't work in gawk"), peek); } } return lasttok = REGEXP; case '\n': pushback(); yyerror(_("unterminated regexp")); goto end_regexp; /* kludge */ case END_FILE: pushback(); yyerror(_("unterminated regexp at end of file")); goto end_regexp; /* kludge */ } tokadd(c); } } retry: /* skipping \r is a hack, but windows is just too pervasive. sigh. */ while ((c = nextc()) == ' ' || c == '\t' || c == '\r') continue; lexeme = lexptr ? lexptr - 1 : lexptr; thisline = NULL; tok = tokstart; #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 == END_FILE) return lasttok = NEWLINE_EOF; } sourceline++; return lasttok = NEWLINE; case '@': return lasttok = '@'; case '\\': #ifdef RELAXED_CONTINUATION /* * This code puports to allow comments and/or whitespace * after the `\' at the end of a line used for continuation. * Use it at your own risk. We think it's a bad idea, which * is why it's not on by default. */ if (! do_traditional) { /* strip trailing white-space and/or comment */ while ((c = nextc()) == ' ' || c == '\t' || c == '\r') continue; if (c == '#') { static short warned = FALSE; if (do_lint && ! warned) { warned = TRUE; lintwarn( _("use of `\\ #...' line continuation is not portable")); } while ((c = nextc()) != '\n') if (c == END_FILE) break; } pushback(); } #endif /* RELAXED_CONTINUATION */ 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")); return lasttok = LEX_EOF; } break; case ':': case '?': yylval = GET_INSTRUCTION(Op_cond_exp); if (! do_posix) allow_newline(); return lasttok = c; /* * in_parens is undefined unless we are parsing a print * statement (in_print), but why bother with a check? */ case ')': in_parens--; return lasttok = c; case '(': in_parens++; return lasttok = c; case '$': yylval = GET_INSTRUCTION(Op_field_spec); return lasttok = c; case '{': if (++in_braces == 1) firstline = sourceline; case ';': case ',': case '[': return lasttok = c; case ']': 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 = 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 ^= */ static int did_warn_op = FALSE, did_warn_assgn = FALSE; if (nextc() == '=') { if (! did_warn_assgn) { did_warn_assgn = TRUE; if (do_lint) lintwarn(_("POSIX does not allow operator `**='")); if (do_lint_old) warning(_("old awk does not support operator `**='")); } yylval = GET_INSTRUCTION(Op_assign_exp); return ASSIGNOP; } else { pushback(); if (! did_warn_op) { did_warn_op = TRUE; if (do_lint) lintwarn(_("POSIX does not allow operator `**'")); 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 '/': if (nextc() == '=') { pushback(); return lasttok = SLASH_BEFORE_EQUAL; } pushback(); yylval = GET_INSTRUCTION(Op_quotient); return lasttok = '/'; case '%': if (nextc() == '=') { yylval = GET_INSTRUCTION(Op_assign_mod); return lasttok = ASSIGNOP; } pushback(); yylval = GET_INSTRUCTION(Op_mod); return lasttok = '%'; case '^': { static int did_warn_op = FALSE, did_warn_assgn = FALSE; if (nextc() == '=') { if (do_lint_old && ! did_warn_assgn) { did_warn_assgn = TRUE; warning(_("operator `^=' is not supported in old awk")); } yylval = GET_INSTRUCTION(Op_assign_exp); return lasttok = ASSIGNOP; } pushback(); if (do_lint_old && ! did_warn_op) { did_warn_op = TRUE; warning(_("operator `^' is not supported in old awk")); } yylval = GET_INSTRUCTION(Op_exp); return lasttok = '^'; } case '+': if ((c = nextc()) == '=') { yylval = GET_INSTRUCTION(Op_assign_plus); return lasttok = ASSIGNOP; } if (c == '+') { yylval = GET_INSTRUCTION(Op_symbol); return lasttok = INCREMENT; } pushback(); yylval = GET_INSTRUCTION(Op_plus); return lasttok = '+'; case '!': if ((c = nextc()) == '=') { yylval = GET_INSTRUCTION(Op_notequal); return lasttok = RELOP; } if (c == '~') { yylval = GET_INSTRUCTION(Op_nomatch); return lasttok = MATCHOP; } pushback(); yylval = GET_INSTRUCTION(Op_symbol); return lasttok = '!'; case '<': if (nextc() == '=') { yylval = GET_INSTRUCTION(Op_leq); return lasttok = RELOP; } yylval = GET_INSTRUCTION(Op_less); pushback(); return lasttok = '<'; case '=': if (nextc() == '=') { yylval = GET_INSTRUCTION(Op_equal); return lasttok = RELOP; } yylval = GET_INSTRUCTION(Op_assign); pushback(); return lasttok = ASSIGN; case '>': if ((c = nextc()) == '=') { yylval = GET_INSTRUCTION(Op_geq); return lasttok = RELOP; } else if (c == '>') { yylval = GET_INSTRUCTION(Op_symbol); yylval->redir_type = redirect_append; return lasttok = IO_OUT; } pushback(); if (in_print && in_parens == 0) { yylval = GET_INSTRUCTION(Op_symbol); yylval->redir_type = redirect_output; return lasttok = IO_OUT; } yylval = GET_INSTRUCTION(Op_greater); return lasttok = '>'; case '~': yylval = GET_INSTRUCTION(Op_match); return lasttok = MATCHOP; case '}': /* * Added did newline stuff. Easier than * hacking the grammar. */ if (did_newline) { did_newline = FALSE; if (--in_braces == 0) lastline = sourceline; return lasttok = c; } did_newline++; --lexptr; /* pick up } next time */ return lasttok = NEWLINE; case '"': string: esc_seen = FALSE; while ((c = nextc()) != '"') { if (c == '\n') { pushback(); yyerror(_("unterminated string")); return lasttok = LEX_EOF; } if ((gawk_mb_cur_max == 1 || nextc_is_1stbyte) && c == '\\') { c = nextc(); if (c == '\n') { sourceline++; continue; } esc_seen = TRUE; if (! want_source || c != '"') tokadd('\\'); } if (c == END_FILE) { pushback(); yyerror(_("unterminated string")); return lasttok = LEX_EOF; } tokadd(c); } 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->memory->flags |= INTLSTR; intlstr = FALSE; if (do_intl) dumpintlstr(yylval->memory->stptr, yylval->memory->stlen); } return lasttok = YSTRING; case '-': if ((c = nextc()) == '=') { yylval = GET_INSTRUCTION(Op_assign_minus); return lasttok = ASSIGNOP; } if (c == '-') { yylval = GET_INSTRUCTION(Op_symbol); return lasttok = DECREMENT; } pushback(); yylval = GET_INSTRUCTION(Op_minus); return lasttok = '-'; case '.': c = nextc(); pushback(); if (! isdigit(c)) return lasttok = '.'; else c = '.'; /* FALL THROUGH */ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': /* It's a number */ for (;;) { int gotnumber = FALSE; tokadd(c); switch (c) { case 'x': case 'X': if (do_traditional) goto done; if (tok == tokstart + 2) { int peek = nextc(); if (isxdigit(peek)) { inhex = TRUE; pushback(); /* following digit */ } else { pushback(); /* x or X */ goto done; } } break; case '.': /* period ends exponent part of floating point number */ if (seen_point || seen_e) { gotnumber = TRUE; break; } seen_point = TRUE; break; case 'e': case 'E': if (inhex) break; if (seen_e) { gotnumber = TRUE; break; } seen_e = TRUE; if ((c = nextc()) == '-' || c == '+') { int c2 = nextc(); if (isdigit(c2)) { tokadd(c); tokadd(c2); } else { pushback(); /* non-digit after + or - */ pushback(); /* + or - */ pushback(); /* e or E */ } } else if (! isdigit(c)) { pushback(); /* character after e or E */ pushback(); /* e or E */ } else { pushback(); /* digit */ } break; case 'a': case 'A': case 'b': case 'B': case 'c': case 'C': case 'D': case 'd': case 'f': case 'F': if (do_traditional || ! inhex) goto done; /* fall through */ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': break; default: done: gotnumber = TRUE; } if (gotnumber) break; c = nextc(); } pushback(); tokadd('\0'); yylval = GET_INSTRUCTION(Op_push_i); if (! do_traditional && isnondecimal(tokstart, FALSE)) { if (do_lint) { 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->memory = mk_number(nondec2awknum(tokstart, strlen(tokstart)), PERM|NUMCUR|NUMBER); } else yylval->memory = mk_number(atof(tokstart), PERM|NUMCUR|NUMBER); return lasttok = YNUMBER; case '&': if ((c = nextc()) == '&') { yylval = GET_INSTRUCTION(Op_and); allow_newline(); return lasttok = LEX_AND; } pushback(); yylval = GET_INSTRUCTION(Op_symbol); return lasttok = '&'; case '|': if ((c = nextc()) == '|') { yylval = GET_INSTRUCTION(Op_or); allow_newline(); return lasttok = LEX_OR; } else if (! do_traditional && c == '&') { 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 = GET_INSTRUCTION(Op_symbol); yylval->redir_type = redirect_pipe; return lasttok = IO_OUT; } else { 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); return lasttok = LEX_EOF; } /* * Lots of fog here. Consider: * * print "xyzzy"$_"foo" * * Without the check for ` lasttok != '$' ', this is parsed as * * print "xxyzz" $(_"foo") * * With the check, it is "correctly" parsed as three * string concatenations. Sigh. This seems to be * "more correct", but this is definitely one of those * occasions where the interactions are funny. */ if (! do_traditional && c == '_' && lasttok != '$') { if ((c = nextc()) == '"') { intlstr = TRUE; goto string; } pushback(); c = '_'; } /* it's some type of name-type-thing. Find its length. */ tok = tokstart; while (c != END_FILE && is_identchar(c)) { tokadd(c); c = nextc(); } tokadd('\0'); 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) && ! (warntab[mid] & GAWKX)) { lintwarn(_("`%s' is a gawk extension"), tokentab[mid].operator); warntab[mid] |= GAWKX; } if ((tokentab[mid].flags & RESX) && ! (warntab[mid] & RESX)) { lintwarn(_("`%s' is a Bell Labs extension"), tokentab[mid].operator); 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) && ! (warntab[mid] & NOT_OLD) ) { warning(_("`%s' is not supported in old awk"), tokentab[mid].operator); warntab[mid] |= NOT_OLD; } 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 { 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) { goto_warned = TRUE; lintwarn(_("`goto' considered harmful!\n")); } return lasttok = NAME; } #undef GET_INSTRUCTION #undef NEWLINE_EOF } /* mk_symbol --- allocates a symbol for the symbol table. */ NODE * mk_symbol(NODETYPE type, NODE *value) { NODE *r; 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 --- instructions for builtin functions. Checks for arg. count and supplies defaults where possible. */ static INSTRUCTION * snode(INSTRUCTION *subn, INSTRUCTION *r) { INSTRUCTION *arg; INSTRUCTION *ip; NODE *n; int nexp = 0; int args_allowed; int idx = r->builtin_idx; 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) { 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 (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; arg = subn->nexti->lasti->nexti; /* 2nd arg list */ (void) mk_rexp(arg); if (nexp == 3) { /* 3rd argument there */ if (do_lint && ! warned) { warned = TRUE; lintwarn(_("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_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) 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 && ! warned) { warned = TRUE; lintwarn(_("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->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->nexti->lasti->memory; if ((str->flags & INTLSTR) != 0) warning(_("use of dcgettext(_\"...\") is incorrect: remove leading underscore")); /* don't dump it, the lexer already did */ else dumpintlstr(str->stptr, str->stlen); } else if (do_intl /* --gen-po */ && r->builtin == do_dcngettext /* dcngettext(...) */ && 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->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 if (subn != NULL) { r->expr_count = count_expressions(&subn, FALSE); return list_append(subn, r); } r->expr_count = 0; return list_create(r); } /* append_param --- append PNAME to the list of parameters * for the current function. */ static void append_param(char *pname) { static NODE *savetail = NULL; NODE *p; 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(INSTRUCTION *fp, NODE *func) { NODE *np; const char *fname, **names; int count, i, j, dups; NODE *params; if (func == NULL) /* error earlier */ return TRUE; fname = func->param; count = func->param_cnt; params = func->rnode; if (count == 0) /* no args, no problem */ return FALSE; if (params == NULL) /* error earlier */ return TRUE; emalloc(names, const char **, count * sizeof(char *), "dup_parms"); i = 0; for (np = params; np != NULL; np = np->rnode) { if (np->param == NULL) { /* error earlier, give up, go home */ efree(names); return TRUE; } names[i++] = np->param; } dups = 0; for (i = 1; i < count; i++) { for (j = 0; j < i; j++) { if (strcmp(names[i], names[j]) == 0) { dups++; error_ln(fp->source_line, _("function `%s': parameter #%d, `%s', duplicates parameter #%d"), fname, i + 1, names[j], j+1); } } } efree(names); return (dups > 0 ? TRUE : FALSE); } /* parms_shadow --- check if parameters shadow globals */ static int parms_shadow(INSTRUCTION *pc, int *shadow) { 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 pcount = func->lnode->param_cnt; 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 < pcount; i++) { if (lookup(func->parmlist[i]) != NULL) { warning( _("function `%s': parameter `%s' shadows global variable"), fname, func->parmlist[i]); ret = TRUE; } } *shadow |= ret; return 0; } /* * 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_symbol(char *name, NODE *value) { NODE *hp; size_t len; int bucket; if (install_func) (*install_func)(name); var_count++; len = strlen(name); bucket = hash(name, len, (unsigned long) HASHSIZE, NULL); getnode(hp); hp->type = Node_hashnode; hp->hnext = variables[bucket]; variables[bucket] = hp; hp->hlength = len; hp->hvalue = value; hp->hname = name; hp->hvalue->vname = name; return hp->hvalue; } /* lookup --- find the most recent hash node for name installed by install_symbol */ NODE * lookup(const char *name) { 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 && strncmp(bucket->hname, name, len) == 0) return bucket->hvalue; return NULL; } /* sym_comp --- compare two symbol (variable or function) names */ static int sym_comp(const void *v1, const void *v2) { const NODE *const *npp1, *const *npp2; const NODE *n1, *n2; int minlen; npp1 = (const NODE *const *) v1; npp2 = (const NODE *const *) v2; n1 = *npp1; n2 = *npp2; if (n1->hlength > n2->hlength) minlen = n1->hlength; else minlen = n2->hlength; return strncmp(n1->hname, n2->hname, minlen); } /* valinfo --- dump var info */ void valinfo(NODE *n, int (*print_func)(FILE *, const char *, ...), FILE *fp) { 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) print_func(fp, "%.17g\n", n->numbr); else if (n->flags & STRCUR) { pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', FALSE); print_func(fp, "\n"); } else if (n->flags & NUMCUR) print_func(fp, "%.17g\n", n->numbr); else print_func(fp, "?? flags %s\n", flags2str(n->flags)); } /* get_varlist --- list of global variables */ NODE ** get_varlist() { int i, j; NODE **table; NODE *p; 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 *), 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; table = get_varlist(); for (i = 0; (p = table[i]) != NULL; i++) { if (p->hvalue->type == Node_func) continue; print_func(fp, "%.*s: ", (int) p->hlength, p->hname); if (p->hvalue->type == Node_var_array) print_func(fp, "array, %ld elements\n", p->hvalue->table_size); else if (p->hvalue->type == Node_var_new) print_func(fp, "untyped variable\n"); else if (p->hvalue->type == Node_var) valinfo(p->hvalue->var_value, print_func, fp); } efree(table); } /* 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)); } /* release_all_vars --- free all variable memory */ void release_all_vars() { int i; NODE *p, *next; for (i = 0; i < HASHSIZE; i++) { for (p = variables[i]; p != NULL; p = next) { next = p->hnext; if (p->hvalue->type == Node_func) continue; else if (p->hvalue->type == Node_var_array) assoc_clear(p->hvalue); else if (p->hvalue->type != Node_var_new) unref(p->hvalue->var_value); efree(p->hname); freenode(p->hvalue); freenode(p); } } } /* dump_funcs --- print all functions */ void dump_funcs() { if (func_count <= 0) return; (void) foreach_func((int (*)(INSTRUCTION *, void *)) pp_func, TRUE, (void *) 0); } /* shadow_funcs --- check all functions for parameters that shadow globals */ void shadow_funcs() { static int calls = 0; int shadow = FALSE; if (func_count <= 0) return; if (calls++ != 0) fatal(_("shadow_funcs() called twice!")); (void) foreach_func((int (*)(INSTRUCTION *, void *)) parms_shadow, TRUE, &shadow); /* End with fatal if the user requested it. */ if (shadow && lintfunc != warning) lintwarn(_("there were shadowed variables.")); } /* * 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 * as value. * * Extra work, build up and save a list of the parameter names in a table * and hang it off params->parmlist. This is used to set the `vname' field * of each function parameter during a function call. See eval.c. */ static int func_install(INSTRUCTION *func, INSTRUCTION *def) { 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) { 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 */ 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) { 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 = mk_symbol(Node_func, params); (void) install_symbol(fname, thisfunc); thisfunc->code_ptr = func; func->func_body = thisfunc; for (n = params->rnode; n != NULL; n = n->rnode) pcount++; if (pcount != 0) { 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(fname, FUNC_DEFINE); func_count++; /* used in profiler / pretty printer */ remove_params: /* remove params from symbol table */ pop_params(params->rnode); return 0; } /* remove_symbol --- remove a variable from the symbol table */ NODE * remove_symbol(char *name) { NODE *bucket, **save; size_t len; len = strlen(name); save = &(variables[hash(name, len, (unsigned long) HASHSIZE, NULL)]); for (bucket = *save; bucket != NULL; bucket = bucket->hnext) { if (len == bucket->hlength && strncmp(bucket->hname, name, len) == 0) { var_count--; *save = bucket->hnext; return bucket; } save = &(bucket->hnext); } return NULL; } /* pop_params --- remove list of function parameters from symbol table */ /* * pop parameters out of the symbol table. do this in reverse order to * avoid reading freed memory if there were duplicated parameters. */ static void pop_params(NODE *params) { NODE *hp; if (params == NULL) return; pop_params(params->rnode); hp = remove_symbol(params->param); if (hp != NULL) freenode(hp); } /* make_param --- make NAME into a function parameter */ static NODE * make_param(char *name) { NODE *r; getnode(r); r->type = Node_param_list; r->rnode = NULL; r->param_cnt = param_counter++; return (install_symbol(name, r)); } static struct fdesc { char *name; short used; short defined; struct fdesc *next; } *ftable[HASHSIZE]; /* func_use --- track uses and definitions of functions */ static void func_use(const char *name, enum defref how) { struct fdesc *fp; int len; int ind; len = strlen(name); ind = hash(name, len, HASHSIZE, NULL); for (fp = ftable[ind]; fp != NULL; fp = fp->next) { if (strcmp(fp->name, name) == 0) { if (how == FUNC_DEFINE) fp->defined++; else fp->used++; return; } } /* not in the table, fall through to allocate a new one */ emalloc(fp, struct fdesc *, sizeof(struct fdesc), "func_use"); memset(fp, '\0', sizeof(struct fdesc)); emalloc(fp->name, char *, len + 1, "func_use"); strcpy(fp->name, name); if (how == FUNC_DEFINE) fp->defined++; else fp->used++; fp->next = ftable[ind]; ftable[ind] = fp; } /* check_funcs --- verify functions that are called but not defined */ static void check_funcs() { 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 /* making this the default breaks old code. sigh. */ if (fp->defined == 0) { error( _("function `%s' called but never defined"), fp->name); errcount++; } #else if (do_lint && fp->defined == 0) lintwarn( _("function `%s' called but never defined"), fp->name); #endif if (do_lint && fp->used == 0) { 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; efree(fp->name); efree(fp); } ftable[i] = NULL; } } /* param_sanity --- look for parameters that are regexp constants */ static void param_sanity(INSTRUCTION *arglist) { 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; } /* 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); emalloc(dv, struct deferred_variable *, sizeof(*dv)+sl, "register_deferred_variable"); dv->load_func = load_func; dv->next = deferred_variables; memcpy(dv->name, name, sl+1); deferred_variables = dv; } /* variable --- make sure NAME is in the symbol table */ NODE * variable(char *name, NODETYPE type) { NODE *r; if ((r = lookup(name)) != NULL) { 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. */ if (type == Node_var) r = mk_symbol(type, Nnull_string); else r = mk_symbol(type, (NODE *) NULL); return install_symbol(name, r); } if (strcmp(name, dv->name) == 0) { r = (*dv->load_func)(); break; } } } efree(name); return r; } /* make_regnode --- make a regular expression node */ static NODE * make_regnode(int type, NODE *exp) { NODE *n; getnode(n); 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; } /* 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(OPCODE type) { switch (type) { 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 */ } return FALSE; } /* make_assignable --- make this operand an assignable one if posiible */ static INSTRUCTION * make_assignable(INSTRUCTION *ip) { 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 NULL; } /* stopme --- for debugging */ NODE * stopme(int nargs ATTRIBUTE_UNUSED) { return (NODE *) 0; } /* dumpintlstr --- write out an initial .po file entry for the string */ static void dumpintlstr(const char *str, size_t len) { char *cp; /* See the GNU gettext distribution for details on the file format */ if (source != NULL) { /* ala the gettext sources, remove leading `./'s */ for (cp = source; cp[0] == '.' && cp[1] == '/'; cp += 2) continue; printf("#: %s:%d\n", cp, sourceline); } printf("msgid "); pp_string_fp(fprintf, stdout, str, len, '"', TRUE); putchar('\n'); printf("msgstr \"\"\n\n"); fflush(stdout); } /* dumpintlstr2 --- write out an initial .po file entry for the string and its plural */ static void dumpintlstr2(const char *str1, size_t len1, const char *str2, size_t len2) { char *cp; /* See the GNU gettext distribution for details on the file format */ if (source != NULL) { /* ala the gettext sources, remove leading `./'s */ for (cp = source; cp[0] == '.' && cp[1] == '/'; cp += 2) continue; printf("#: %s:%d\n", cp, sourceline); } printf("msgid "); pp_string_fp(fprintf, stdout, str1, len1, '"', TRUE); putchar('\n'); printf("msgid_plural "); pp_string_fp(fprintf, stdout, str2, len2, '"', TRUE); putchar('\n'); printf("msgstr[0] \"\"\nmsgstr[1] \"\"\n\n"); fflush(stdout); } /* isarray --- can this type be subscripted? */ static int isarray(NODE *n) { switch (n->type) { case Node_var_new: case Node_var_array: return TRUE; case Node_param_list: return (n->flags & FUNC) == 0; case Node_array_ref: cant_happen(); break; default: break; /* keeps gcc -Wall happy */ } 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 check_special(const char *name) { int low, high, mid; int i; #if 'a' == 0x81 /* it's EBCDIC */ static int did_sort = FALSE; if (! did_sort) { 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) { mid = (low + high) / 2; i = *name - tokentab[mid].operator[0]; if (i == 0) i = strcmp(name, tokentab[mid].operator); if (i < 0) /* token < mid */ high = mid - 1; else if (i > 0) /* token > mid */ low = mid + 1; else { if ((do_traditional && (tokentab[mid].flags & GAWKX)) || (do_posix && (tokentab[mid].flags & NOT_POSIX))) return -1; return mid; } } return -1; } /* * This provides a private version of functions that act like VMS's * variable-length record filesystem, where there was a bug on * certain source files. */ static FILE *fp = NULL; /* read_one_line --- return one input line at a time. mainly for debugging. */ static ssize_t read_one_line(int fd, void *buffer, size_t count) { char buf[BUFSIZ]; /* Minor potential memory leak here. Too bad. */ if (fp == NULL) { fp = fdopen(fd, "r"); if (fp == NULL) { fprintf(stderr, "ugh. fdopen: %s\n", strerror(errno)); gawk_exit(EXIT_FAILURE); } } if (fgets(buf, sizeof buf, fp) == NULL) return 0; memcpy(buffer, buf, strlen(buf)); return strlen(buf); } /* one_line_close --- close the open file being read with read_one_line() */ static int one_line_close(int fd) { int ret; if (fp == NULL || fd != fileno(fp)) fatal("debugging read/close screwed up!"); ret = fclose(fp); fp = NULL; return ret; } gawk-4.0.1+dfsg.orig/version.c0000644000175000017500000000010311734667226015206 0ustar schotschot#include "config.h" const char *version_string = "GNU Awk 4.0.1"; gawk-4.0.1+dfsg.orig/node.c0000644000175000017500000005172211734665352014461 0ustar schotschot/* * node.c -- routines for node management */ /* * 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. * * 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 "awk.h" #include "math.h" static int is_ieee_magic_val(const char *val); static AWKNUM get_ieee_magic_val(const char *val); /* force_number --- force a value to be numeric */ AWKNUM r_force_number(NODE *n) { char *cp; char *cpend; char save; char *ptr; unsigned int newflags; extern double strtod(); if (n->flags & NUMCUR) return n->numbr; /* all the conditionals are an attempt to avoid the expensive strtod */ /* Note: only set NUMCUR if we actually convert some digits */ n->numbr = 0.0; if (n->stlen == 0) { return 0.0; } cp = n->stptr; /* * 2/2007: * POSIX, by way of severe language lawyering, seems to * allow things like "inf" and "nan" to mean something. * So if do_posix, the user gets what he deserves. * This also allows hexadecimal floating point. Ugh. */ if (! do_posix) { if (isalpha((unsigned char) *cp)) { return 0.0; } else if (n->stlen == 4 && is_ieee_magic_val(n->stptr)) { if (n->flags & MAYBE_NUM) n->flags &= ~MAYBE_NUM; n->flags |= NUMBER|NUMCUR; n->numbr = get_ieee_magic_val(n->stptr); return n->numbr; } /* else fall through */ } /* else not POSIX, so fall through */ cpend = cp + n->stlen; while (cp < cpend && isspace((unsigned char) *cp)) 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'))))) { return 0.0; } if (n->flags & MAYBE_NUM) { newflags = NUMBER; n->flags &= ~MAYBE_NUM; } else newflags = 0; 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; } return n->numbr; } if (do_non_decimal_data) { /* main.c assures false if do_posix */ errno = 0; if (! do_traditional && isnondecimal(cp, TRUE)) { n->numbr = nondec2awknum(cp, cpend - cp); n->flags |= NUMCUR; ptr = cpend; goto finish; } } errno = 0; save = *cpend; *cpend = '\0'; n->numbr = (AWKNUM) strtod((const char *) cp, &ptr); /* POSIX says trailing space is OK for NUMBER */ while (isspace((unsigned char) *ptr)) ptr++; *cpend = save; finish: if (errno == 0 && ptr == cpend) { n->flags |= newflags; n->flags |= NUMCUR; } else { errno = 0; } return n->numbr; } /* * 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. */ static const char *values[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", }; #define NVAL (sizeof(values)/sizeof(values[0])) /* format_val --- format a numeric value based on format */ NODE * format_val(const char *format, int index, NODE *s) { char buf[BUFSIZ]; char *sp = buf; double val; char *orig, *trans, save; if (! do_traditional && (s->flags & INTLSTR) != 0) { save = s->stptr[s->stlen]; s->stptr[s->stlen] = '\0'; orig = s->stptr; trans = dgettext(TEXTDOMAIN, orig); s->stptr[s->stlen] = save; return make_string(trans, strlen(trans)); } /* * 2/2007: Simplify our lives here. Instead of worrying about * whether or not the value will fit into a long just so we * can use sprintf("%ld", val) on it, always format it ourselves. * The only thing to worry about is that integral values always * format as integers. %.0f does that very well. * * 6/2008: Would that things were so simple. Always using %.0f * imposes a notable performance penalty for applications that * do a lot of conversion of integers to strings. So, we reinstate * the old code, but use %.0f for integral values that are outside * the range of a long. This seems a reasonable compromise. * * 12/2009: Use <= and >= in the comparisons with LONG_xxx instead of * < and > so that things work correctly on systems with 64 bit integers. */ /* not an integral value, or out of range */ if ((val = double_to_int(s->numbr)) != s->numbr || val <= LONG_MIN || val >= LONG_MAX) { /* * Once upon a time, we just blindly did this: * sprintf(sp, format, s->numbr); * s->stlen = strlen(sp); * s->stfmt = (char) index; * but that's no good if, e.g., OFMT is %s. So we punt, * and just always format the value ourselves. */ 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 */ dummy[1] = s; oflags = s->flags; 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) efree(s->stptr); s->stptr = r->stptr; 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 */ long num = (long) val; if (num < NVAL && num >= 0) { sp = (char *) values[num]; s->stlen = 1; } else { (void) sprintf(sp, "%ld", num); s->stlen = strlen(sp); } 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->flags |= STRCUR; free_wstr(s); return s; } /* force_string --- force a value to be a string */ NODE * r_force_string(NODE *s) { if ((s->flags & STRCUR) != 0 && (s->stfmt == -1 || s->stfmt == CONVFMTidx) ) return s; return format_val(CONVFMT, CONVFMTidx, s); } /* dupnode --- duplicate a node */ NODE * dupnode(NODE *n) { NODE *r; if (n->type == Node_ahash) { n->ahname_ref++; return n; } assert(n->type == Node_val); if ((n->flags & PERM) != 0) return n; if ((n->flags & MALLOC) != 0) { n->valref++; return n; } getnode(r); *r = *n; r->flags &= ~FIELD; r->flags |= MALLOC; r->valref = 1; #if MBS_SUPPORT /* * DON'T call free_wstr(r) here! * r->wstptr still points at n->wstptr's value, and we * don't want to free it! */ r->wstptr = NULL; r->wstlen = 0; #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) * (n->wstlen + 2), "dupnode"); memcpy(r->wstptr, n->wstptr, n->wstlen * sizeof(wchar_t)); r->wstptr[n->wstlen] = L'\0'; r->flags |= WSTRCUR; } #endif /* MBS_SUPPORT */ } return r; } /* mk_number --- allocate a node with defined number */ NODE * mk_number(AWKNUM x, unsigned int flags) { NODE *r; getnode(r); r->type = Node_val; r->numbr = x; r->valref = 1; r->flags = flags; r->stptr = NULL; r->stlen = 0; free_wstr(r); return r; } /* make_str_node --- make a string node */ NODE * r_make_str_node(const char *s, unsigned long len, int flags) { NODE *r; getnode(r); r->type = Node_val; r->numbr = 0; r->flags = (STRING|STRCUR|MALLOC); #if MBS_SUPPORT r->wstptr = NULL; r->wstlen = 0; #endif /* MBS_SUPPORT */ if (flags & ALREADY_MALLOCED) r->stptr = (char *) s; else { 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; char *ptm; int c; const char *end; #if MBS_SUPPORT mbstate_t cur_state; memset(& cur_state, 0, sizeof(cur_state)); #endif end = &(r->stptr[len]); for (pf = ptm = r->stptr; pf < end;) { #if MBS_SUPPORT /* * Keep multibyte characters together. This avoids * problems if a subsequent byte of a multibyte * character happens to be a backslash. */ if (gawk_mb_cur_max > 1) { int mblen = mbrlen(pf, end-pf, &cur_state); if (mblen > 1) { int i; for (i = 0; i < mblen; i++) *ptm++ = *pf++; continue; } } #endif c = *pf++; if (c == '\\') { c = parse_escape(&pf); if (c < 0) { if (do_lint) lintwarn(_("backslash at end of string")); c = '\\'; } *ptm++ = c; } else *ptm++ = c; } 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->valref = 1; r->stfmt = -1; return r; } /* more_nodes --- allocate more nodes */ #define NODECHUNK 100 NODE *nextfree = NULL; NODE * more_nodes() { NODE *np; /* get more nodes and initialize list */ emalloc(nextfree, NODE *, NODECHUNK * sizeof(NODE), "more_nodes"); memset(nextfree, 0, NODECHUNK * sizeof(NODE)); for (np = nextfree; np <= &nextfree[NODECHUNK - 1]; np++) { np->nextp = np + 1; } --np; np->nextp = NULL; np = nextfree; nextfree = nextfree->nextp; return np; } /* unref --- remove reference to a particular node */ void unref(NODE *tmp) { if (tmp == NULL) return; if ((tmp->flags & PERM) != 0) return; if (tmp->type == Node_ahash) { if (tmp->ahname_ref > 1) tmp->ahname_ref--; else { efree(tmp->ahname_str); 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: * * Parse a C escape sequence. STRING_PTR points to a variable containing a * pointer to the string to parse. That pointer is updated past the * characters we use. The value of the escape sequence is returned. * * A negative value means the sequence \ newline was seen, which is supposed to * be equivalent to nothing at all. * * If \ is followed by a null character, we return a negative value and leave * the string pointer pointing at the null character. * * 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. */ int parse_escape(const char **string_ptr) { 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': warning(_("old awk does not support the `\\%c' escape sequence"), c); break; } } switch (c) { case 'a': return '\a'; case 'b': return '\b'; case 'f': return '\f'; case 'n': return '\n'; case 'r': return '\r'; case 't': return '\t'; case 'v': return '\v'; case '\n': return -2; case 0: (*string_ptr)--; return -1; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': i = c - '0'; count = 0; while (++count < 3) { if ((c = *(*string_ptr)++) >= '0' && c <= '7') { i *= 8; i += c - '0'; } else { (*string_ptr)--; break; } } return i; case 'x': if (do_lint) { static short warned = FALSE; if (! warned) { warned = TRUE; lintwarn(_("POSIX does not allow `\\x' escapes")); } } if (do_posix) return ('x'); if (! isxdigit((unsigned char) (*string_ptr)[0])) { warning(_("no hex digits in `\\x' escape sequence")); return ('x'); } i = j = 0; start = *string_ptr; for (;; j++) { /* do outside test to avoid multiple side effects */ c = *(*string_ptr)++; if (isxdigit(c)) { i *= 16; if (isdigit(c)) i += c - '0'; else if (isupper(c)) i += c - 'A' + 10; else i += c - 'a' + 10; } else { (*string_ptr)--; break; } } if (do_lint && j > 2) lintwarn(_("hex escape \\x%.*s of %d characters probably not interpreted the way you expect"), j, start, j); return i; case '\\': case '"': return c; default: { static short warned[256]; unsigned char uc = (unsigned char) c; /* N.B.: use unsigned char here to avoid Latin-1 problems */ if (! warned[uc]) { warned[uc] = TRUE; warning(_("escape sequence `\\%c' treated as plain `%c'"), uc, uc); } } return c; } } /* isnondecimal --- return true if number is not a decimal number */ int isnondecimal(const char *str, int use_locale) { int dec_point = '.'; #if defined(HAVE_LOCALE_H) /* * loc.decimal_point may not have been initialized yet, * so double check it before using it. */ if (use_locale && loc.decimal_point != NULL && loc.decimal_point[0] != '\0') dec_point = loc.decimal_point[0]; /* XXX --- assumes one char */ #endif if (str[0] != '0') return FALSE; /* leading 0x or 0X */ if (str[1] == 'x' || str[1] == 'X') return TRUE; /* * Numbers with '.', 'e', or 'E' are decimal. * Have to check so that things like 00.34 are handled right. * * These beasts can have trailing whitespace. Deal with that too. */ for (; *str != '\0'; str++) { if (*str == 'e' || *str == 'E' || *str == dec_point) return FALSE; else if (! isdigit((unsigned char) *str)) break; } return TRUE; } #if MBS_SUPPORT /* str2wstr --- convert a multibyte string to a wide string */ NODE * str2wstr(NODE *n, size_t **ptr) { size_t i, count, src_count; 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; /* otherwise fall through and recompute to fill in the array */ free_wstr(n); } /* * After consideration and consultation, this * 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 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 in * the info. If there's a lot left over, we can * realloc the wide string down in size. */ emalloc(n->wstptr, wchar_t *, sizeof(wchar_t) * (n->stlen + 2), "str2wstr"); wsp = n->wstptr; /* * For use by do_match, create and fill in an array. * For each byte `i' in n->stptr (the original string), * a[i] is equal to `j', where `j' is the corresponding wchar_t * in the converted wide string. * * Create the array. */ if (ptr != NULL) { emalloc(*ptr, size_t *, sizeof(size_t) * n->stlen, "str2wstr"); memset(*ptr, 0, sizeof(size_t) * n->stlen); } sp = n->stptr; src_count = n->stlen; memset(& mbs, 0, sizeof(mbs)); for (i = 0; src_count > 0; i++) { /* * 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: /* * 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; /* fall through */ default: *wsp++ = wc; src_count -= count; while (count--) { if (ptr != NULL) (*ptr)[sp - n->stptr] = i; sp++; } break; } } *wsp = L'\0'; 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) erealloc(n->wstptr, wchar_t *, sizeof(wchar_t) * (n->wstlen + 2), "str2wstr"); 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 free_wstr(NODE *n) { assert(n->type == Node_val); if ((n->flags & WSTRCUR) != 0) { assert(n->wstptr != NULL); efree(n->wstptr); } n->wstptr = NULL; n->wstlen = 0; n->flags &= ~WSTRCUR; } static void __attribute__ ((unused)) dump_wstr(FILE *fp, const wchar_t *str, size_t len) { if (str == NULL || len == 0) return; for (; len--; str++) putwc(*str, fp); } /* wstrstr --- walk haystack, looking for needle, wide char version */ const wchar_t * wstrstr(const wchar_t *haystack, size_t hs_len, const wchar_t *needle, size_t needle_len) { size_t i; if (haystack == NULL || needle == NULL || needle_len > hs_len) return NULL; for (i = 0; i < hs_len; i++) { if (haystack[i] == needle[0] && i+needle_len-1 < hs_len && haystack[i+needle_len-1] == needle[needle_len-1]) { /* first & last chars match, check string */ if (memcmp(haystack+i, needle, sizeof(wchar_t) * needle_len) == 0) { return haystack + i; } } } return NULL; } /* wcasestrstr --- walk haystack, nocase look for needle, wide char version */ const wchar_t * wcasestrstr(const wchar_t *haystack, size_t hs_len, const wchar_t *needle, size_t needle_len) { size_t i, j; if (haystack == NULL || needle == NULL || needle_len > hs_len) return NULL; for (i = 0; i < hs_len; i++) { if (towlower(haystack[i]) == towlower(needle[0]) && i+needle_len-1 < hs_len && towlower(haystack[i+needle_len-1]) == towlower(needle[needle_len-1])) { /* first & last chars match, check string */ const wchar_t *start; start = haystack+i; for (j = 0; j < needle_len; j++, start++) { wchar_t h, n; h = towlower(*start); n = towlower(needle[j]); if (h != n) goto out; } return haystack + i; } out: ; } return NULL; } #endif /* MBS_SUPPORT */ /* is_ieee_magic_val --- return true for +inf, -inf, +nan, -nan */ static int is_ieee_magic_val(const char *val) { /* * Avoid strncasecmp: it mishandles ASCII bytes in some locales. * Assume the length is 4, as the caller checks this. */ return ( (val[0] == '+' || val[0] == '-') && ( ( (val[1] == 'i' || val[1] == 'I') && (val[2] == 'n' || val[2] == 'N') && (val[3] == 'f' || val[3] == 'F')) || ( (val[1] == 'n' || val[1] == 'N') && (val[2] == 'a' || val[2] == 'A') && (val[3] == 'n' || val[3] == 'N')))); } /* get_ieee_magic_val --- return magic value for string */ static AWKNUM get_ieee_magic_val(const char *val) { static short first = TRUE; static AWKNUM inf; static AWKNUM nan; char *ptr; AWKNUM v = strtod(val, &ptr); if (val == ptr) { /* Older strtod implementations don't support inf or nan. */ if (first) { first = FALSE; nan = sqrt(-1.0); inf = -log(0.0); } v = ((val[1] == 'i' || val[1] == 'I') ? inf : nan); if (val[0] == '-') v = -v; } 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 gawk-4.0.1+dfsg.orig/random.h0000644000175000017500000000270511463242060015000 0ustar schotschot/* * random.h - redefine name of random lib routines to avoid conflicts */ /* * Copyright (C) 1996, 2001, 2004, 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 initstate gawk_initstate #define setstate gawk_setstate #define random gawk_random #define srandom gawk_srandom #if SIZEOF_UNSIGNED_INT == 4 typedef unsigned int gawk_uint32_t; typedef int gawk_int32_t; #else #if SIZEOF_UNSIGNED_LONG == 4 typedef unsigned long gawk_uint32_t; typedef long gawk_int32_t; #endif #endif #define uint32_t gawk_uint32_t #define int32_t gawk_int32_t #ifdef __STDC__ #undef __P #define __P(s) s #else #define __P(s) () #endif extern long random __P((void)); gawk-4.0.1+dfsg.orig/profile_p.c0000644000175000017500000000172111734665352015505 0ustar schotschot/* * profile_p.c - compile profile.c with profiling 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 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 PROFILING 1 #include "profile.c" gawk-4.0.1+dfsg.orig/ext.c0000644000175000017500000001637011734666022014327 0ustar schotschot/* * ext.c - Builtin function that links external gawk functions and related * utilities. * * Christos Zoulas, Thu Jun 29 17:40:41 EDT 1995 * Arnold Robbins, update for 3.1, Mon Nov 23 12:53:39 EST 1998 */ /* * 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. * * 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 "awk.h" #ifdef DYNAMIC #include /* do_ext --- load an extension */ NODE * do_ext(int nargs) { NODE *obj; NODE *fun; 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; #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) error(_("`extension' is a gawk extension")); fun = POP_STRING(); obj = POP_STRING(); #ifdef RTLD_GLOBAL flags |= RTLD_GLOBAL; #endif 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; } 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()); fatal_error = TRUE; goto done; } 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(const char *name, NODE *(*func)(int), int count) { NODE *p, *symbol, *f; INSTRUCTION *b, *r; const char *sp; char *pname; char **vnames = NULL; char c, buf[200]; size_t space_needed; int i; sp = name; if (sp == NULL || *sp == '\0') fatal(_("extension: missing function name")); 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) { 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. */ if (do_lint) lintwarn(_("extension: function `%s' already defined"), name); return; } } 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; } } getnode(p); p->type = Node_param_list; p->flags |= FUNC; /* get our own copy for name */ p->param = estrdup(name, strlen(name)); p->param_cnt = count; /* actual source and line numbers set at runtime for these instructions */ b = bcalloc(Op_builtin, 1, __LINE__); b->builtin = func; 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); } /* 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 */ NODE * get_argument(int i) { int pcount; NODE *t, *f; int 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; t = GET_PARAM(i); 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(int i, int optional, int want_array) { /* optional : if TRUE and i th argument not present return NULL, else fatal. */ 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 >= pcount) /* must be fatal */ fatal(_("function `%s' defined to take no more than %d argument(s)"), fname, pcount); if (! optional) fatal(_("function `%s': missing argument #%d"), fname, i + 1); return NULL; } 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"), fname, i + 1); } else { if (t->type != Node_val) fatal(_("function `%s': argument #%d: attempt to use array as a scalar"), fname, i + 1); } return t; } #else /* do_ext --- dummy version if extensions not available */ NODE * do_ext(int nargs) { const char *emsg = _("Operation Not Supported"); unref(ERRNO_node->var_value); ERRNO_node->var_value = make_string(emsg, strlen(emsg)); return make_number((AWKNUM) -1); } #endif gawk-4.0.1+dfsg.orig/cmd.h0000644000175000017500000001272411734665351014302 0ustar schotschot/* * 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); gawk-4.0.1+dfsg.orig/configure.ac0000644000175000017500000002247011734667023015651 0ustar schotschotdnl dnl configure.ac --- autoconf input file for gawk dnl 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. dnl dnl GAWK is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 3 of the License, or dnl (at your option) any later version. dnl dnl GAWK is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA dnl dnl Process this file with autoconf to produce a configure script. 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. # # If the user supplies $INSTALL, figure they know what they're doing. # # With Autoconf 2.5x, this needs to come very early on, but *after* # the INIT macro. Sigh. if test "x$INSTALL" = "x" then INSTALL="$srcdir/install-sh -c" export INSTALL fi AC_PREREQ(2.68) AM_INIT_AUTOMAKE([1.11 dist-xz]) AC_CONFIG_MACRO_DIR([m4]) dnl Additional argument stuff AC_ARG_WITH(whiny-user-strftime, [ --with-whiny-user-strftime Force use of included version of strftime for deficient systems], if test "$withval" = yes then AC_DEFINE(USE_INCLUDED_STRFTIME, 1, [force use of our version of strftime]) fi ) AC_ARG_ENABLE([lint], [ --disable-lint Disable gawk lint checking], if test "$enableval" = no then AC_DEFINE(NO_LINT, 1, [disable lint checks]) fi ) AC_USE_SYSTEM_EXTENSIONS dnl checks for programs AC_PROG_EGREP AC_PROG_YACC AC_PROG_LN_S AC_PROG_CC AC_PROG_CPP AC_OBJEXT AC_EXEEXT AC_PROG_INSTALL AC_PROG_MAKE_SET # This is mainly for my use during testing and development. # Yes, it's a bit of a hack. AC_MSG_CHECKING([for special development options]) if test -f $srcdir/.developing then # add other debug flags as appropriate, save GAWKDEBUG for emergencies CFLAGS="$CFLAGS -DARRAYDEBUG -DYYDEBUG" if grep dbug $srcdir/.developing then CFLAGS="$CFLAGS -DDBUG" LIBS="$LIBS dbug/libdbug.a" fi # turn on compiler warnings if we're doing development # enable debugging using macros also if test "$GCC" = yes then CFLAGS="$CFLAGS -Wall -fno-builtin -g3 -gdwarf-2" fi AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi AC_SUBST(CFLAGS) dnl checks for systems AC_ZOS_USS AC_ISC_POSIX AC_SYS_LARGEFILE GAWK_AC_AIX_TWEAK GAWK_AC_LINUX_ALPHA if test "$ISC" = 1 # will be set by test for ISC then dnl need -D_SYSV3 for ISC CFLAGS="$CFLAGS -D_SYSV3" fi 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. case `(uname) 2> /dev/null` in *CYGWIN*) with_libiconv_prefix=no with_libintl_prefix=no ;; *) ;; esac dnl initialize GNU gettext AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.18.1]) AM_LANGINFO_CODESET gt_LC_MESSAGES dnl checks for header files AC_HEADER_STDC AC_HEADER_SYS_WAIT 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/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 then AC_CHECK_HEADERS(memory.h) else AC_CHECK_HEADERS(strings.h) fi dnl checks for typedefs AC_TYPE_PID_T AC_TYPE_SIGNAL AC_SIZE_T AC_TYPE_GETGROUPS gl_AC_TYPE_LONG_LONG gl_AC_TYPE_UNSIGNED_LONG_LONG gl_AC_TYPE_INTMAX_T gl_AC_TYPE_UINTMAX_T AC_CHECK_TYPE(ssize_t, int) AC_CHECK_SIZEOF(unsigned int) AC_CHECK_SIZEOF(unsigned long) dnl see if time_t is defined in AC_TRY_COMPILE([#include ],[ time_t foo; foo = 0; ], AC_DEFINE(TIME_T_IN_SYS_TYPES_H, 1, [some systems define this type here])) dnl check for wctype_t in AC_TRY_COMPILE([#include ],[ wctype_t foo; foo = 0; ], AC_DEFINE(HAVE_WCTYPE_T, 1, [systems should define this type here])) dnl check for wint_t in AC_TRY_COMPILE([#include ],[ wint_t foo; foo = 0; ], AC_DEFINE(HAVE_WINT_T, 1, [systems should define this type here])) dnl check for sockaddr_storage AC_TRY_COMPILE([#include #include ],[ struct sockaddr_storage foo; ], AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [newer systems define this type here])) dnl Borrwed from rsync, thanks to to Jim Meyering. dnl Check for socklen_t: historically on BSD it is an int, and in dnl POSIX 1g it is a type of its own, but some platforms use different dnl types for the argument to getsockopt, getpeername, etc. So we dnl have to test to find something that will work. dnl This is no good, because passing the wrong pointer on C compilers is dnl likely to only generate a warning, not an error. AC_DEFUN([TYPE_SOCKLEN_T], [ AC_CHECK_TYPE([socklen_t], ,[ AC_MSG_CHECKING([for socklen_t equivalent]) AC_CACHE_VAL([rsync_cv_socklen_t_equiv], [ # Systems have either "struct sockaddr *" or # "void *" as the second argument to getpeername rsync_cv_socklen_t_equiv= for arg2 in "struct sockaddr" void; do for t in int size_t unsigned long "unsigned long"; do AC_TRY_COMPILE([ #include #include int getpeername (int, $arg2 *, $t *); ],[ $t len; getpeername(0,0,&len); ],[ rsync_cv_socklen_t_equiv="$t" break ]) done done if test "x$rsync_cv_socklen_t_equiv" = x; then dnl Some systems get this. Default to int. -- ADR dnl AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) rsync_cv_socklen_t_equiv=int fi ]) AC_MSG_RESULT($rsync_cv_socklen_t_equiv) AC_DEFINE_UNQUOTED(socklen_t, $rsync_cv_socklen_t_equiv, [type to use in place of socklen_t if not defined])], [#include #include ]) ]) TYPE_SOCKLEN_T dnl checks for functions AC_FUNC_VPRINTF AC_FUNC_MKTIME case "$ac_cv_func_working_mktime" in yes) AC_DEFINE(HAVE_MKTIME, 1, [we have the mktime function]) ;; esac AC_CHECK_FUNC(getaddrinfo, [AC_DEFINE(HAVE_GETADDRINFO, 1, [have getaddrinfo])], [AC_CHECK_LIB(socket, getaddrinfo, [AC_DEFINE(HAVE_GETADDRINFO, 1, [have getaddrinfo])])]) AC_CHECK_LIB(m, fmod) AC_CHECK_LIB(m, isinf) AC_CHECK_LIB(m, ismod) dnl Don't look for libsigsegv on OSF/1, gives us severe headaches case `uname` in OSF1) : ;; *) gl_LIBSIGSEGV ;; esac # Need the check for mkstemp and tmpfile for missing_d/snprintf.c. AC_CHECK_FUNCS(atexit btowc fmod getgrent getgroups grantpt \ isascii iswctype iswlower iswupper mbrlen \ memcmp memcpy memcpy_ulong memmove memset \ memset_ulong mkstemp setenv setlocale setsid snprintf strchr \ strerror strftime strncasecmp strcoll strtod strtoul \ system tmpfile towlower towupper tzset usleep wcrtomb \ wcscoll wctype) dnl this check is for both mbrtowc and the mbstate_t type, which is good AC_FUNC_MBRTOWC dnl check for dynamic linking dnl This is known to be very primitive AC_CHECK_HEADER(dlfcn.h, [AC_DEFINE([DYNAMIC], 1, [dynamic loading is possible]) if test "$GCC" = yes then # Add others here as appropriate, # one day use GNU libtool. # 3/2010: Used to have cygwin here but removed since # we get complaints that -export-dynamic doesn't work. if uname | $EGREP -i 'linux|freebsd' > /dev/null then LDFLAGS="$LDFLAGS -export-dynamic" fi fi # Check this separately. Some systems have dlopen # in libc. Notably freebsd and cygwin. # HP-NSK has it in zrldsrl AC_SEARCH_LIBS(dlopen, dl zrldsrl) ]) dnl check for how to use getpgrp dnl have to hardwire it for VMS POSIX. Sigh. dnl ditto for BeOS, OS/2, and MS-DOS. case `(uname) 2> /dev/null` in *VMS*|*BeOS*|*OS/2*|*MS-DOS*) AC_DEFINE(GETPGRP_VOID, 1, [Define to 1 if the getpgrp function requires zero arguments.]) ;; *) AC_FUNC_GETPGRP ;; esac dnl check for printf %F format AC_MSG_CHECKING([for printf %F format]) AC_RUN_IFELSE([ AC_LANG_SOURCE([ #include int main() { char buf[[100]]; sprintf(buf, "%F", 123.45); if (strcmp(buf, "123.450000") == 0) return 0; else return 1; } ])], has_f_format=yes, has_f_format=no, has_f_format=no dnl Cross-compiling, assuming the worst. ) if test "$has_f_format" = yes; then AC_DEFINE(PRINTF_HAS_F_FORMAT, 1, [Define to 1 if *printf supports %F format]) fi AC_MSG_RESULT($has_f_format) 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 AC_STRUCT_TM AC_STRUCT_TIMEZONE dnl checks for compiler characteristics AC_C_CHAR_UNSIGNED AC_C_CONST AC_C_RESTRICT AC_C_INLINE AC_C_STRINGIZE AC_CONFIG_HEADERS([config.h:configh.in]) AH_BOTTOM([#include "custom.h"]) AC_CONFIG_FILES(Makefile awklib/Makefile doc/Makefile po/Makefile.in test/Makefile) AC_OUTPUT gawk-4.0.1+dfsg.orig/array.c0000644000175000017500000012752211734665351014653 0ustar schotschot/* * array.c - routines for associative arrays. */ /* * 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. * * 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 "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 * grow them as needed, so that our arrays are hopefully small enough, * most of the time, that they're pretty full and we're not looking at * wasted space. * * The decision is made to grow the array if the average chain length is * ``too big''. This is defined as the total number of entries in the table * divided by the size of the array being greater than some constant. * * We make the constant a variable, so that it can be tweaked * via environment variable. */ static size_t AVG_CHAIN_MAX = 2; /* Modern machines are bigger, reduce this from 10. */ static size_t SUBSEPlen; static char *SUBSEP; static NODE *assoc_find(NODE *symbol, NODE *subs, unsigned long hash1, NODE **last); static void grow_table(NODE *symbol); 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 --- check relevant environment variables */ void array_init() { const char *val; char *endptr; size_t 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_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_array(NODE *symbol, int canfatal) { NODE *save_symbol = symbol; int isparam = FALSE; 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; } switch (symbol->type) { 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; case Node_array_ref: case Node_param_list: if ((symbol->flags & FUNC) == 0) cant_happen(); /* else fall through */ 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); else if (isparam) fatal(_("attempt to use scalar parameter `%s' as an array"), save_symbol->vname); else fatal(_("attempt to use scalar `%s' as an array"), save_symbol->vname); } else break; } return symbol; } /* set_SUBSEP --- update SUBSEP related variables when SUBSEP assigned to */ void set_SUBSEP() { 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(int nargs, int do_subsep) { /* do_subsep is false for Node-concat */ NODE *r; char *str; char *s; size_t len; 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; DEREF(r); for (i = nargs - 1; i > 0; i--) { if (subseplen == 1) *s++ = *SUBSEP; else if (subseplen > 0) { memcpy(s, SUBSEP, subseplen); s += subseplen; } r = args_array[i]; memcpy(s, r->stptr, r->stlen); s += r->stlen; DEREF(r); } return make_str_node(str, len, ALREADY_MALLOCED); } /* assoc_clear --- flush all the values in symbol[] */ void assoc_clear(NODE *symbol) { long i; NODE *bucket, *next; 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; 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; } efree(symbol->var_array); symbol->var_array = NULL; symbol->array_size = symbol->table_size = 0; symbol->flags &= ~ARRAYMAXED; } /* awk_hash --- calculate the hash function of the string in subs */ static unsigned long awk_hash(const char *s, size_t len, unsigned long hsize, size_t *code) { 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. */ /* * 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 ; \ htmp &= 0xFFFFFFFF; \ h &= 0xFFFFFFFF h = 0; /* "Duff's Device" */ if (len > 0) { size_t loop = (len + 8 - 1) >> 3; switch (len & (8 - 1)) { case 0: do { /* All fall throughs */ HASHC; case 7: HASHC; case 6: HASHC; case 5: HASHC; case 4: HASHC; case 3: HASHC; case 2: HASHC; case 1: HASHC; } while (--loop); } } if (code != NULL) *code = h; if (h >= hsize) h %= hsize; return h; } /* assoc_find --- locate symbol[subs] */ static NODE * /* NULL if not found */ assoc_find(NODE *symbol, NODE *subs, unsigned long hash1, NODE **last) { NODE *bucket, *prev; const char *s1_str; size_t s1_len; NODE *s2; 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 indices are strings; compare as such, always! */ 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; } } if (last != NULL) *last = prev; return bucket; } /* in_array --- test whether the array element symbol[subs] exists or not, * return pointer to value if it does. */ NODE * in_array(NODE *symbol, NODE *subs) { unsigned long hash1; NODE *ret; assert(symbol->type == Node_var_array); 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, NULL); return (ret ? ret->ahvalue : NULL); } /* * assoc_lookup: * Find SYMBOL[SUBS] in the assoc array. Install it with value "" if it * isn't there. Returns a pointer ala get_lhs to where its value is stored. * * SYMBOL is the address of the node (or other pointer) being dereferenced. * SUBS is a number or string used as the subscript. */ NODE ** assoc_lookup(NODE *symbol, NODE *subs, int reference) { unsigned long hash1; NODE *bucket; size_t code; assert(symbol->type == Node_var_array); (void) force_string(subs); if (symbol->var_array == NULL) { symbol->array_size = symbol->table_size = 0; /* sanity */ symbol->flags &= ~ARRAYMAXED; grow_table(symbol); hash1 = hash(subs->stptr, subs->stlen, (unsigned long) symbol->array_size, & code); } else { hash1 = hash(subs->stptr, subs->stlen, (unsigned long) symbol->array_size, & code); bucket = assoc_find(symbol, subs, hash1, NULL); if (bucket != NULL) return &(bucket->ahvalue); } if (do_lint && reference) { lintwarn(_("reference to uninitialized element `%s[\"%.*s\"]'"), array_vname(symbol), (int)subs->stlen, subs->stptr); } /* It's not there, install it. */ if (do_lint && subs->stlen == 0) lintwarn(_("subscript of array `%s' is null string"), array_vname(symbol)); /* first see if we would need to grow the array, before installing */ symbol->table_size++; if ((symbol->flags & ARRAYMAXED) == 0 && (symbol->table_size / symbol->array_size) > AVG_CHAIN_MAX) { grow_table(symbol); /* have to recompute hash value for new size */ hash1 = code % (unsigned long) symbol->array_size; } getnode(bucket); bucket->type = Node_ahash; /* * Freeze this string value --- it must never * change, no matter what happens to the value * that created it or to CONVFMT, etc. * * One day: Use an atom table to track array indices, * and avoid the extra memory overhead. */ bucket->flags |= MALLOC; bucket->ahname_ref = 1; 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 * `nsubs' is number of subscripts */ void do_delete(NODE *symbol, int nsubs) { 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 (nsubs == 0) { /* delete array */ adjust_fcall_stack(symbol, 0); /* fix function call stack; See above. */ assoc_clear(symbol); return; } /* NB: subscripts are in reverse order on stack */ 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); 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); } 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); } 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); /* unref() will free the ahname_str */ symbol->table_size--; if (symbol->table_size <= 0) { symbol->table_size = symbol->array_size = 0; symbol->flags &= ~ARRAYMAXED; 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]'' */ /* * The primary hassle here is that `iggy' needs to have some arbitrary * array index put in it before we can clear the array, we can't * just replace the loop with `delete foo'. */ void do_delete_loop(NODE *symbol, NODE **lhs) { long i; assert(symbol->type == Node_var_array); if (symbol->var_array == NULL) return; /* get first index value */ for (i = 0; i < symbol->array_size; i++) { if (symbol->var_array[i] != NULL) { unref(*lhs); *lhs = make_string(symbol->var_array[i]->ahname_str, symbol->var_array[i]->ahname_len); break; } } /* blast the array in one shot */ adjust_fcall_stack(symbol, 0); assoc_clear(symbol); } /* grow_table --- grow a hash table */ static void grow_table(NODE *symbol) { NODE **old, **new, *chain, *next; int i, j; unsigned long hash1; unsigned long oldsize, newsize, k; /* * 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. 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, 131101, 262147, 524309, 1048583, 2097169, 4194319, 8388617, 16777259, 33554467, 67108879, 134217757, 268435459, 536870923, 1073741827 }; /* find next biggest hash size */ newsize = oldsize = symbol->array_size; for (i = 0, j = sizeof(sizes)/sizeof(sizes[0]); i < j; i++) { if (oldsize < sizes[i]) { newsize = sizes[i]; break; } } if (newsize == oldsize) { /* table already at max (!) */ symbol->flags |= ARRAYMAXED; return; } /* allocate new table */ emalloc(new, NODE **, newsize * sizeof(NODE *), "grow_table"); memset(new, '\0', newsize * sizeof(NODE *)); /* brand new hash table, set things up and return */ if (symbol->var_array == NULL) { symbol->table_size = 0; goto done; } /* old hash table there, move stuff to new, free old */ old = symbol->var_array; for (k = 0; k < oldsize; k++) { if (old[k] == NULL) continue; for (chain = old[k]; chain != NULL; chain = next) { next = chain->ahnext; hash1 = chain->ahcode % newsize; /* remove from old list, add to new */ chain->ahnext = new[hash1]; new[hash1] = chain; } } efree(old); done: /* * note that symbol->table_size does not change if an old array, * and is explicitly set to 0 if a new one. */ symbol->var_array = new; symbol->array_size = newsize; } /* pr_node --- print simple node info */ static void pr_node(NODE *n) { 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); } static void indent(int indent_level) { int k; for (k = 0; k < indent_level; k++) putchar('\t'); } /* assoc_dump --- dump the contents of an array */ NODE * 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 make_number((AWKNUM) 0); } if (symbol->table_size == 0) { printf(_("%s: empty (zero)\n"), symbol->vname); return make_number((AWKNUM) 0); } printf(_("%s: table_size = %d, array_size = %d\n"), symbol->vname, (int) symbol->table_size, (int) symbol->array_size); for (i = 0; i < symbol->array_size; i++) { for (bucket = symbol->var_array[i]; bucket != NULL; bucket = bucket->ahnext) { 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); 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 make_number((AWKNUM) 0); } /* do_adump --- dump an array: interface to assoc_dump */ NODE * do_adump(int nargs) { NODE *r, *a; a = POP(); if (a->type == Node_param_list) { printf(_("%s: is parameter\n"), a->vname); 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; } if (a->type != Node_var_array) fatal(_("adump: argument not an array")); r = assoc_dump(a, 0); return r; } /* * The following functions implement the builtin * asort function. Initial work by Alan J. Broder, * ajb@woti.com. */ /* dup_table --- recursively duplicate input array "symbol" */ static NODE * dup_table(NODE *symbol, NODE *newsymb) { NODE **old, **new, *chain, *bucket; long i; unsigned long cursize; /* find the current hash size */ cursize = symbol->array_size; new = NULL; /* input is a brand new hash table, so there's nothing to copy */ if (symbol->var_array == NULL) newsymb->table_size = 0; else { /* old hash table there, dupnode stuff into a new table */ /* allocate new table */ emalloc(new, NODE **, cursize * sizeof(NODE *), "dup_table"); memset(new, '\0', cursize * sizeof(NODE *)); /* do the copying/dupnode'ing */ old = symbol->var_array; for (i = 0; i < cursize; i++) { if (old[i] != NULL) { for (chain = old[i]; chain != NULL; chain = chain->ahnext) { /* get a node for the linked list */ getnode(bucket); 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 * value from the original input list */ emalloc(bucket->ahname_str, char *, chain->ahname_len + 2, "dup_table"); bucket->ahname_len = chain->ahname_len; memcpy(bucket->ahname_str, chain->ahname_str, chain->ahname_len); bucket->ahname_str[bucket->ahname_len] = '\0'; 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 * linked list in the new table */ bucket->ahnext = new[i]; new[i] = bucket; } } } newsymb->table_size = symbol->table_size; } newsymb->var_array = new; newsymb->array_size = cursize; newsymb->flags = symbol->flags; /* ARRAYMAXED */ return newsymb; } /* asort_actual --- do the actual work to sort the input array */ static NODE * asort_actual(int nargs, SORT_CTXT ctxt) { 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); /* * 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 (dest != NULL && dest != array) { assoc_clear(dest); result = dest; } else { /* 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; } 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 { 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. */ } 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. */ 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); } /* sort_down_index_string --- descending index strings */ static int sort_down_index_string(const void *p1, const void *p2) { /* * 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); } /* sort_up_index_number --- qsort comparison function; ascending index numbers. */ static int sort_up_index_number(const void *p1, const void *p2) { const NODE *n1, *n2; int ret; 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; } /* sort_down_index_number --- qsort comparison function; descending index numbers */ static int sort_down_index_number(const void *p1, const void *p2) { return -sort_up_index_number(p1, p2); } /* sort_up_value_string --- qsort comparison function; ascending value string */ 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); } /* sort_down_value_string --- descending value string */ static int sort_down_value_string(const void *p1, const void *p2) { return -sort_up_value_string(p1, p2); } /* sort_up_value_number --- qsort comparison function; ascending value number */ static int sort_up_value_number(const void *p1, const void *p2) { const NODE *t1, *t2; NODE *n1, *n2; int ret; /* 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 Node_val, and force_number'ed */ if (n1->numbr < n2->numbr) ret = -1; else ret = (n1->numbr > n2->numbr); 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 ret; } /* sort_down_value_number --- descending value number */ static int sort_down_value_number(const void *p1, const void *p2) { return -sort_up_value_number(p1, p2); } /* sort_up_value_type --- qsort comparison function; ascending value type */ 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; } /* 4. Two strings */ return cmp_string(n1, n2); } /* sort_down_value_type --- descending value type */ static int sort_down_value_type(const void *p1, const void *p2) { return -sort_up_value_type(p1, p2); } /* sort_user_func --- user defined qsort comparison function */ 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) { 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 From: Paolo Bonzini To: arnold@skeeve.com Subject: Hash function Message-ID: <20021028123303.GA6832@biancaneve> Here is the hash function I'm using in GNU Smalltalk. The scrambling is needed if you use powers of two as the table sizes. If you use primes it is not needed. To use double-hashing with power-of-two size, you should use the _gst_hash_string(str, len) as the primary hash and scramble(_gst_hash_string (str, len)) | 1 as the secondary hash. Paolo */ /* * ADR: Slightly modified to work w/in the context of gawk. */ static unsigned long gst_hash_string(const char *str, size_t len, unsigned long hsize, size_t *code) { unsigned long hashVal = 1497032417; /* arbitrary value */ unsigned long ret; while (len--) { hashVal += *str++; hashVal += (hashVal << 10); hashVal ^= (hashVal >> 6); } ret = scramble(hashVal); if (code != NULL) *code = ret; if (ret >= hsize) ret %= hsize; return ret; } static unsigned long scramble(unsigned long x) { if (sizeof(long) == 4) { int y = ~x; x += (y << 10) | (y >> 22); x += (x << 6) | (x >> 26); x -= (x << 16) | (x >> 16); } else { x ^= (~x) >> 31; x += (x << 21) | (x >> 11); x += (x << 5) | (x >> 27); x += (x << 27) | (x >> 5); x += (x << 31); } return x; } gawk-4.0.1+dfsg.orig/eval_d.c0000644000175000017500000000170411734665352014761 0ustar schotschot/* * 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" gawk-4.0.1+dfsg.orig/mbsupport.h0000644000175000017500000000515311734665745015577 0ustar schotschot/* * mbsupport.h --- Localize determination of whether we have multibyte stuff. */ /* * 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. * * 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 needed because we test for i18n support in 3 different * places, and we want a consistent definition in all of them. Following * the ``Don't Repeat Yourself'' principle from "The Pragmatic Programmer", * we centralize the tests here. * * This test is the union of all the current tests. */ #ifdef HAVE_STDLIB_H #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) \ && defined(HAVE_WCRTOMB) \ && defined(HAVE_WCSCOLL) \ && defined(HAVE_WCTYPE) \ && defined(HAVE_WCTYPE_H) \ && defined(HAVE_WCTYPE_T) \ && defined(HAVE_WINT_T) \ && defined(HAVE_ISWLOWER) \ && defined(HAVE_ISWUPPER) \ && defined(HAVE_TOWLOWER) \ && defined(HAVE_TOWUPPER) \ && (defined(HAVE_STDLIB_H) && defined(MB_CUR_MAX)) \ /* We can handle multibyte strings. */ # define MBS_SUPPORT 1 #else # 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 gawk-4.0.1+dfsg.orig/posix/0000755000175000017500000000000011734667115014522 5ustar schotschotgawk-4.0.1+dfsg.orig/posix/ChangeLog0000644000175000017500000000044311734667115016275 0ustar schotschot2012-03-28 Arnold D. Robbins * 4.0.1: Release tar ball made. 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. gawk-4.0.1+dfsg.orig/posix/gawkmisc.c0000644000175000017500000001360411734665352016500 0ustar schotschot/* gawkmisc.c --- miscellaneous gawk routines that are OS specific. 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 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. */ #ifdef __CYGWIN__ #include #include #include #include #endif char quote = '\''; char *defpath = DEFPATH; char envsep = ':'; #ifndef INVALID_HANDLE /* FIXME: is this value for INVALID_HANDLE correct? */ #define INVALID_HANDLE -1 #endif /* gawk_name --- pull out the "gawk" part from how the OS called us */ char * gawk_name(const char *filespec) { char *p; /* "path/name" -> "name" */ p = strrchr(filespec, '/'); return (p == NULL ? (char *) filespec : p + 1); } /* os_arg_fixup --- fixup the command line */ void os_arg_fixup(int *argcp, char ***argvp) { /* no-op */ return; } /* os_devopen --- open special per-OS devices */ int os_devopen(const char *name, int flag) { /* no-op */ return INVALID_HANDLE; } /* optimal_bufsize --- determine optimal buffer size */ /* * Enhance this for debugging purposes, as follows: * * Always stat the file, stat buffer is used by higher-level code. * * if (AWKBUFSIZE == "exact") * return the file size * else if (AWKBUFSIZE == a number) * always return that number * else * if the size is < default_blocksize * return the size * else * return default_blocksize * end if * endif * * Hair comes in an effort to only deal with AWKBUFSIZE * once, the first time this routine is called, instead of * every time. Performance, dontyaknow. */ size_t optimal_bufsize(int fd, struct stat *stb) { char *val; static size_t env_val = 0; static short first = TRUE; static short exact = FALSE; /* force all members to zero in case OS doesn't use all of them. */ memset(stb, '\0', sizeof(struct stat)); /* always stat, in case stb is used by higher level code. */ if (fstat(fd, stb) == -1) fatal("can't stat fd %d (%s)", fd, strerror(errno)); if (first) { first = FALSE; if ((val = getenv("AWKBUFSIZE")) != NULL) { if (strcmp(val, "exact") == 0) exact = TRUE; else if (isdigit((unsigned char) *val)) { for (; *val && isdigit((unsigned char) *val); val++) env_val = (env_val * 10) + *val - '0'; return env_val; } } } else if (! exact && env_val > 0) return env_val; /* else fall through */ /* * System V.n, n < 4, doesn't have the file system block size in the * stat structure. So we have to make some sort of reasonable * guess. We use stdio's BUFSIZ, since that is what it was * meant for in the first place. */ #ifdef HAVE_ST_BLKSIZE #define DEFBLKSIZE (stb->st_blksize > 0 ? stb->st_blksize : BUFSIZ) #else #define DEFBLKSIZE BUFSIZ #endif if (S_ISREG(stb->st_mode) /* regular file */ && 0 < stb->st_size /* non-zero size */ && (stb->st_size < DEFBLKSIZE /* small file */ || exact)) /* or debugging */ return stb->st_size; /* use file size */ return DEFBLKSIZE; } /* ispath --- return true if path has directory components */ int ispath(const char *file) { return (strchr(file, '/') != NULL); } /* isdirpunct --- return true if char is a directory separator */ int isdirpunct(int c) { return (c == '/'); } /* os_close_on_exec --- set close on exec flag, print warning if fails */ void os_close_on_exec(int fd, const char *name, const char *what, const char *dir) { int curflags = 0; if (fd <= 2) /* sanity */ return; /* * 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)); } /* 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(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() { long uid, euid; uid = getuid(); euid = geteuid(); return (euid == 0 && euid != uid); } /* os_setbinmode --- set binary mode on file */ int os_setbinmode(int fd, int mode) { #ifdef __CYGWIN__ setmode (fd, mode); #endif return 0; } /* os_restore_mode --- restore the original mode of the console device */ void os_restore_mode(int fd) { /* no-op */ return; } /* 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; 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, struct per_process *myself) { 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, struct per_process *myself) { setmode(fileno (stdin), O_TEXT); } #endif gawk-4.0.1+dfsg.orig/posix/ChangeLog.00000644000175000017500000001177211577700447016443 0ustar schotschotMon 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. gawk-4.0.1+dfsg.orig/regexec.c0000644000175000017500000037507111734665352015164 0ustar schotschot/* Extended regular expression matching and search library. 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 . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, int n) internal_function; static void match_ctx_clean (re_match_context_t *mctx) internal_function; static void match_ctx_free (re_match_context_t *cache) internal_function; static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, int node, int str_idx, int from, int to) internal_function; static int search_cur_bkref_entry (const re_match_context_t *mctx, int str_idx) internal_function; static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, int node, int str_idx) internal_function; static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, int node, int str_idx) internal_function; static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, int last_node, int last_str_idx) internal_function; static reg_errcode_t re_search_internal (const regex_t *preg, const char *string, int length, int start, int range, int stop, size_t nmatch, regmatch_t pmatch[], int eflags) internal_function; static int re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, int length1, const char *string2, int length2, int start, int range, struct re_registers *regs, int stop, int ret_len) internal_function; static int re_search_stub (struct re_pattern_buffer *bufp, const char *string, int length, int start, int range, int stop, struct re_registers *regs, int ret_len) internal_function; static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, int nregs, int regs_allocated) internal_function; static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx) internal_function; static int check_matching (re_match_context_t *mctx, int fl_longest_match, int *p_match_first) internal_function; static int check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, int idx) internal_function; static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, int cur_node, int cur_idx, int nmatch) internal_function; static reg_errcode_t 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) internal_function; static reg_errcode_t set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, int fl_backtrack) internal_function; static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) internal_function; #ifdef RE_ENABLE_I18N static int sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, int node_idx, int str_idx, int max_str_idx) internal_function; #endif /* RE_ENABLE_I18N */ static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) internal_function; static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *cur_dest) internal_function; static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *dest_nodes) internal_function; static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) internal_function; static int check_dst_limits (const re_match_context_t *mctx, re_node_set *limits, int dst_node, int dst_idx, int src_node, int src_idx) internal_function; static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, int subexp_idx, int from_node, int bkref_idx) internal_function; static int check_dst_limits_calc_pos (const re_match_context_t *mctx, int limit, int subexp_idx, int node, int str_idx, int bkref_idx) internal_function; static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, int str_idx) internal_function; static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, const re_node_set *candidates) internal_function; static reg_errcode_t merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, int num) internal_function; static re_dfastate_t *find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) internal_function; static re_dfastate_t *transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) internal_function; static re_dfastate_t *merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) internal_function; static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, int str_idx) internal_function; #if 0 static re_dfastate_t *transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *pstate) internal_function; #endif #ifdef RE_ENABLE_I18N static reg_errcode_t transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) internal_function; #endif /* RE_ENABLE_I18N */ static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) internal_function; static reg_errcode_t get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx) internal_function; static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, int bkref_node, int bkref_str) internal_function; static int find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, int subexp_idx, int type) internal_function; static reg_errcode_t 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) internal_function; static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) internal_function; static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, int ex_subexp, int type) internal_function; static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, int target, int ex_subexp, int type) internal_function; static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, int cur_str, int subexp_num, int type) internal_function; static int build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) internal_function; #ifdef RE_ENABLE_I18N static int check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, const re_string_t *input, int idx) internal_function; # ifdef _LIBC static unsigned int find_collation_sequence_value (const unsigned char *mbs, size_t name_len) internal_function; # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ static int group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *states_node, bitset_t *states_ch) internal_function; static int check_node_accept (const re_match_context_t *mctx, const re_token_t *node, int idx) 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. */ /* regexec searches for a given pattern, specified by PREG, in the string STRING. If NMATCH is zero or REG_NOSUB was set in the cflags argument to `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at least NMATCH elements, and we set them to the offsets of the corresponding matched substrings. EFLAGS specifies `execution flags' which affect matching: if REG_NOTBOL is set, then ^ does not match at the beginning of the string; if REG_NOTEOL is set, then $ does not match at the end. We return 0 if we find a match and REG_NOMATCH if not. */ int regexec (preg, string, nmatch, pmatch, eflags) const regex_t *__restrict preg; const char *__restrict string; size_t nmatch; regmatch_t pmatch[]; int eflags; { reg_errcode_t err; int start, length; if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND)) return REG_BADPAT; if (eflags & REG_STARTEND) { start = pmatch[0].rm_so; length = pmatch[0].rm_eo; } else { start = 0; length = strlen (string); } __libc_lock_lock (dfa->lock); if (preg->no_sub) err = re_search_internal (preg, string, length, start, length - start, length, 0, NULL, eflags); else err = re_search_internal (preg, string, length, start, length - start, length, nmatch, pmatch, eflags); __libc_lock_unlock (dfa->lock); return err != REG_NOERROR; } #ifdef _LIBC # include versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) __typeof__ (__regexec) __compat_regexec; int attribute_compat_text_section __compat_regexec (const regex_t *__restrict preg, const char *__restrict string, size_t nmatch, regmatch_t pmatch[], int eflags) { return regexec (preg, string, nmatch, pmatch, eflags & (REG_NOTBOL | REG_NOTEOL)); } compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); # endif #endif /* Entry points for GNU code. */ /* re_match, re_search, re_match_2, re_search_2 The former two functions operate on STRING with length LENGTH, while the later two operate on concatenation of STRING1 and STRING2 with lengths LENGTH1 and LENGTH2, respectively. re_match() matches the compiled pattern in BUFP against the string, starting at index START. re_search() first tries matching at index START, then it tries to match starting from index START + 1, and so on. The last start position tried is START + RANGE. (Thus RANGE = 0 forces re_search to operate the same way as re_match().) The parameter STOP of re_{match,search}_2 specifies that no match exceeding the first STOP characters of the concatenation of the strings should be concerned. If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match and all groups is stroed in REGS. (For the "_2" variants, the offsets are computed relative to the concatenation, not relative to the individual strings.) On success, re_match* functions return the length of the match, re_search* return the position of the start of the match. Return value -1 means no match was found and -2 indicates an internal error. */ int re_match (bufp, string, length, start, regs) struct re_pattern_buffer *bufp; const char *string; int length, start; struct re_registers *regs; { return re_search_stub (bufp, string, length, start, 0, length, regs, 1); } #ifdef _LIBC weak_alias (__re_match, re_match) #endif int re_search (bufp, string, length, start, range, regs) struct re_pattern_buffer *bufp; const char *string; int length, start, range; struct re_registers *regs; { return re_search_stub (bufp, string, length, start, range, length, regs, 0); } #ifdef _LIBC weak_alias (__re_search, re_search) #endif int re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; int length1, length2, start, stop; struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, 0, regs, stop, 1); } #ifdef _LIBC weak_alias (__re_match_2, re_match_2) #endif int re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; int length1, length2, start, range, stop; struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, stop, 0); } #ifdef _LIBC weak_alias (__re_search_2, re_search_2) #endif static int re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, stop, ret_len) struct re_pattern_buffer *bufp; const char *string1, *string2; int length1, length2, start, range, stop, ret_len; struct re_registers *regs; { const char *str; int rval; int len = length1 + length2; int free_str = 0; if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0)) return -2; /* Concatenate the strings. */ if (length2 > 0) if (length1 > 0) { char *s = re_malloc (char, len); if (BE (s == NULL, 0)) return -2; #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; } else str = string2; else str = string1; rval = re_search_stub (bufp, str, len, start, range, stop, regs, ret_len); if (free_str) re_free ((char *) str); return rval; } /* The parameters have the same meaning as those of re_search. Additional parameters: If RET_LEN is nonzero the length of the match is returned (re_match style); otherwise the position of the match is returned. */ static int re_search_stub (bufp, string, length, start, range, stop, regs, ret_len) struct re_pattern_buffer *bufp; const char *string; int length, start, range, stop, ret_len; struct re_registers *regs; { reg_errcode_t result; regmatch_t *pmatch; int nregs, rval; int eflags = 0; /* Check for out-of-range. */ if (BE (start < 0 || start > length, 0)) return -1; if (BE (start + range > length, 0)) range = length - start; else if (BE (start + range < 0, 0)) range = -start; __libc_lock_lock (dfa->lock); eflags |= (bufp->not_bol) ? REG_NOTBOL : 0; eflags |= (bufp->not_eol) ? REG_NOTEOL : 0; /* Compile fastmap if we haven't yet. */ if (range > 0 && bufp->fastmap != NULL && !bufp->fastmap_accurate) re_compile_fastmap (bufp); if (BE (bufp->no_sub, 0)) regs = NULL; /* We need at least 1 register. */ if (regs == NULL) nregs = 1; else if (BE (bufp->regs_allocated == REGS_FIXED && regs->num_regs < bufp->re_nsub + 1, 0)) { nregs = regs->num_regs; if (BE (nregs < 1, 0)) { /* Nothing can be copied to regs. */ regs = NULL; nregs = 1; } } else nregs = bufp->re_nsub + 1; pmatch = re_malloc (regmatch_t, nregs); if (BE (pmatch == NULL, 0)) { rval = -2; goto out; } result = re_search_internal (bufp, string, length, start, range, stop, nregs, pmatch, eflags); rval = 0; /* I hope we needn't fill ther regs with -1's when no match was found. */ if (result != REG_NOERROR) rval = -1; else if (regs != NULL) { /* If caller wants register contents data back, copy them. */ bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs, bufp->regs_allocated); if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0)) rval = -2; } if (BE (rval == 0, 1)) { if (ret_len) { assert (pmatch[0].rm_so == start); rval = pmatch[0].rm_eo - start; } else rval = pmatch[0].rm_so; } re_free (pmatch); out: __libc_lock_unlock (dfa->lock); return rval; } static unsigned re_copy_regs (regs, pmatch, nregs, regs_allocated) struct re_registers *regs; regmatch_t *pmatch; int nregs, regs_allocated; { int rval = REGS_REALLOCATE; int i; int need_regs = nregs + 1; /* We need one extra element beyond `num_regs' for the `-1' marker GNU code uses. */ /* Have the register data arrays been allocated? */ if (regs_allocated == REGS_UNALLOCATED) { /* No. So allocate them with malloc. */ regs->start = re_malloc (regoff_t, need_regs); if (BE (regs->start == NULL, 0)) return REGS_UNALLOCATED; regs->end = re_malloc (regoff_t, need_regs); if (BE (regs->end == NULL, 0)) { re_free (regs->start); return REGS_UNALLOCATED; } regs->num_regs = need_regs; } else if (regs_allocated == REGS_REALLOCATE) { /* Yes. If we need more elements than were already allocated, reallocate them. If we need fewer, just leave it alone. */ if (BE (need_regs > regs->num_regs, 0)) { regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs); regoff_t *new_end; if (BE (new_start == NULL, 0)) return REGS_UNALLOCATED; new_end = re_realloc (regs->end, regoff_t, need_regs); if (BE (new_end == NULL, 0)) { re_free (new_start); return REGS_UNALLOCATED; } regs->start = new_start; regs->end = new_end; regs->num_regs = need_regs; } } else { assert (regs_allocated == REGS_FIXED); /* This function may not be called with REGS_FIXED and nregs too big. */ assert (regs->num_regs >= nregs); rval = REGS_FIXED; } /* Copy the regs. */ for (i = 0; i < nregs; ++i) { regs->start[i] = pmatch[i].rm_so; regs->end[i] = pmatch[i].rm_eo; } for ( ; i < regs->num_regs; ++i) regs->start[i] = regs->end[i] = -1; return rval; } /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated using the malloc library routine, and must each be at least NUM_REGS * sizeof (regoff_t) bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using PATTERN_BUFFER will allocate its own register data, without freeing the old data. */ void re_set_registers (bufp, regs, num_regs, starts, ends) struct re_pattern_buffer *bufp; struct re_registers *regs; unsigned num_regs; regoff_t *starts, *ends; { if (num_regs) { bufp->regs_allocated = REGS_REALLOCATE; regs->num_regs = num_regs; regs->start = starts; regs->end = ends; } else { bufp->regs_allocated = REGS_UNALLOCATED; regs->num_regs = 0; regs->start = regs->end = (regoff_t *) 0; } } #ifdef _LIBC weak_alias (__re_set_registers, re_set_registers) #endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC int # ifdef _LIBC weak_function # endif re_exec (s) const char *s; { return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); } #endif /* _REGEX_RE_COMP */ /* Internal entry point. */ /* Searches for a compiled pattern PREG in the string STRING, whose length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same mingings with regexec. START, and RANGE have the same meanings with re_search. Return REG_NOERROR if we find a match, and REG_NOMATCH if not, otherwise return the error code. Note: We assume front end functions already check ranges. (START + RANGE >= 0 && START + RANGE <= LENGTH) */ static reg_errcode_t __attribute_warn_unused_result__ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch, eflags) const regex_t *preg; const char *string; int length, start, range, stop, eflags; size_t nmatch; regmatch_t pmatch[]; { reg_errcode_t err; const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; int left_lim, right_lim, incr; int fl_longest_match, match_first, match_kind, match_last = -1; int extra_nmatch; int sb, ch; #if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) re_match_context_t mctx = { .dfa = dfa }; #else re_match_context_t mctx; #endif char *fastmap = (preg->fastmap != NULL && preg->fastmap_accurate && range && !preg->can_be_null) ? preg->fastmap : NULL; RE_TRANSLATE_TYPE t = preg->translate; #if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) memset (&mctx, '\0', sizeof (re_match_context_t)); mctx.dfa = dfa; #endif extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0; nmatch -= extra_nmatch; /* Check if the DFA haven't been compiled. */ if (BE (preg->used == 0 || dfa->init_state == NULL || dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return REG_NOMATCH; #ifdef DEBUG /* We assume front-end functions already check them. */ assert (start + range >= 0 && start + range <= length); #endif /* If initial states with non-begbuf contexts have no elements, the regex must be anchored. If preg->newline_anchor is set, we'll never use init_state_nl, so do not check it. */ if (dfa->init_state->nodes.nelem == 0 && dfa->init_state_word->nodes.nelem == 0 && (dfa->init_state_nl->nodes.nelem == 0 || !preg->newline_anchor)) { if (start != 0 && start + range != 0) return REG_NOMATCH; start = range = 0; } /* We must check the longest matching, if nmatch > 0. */ fl_longest_match = (nmatch != 0 || dfa->nbackref); err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, preg->translate, preg->syntax & RE_ICASE, dfa); if (BE (err != REG_NOERROR, 0)) goto free_return; mctx.input.stop = stop; mctx.input.raw_stop = stop; mctx.input.newline_anchor = preg->newline_anchor; err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); if (BE (err != REG_NOERROR, 0)) goto free_return; /* We will log all the DFA states through which the dfa pass, if nmatch > 1, or this dfa has "multibyte node", which is a back-reference or a node which can accept multibyte character or multi character collating element. */ if (nmatch > 1 || dfa->has_mb_node) { /* Avoid overflow. */ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0)) { err = REG_ESPACE; goto free_return; } mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); if (BE (mctx.state_log == NULL, 0)) { err = REG_ESPACE; goto free_return; } } else mctx.state_log = NULL; match_first = start; mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF; /* Check incrementally whether of not the input string match. */ incr = (range < 0) ? -1 : 1; left_lim = (range < 0) ? start + range : start; right_lim = (range < 0) ? start : start + range; sb = dfa->mb_cur_max == 1; match_kind = (fastmap ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) | (range >= 0 ? 2 : 0) | (t != NULL ? 1 : 0)) : 8); for (;; match_first += incr) { err = REG_NOMATCH; if (match_first < left_lim || right_lim < match_first) goto free_return; /* Advance as rapidly as possible through the string, until we find a plausible place to start matching. This may be done with varying efficiency, so there are various possibilities: only the most common of them are specialized, in order to save on code size. We use a switch statement for speed. */ switch (match_kind) { case 8: /* No fastmap. */ break; case 7: /* Fastmap with single-byte translation, match forward. */ while (BE (match_first < right_lim, 1) && !fastmap[t[(unsigned char) string[match_first]]]) ++match_first; goto forward_match_found_start_or_reached_end; case 6: /* Fastmap without translation, match forward. */ while (BE (match_first < right_lim, 1) && !fastmap[(unsigned char) string[match_first]]) ++match_first; forward_match_found_start_or_reached_end: if (BE (match_first == right_lim, 0)) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (!fastmap[t ? t[ch] : ch]) goto free_return; } break; case 4: case 5: /* Fastmap without multi-byte translation, match backwards. */ while (match_first >= left_lim) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (fastmap[t ? t[ch] : ch]) break; --match_first; } if (match_first < left_lim) goto free_return; break; default: /* In this case, we can't determine easily the current byte, since it might be a component byte of a multibyte character. Then we use the constructed buffer instead. */ for (;;) { /* If MATCH_FIRST is out of the valid range, reconstruct the buffers. */ unsigned int offset = match_first - mctx.input.raw_mbs_idx; if (BE (offset >= (unsigned int) mctx.input.valid_raw_len, 0)) { err = re_string_reconstruct (&mctx.input, match_first, eflags); if (BE (err != REG_NOERROR, 0)) goto free_return; offset = match_first - mctx.input.raw_mbs_idx; } /* If MATCH_FIRST is out of the buffer, leave it as '\0'. Note that MATCH_FIRST must not be smaller than 0. */ ch = (match_first >= length ? 0 : re_string_byte_at (&mctx.input, offset)); if (fastmap[ch]) break; match_first += incr; if (match_first < left_lim || match_first > right_lim) { err = REG_NOMATCH; goto free_return; } } break; } /* Reconstruct the buffers so that the matcher can assume that the matching starts from the beginning of the buffer. */ err = re_string_reconstruct (&mctx.input, match_first, eflags); if (BE (err != REG_NOERROR, 0)) goto free_return; #ifdef RE_ENABLE_I18N /* Don't consider this char as a possible match start if it part, yet isn't the head, of a multibyte character. */ if (!sb && !re_string_first_byte (&mctx.input, 0)) continue; #endif /* It seems to be appropriate one, then use the matcher. */ /* We assume that the matching starts from 0. */ mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; match_last = check_matching (&mctx, fl_longest_match, range >= 0 ? &match_first : NULL); if (match_last != -1) { if (BE (match_last == -2, 0)) { err = REG_ESPACE; goto free_return; } else { mctx.match_last = match_last; if ((!preg->no_sub && nmatch > 1) || dfa->nbackref) { re_dfastate_t *pstate = mctx.state_log[match_last]; mctx.last_node = check_halt_state_context (&mctx, pstate, match_last); } if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match) || dfa->nbackref) { err = prune_impossible_nodes (&mctx); if (err == REG_NOERROR) break; if (BE (err != REG_NOMATCH, 0)) goto free_return; match_last = -1; } else break; /* We found a match. */ } } match_ctx_clean (&mctx); } #ifdef DEBUG assert (match_last != -1); assert (err == REG_NOERROR); #endif /* Set pmatch[] if we need. */ if (nmatch > 0) { int reg_idx; /* Initialize registers. */ for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1; /* Set the points where matching start/end. */ pmatch[0].rm_so = 0; pmatch[0].rm_eo = mctx.match_last; if (!preg->no_sub && nmatch > 1) { err = set_regs (preg, &mctx, nmatch, pmatch, dfa->has_plural_match && dfa->nbackref > 0); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* At last, add the offset to the each registers, since we slided the buffers so that we could assume that the matching starts from 0. */ for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so != -1) { #ifdef RE_ENABLE_I18N if (BE (mctx.input.offsets_needed != 0, 0)) { pmatch[reg_idx].rm_so = (pmatch[reg_idx].rm_so == mctx.input.valid_len ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_so]); pmatch[reg_idx].rm_eo = (pmatch[reg_idx].rm_eo == mctx.input.valid_len ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_eo]); } #else assert (mctx.input.offsets_needed == 0); #endif pmatch[reg_idx].rm_so += match_first; pmatch[reg_idx].rm_eo += match_first; } for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx) { pmatch[nmatch + reg_idx].rm_so = -1; pmatch[nmatch + reg_idx].rm_eo = -1; } if (dfa->subexp_map) for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) if (dfa->subexp_map[reg_idx] != reg_idx) { pmatch[reg_idx + 1].rm_so = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so; pmatch[reg_idx + 1].rm_eo = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo; } } free_return: re_free (mctx.state_log); if (dfa->nbackref) match_ctx_free (&mctx); re_string_destruct (&mctx.input); return err; } static reg_errcode_t __attribute_warn_unused_result__ prune_impossible_nodes (mctx) re_match_context_t *mctx; { const re_dfa_t *const dfa = mctx->dfa; int halt_node, match_last; reg_errcode_t ret; re_dfastate_t **sifted_states; re_dfastate_t **lim_states = NULL; re_sift_context_t sctx; #ifdef DEBUG assert (mctx->state_log != NULL); #endif match_last = mctx->match_last; halt_node = mctx->last_node; /* Avoid overflow. */ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0)) return REG_ESPACE; sifted_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (sifted_states == NULL, 0)) { ret = REG_ESPACE; goto free_return; } if (dfa->nbackref) { lim_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (lim_states == NULL, 0)) { ret = REG_ESPACE; goto free_return; } while (1) { memset (lim_states, '\0', sizeof (re_dfastate_t *) * (match_last + 1)); sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; if (sifted_states[0] != NULL || lim_states[0] != NULL) break; do { --match_last; if (match_last < 0) { ret = REG_NOMATCH; goto free_return; } } while (mctx->state_log[match_last] == NULL || !mctx->state_log[match_last]->halt); halt_node = check_halt_state_context (mctx, mctx->state_log[match_last], match_last); } ret = merge_state_array (dfa, sifted_states, lim_states, match_last + 1); re_free (lim_states); lim_states = NULL; if (BE (ret != REG_NOERROR, 0)) goto free_return; } else { sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; if (sifted_states[0] == NULL) { ret = REG_NOMATCH; goto free_return; } } re_free (mctx->state_log); mctx->state_log = sifted_states; sifted_states = NULL; mctx->last_node = halt_node; mctx->match_last = match_last; ret = REG_NOERROR; free_return: re_free (sifted_states); re_free (lim_states); return ret; } /* Acquire an initial state and return it. We must select appropriate initial state depending on the context, since initial states may have constraints like "\<", "^", etc.. */ static inline re_dfastate_t * __attribute ((always_inline)) internal_function acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, int idx) { const re_dfa_t *const dfa = mctx->dfa; if (dfa->init_state->has_constraint) { unsigned int context; context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags); if (IS_WORD_CONTEXT (context)) return dfa->init_state_word; else if (IS_ORDINARY_CONTEXT (context)) return dfa->init_state; else if (IS_BEGBUF_CONTEXT (context) && IS_NEWLINE_CONTEXT (context)) return dfa->init_state_begbuf; else if (IS_NEWLINE_CONTEXT (context)) return dfa->init_state_nl; else if (IS_BEGBUF_CONTEXT (context)) { /* It is relatively rare case, then calculate on demand. */ return re_acquire_state_context (err, dfa, dfa->init_state->entrance_nodes, context); } else /* Must not happen? */ return dfa->init_state; } else return dfa->init_state; } /* Check whether the regular expression match input string INPUT or not, and return the index where the matching end, return -1 if not match, or return -2 in case of an error. FL_LONGEST_MATCH means we want the POSIX longest matching. If P_MATCH_FIRST is not NULL, and the match fails, it is set to the next place where we may want to try matching. Note that the matcher assume that the maching starts from the current index of the buffer. */ static int internal_function __attribute_warn_unused_result__ check_matching (re_match_context_t *mctx, int fl_longest_match, int *p_match_first) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int match = 0; int match_last = -1; int cur_str_idx = re_string_cur_idx (&mctx->input); re_dfastate_t *cur_state; int at_init_state = p_match_first != NULL; int next_start_idx = cur_str_idx; err = REG_NOERROR; cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); /* An initial state must not be NULL (invalid). */ if (BE (cur_state == NULL, 0)) { assert (err == REG_ESPACE); return -2; } if (mctx->state_log != NULL) { mctx->state_log[cur_str_idx] = cur_state; /* Check OP_OPEN_SUBEXP in the initial state in case that we use them later. E.g. Processing back references. */ if (BE (dfa->nbackref, 0)) { at_init_state = 0; err = check_subexp_matching_top (mctx, &cur_state->nodes, 0); if (BE (err != REG_NOERROR, 0)) return err; if (cur_state->has_backref) { err = transit_state_bkref (mctx, &cur_state->nodes); if (BE (err != REG_NOERROR, 0)) return err; } } } /* If the RE accepts NULL string. */ if (BE (cur_state->halt, 0)) { if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, cur_str_idx)) { if (!fl_longest_match) return cur_str_idx; else { match_last = cur_str_idx; match = 1; } } } while (!re_string_eoi (&mctx->input)) { 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) && mctx->input.bufs_len < mctx->input.len) || (BE (next_char_idx >= mctx->input.valid_len, 0) && mctx->input.valid_len < mctx->input.len)) { err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) { assert (err == REG_ESPACE); return -2; } } cur_state = transit_state (&err, mctx, cur_state); if (mctx->state_log != NULL) cur_state = merge_state_with_log (&err, mctx, cur_state); if (cur_state == NULL) { /* Reached the invalid state or an error. Try to recover a valid state using the state log, if available and if we have not already found a valid (even if not the longest) match. */ if (BE (err != REG_NOERROR, 0)) return -2; if (mctx->state_log == NULL || (match && !fl_longest_match) || (cur_state = find_recover_state (&err, mctx)) == NULL) break; } if (BE (at_init_state, 0)) { if (old_state == cur_state) next_start_idx = next_char_idx; else at_init_state = 0; } if (cur_state->halt) { /* Reached a halt state. Check the halt state can satisfy the current context. */ if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, re_string_cur_idx (&mctx->input))) { /* We found an appropriate halt state. */ match_last = re_string_cur_idx (&mctx->input); match = 1; /* We found a match, do not modify match_first below. */ p_match_first = NULL; if (!fl_longest_match) break; } } } if (p_match_first) *p_match_first += next_start_idx; return match_last; } /* Check NODE match the current context. */ static int internal_function check_halt_node_context (const re_dfa_t *dfa, int node, unsigned int context) { re_token_type_t type = dfa->nodes[node].type; unsigned int constraint = dfa->nodes[node].constraint; if (type != END_OF_RE) return 0; if (!constraint) return 1; if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context)) return 0; return 1; } /* Check the halt state STATE match the current context. Return 0 if not match, if the node, STATE has, is a halt node and match the context, return the node. */ static int internal_function check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, int idx) { int i; unsigned int context; #ifdef DEBUG assert (state->halt); #endif context = re_string_context_at (&mctx->input, idx, mctx->eflags); for (i = 0; i < state->nodes.nelem; ++i) if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context)) return state->nodes.elems[i]; return 0; } /* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA corresponding to the DFA). Return the destination node, and update EPS_VIA_NODES, return -1 in case of errors. */ static int internal_function proceed_next_node (const re_match_context_t *mctx, int nregs, regmatch_t *regs, int *pidx, int node, re_node_set *eps_via_nodes, struct re_fail_stack_t *fs) { const re_dfa_t *const dfa = mctx->dfa; int i, err; if (IS_EPSILON_NODE (dfa->nodes[node].type)) { re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; re_node_set *edests = &dfa->edests[node]; int dest_node; err = re_node_set_insert (eps_via_nodes, node); if (BE (err < 0, 0)) return -2; /* Pick up a valid destination, or return -1 if none is found. */ for (dest_node = -1, i = 0; i < edests->nelem; ++i) { int candidate = edests->elems[i]; if (!re_node_set_contains (cur_nodes, candidate)) continue; if (dest_node == -1) dest_node = candidate; else { /* In order to avoid infinite loop like "(a*)*", return the second epsilon-transition if the first was already considered. */ if (re_node_set_contains (eps_via_nodes, dest_node)) return candidate; /* Otherwise, push the second epsilon-transition on the fail stack. */ else if (fs != NULL && push_fail_stack (fs, *pidx, candidate, nregs, regs, eps_via_nodes)) return -2; /* We know we are going to exit. */ break; } } return dest_node; } else { int naccepted = 0; re_token_type_t type = dfa->nodes[node].type; #ifdef RE_ENABLE_I18N if (dfa->nodes[node].accept_mb) naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); else #endif /* RE_ENABLE_I18N */ if (type == OP_BACK_REF) { int subexp_idx = dfa->nodes[node].opr.idx + 1; naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; if (fs != NULL) { if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) return -1; else if (naccepted) { char *buf = (char *) re_string_get_buffer (&mctx->input); if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, naccepted) != 0) return -1; } } if (naccepted == 0) { int dest_node; err = re_node_set_insert (eps_via_nodes, node); if (BE (err < 0, 0)) return -2; dest_node = dfa->edests[node].elems[0]; if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node)) return dest_node; } } if (naccepted != 0 || check_node_accept (mctx, dfa->nodes + node, *pidx)) { int dest_node = dfa->nexts[node]; *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted; if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node))) return -1; re_node_set_empty (eps_via_nodes); return dest_node; } } return -1; } static reg_errcode_t 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) { reg_errcode_t err; int num = fs->num++; if (fs->num == fs->alloc) { struct re_fail_stack_ent_t *new_array; new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) * fs->alloc * 2)); if (new_array == NULL) return REG_ESPACE; fs->alloc *= 2; fs->stack = new_array; } fs->stack[num].idx = str_idx; fs->stack[num].node = dest_node; fs->stack[num].regs = re_malloc (regmatch_t, nregs); if (fs->stack[num].regs == NULL) return REG_ESPACE; memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes); return err; } static int internal_function pop_fail_stack (struct re_fail_stack_t *fs, int *pidx, int nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { int num = --fs->num; assert (num >= 0); *pidx = fs->stack[num].idx; memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); re_node_set_free (eps_via_nodes); re_free (fs->stack[num].regs); *eps_via_nodes = fs->stack[num].eps_via_nodes; return fs->stack[num].node; } /* Set the positions where the subexpressions are starts/ends to registers PMATCH. Note: We assume that pmatch[0] is already set, and pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */ static reg_errcode_t 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) { const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; int idx, cur_node; re_node_set eps_via_nodes; struct re_fail_stack_t *fs; struct re_fail_stack_t fs_body = { 0, 2, NULL }; regmatch_t *prev_idx_match; int prev_idx_match_malloced = 0; #ifdef DEBUG assert (nmatch > 1); assert (mctx->state_log != NULL); #endif if (fl_backtrack) { fs = &fs_body; fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc); if (fs->stack == NULL) return REG_ESPACE; } else fs = NULL; cur_node = dfa->init_node; re_node_set_init_empty (&eps_via_nodes); #ifdef HAVE_ALLOCA if (__libc_use_alloca (nmatch * sizeof (regmatch_t))) prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t)); else #endif { prev_idx_match = re_malloc (regmatch_t, nmatch); if (prev_idx_match == NULL) { free_fail_stack_return (fs); return REG_ESPACE; } prev_idx_match_malloced = 1; } memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;) { update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch); if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node) { int reg_idx; if (fs) { for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1) break; if (reg_idx == nmatch) { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return free_fail_stack_return (fs); } cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); } else { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return REG_NOERROR; } } /* Proceed to next node. */ cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node, &eps_via_nodes, fs); if (BE (cur_node < 0, 0)) { if (BE (cur_node == -2, 0)) { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); free_fail_stack_return (fs); return REG_ESPACE; } if (fs) cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); else { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return REG_NOMATCH; } } } re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return free_fail_stack_return (fs); } static reg_errcode_t internal_function free_fail_stack_return (struct re_fail_stack_t *fs) { if (fs) { int fs_idx; for (fs_idx = 0; fs_idx < fs->num; ++fs_idx) { re_node_set_free (&fs->stack[fs_idx].eps_via_nodes); re_free (fs->stack[fs_idx].regs); } re_free (fs->stack); } return REG_NOERROR; } static void internal_function update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, int cur_node, int cur_idx, int nmatch) { int type = dfa->nodes[cur_node].type; if (type == OP_OPEN_SUBEXP) { int reg_num = dfa->nodes[cur_node].opr.idx + 1; /* We are at the first node of this sub expression. */ if (reg_num < nmatch) { pmatch[reg_num].rm_so = cur_idx; pmatch[reg_num].rm_eo = -1; } } else if (type == OP_CLOSE_SUBEXP) { int reg_num = dfa->nodes[cur_node].opr.idx + 1; if (reg_num < nmatch) { /* We are at the last node of this sub expression. */ if (pmatch[reg_num].rm_so < cur_idx) { pmatch[reg_num].rm_eo = cur_idx; /* This is a non-empty match or we are not inside an optional subexpression. Accept this right away. */ memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); } else { if (dfa->nodes[cur_node].opt_subexp && prev_idx_match[reg_num].rm_so != -1) /* We transited through an empty match for an optional subexpression, like (a?)*, and this is not the subexp's first match. Copy back the old content of the registers so that matches of an inner subexpression are undone as well, like in ((a?))*. */ memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch); else /* We completed a subexpression, but it may be part of an optional one, so do not update PREV_IDX_MATCH. */ pmatch[reg_num].rm_eo = cur_idx; } } } } /* This function checks the STATE_LOG from the SCTX->last_str_idx to 0 and sift the nodes in each states according to the following rules. Updated state_log will be wrote to STATE_LOG. Rules: We throw away the Node `a' in the STATE_LOG[STR_IDX] if... 1. When STR_IDX == MATCH_LAST(the last index in the state_log): If `a' isn't the LAST_NODE and `a' can't epsilon transit to the LAST_NODE, we throw away the node `a'. 2. When 0 <= STR_IDX < MATCH_LAST and `a' accepts string `s' and transit to `b': i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw away the node `a'. ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is thrown away, we throw away the node `a'. 3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b': i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the node `a'. ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away, we throw away the node `a'. */ #define STATE_NODE_CONTAINS(state,node) \ ((state) != NULL && re_node_set_contains (&(state)->nodes, node)) static reg_errcode_t internal_function sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) { reg_errcode_t err; int null_cnt = 0; int str_idx = sctx->last_str_idx; re_node_set cur_dest; #ifdef DEBUG assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); #endif /* Build sifted state_log[str_idx]. It has the nodes which can epsilon transit to the last_node and the last_node itself. */ err = re_node_set_init_1 (&cur_dest, sctx->last_node); if (BE (err != REG_NOERROR, 0)) return err; err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; /* Then check each states in the state_log. */ while (str_idx > 0) { /* Update counters. */ null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0; if (null_cnt > mctx->max_mb_elem_len) { memset (sctx->sifted_states, '\0', sizeof (re_dfastate_t *) * str_idx); re_node_set_free (&cur_dest); return REG_NOERROR; } re_node_set_empty (&cur_dest); --str_idx; if (mctx->state_log[str_idx]) { err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* Add all the nodes which satisfy the following conditions: - It can epsilon transit to a node in CUR_DEST. - It is in CUR_SRC. And update state_log. */ err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; } err = REG_NOERROR; free_return: re_node_set_free (&cur_dest); return err; } static reg_errcode_t 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) { const re_dfa_t *const dfa = mctx->dfa; const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; int i; /* Then build the next sifted state. We build the next sifted state on `cur_dest', and update `sifted_states[str_idx]' with `cur_dest'. Note: `cur_dest' is the sifted state from `state_log[str_idx + 1]'. `cur_src' points the node_set of the old `state_log[str_idx]' (with the epsilon nodes pre-filtered out). */ for (i = 0; i < cur_src->nelem; i++) { int prev_node = cur_src->elems[i]; int naccepted = 0; int ret; #ifdef DEBUG re_token_type_t type = dfa->nodes[prev_node].type; assert (!IS_EPSILON_NODE (type)); #endif #ifdef RE_ENABLE_I18N /* If the node may accept `multi byte'. */ if (dfa->nodes[prev_node].accept_mb) naccepted = sift_states_iter_mb (mctx, sctx, prev_node, str_idx, sctx->last_str_idx); #endif /* RE_ENABLE_I18N */ /* We don't check backreferences here. See update_cur_sifted_state(). */ if (!naccepted && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1], dfa->nexts[prev_node])) naccepted = 1; if (naccepted == 0) continue; if (sctx->limits.nelem) { int to_idx = str_idx + naccepted; if (check_dst_limits (mctx, &sctx->limits, dfa->nexts[prev_node], to_idx, prev_node, str_idx)) continue; } ret = re_node_set_insert (cur_dest, prev_node); if (BE (ret == -1, 0)) return REG_ESPACE; } return REG_NOERROR; } /* Helper functions. */ static reg_errcode_t internal_function clean_state_log_if_needed (re_match_context_t *mctx, int next_state_log_idx) { int top = mctx->state_log_top; if ((next_state_log_idx >= mctx->input.bufs_len && mctx->input.bufs_len < mctx->input.len) || (next_state_log_idx >= mctx->input.valid_len && mctx->input.valid_len < mctx->input.len)) { reg_errcode_t err; err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) return err; } if (top < next_state_log_idx) { memset (mctx->state_log + top + 1, '\0', sizeof (re_dfastate_t *) * (next_state_log_idx - top)); mctx->state_log_top = next_state_log_idx; } return REG_NOERROR; } static reg_errcode_t internal_function merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, int num) { int st_idx; reg_errcode_t err; for (st_idx = 0; st_idx < num; ++st_idx) { if (dst[st_idx] == NULL) dst[st_idx] = src[st_idx]; else if (src[st_idx] != NULL) { re_node_set merged_set; err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes, &src[st_idx]->nodes); if (BE (err != REG_NOERROR, 0)) return err; dst[st_idx] = re_acquire_state (&err, dfa, &merged_set); re_node_set_free (&merged_set); if (BE (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } static reg_errcode_t internal_function update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *dest_nodes) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err = REG_NOERROR; const re_node_set *candidates; candidates = ((mctx->state_log[str_idx] == NULL) ? NULL : &mctx->state_log[str_idx]->nodes); if (dest_nodes->nelem == 0) sctx->sifted_states[str_idx] = NULL; else { if (candidates) { /* At first, add the nodes which can epsilon transit to a node in DEST_NODE. */ err = add_epsilon_src_nodes (dfa, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; /* Then, check the limitations in the current sift_context. */ if (sctx->limits.nelem) { err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits, mctx->bkref_ents, str_idx); if (BE (err != REG_NOERROR, 0)) return err; } } sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; } if (candidates && mctx->state_log[str_idx]->has_backref) { err = sift_states_bkref (mctx, sctx, str_idx, candidates); if (BE (err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } static reg_errcode_t 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) { reg_errcode_t err = REG_NOERROR; int i; re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; if (!state->inveclosure.alloc) { err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; for (i = 0; i < dest_nodes->nelem; i++) { err = re_node_set_merge (&state->inveclosure, dfa->inveclosures + dest_nodes->elems[i]); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; } } return re_node_set_add_intersect (dest_nodes, candidates, &state->inveclosure); } static reg_errcode_t internal_function sub_epsilon_src_nodes (const re_dfa_t *dfa, int node, re_node_set *dest_nodes, const re_node_set *candidates) { int ecl_idx; reg_errcode_t err; re_node_set *inv_eclosure = dfa->inveclosures + node; re_node_set except_nodes; re_node_set_init_empty (&except_nodes); for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { int cur_node = inv_eclosure->elems[ecl_idx]; if (cur_node == node) continue; if (IS_EPSILON_NODE (dfa->nodes[cur_node].type)) { int edst1 = dfa->edests[cur_node].elems[0]; int edst2 = ((dfa->edests[cur_node].nelem > 1) ? dfa->edests[cur_node].elems[1] : -1); if ((!re_node_set_contains (inv_eclosure, edst1) && re_node_set_contains (dest_nodes, edst1)) || (edst2 > 0 && !re_node_set_contains (inv_eclosure, edst2) && re_node_set_contains (dest_nodes, edst2))) { err = re_node_set_add_intersect (&except_nodes, candidates, dfa->inveclosures + cur_node); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&except_nodes); return err; } } } } for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { int cur_node = inv_eclosure->elems[ecl_idx]; if (!re_node_set_contains (&except_nodes, cur_node)) { int idx = re_node_set_contains (dest_nodes, cur_node) - 1; re_node_set_remove_at (dest_nodes, idx); } } re_node_set_free (&except_nodes); return REG_NOERROR; } static int internal_function check_dst_limits (const re_match_context_t *mctx, re_node_set *limits, int dst_node, int dst_idx, int src_node, int src_idx) { const re_dfa_t *const dfa = mctx->dfa; int lim_idx, src_pos, dst_pos; int dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); int src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { int subexp_idx; struct re_backref_cache_entry *ent; ent = mctx->bkref_ents + limits->elems[lim_idx]; subexp_idx = dfa->nodes[ent->node].opr.idx; dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], subexp_idx, dst_node, dst_idx, dst_bkref_idx); src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], subexp_idx, src_node, src_idx, src_bkref_idx); /* In case of: ( ) ( ) ( ) */ if (src_pos == dst_pos) continue; /* This is unrelated limitation. */ else return 1; } return 0; } static int internal_function check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, int subexp_idx, int from_node, int bkref_idx) { const re_dfa_t *const dfa = mctx->dfa; const re_node_set *eclosures = dfa->eclosures + from_node; int node_idx; /* Else, we are on the boundary: examine the nodes on the epsilon closure. */ for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx) { int node = eclosures->elems[node_idx]; switch (dfa->nodes[node].type) { case OP_BACK_REF: if (bkref_idx != -1) { struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx; do { int dst, cpos; if (ent->node != node) continue; if (subexp_idx < BITSET_WORD_BITS && !(ent->eps_reachable_subexps_map & ((bitset_word_t) 1 << subexp_idx))) continue; /* Recurse trying to reach the OP_OPEN_SUBEXP and OP_CLOSE_SUBEXP cases below. But, if the destination node is the same node as the source node, don't recurse because it would cause an infinite loop: a regex that exhibits this behavior is ()\1*\1* */ dst = dfa->edests[node].elems[0]; if (dst == from_node) { if (boundaries & 1) return -1; else /* if (boundaries & 2) */ return 0; } cpos = check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, dst, bkref_idx); if (cpos == -1 /* && (boundaries & 1) */) return -1; if (cpos == 0 && (boundaries & 2)) return 0; if (subexp_idx < BITSET_WORD_BITS) ent->eps_reachable_subexps_map &= ~((bitset_word_t) 1 << subexp_idx); } while (ent++->more); } break; case OP_OPEN_SUBEXP: if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx) return -1; break; case OP_CLOSE_SUBEXP: if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx) return 0; break; default: break; } } return (boundaries & 2) ? 1 : 0; } static int internal_function check_dst_limits_calc_pos (const re_match_context_t *mctx, int limit, int subexp_idx, int from_node, int str_idx, int bkref_idx) { struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; int boundaries; /* If we are outside the range of the subexpression, return -1 or 1. */ if (str_idx < lim->subexp_from) return -1; if (lim->subexp_to < str_idx) return 1; /* If we are within the subexpression, return 0. */ boundaries = (str_idx == lim->subexp_from); boundaries |= (str_idx == lim->subexp_to) << 1; if (boundaries == 0) return 0; /* Else, examine epsilon closure. */ return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, from_node, bkref_idx); } /* Check the limitations of sub expressions LIMITS, and remove the nodes which are against limitations from DEST_NODES. */ static reg_errcode_t internal_function check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, int str_idx) { reg_errcode_t err; int node_idx, lim_idx; for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { int subexp_idx; struct re_backref_cache_entry *ent; ent = bkref_ents + limits->elems[lim_idx]; if (str_idx <= ent->subexp_from || ent->str_idx < str_idx) continue; /* This is unrelated limitation. */ subexp_idx = dfa->nodes[ent->node].opr.idx; if (ent->subexp_to == str_idx) { int ops_node = -1; int cls_node = -1; for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { int node = dest_nodes->elems[node_idx]; re_token_type_t type = dfa->nodes[node].type; if (type == OP_OPEN_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) ops_node = node; else if (type == OP_CLOSE_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) cls_node = node; } /* Check the limitation of the open subexpression. */ /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */ if (ops_node >= 0) { err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } /* Check the limitation of the close subexpression. */ if (cls_node >= 0) for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { int node = dest_nodes->elems[node_idx]; if (!re_node_set_contains (dfa->inveclosures + node, cls_node) && !re_node_set_contains (dfa->eclosures + node, cls_node)) { /* It is against this limitation. Remove it form the current sifted state. */ err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; --node_idx; } } } else /* (ent->subexp_to != str_idx) */ { for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { int node = dest_nodes->elems[node_idx]; re_token_type_t type = dfa->nodes[node].type; if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP) { if (subexp_idx != dfa->nodes[node].opr.idx) continue; /* It is against this limitation. Remove it form the current sifted state. */ err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } } } } return REG_NOERROR; } static reg_errcode_t 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) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int node_idx, node; re_sift_context_t local_sctx; int first_idx = search_cur_bkref_entry (mctx, str_idx); if (first_idx == -1) return REG_NOERROR; local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */ for (node_idx = 0; node_idx < candidates->nelem; ++node_idx) { int enabled_idx; re_token_type_t type; struct re_backref_cache_entry *entry; node = candidates->elems[node_idx]; type = dfa->nodes[node].type; /* Avoid infinite loop for the REs like "()\1+". */ if (node == sctx->last_node && str_idx == sctx->last_str_idx) continue; if (type != OP_BACK_REF) continue; entry = mctx->bkref_ents + first_idx; enabled_idx = first_idx; do { int subexp_len; int to_idx; int dst_node; int ret; re_dfastate_t *cur_state; if (entry->node != node) continue; subexp_len = entry->subexp_to - entry->subexp_from; to_idx = str_idx + subexp_len; dst_node = (subexp_len ? dfa->nexts[node] : dfa->edests[node].elems[0]); if (to_idx > sctx->last_str_idx || sctx->sifted_states[to_idx] == NULL || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node) || check_dst_limits (mctx, &sctx->limits, node, str_idx, dst_node, to_idx)) continue; if (local_sctx.sifted_states == NULL) { local_sctx = *sctx; err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits); if (BE (err != REG_NOERROR, 0)) goto free_return; } local_sctx.last_node = node; local_sctx.last_str_idx = str_idx; ret = re_node_set_insert (&local_sctx.limits, enabled_idx); if (BE (ret < 0, 0)) { err = REG_ESPACE; goto free_return; } cur_state = local_sctx.sifted_states[str_idx]; err = sift_states_backward (mctx, &local_sctx); if (BE (err != REG_NOERROR, 0)) goto free_return; if (sctx->limited_states != NULL) { err = merge_state_array (dfa, sctx->limited_states, local_sctx.sifted_states, str_idx + 1); if (BE (err != REG_NOERROR, 0)) goto free_return; } local_sctx.sifted_states[str_idx] = cur_state; re_node_set_remove (&local_sctx.limits, enabled_idx); /* mctx->bkref_ents may have changed, reload the pointer. */ entry = mctx->bkref_ents + enabled_idx; } while (enabled_idx++, entry++->more); } err = REG_NOERROR; free_return: if (local_sctx.sifted_states != NULL) { re_node_set_free (&local_sctx.limits); } return err; } #ifdef RE_ENABLE_I18N static int internal_function sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, int node_idx, int str_idx, int max_str_idx) { const re_dfa_t *const dfa = mctx->dfa; int naccepted; /* Check the node can accept `multi byte'. */ naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); if (naccepted > 0 && str_idx + naccepted <= max_str_idx && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], dfa->nexts[node_idx])) /* The node can't accept the `multi byte', or the destination was already thrown away, then the node could't accept the current input `multi byte'. */ naccepted = 0; /* Otherwise, it is sure that the node could accept `naccepted' bytes input. */ return naccepted; } #endif /* RE_ENABLE_I18N */ /* Functions for state transition. */ /* Return the next state to which the current state STATE will transit by accepting the current input byte, and update STATE_LOG if necessary. If STATE can accept a multibyte char/collating element/back reference update the destination of STATE_LOG. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { re_dfastate_t **trtable; unsigned char ch; #ifdef RE_ENABLE_I18N /* If the current state can accept multibyte. */ if (BE (state->accept_mb, 0)) { *err = transit_state_mb (mctx, state); if (BE (*err != REG_NOERROR, 0)) return NULL; } #endif /* RE_ENABLE_I18N */ /* Then decide the next state with the single byte. */ #if 0 if (0) /* don't use transition table */ return transit_state_sb (err, mctx, state); #endif /* Use transition table */ ch = re_string_fetch_byte (&mctx->input); for (;;) { trtable = state->trtable; if (BE (trtable != NULL, 1)) return trtable[ch]; trtable = state->word_trtable; if (BE (trtable != NULL, 1)) { unsigned int context; context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input) - 1, mctx->eflags); if (IS_WORD_CONTEXT (context)) return trtable[ch + SBC_MAX]; else return trtable[ch]; } if (!build_trtable (mctx->dfa, state)) { *err = REG_ESPACE; return NULL; } /* Retry, we now have a transition table. */ } } /* Update the state_log if we need */ re_dfastate_t * internal_function merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) { const re_dfa_t *const dfa = mctx->dfa; int cur_idx = re_string_cur_idx (&mctx->input); if (cur_idx > mctx->state_log_top) { mctx->state_log[cur_idx] = next_state; mctx->state_log_top = cur_idx; } else if (mctx->state_log[cur_idx] == 0) { mctx->state_log[cur_idx] = next_state; } else { re_dfastate_t *pstate; unsigned int context; re_node_set next_nodes, *log_nodes, *table_nodes = NULL; /* If (state_log[cur_idx] != 0), it implies that cur_idx is the destination of a multibyte char/collating element/ back reference. Then the next state is the union set of these destinations and the results of the transition table. */ pstate = mctx->state_log[cur_idx]; log_nodes = pstate->entrance_nodes; if (next_state != NULL) { table_nodes = next_state->entrance_nodes; *err = re_node_set_init_union (&next_nodes, table_nodes, log_nodes); if (BE (*err != REG_NOERROR, 0)) return NULL; } else next_nodes = *log_nodes; /* Note: We already add the nodes of the initial state, then we don't need to add them here. */ context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input) - 1, mctx->eflags); next_state = mctx->state_log[cur_idx] = re_acquire_state_context (err, dfa, &next_nodes, context); /* We don't need to check errors here, since the return value of this function is next_state and ERR is already set. */ if (table_nodes != NULL) re_node_set_free (&next_nodes); } if (BE (dfa->nbackref, 0) && next_state != NULL) { /* Check OP_OPEN_SUBEXP in the current state in case that we use them later. We must check them here, since the back references in the next state might use them. */ *err = check_subexp_matching_top (mctx, &next_state->nodes, cur_idx); if (BE (*err != REG_NOERROR, 0)) return NULL; /* If the next state has back references. */ if (next_state->has_backref) { *err = transit_state_bkref (mctx, &next_state->nodes); if (BE (*err != REG_NOERROR, 0)) return NULL; next_state = mctx->state_log[cur_idx]; } } return next_state; } /* Skip bytes in the input that correspond to part of a multi-byte match, then look in the log for a state from which to restart matching. */ re_dfastate_t * internal_function find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) { re_dfastate_t *cur_state; do { int max = mctx->state_log_top; int cur_str_idx = re_string_cur_idx (&mctx->input); do { if (++cur_str_idx > max) return NULL; re_string_skip_bytes (&mctx->input, 1); } while (mctx->state_log[cur_str_idx] == NULL); cur_state = merge_state_with_log (err, mctx, NULL); } while (*err == REG_NOERROR && cur_state == NULL); return cur_state; } /* Helper functions for transit_state. */ /* From the node set CUR_NODES, pick up the nodes whose types are OP_OPEN_SUBEXP and which have corresponding back references in the regular expression. And register them to use them later for evaluating the correspoding back references. */ static reg_errcode_t internal_function check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, int str_idx) { const re_dfa_t *const dfa = mctx->dfa; int node_idx; reg_errcode_t err; /* TODO: This isn't efficient. Because there might be more than one nodes whose types are OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all nodes. E.g. RE: (a){2} */ for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx) { int node = cur_nodes->elems[node_idx]; if (dfa->nodes[node].type == OP_OPEN_SUBEXP && dfa->nodes[node].opr.idx < BITSET_WORD_BITS && (dfa->used_bkref_map & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx))) { err = match_ctx_add_subtop (mctx, node, str_idx); if (BE (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } #if 0 /* Return the next state to which the current state STATE will transit by accepting the current input byte. */ static re_dfastate_t * transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { const re_dfa_t *const dfa = mctx->dfa; re_node_set next_nodes; re_dfastate_t *next_state; int node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input); unsigned int context; *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1); if (BE (*err != REG_NOERROR, 0)) return NULL; for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt) { int cur_node = state->nodes.elems[node_cnt]; if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx)) { *err = re_node_set_merge (&next_nodes, dfa->eclosures + dfa->nexts[cur_node]); if (BE (*err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return NULL; } } } context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); next_state = re_acquire_state_context (err, dfa, &next_nodes, context); /* We don't need to check errors here, since the return value of this function is next_state and ERR is already set. */ re_node_set_free (&next_nodes); re_string_skip_bytes (&mctx->input, 1); return next_state; } #endif #ifdef RE_ENABLE_I18N static reg_errcode_t internal_function transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int i; for (i = 0; i < pstate->nodes.nelem; ++i) { re_node_set dest_nodes, *new_nodes; int cur_node_idx = pstate->nodes.elems[i]; int naccepted, dest_idx; unsigned int context; re_dfastate_t *dest_state; if (!dfa->nodes[cur_node_idx].accept_mb) continue; if (dfa->nodes[cur_node_idx].constraint) { context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input), mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint, context)) continue; } /* How many bytes the node can accept? */ naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input, re_string_cur_idx (&mctx->input)); if (naccepted == 0) continue; /* The node can accepts `naccepted' bytes. */ dest_idx = re_string_cur_idx (&mctx->input) + naccepted; mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted : mctx->max_mb_elem_len); err = clean_state_log_if_needed (mctx, dest_idx); if (BE (err != REG_NOERROR, 0)) return err; #ifdef DEBUG assert (dfa->nexts[cur_node_idx] != -1); #endif new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx]; dest_state = mctx->state_log[dest_idx]; if (dest_state == NULL) dest_nodes = *new_nodes; else { err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_nodes); if (BE (err != REG_NOERROR, 0)) return err; } context = re_string_context_at (&mctx->input, dest_idx - 1, mctx->eflags); mctx->state_log[dest_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); if (dest_state != NULL) re_node_set_free (&dest_nodes); if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } #endif /* RE_ENABLE_I18N */ static reg_errcode_t internal_function transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int i; int cur_str_idx = re_string_cur_idx (&mctx->input); for (i = 0; i < nodes->nelem; ++i) { int dest_str_idx, prev_nelem, bkc_idx; int node_idx = nodes->elems[i]; unsigned int context; const re_token_t *node = dfa->nodes + node_idx; re_node_set *new_dest_nodes; /* Check whether `node' is a backreference or not. */ if (node->type != OP_BACK_REF) continue; if (node->constraint) { context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) continue; } /* `node' is a backreference. Check the substring which the substring matched. */ bkc_idx = mctx->nbkref_ents; err = get_subexp (mctx, node_idx, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; /* And add the epsilon closures (which is `new_dest_nodes') of the backreference to appropriate state_log. */ #ifdef DEBUG assert (dfa->nexts[node_idx] != -1); #endif for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) { int subexp_len; re_dfastate_t *dest_state; struct re_backref_cache_entry *bkref_ent; bkref_ent = mctx->bkref_ents + bkc_idx; if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx) continue; subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from; new_dest_nodes = (subexp_len == 0 ? dfa->eclosures + dfa->edests[node_idx].elems[0] : dfa->eclosures + dfa->nexts[node_idx]); dest_str_idx = (cur_str_idx + bkref_ent->subexp_to - bkref_ent->subexp_from); context = re_string_context_at (&mctx->input, dest_str_idx - 1, mctx->eflags); dest_state = mctx->state_log[dest_str_idx]; prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0 : mctx->state_log[cur_str_idx]->nodes.nelem); /* Add `new_dest_node' to state_log. */ if (dest_state == NULL) { mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, new_dest_nodes, context); if (BE (mctx->state_log[dest_str_idx] == NULL && err != REG_NOERROR, 0)) goto free_return; } else { re_node_set dest_nodes; err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_dest_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&dest_nodes); goto free_return; } mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); re_node_set_free (&dest_nodes); if (BE (mctx->state_log[dest_str_idx] == NULL && err != REG_NOERROR, 0)) goto free_return; } /* We need to check recursively if the backreference can epsilon transit. */ if (subexp_len == 0 && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) { err = check_subexp_matching_top (mctx, new_dest_nodes, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; err = transit_state_bkref (mctx, new_dest_nodes); if (BE (err != REG_NOERROR, 0)) goto free_return; } } } err = REG_NOERROR; free_return: return err; } /* Enumerate all the candidates which the backreference BKREF_NODE can match at BKREF_STR_IDX, and register them by match_ctx_add_entry(). Note that we might collect inappropriate candidates here. However, the cost of checking them strictly here is too high, then we delay these checking for prune_impossible_nodes(). */ static reg_errcode_t 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; int subexp_num, sub_top_idx; const char *buf = (const char *) re_string_get_buffer (&mctx->input); /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */ int cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); if (cache_idx != -1) { const struct re_backref_cache_entry *entry = mctx->bkref_ents + cache_idx; do if (entry->node == bkref_node) return REG_NOERROR; /* We already checked it. */ while (entry++->more); } subexp_num = dfa->nodes[bkref_node].opr.idx; /* For each sub expression */ for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx) { reg_errcode_t err; re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; re_sub_match_last_t *sub_last; int sub_last_idx, sl_str, bkref_str_off; if (dfa->nodes[sub_top->node].opr.idx != subexp_num) continue; /* It isn't related. */ sl_str = sub_top->str_idx; bkref_str_off = bkref_str_idx; /* At first, check the last node of sub expressions we already evaluated. */ for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx) { int sl_str_diff; sub_last = sub_top->lasts[sub_last_idx]; sl_str_diff = sub_last->str_idx - sl_str; /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_diff > 0) { if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0)) { /* Not enough chars for a successful match. */ if (bkref_str_off + sl_str_diff > mctx->input.len) break; err = clean_state_log_if_needed (mctx, bkref_str_off + sl_str_diff); if (BE (err != REG_NOERROR, 0)) return err; buf = (const char *) re_string_get_buffer (&mctx->input); } if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0) /* We don't need to search this sub expression any more. */ break; } bkref_str_off += sl_str_diff; sl_str += sl_str_diff; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); /* Reload buf, since the preceding call might have reallocated the buffer. */ buf = (const char *) re_string_get_buffer (&mctx->input); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) return err; } if (sub_last_idx < sub_top->nlasts) continue; if (sub_last_idx > 0) ++sl_str; /* Then, search for the other last nodes of the sub expression. */ for (; sl_str <= bkref_str_idx; ++sl_str) { int cls_node, sl_str_off; const re_node_set *nodes; sl_str_off = sl_str - sub_top->str_idx; /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_off > 0) { if (BE (bkref_str_off >= mctx->input.valid_len, 0)) { /* If we are at the end of the input, we cannot match. */ if (bkref_str_off >= mctx->input.len) break; err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) return err; buf = (const char *) re_string_get_buffer (&mctx->input); } if (buf [bkref_str_off++] != buf[sl_str - 1]) break; /* We don't need to search this sub expression any more. */ } if (mctx->state_log[sl_str] == NULL) continue; /* Does this state have a ')' of the sub expression? */ nodes = &mctx->state_log[sl_str]->nodes; cls_node = find_subexp_node (dfa, nodes, subexp_num, OP_CLOSE_SUBEXP); if (cls_node == -1) continue; /* No. */ if (sub_top->path == NULL) { sub_top->path = calloc (sizeof (state_array_t), sl_str - sub_top->str_idx + 1); if (sub_top->path == NULL) return REG_ESPACE; } /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node in the current context? */ err = check_arrival (mctx, sub_top->path, sub_top->node, sub_top->str_idx, cls_node, sl_str, OP_CLOSE_SUBEXP); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) return err; sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str); if (BE (sub_last == NULL, 0)) return REG_ESPACE; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); if (err == REG_NOMATCH) continue; } } return REG_NOERROR; } /* Helper functions for get_subexp(). */ /* Check SUB_LAST can arrive to the back reference BKREF_NODE at BKREF_STR. If it can arrive, register the sub expression expressed with SUB_TOP and SUB_LAST. */ static reg_errcode_t internal_function get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, int bkref_node, int bkref_str) { reg_errcode_t err; int to_idx; /* Can the subexpression arrive the back reference? */ err = check_arrival (mctx, &sub_last->path, sub_last->node, sub_last->str_idx, bkref_node, bkref_str, OP_OPEN_SUBEXP); if (err != REG_NOERROR) return err; err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, sub_last->str_idx); if (BE (err != REG_NOERROR, 0)) return err; to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; return clean_state_log_if_needed (mctx, to_idx); } /* Find the first node which is '(' or ')' and whose index is SUBEXP_IDX. Search '(' if FL_OPEN, or search ')' otherwise. TODO: This function isn't efficient... Because there might be more than one nodes whose types are OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all nodes. E.g. RE: (a){2} */ static int internal_function find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, int subexp_idx, int type) { int cls_idx; for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx) { int cls_node = nodes->elems[cls_idx]; const re_token_t *node = dfa->nodes + cls_node; if (node->type == type && node->opr.idx == subexp_idx) return cls_node; } return -1; } /* Check whether the node TOP_NODE at TOP_STR can arrive to the node LAST_NODE at LAST_STR. We record the path onto PATH since it will be heavily reused. Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ static reg_errcode_t 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) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err = REG_NOERROR; int subexp_num, backup_cur_idx, str_idx, null_cnt; re_dfastate_t *cur_state = NULL; re_node_set *cur_nodes, next_nodes; re_dfastate_t **backup_state_log; unsigned int context; subexp_num = dfa->nodes[top_node].opr.idx; /* Extend the buffer if we need. */ if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0)) { re_dfastate_t **new_array; int old_alloc = path->alloc; path->alloc += last_str + mctx->max_mb_elem_len + 1; new_array = re_realloc (path->array, re_dfastate_t *, path->alloc); if (BE (new_array == NULL, 0)) { path->alloc = old_alloc; return REG_ESPACE; } path->array = new_array; memset (new_array + old_alloc, '\0', sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); } str_idx = path->next_idx ? path->next_idx : top_str; /* Temporary modify MCTX. */ backup_state_log = mctx->state_log; backup_cur_idx = mctx->input.cur_idx; mctx->state_log = path->array; mctx->input.cur_idx = str_idx; /* Setup initial node set. */ context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); if (str_idx == top_str) { err = re_node_set_init_1 (&next_nodes, top_node); if (BE (err != REG_NOERROR, 0)) return err; err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } else { cur_state = mctx->state_log[str_idx]; if (cur_state && cur_state->has_backref) { err = re_node_set_init_copy (&next_nodes, &cur_state->nodes); if (BE (err != REG_NOERROR, 0)) return err; } else re_node_set_init_empty (&next_nodes); } if (str_idx == top_str || (cur_state && cur_state->has_backref)) { if (next_nodes.nelem) { err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } mctx->state_log[str_idx] = cur_state; } for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) { re_node_set_empty (&next_nodes); if (mctx->state_log[str_idx + 1]) { err = re_node_set_merge (&next_nodes, &mctx->state_log[str_idx + 1]->nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } if (cur_state) { err = check_arrival_add_next_nodes (mctx, str_idx, &cur_state->non_eps_nodes, &next_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } ++str_idx; if (next_nodes.nelem) { err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } mctx->state_log[str_idx] = cur_state; null_cnt = cur_state == NULL ? null_cnt + 1 : 0; } re_node_set_free (&next_nodes); cur_nodes = (mctx->state_log[last_str] == NULL ? NULL : &mctx->state_log[last_str]->nodes); path->next_idx = str_idx; /* Fix MCTX. */ mctx->state_log = backup_state_log; mctx->input.cur_idx = backup_cur_idx; /* Then check the current node set has the node LAST_NODE. */ if (cur_nodes != NULL && re_node_set_contains (cur_nodes, last_node)) return REG_NOERROR; return REG_NOMATCH; } /* Helper functions for check_arrival. */ /* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them to NEXT_NODES. TODO: This function is similar to the functions transit_state*(), however this function has many additional works. Can't we unify them? */ static reg_errcode_t 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) { int naccepted = 0; int cur_node = cur_nodes->elems[cur_idx]; #ifdef DEBUG re_token_type_t type = dfa->nodes[cur_node].type; assert (!IS_EPSILON_NODE (type)); #endif #ifdef RE_ENABLE_I18N /* If the node may accept `multi byte'. */ if (dfa->nodes[cur_node].accept_mb) { naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, str_idx); if (naccepted > 1) { re_dfastate_t *dest_state; int next_node = dfa->nexts[cur_node]; int next_idx = str_idx + naccepted; dest_state = mctx->state_log[next_idx]; re_node_set_empty (&union_set); if (dest_state) { err = re_node_set_merge (&union_set, &dest_state->nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&union_set); return err; } } result = re_node_set_insert (&union_set, next_node); if (BE (result < 0, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } mctx->state_log[next_idx] = re_acquire_state (&err, dfa, &union_set); if (BE (mctx->state_log[next_idx] == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&union_set); return err; } } } #endif /* RE_ENABLE_I18N */ if (naccepted || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) { result = re_node_set_insert (next_nodes, dfa->nexts[cur_node]); if (BE (result < 0, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } } } re_node_set_free (&union_set); return REG_NOERROR; } /* For all the nodes in CUR_NODES, add the epsilon closures of them to CUR_NODES, however exclude the nodes which are: - inside the sub expression whose number is EX_SUBEXP, if FL_OPEN. - out of the sub expression whose number is EX_SUBEXP, if !FL_OPEN. */ static reg_errcode_t internal_function check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, int ex_subexp, int type) { reg_errcode_t err; int idx, outside_node; re_node_set new_nodes; #ifdef DEBUG assert (cur_nodes->nelem); #endif err = re_node_set_alloc (&new_nodes, cur_nodes->nelem); if (BE (err != REG_NOERROR, 0)) return err; /* Create a new node set NEW_NODES with the nodes which are epsilon closures of the node in CUR_NODES. */ for (idx = 0; idx < cur_nodes->nelem; ++idx) { int cur_node = cur_nodes->elems[idx]; const re_node_set *eclosure = dfa->eclosures + cur_node; outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type); if (outside_node == -1) { /* There are no problematic nodes, just merge them. */ err = re_node_set_merge (&new_nodes, eclosure); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); return err; } } else { /* There are problematic nodes, re-calculate incrementally. */ err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node, ex_subexp, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); return err; } } } re_node_set_free (cur_nodes); *cur_nodes = new_nodes; return REG_NOERROR; } /* Helper function for check_arrival_expand_ecl. Check incrementally the epsilon closure of TARGET, and if it isn't problematic append it to DST_NODES. */ static reg_errcode_t 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) { int cur_node; for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);) { int err; if (dfa->nodes[cur_node].type == type && dfa->nodes[cur_node].opr.idx == ex_subexp) { if (type == OP_CLOSE_SUBEXP) { err = re_node_set_insert (dst_nodes, cur_node); if (BE (err == -1, 0)) return REG_ESPACE; } break; } err = re_node_set_insert (dst_nodes, cur_node); if (BE (err == -1, 0)) return REG_ESPACE; if (dfa->edests[cur_node].nelem == 0) break; if (dfa->edests[cur_node].nelem == 2) { err = check_arrival_expand_ecl_sub (dfa, dst_nodes, dfa->edests[cur_node].elems[1], ex_subexp, type); if (BE (err != REG_NOERROR, 0)) return err; } cur_node = dfa->edests[cur_node].elems[0]; } return REG_NOERROR; } /* For all the back references in the current state, calculate the destination of the back references by the appropriate entry in MCTX->BKREF_ENTS. */ static reg_errcode_t 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) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int cache_idx_start = search_cur_bkref_entry (mctx, cur_str); struct re_backref_cache_entry *ent; if (cache_idx_start == -1) return REG_NOERROR; restart: ent = mctx->bkref_ents + cache_idx_start; do { int to_idx, next_node; /* Is this entry ENT is appropriate? */ if (!re_node_set_contains (cur_nodes, ent->node)) continue; /* No. */ to_idx = cur_str + ent->subexp_to - ent->subexp_from; /* Calculate the destination of the back reference, and append it to MCTX->STATE_LOG. */ if (to_idx == cur_str) { /* The backreference did epsilon transit, we must re-check all the node in the current state. */ re_node_set new_dests; reg_errcode_t err2, err3; next_node = dfa->edests[ent->node].elems[0]; if (re_node_set_contains (cur_nodes, next_node)) continue; err = re_node_set_init_1 (&new_dests, next_node); err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type); err3 = re_node_set_merge (cur_nodes, &new_dests); re_node_set_free (&new_dests); if (BE (err != REG_NOERROR || err2 != REG_NOERROR || err3 != REG_NOERROR, 0)) { err = (err != REG_NOERROR ? err : (err2 != REG_NOERROR ? err2 : err3)); return err; } /* TODO: It is still inefficient... */ goto restart; } else { re_node_set union_set; next_node = dfa->nexts[ent->node]; if (mctx->state_log[to_idx]) { int ret; if (re_node_set_contains (&mctx->state_log[to_idx]->nodes, next_node)) continue; err = re_node_set_init_copy (&union_set, &mctx->state_log[to_idx]->nodes); ret = re_node_set_insert (&union_set, next_node); if (BE (err != REG_NOERROR || ret < 0, 0)) { re_node_set_free (&union_set); err = err != REG_NOERROR ? err : REG_ESPACE; return err; } } else { err = re_node_set_init_1 (&union_set, next_node); if (BE (err != REG_NOERROR, 0)) return err; } mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); re_node_set_free (&union_set); if (BE (mctx->state_log[to_idx] == NULL && err != REG_NOERROR, 0)) return err; } } while (ent++->more); return REG_NOERROR; } /* Build transition table for the state. Return 1 if succeeded, otherwise return NULL. */ static int internal_function build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) { reg_errcode_t err; int i, j, ch, need_word_trtable = 0; bitset_word_t elem, mask; bool dests_node_malloced = false; bool dest_states_malloced = false; int ndests; /* Number of the destination states from `state'. */ re_dfastate_t **trtable; re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl; re_node_set follows, *dests_node; bitset_t *dests_ch; bitset_t acceptable; struct dests_alloc { re_node_set dests_node[SBC_MAX]; bitset_t dests_ch[SBC_MAX]; } *dests_alloc; /* We build DFA states which corresponds to the destination nodes from `state'. `dests_node[i]' represents the nodes which i-th destination state contains, and `dests_ch[i]' represents the characters which i-th destination state accepts. */ #ifdef HAVE_ALLOCA if (__libc_use_alloca (sizeof (struct dests_alloc))) dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc)); else #endif { dests_alloc = re_malloc (struct dests_alloc, 1); if (BE (dests_alloc == NULL, 0)) return 0; dests_node_malloced = true; } dests_node = dests_alloc->dests_node; dests_ch = dests_alloc->dests_ch; /* Initialize transiton table. */ state->word_trtable = state->trtable = NULL; /* At first, group all nodes belonging to `state' into several destinations. */ ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch); if (BE (ndests <= 0, 0)) { if (dests_node_malloced) free (dests_alloc); /* Return 0 in case of an error, 1 otherwise. */ if (ndests == 0) { state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); if (BE (state->trtable == NULL, 0)) return 0; return 1; } return 0; } err = re_node_set_alloc (&follows, ndests + 1); if (BE (err != REG_NOERROR, 0)) goto out_free; /* Avoid arithmetic overflow in size calculation. */ if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) / (3 * sizeof (re_dfastate_t *))) < ndests), 0)) goto out_free; #ifdef HAVE_ALLOCA if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX + ndests * 3 * sizeof (re_dfastate_t *))) dest_states = (re_dfastate_t **) alloca (ndests * 3 * sizeof (re_dfastate_t *)); else #endif { dest_states = (re_dfastate_t **) malloc (ndests * 3 * sizeof (re_dfastate_t *)); if (BE (dest_states == NULL, 0)) { out_free: if (dest_states_malloced) free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) free (dests_alloc); return 0; } dest_states_malloced = true; } dest_states_word = dest_states + ndests; dest_states_nl = dest_states_word + ndests; bitset_empty (acceptable); /* Then build the states for all destinations. */ for (i = 0; i < ndests; ++i) { int next_node; re_node_set_empty (&follows); /* Merge the follows of this destination states. */ for (j = 0; j < dests_node[i].nelem; ++j) { next_node = dfa->nexts[dests_node[i].elems[j]]; if (next_node != -1) { err = re_node_set_merge (&follows, dfa->eclosures + next_node); if (BE (err != REG_NOERROR, 0)) goto out_free; } } dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0); if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0)) goto out_free; /* If the new state has context constraint, build appropriate states for these contexts. */ if (dest_states[i]->has_constraint) { dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_WORD); if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) goto out_free; if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1) need_word_trtable = 1; dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_NEWLINE); if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0)) goto out_free; } else { dest_states_word[i] = dest_states[i]; dest_states_nl[i] = dest_states[i]; } bitset_merge (acceptable, dests_ch[i]); } if (!BE (need_word_trtable, 0)) { /* We don't care about whether the following character is a word character, or we are in a single-byte character set so we can discern by looking at the character code: allocate a 256-entry transition table. */ trtable = state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); if (BE (trtable == NULL, 0)) goto out_free; /* For all characters ch...: */ for (i = 0; i < BITSET_WORDS; ++i) for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) if (BE (elem & 1, 0)) { /* There must be exactly one destination which accepts character ch. See group_nodes_into_DFAstates. */ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) ; /* j-th destination accepts the word character ch. */ if (dfa->word_char[i] & mask) trtable[ch] = dest_states_word[j]; else trtable[ch] = dest_states[j]; } } else { /* We care about whether the following character is a word character, and we are in a multi-byte character set: discern by looking at the character code: build two 256-entry transition tables, one starting at trtable[0] and one starting at trtable[SBC_MAX]. */ trtable = state->word_trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX); if (BE (trtable == NULL, 0)) goto out_free; /* For all characters ch...: */ for (i = 0; i < BITSET_WORDS; ++i) for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) if (BE (elem & 1, 0)) { /* There must be exactly one destination which accepts character ch. See group_nodes_into_DFAstates. */ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) ; /* j-th destination accepts the word character ch. */ trtable[ch] = dest_states[j]; trtable[ch + SBC_MAX] = dest_states_word[j]; } } /* new line */ if (bitset_contain (acceptable, NEWLINE_CHAR)) { /* The current state accepts newline character. */ for (j = 0; j < ndests; ++j) if (bitset_contain (dests_ch[j], NEWLINE_CHAR)) { /* k-th destination accepts newline character. */ trtable[NEWLINE_CHAR] = dest_states_nl[j]; if (need_word_trtable) trtable[NEWLINE_CHAR + SBC_MAX] = dest_states_nl[j]; /* There must be only one destination which accepts newline. See group_nodes_into_DFAstates. */ break; } } if (dest_states_malloced) free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) free (dests_alloc); return 1; } /* Group all nodes belonging to STATE into several destinations. Then for all destinations, set the nodes belonging to the destination to DESTS_NODE[i] and set the characters accepted by the destination to DEST_CH[i]. This function return the number of destinations. */ static int internal_function group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *dests_node, bitset_t *dests_ch) { reg_errcode_t err; int result; int i, j, k; int ndests; /* Number of the destinations from `state'. */ bitset_t accepts; /* Characters a node can accept. */ const re_node_set *cur_nodes = &state->nodes; bitset_empty (accepts); ndests = 0; /* For all the nodes belonging to `state', */ for (i = 0; i < cur_nodes->nelem; ++i) { re_token_t *node = &dfa->nodes[cur_nodes->elems[i]]; re_token_type_t type = node->type; unsigned int constraint = node->constraint; /* Enumerate all single byte character this node can accept. */ if (type == CHARACTER) bitset_set (accepts, node->opr.c); else if (type == SIMPLE_BRACKET) { bitset_merge (accepts, node->opr.sbcset); } else if (type == OP_PERIOD) { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) bitset_merge (accepts, dfa->sb_char); else #endif bitset_set_all (accepts); if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } #ifdef RE_ENABLE_I18N else if (type == OP_UTF8_PERIOD) { memset (accepts, '\xff', sizeof (bitset_t) / 2); if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } #endif else continue; /* Check the `accepts' and sift the characters which are not match it the context. */ if (constraint) { if (constraint & NEXT_NEWLINE_CONSTRAINT) { bool accepts_newline = bitset_contain (accepts, NEWLINE_CHAR); bitset_empty (accepts); if (accepts_newline) bitset_set (accepts, NEWLINE_CHAR); else continue; } if (constraint & NEXT_ENDBUF_CONSTRAINT) { bitset_empty (accepts); continue; } if (constraint & NEXT_WORD_CONSTRAINT) { bitset_word_t any_set = 0; if (type == CHARACTER && !node->word_char) { bitset_empty (accepts); continue; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); else #endif for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= dfa->word_char[j]); if (!any_set) continue; } if (constraint & NEXT_NOTWORD_CONSTRAINT) { bitset_word_t any_set = 0; if (type == CHARACTER && node->word_char) { bitset_empty (accepts); continue; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); else #endif for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~dfa->word_char[j]); if (!any_set) continue; } } /* Then divide `accepts' into DFA states, or create a new state. Above, we make sure that accepts is not empty. */ for (j = 0; j < ndests; ++j) { bitset_t intersec; /* Intersection sets, see below. */ bitset_t remains; /* Flags, see below. */ bitset_word_t has_intersec, not_subset, not_consumed; /* Optimization, skip if this state doesn't accept the character. */ if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c)) continue; /* Enumerate the intersection set of this state and `accepts'. */ has_intersec = 0; for (k = 0; k < BITSET_WORDS; ++k) has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k]; /* And skip if the intersection set is empty. */ if (!has_intersec) continue; /* Then check if this state is a subset of `accepts'. */ not_subset = not_consumed = 0; for (k = 0; k < BITSET_WORDS; ++k) { not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k]; not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k]; } /* If this state isn't a subset of `accepts', create a new group state, which has the `remains'. */ if (not_subset) { bitset_copy (dests_ch[ndests], remains); bitset_copy (dests_ch[j], intersec); err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]); if (BE (err != REG_NOERROR, 0)) goto error_return; ++ndests; } /* Put the position in the current group. */ result = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]); if (BE (result < 0, 0)) goto error_return; /* If all characters are consumed, go to next node. */ if (!not_consumed) break; } /* Some characters remain, create a new group. */ if (j == ndests) { bitset_copy (dests_ch[ndests], accepts); err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]); if (BE (err != REG_NOERROR, 0)) goto error_return; ++ndests; bitset_empty (accepts); } } return ndests; error_return: for (j = 0; j < ndests; ++j) re_node_set_free (dests_node + j); return -1; } #ifdef RE_ENABLE_I18N /* Check how many bytes the node `dfa->nodes[node_idx]' accepts. Return the number of the bytes the node accepts. STR_IDX is the current index of the input string. This function handles the nodes which can accept one character, or one collating element like '.', '[a-z]', opposite to the other nodes can only accept one byte. */ static int internal_function check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, const re_string_t *input, int str_idx) { const re_token_t *node = dfa->nodes + node_idx; int char_len, elem_len; int i; wint_t wc; if (BE (node->type == OP_UTF8_PERIOD, 0)) { unsigned char c = re_string_byte_at (input, str_idx), d; if (BE (c < 0xc2, 1)) return 0; if (str_idx + 2 > input->len) return 0; d = re_string_byte_at (input, str_idx + 1); if (c < 0xe0) return (d < 0x80 || d > 0xbf) ? 0 : 2; else if (c < 0xf0) { char_len = 3; if (c == 0xe0 && d < 0xa0) return 0; } else if (c < 0xf8) { char_len = 4; if (c == 0xf0 && d < 0x90) return 0; } else if (c < 0xfc) { char_len = 5; if (c == 0xf8 && d < 0x88) return 0; } else if (c < 0xfe) { char_len = 6; if (c == 0xfc && d < 0x84) return 0; } else return 0; if (str_idx + char_len > input->len) return 0; for (i = 1; i < char_len; ++i) { d = re_string_byte_at (input, str_idx + i); if (d < 0x80 || d > 0xbf) return 0; } return char_len; } char_len = re_string_char_size_at (input, str_idx); if (node->type == OP_PERIOD) { if (char_len <= 1) return 0; /* FIXME: I don't think this if is needed, as both '\n' and '\0' are char_len == 1. */ /* '.' accepts any one character except the following two cases. */ if ((!(dfa->syntax & RE_DOT_NEWLINE) && re_string_byte_at (input, str_idx) == '\n') || ((dfa->syntax & RE_DOT_NOT_NULL) && re_string_byte_at (input, str_idx) == '\0')) return 0; return char_len; } elem_len = re_string_elem_size_at (input, str_idx); wc = __btowc(*(input->mbs+str_idx)); if (((elem_len <= 1 && char_len <= 1) || char_len == 0) && (wc != WEOF && wc < SBC_MAX)) return 0; if (node->type == COMPLEX_BRACKET) { const re_charset_t *cset = node->opr.mbcset; # ifdef _LIBC const unsigned char *pin = ((const unsigned char *) re_string_get_buffer (input) + str_idx); int j; uint32_t nrules; # endif /* _LIBC */ int match_len = 0; wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) ? re_string_wchar_at (input, str_idx) : 0); /* match with multibyte character? */ for (i = 0; i < cset->nmbchars; ++i) if (wc == cset->mbchars[i]) { match_len = char_len; goto check_node_accept_bytes_match; } /* match with character_class? */ for (i = 0; i < cset->nchar_classes; ++i) { wctype_t wt = cset->char_classes[i]; if (__iswctype (wc, wt)) { match_len = char_len; goto check_node_accept_bytes_match; } } # ifdef _LIBC nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { unsigned int in_collseq = 0; const int32_t *table, *indirect; const unsigned char *weights, *extra; const char *collseqwc; /* This #include defines a local function! */ # include /* match with collating_symbol? */ if (cset->ncoll_syms) extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); for (i = 0; i < cset->ncoll_syms; ++i) { const unsigned char *coll_sym = extra + cset->coll_syms[i]; /* Compare the length of input collating element and the length of current collating element. */ if (*coll_sym != elem_len) continue; /* Compare each bytes. */ for (j = 0; j < *coll_sym; j++) if (pin[j] != coll_sym[1 + j]) break; if (j == *coll_sym) { /* Match if every bytes is equal. */ match_len = j; goto check_node_accept_bytes_match; } } if (cset->nranges) { if (elem_len <= char_len) { collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); in_collseq = __collseq_table_lookup (collseqwc, wc); } else in_collseq = find_collation_sequence_value (pin, elem_len); } /* match with range expression? */ for (i = 0; i < cset->nranges; ++i) if (cset->range_starts[i] <= in_collseq && in_collseq <= cset->range_ends[i]) { match_len = elem_len; goto check_node_accept_bytes_match; } /* match with equivalence_class? */ if (cset->nequiv_classes) { const unsigned char *cp = pin; int32_t idx; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); idx = findidx (&cp, elem_len); if (idx > 0) for (i = 0; i < cset->nequiv_classes; ++i) { int32_t equiv_class_idx = cset->equiv_classes[i]; size_t weight_len = weights[idx & 0xffffff]; if (weight_len == weights[equiv_class_idx & 0xffffff] && (idx >> 24) == (equiv_class_idx >> 24)) { int cnt = 0; idx &= 0xffffff; equiv_class_idx &= 0xffffff; while (cnt <= weight_len && (weights[equiv_class_idx + 1 + cnt] == weights[idx + 1 + cnt])) ++cnt; if (cnt > weight_len) { match_len = elem_len; goto check_node_accept_bytes_match; } } } } } else # endif /* _LIBC */ { /* match with range expression? */ for (i = 0; i < cset->nranges; ++i) { if (cset->range_starts[i] <= wc && wc <= cset->range_ends[i]) { match_len = char_len; goto check_node_accept_bytes_match; } } } check_node_accept_bytes_match: if (!cset->non_match) return match_len; else { if (match_len > 0) return 0; else return (elem_len > char_len) ? elem_len : char_len; } } return 0; } # ifdef _LIBC static unsigned int internal_function find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) { uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules == 0) { if (mbs_len == 1) { /* No valid character. Match it as a single byte character. */ const unsigned char *collseq = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); return collseq[mbs[0]]; } return UINT_MAX; } else { int32_t idx; const unsigned char *extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); int32_t extrasize = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB + 1) - extra; for (idx = 0; idx < extrasize;) { int mbs_cnt, found = 0; int32_t elem_mbs_len; /* Skip the name of collating element name. */ idx = idx + extra[idx] + 1; elem_mbs_len = extra[idx++]; if (mbs_len == elem_mbs_len) { for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt) if (extra[idx + mbs_cnt] != mbs[mbs_cnt]) break; if (mbs_cnt == elem_mbs_len) /* Found the entry. */ found = 1; } /* Skip the byte sequence of the collating element. */ idx += elem_mbs_len; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; /* Skip the collation sequence value. */ idx += sizeof (uint32_t); /* Skip the wide char sequence of the collating element. */ idx = idx + sizeof (uint32_t) * (*(int32_t *) (extra + idx) + 1); /* If we found the entry, return the sequence value. */ if (found) return *(uint32_t *) (extra + idx); /* Skip the collation sequence value. */ idx += sizeof (uint32_t); } return UINT_MAX; } } # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ /* Check whether the node accepts the byte which is IDX-th byte of the INPUT. */ static int internal_function check_node_accept (const re_match_context_t *mctx, const re_token_t *node, int idx) { unsigned char ch; ch = re_string_byte_at (&mctx->input, idx); switch (node->type) { case CHARACTER: if (node->opr.c != ch) return 0; break; case SIMPLE_BRACKET: if (!bitset_contain (node->opr.sbcset, ch)) return 0; break; #ifdef RE_ENABLE_I18N case OP_UTF8_PERIOD: if (ch >= 0x80) return 0; /* FALLTHROUGH */ #endif case OP_PERIOD: if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) return 0; break; default: return 0; } if (node->constraint) { /* The node has constraints. Check whether the current context satisfies the constraints. */ unsigned int context = re_string_context_at (&mctx->input, idx, mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) return 0; } return 1; } /* Extend the buffers, if the buffers have run out. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ extend_buffers (re_match_context_t *mctx) { reg_errcode_t ret; re_string_t *pstr = &mctx->input; /* Avoid overflow. */ if (BE (INT_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0)) return REG_ESPACE; /* Double the lengthes of the buffers. */ ret = re_string_realloc_buffers (pstr, MIN (pstr->len, pstr->bufs_len * 2)); if (BE (ret != REG_NOERROR, 0)) return ret; if (mctx->state_log != NULL) { /* And double the length of state_log. */ /* XXX We have no indication of the size of this buffer. If this allocation fail we have no indication that the state_log array does not have the right size. */ re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *, pstr->bufs_len + 1); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->state_log = new_array; } /* Then reconstruct the buffers. */ if (pstr->icase) { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; } else #endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (pstr->trans != NULL) re_string_translate_buffer (pstr); } } return REG_NOERROR; } /* Functions for matching context. */ /* Initialize MCTX. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_init (re_match_context_t *mctx, int eflags, int n) { mctx->eflags = eflags; mctx->match_last = -1; if (n > 0) { mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0)) return REG_ESPACE; } /* Already zero-ed by the caller. else mctx->bkref_ents = NULL; mctx->nbkref_ents = 0; mctx->nsub_tops = 0; */ mctx->abkref_ents = n; mctx->max_mb_elem_len = 1; mctx->asub_tops = n; return REG_NOERROR; } /* Clean the entries which depend on the current input in MCTX. This function must be invoked when the matcher changes the start index of the input, or changes the input string. */ static void internal_function match_ctx_clean (re_match_context_t *mctx) { int st_idx; for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx) { int sl_idx; re_sub_match_top_t *top = mctx->sub_tops[st_idx]; for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx) { re_sub_match_last_t *last = top->lasts[sl_idx]; re_free (last->path.array); re_free (last); } re_free (top->lasts); if (top->path) { re_free (top->path->array); re_free (top->path); } free (top); } mctx->nsub_tops = 0; mctx->nbkref_ents = 0; } /* Free all the memory associated with MCTX. */ static void internal_function match_ctx_free (re_match_context_t *mctx) { /* First, free all the memory associated with MCTX->SUB_TOPS. */ match_ctx_clean (mctx); re_free (mctx->sub_tops); re_free (mctx->bkref_ents); } /* Add a new backreference entry to MCTX. Note that we assume that caller never call this function with duplicate entry, and call with STR_IDX which isn't smaller than any existing entry. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_add_entry (re_match_context_t *mctx, int node, int str_idx, int from, int to) { if (mctx->nbkref_ents >= mctx->abkref_ents) { struct re_backref_cache_entry* new_entry; new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, mctx->abkref_ents * 2); if (BE (new_entry == NULL, 0)) { re_free (mctx->bkref_ents); return REG_ESPACE; } mctx->bkref_ents = new_entry; memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); mctx->abkref_ents *= 2; } if (mctx->nbkref_ents > 0 && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1; mctx->bkref_ents[mctx->nbkref_ents].node = node; mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from; mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to; /* This is a cache that saves negative results of check_dst_limits_calc_pos. If bit N is clear, means that this entry won't epsilon-transition to an OP_OPEN_SUBEXP or OP_CLOSE_SUBEXP for the N+1-th subexpression. If it is set, check_dst_limits_calc_pos_1 will recurse and try to find one such node. A backreference does not epsilon-transition unless it is empty, so set to all zeros if FROM != TO. */ mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map = (from == to ? ~0 : 0); mctx->bkref_ents[mctx->nbkref_ents++].more = 0; if (mctx->max_mb_elem_len < to - from) mctx->max_mb_elem_len = to - from; return REG_NOERROR; } /* Search for the first entry which has the same str_idx, or -1 if none is found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */ static int internal_function search_cur_bkref_entry (const re_match_context_t *mctx, int str_idx) { int left, right, mid, last; last = right = mctx->nbkref_ents; for (left = 0; left < right;) { mid = (left + right) / 2; if (mctx->bkref_ents[mid].str_idx < str_idx) left = mid + 1; else right = mid; } if (left < last && mctx->bkref_ents[left].str_idx == str_idx) return left; else return -1; } /* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches at STR_IDX. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_add_subtop (re_match_context_t *mctx, int node, int str_idx) { #ifdef DEBUG assert (mctx->sub_tops != NULL); assert (mctx->asub_tops > 0); #endif if (BE (mctx->nsub_tops == mctx->asub_tops, 0)) { int new_asub_tops = mctx->asub_tops * 2; re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops, re_sub_match_top_t *, new_asub_tops); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->sub_tops = new_array; mctx->asub_tops = new_asub_tops; } mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0)) return REG_ESPACE; mctx->sub_tops[mctx->nsub_tops]->node = node; mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; return REG_NOERROR; } /* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */ static re_sub_match_last_t * internal_function match_ctx_add_sublast (re_sub_match_top_t *subtop, int node, int str_idx) { re_sub_match_last_t *new_entry; if (BE (subtop->nlasts == subtop->alasts, 0)) { int new_alasts = 2 * subtop->alasts + 1; re_sub_match_last_t **new_array = re_realloc (subtop->lasts, re_sub_match_last_t *, new_alasts); if (BE (new_array == NULL, 0)) return NULL; subtop->lasts = new_array; subtop->alasts = new_alasts; } new_entry = calloc (1, sizeof (re_sub_match_last_t)); if (BE (new_entry != NULL, 1)) { subtop->lasts[subtop->nlasts] = new_entry; new_entry->node = node; new_entry->str_idx = str_idx; ++subtop->nlasts; } return new_entry; } static void internal_function sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, int last_node, int last_str_idx) { sctx->sifted_states = sifted_sts; sctx->limited_states = limited_sts; sctx->last_node = last_node; sctx->last_str_idx = last_str_idx; re_node_set_init_empty (&sctx->limits); } gawk-4.0.1+dfsg.orig/getopt_int.h0000644000175000017500000001122411734665352015706 0ustar schotschot/* Internal declarations for getopt. Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _GETOPT_INT_H #define _GETOPT_INT_H 1 extern int _getopt_internal (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, int posixly_correct); /* Reentrant versions which can handle parsing multiple argument vectors at the same time. */ /* Data type for reentrant functions. */ struct _getopt_data { /* These have exactly the same meaning as the corresponding global variables, except that they are used for the reentrant versions of getopt. */ int optind; int opterr; int optopt; char *optarg; /* Internal members. */ /* True if the internal members have been initialized. */ int __initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ char *__nextchar; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } __ordering; /* If the POSIXLY_CORRECT environment variable is set. */ int __posixly_correct; /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ int __first_nonopt; int __last_nonopt; #if defined _LIBC && defined USE_NONOPTION_FLAGS int __nonoption_flags_max_len; int __nonoption_flags_len; # endif }; /* The initializer is necessary to set OPTIND and OPTERR to their default values and to clear the initialization flag. */ #define _GETOPT_DATA_INITIALIZER { 1, 1 } extern int _getopt_internal_r (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, struct _getopt_data *__data, int posixly_correct); extern int _getopt_long_r (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); extern int _getopt_long_only_r (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); #endif /* getopt_int.h */ gawk-4.0.1+dfsg.orig/COPYING0000644000175000017500000010451311463242060014402 0ustar schotschot GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . gawk-4.0.1+dfsg.orig/README_d/0000755000175000017500000000000011734667104014616 5ustar schotschotgawk-4.0.1+dfsg.orig/README_d/ChangeLog0000644000175000017500000000103411734667104016366 0ustar schotschot2012-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. gawk-4.0.1+dfsg.orig/README_d/README.multibyte0000644000175000017500000000216111463242060017500 0ustar schotschotFri Jun 3 12:20:17 IDT 2005 ============================ As noted in the NEWS file, as of 3.1.5, gawk uses character values instead of byte values for `index', `length', `substr' and `match'. This works in multibyte and unicode locales. Wed Jun 18 16:47:31 IDT 2003 ============================ Multibyte locales can cause occasional weirdness, in particular with ranges inside brackets: /[....]/. Something that works great for ASCII will choke for, e.g., en_US.UTF-8. One such program is test/gsubtst5.awk. By default, the test suite runs with LC_ALL=C and LANG=C. You can change this by doing (from a Bourne-style shell): $ GAWKLOCALE=some_locale make check Then the test suite will set LC_ALL and LANG to the given locale. As of this writing, this works for en_US.UTF-8, and all tests pass except gsubtst5. For the normal case of RS = "\n", the locale is largely irrelevant. For other single byte record separators, using LC_ALL=C will give you much better performance when reading records. Otherwise, gawk has to make several function calls, *per input character* to find the record terminator. You have been warned. gawk-4.0.1+dfsg.orig/README_d/README.os20000644000175000017500000000121611463242060016165 0ustar schotschotDate: 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 gawk-4.0.1+dfsg.orig/README_d/README.solaris0000644000175000017500000000067211654051010017136 0ustar schotschotFri Jul 15 14:24:00 IDT 2011 ============================ It looks like you need to use -Xc -D_XPG4_2 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 on Solaris 9. 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 gawk-4.0.1+dfsg.orig/README_d/README.zos0000644000175000017500000000213111505423437016300 0ustar schotschotFri Dec 24 10:58:16 2010 Dave Pitts ---------------------------- GAWK on z/OS 1. To unpack the tarball: $ 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. If you do not have the gunzip program on your system you can perform 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-4.0.0.tar 2. To Build $ ./configure CC=c89 $ make You will get compilation warnings of the form: WARNING CBC3343 ./dfa.c:332 Redeclaration of dfasyntax differs from previous declaration on line 404 of "./dfa.h". Because the IBM compiler complains when a function is decalared using prototypes in the header and is defined without prototypes in the code these warnings can be ignored. 3. To Install: $ make install 4. To Test (optional): $ make check NOTE: Since the test suite was defined for an ASCII and IEEE floating point environment several of the tests will fail under z/OS. gawk-4.0.1+dfsg.orig/README_d/README.pc0000644000175000017500000001130111654051010016053 0ustar schotschotThis 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 on Windows), Eberhard Mattes (EMX; OS/2, DOS, and Windows32 with rsxnt), and Jan-Jaap van der Heijden and Mumit Khan (Mingw32; Windows32). 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-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 * * socket support nor two-way pipes work in any other Windows environment! * *************************************************************************** Building gawk ------------- 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 section with comments, and may need to be edited in order to work with your make utility. The "prefix" line in the Makefile is used during the install of gawk (and in building igawk.bat and igawk.cmd). Since the libraries for gawk will be installed under $(prefix)/lib/awk (e.g., /gnu/lib/awk), it is convenient to have this directory in DEFPATH of config.h. The makefile contains a number of targets for building various DOS and OS/2 versions. A list of targets will be printed if the make command is given without a target. As an example, to build gawk using the djgpp tools, enter "make djgpp". Testing and installing gawk --------------------------- The command "make test" (and possibly "make install") requires several Unix-like tools, including an sh-like shell, sed, cp, and cmp. Only dmake and GNU make are known to work on "make test". There are two methods for the install: Method 1 uses a typical Unix-like approach and requires cat, cp, mkdir, sed, and sh; method 2 uses gawk and batch files. See the configuration section of the makefile. The file test/Makefile will need some editing (especially for DOS). A sample makefile with comments appears in pc/Makefile.tst, and can be used to modify test/Makefile for your platform. In addition, some files in the test directory may need to have their end-of-line markers converted, as described in Makefile.tst. As with building gawk, the OS, shell, and long filename issues come into play when testing, too. If you are testing gawk on a LFN aware system with some LFN aware tools, you may have problems if the shell that you specify in test/Makefile is not LFN aware. This problem will apply whether or not you are building a LFN aware gawk. See the comments in pc/Makefile.tst for more information on this. It is routine to install by hand, but note that the install target also builds igawk.bat and igawk.cmd, which are used to add an include facility to gawk (and which require sh). 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 :). We are indebted to Juan Grigera for additional help on changes for Windows32. ---- If you have any problems with the DOS or OS/2 versions of Gawk, please send bug reports (along with the version and compiler used) to Scott Deifik, scottd.mail@sbcglobal.net (DOS versions) or andreas.buening@nexgo.de (OS/2 version) Support for Windows32 started in gawk-3.0.3. ---- 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. gawk-4.0.1+dfsg.orig/README_d/README.bootstrap0000644000175000017500000000206011670206020017471 0ustar schotschotTue 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 gawk-4.0.1+dfsg.orig/README_d/README.VMS0000644000175000017500000000741611463242060016137 0ustar schotschot Compiling GAWK on VMS: There's a DCL command procedure that will issue all the necessary CC and LINK commands, and there's also a Makefile for use with the MMS utility. From the source directory, use either |$ @[.VMS]VMSBUILD.COM or |$ MMS/DECRIPTION=[.VMS]DECSRIP.MMS GAWK DEC C -- use either vmsbuild.com or descrip.mms as is. VAX C -- use `@vmsbuild VAXC' or `MMS/MACRO=("VAXC")'. On a system with both VAX C and DEC C installed where DEC C is the default, use `MMS/MACRO=("VAXC","CC=CC/VAXC")' for the MMS variant; for the vmsbuild.com variant, any need for `/VAXC' will be detected automatically. GNU C -- use `@vmsbuild GNUC' or `MMS/MACRO=("GNUC")'. On a system where the GCC command is not already defined, use either `@vmsbuild GNUC DO_GNUC_SETUP' or `MMS/MACRO=("GNUC","DO_GNUC_SETUP")'. Tested under Alpha/VMS V7.1 using DEC C V6.4. GAWK should work without modifications for VMS V4.6 and up. Installing GAWK on VMS: All that's needed is a 'foreign' command, which is a DCL symbol whose value begins with a dollar sign. |$ GAWK :== $device:[directory]GAWK (Substitute the actual location of gawk.exe for 'device:[directory]'.) That symbol should be placed in the user's login.com or in the system- wide sylogin.com procedure so that it will be defined every time the user logs on. Optionally, the help entry can be loaded into a VMS help library. |$ LIBRARY/HELP SYS$HELP:HELPLIB [.VMS]GAWK.HLP (You may want to substitute a site-specific help library rather than the standard VMS library 'HELPLIB'.) After loading the help text, |$ HELP GAWK will provide information about both the gawk implementation and the awk programming language. The logical name AWK_LIBRARY can designate a default location for awk program files. For the '-f' option, if the specified filename has no device or directory path information in it, Gawk will look in the current directory first, then in the directory specified by the translation of AWK_LIBRARY if it the file wasn't found. If the file still isn't found, then ".awk" will be appended and the file access will be re-tried. If AWK_LIBRARY is not defined, that portion of the file search will fail benignly. Running GAWK on VMS: Command line parsing and quoting conventions are significantly different on VMS, so examples in _The_GAWK_Manual_ or the awk book often need minor changes. They *are* minor though, and all the awk programs should run correctly. Here are a couple of trivial tests: |$ gawk -- "BEGIN {print ""Hello, World!""}" |$ gawk -"W" version !could also be -"W version" or "-W version" Note that upper- and mixed-case text must be quoted. The VMS port of Gawk includes a DCL-style interface in addition to the original shell-style interface. See the help entry for details. One side-effect of dual command line parsing is that if there's only a single parameter (as in the quoted string program above), the command becomes ambiguous. To work-around this, the normally optional "--" flag is required to force shell rather than DCL parsing. If any other dash-type options (or multiple parameters such as data files to be processed) are present, there is no ambiguity and "--" can be omitted. The logical name AWKPATH can be used to override the default search path of "SYS$DISK:[],AWK_LIBRARY:" when looking for awk program files specified by the '-f' option. The format of AWKPATH is a comma- separated list of directory specifications. When defining it, the value should be quoted so that it retains a single translation, not a multi-translation RMS searchlist. ------------------------------ Thu Jun 18 05:22:10 IDT 2009 ============================ On OpenVMS V7.3 (Alpha) the "manyfiles" test is known to fail. The reason is not (yet) known. gawk-4.0.1+dfsg.orig/README_d/ChangeLog.00000644000175000017500000000035311505423473016522 0ustar schotschot2010-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. gawk-4.0.1+dfsg.orig/README_d/README.tests0000644000175000017500000000245511463242060016632 0ustar schotschotDate: Sat, 22 Apr 2000 06:07:06 -0600 (MDT) From: "Nelson H. F. Beebe" Cc: beebe@math.utah.edu, sysstaff@math.utah.edu, othmer@math.utah.edu Subject: gawk-3.0.4 and a GNU/Linux gotcha Yesterday, I was assisting a colleague install some software on his GNU/Linux machine for which uname -r reports 2.2.14. A (mis)feature of this system, which I've never encountered before, broke the build of one of my programs, and also of gawk-3.0.4. Namely, the kernel will not execute anything that resides in /tmp, though it will if the same script is in /usr/tmp! % cat /tmp/foo.sh #! /bin/sh echo hello ls -l /tmp/foo.sh -rwxr-xr-x 1 othmer math 22 Apr 21 10:34 /tmp/foo.sh* % /tmp/foo.sh bash: /tmp/foo.sh: Permission denied % cp /tmp/foo.sh /usr/tmp % /usr/tmp/foo.sh hello Thus, programs that do a temporary install in /tmp, as some of mine do in order to run the validation suite, will fail. gawk-3.0.4, and likely other gawk versions, hits this problem too. It fails because test/poundbang starts with #! /tmp/gawk -f I tracked down where it comes from: % grep /tmp /etc/fstab /dev/hda3 /tmp ext2 rw,nosuid,noexec,nouser,auto,async,nodev 1 1 !!!!!! Since this is done via a mount command, potentially ANY directory tree could be mounted with noexec. gawk-4.0.1+dfsg.orig/custom.h0000644000175000017500000000427111654051011015026 0ustar schotschot/* * custom.h * * This file is for use on systems where Autoconf isn't quite able to * get things right. It is appended to the bottom of config.h by configure, * in order to override definitions from Autoconf that are erroneous. See * the manual for more information. * * If you make additions to this file for your system, please send me * the information, to arnold@skeeve.com. */ /* * 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. * * 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 */ /* for VMS POSIX, from Pat Rankin, r.pat.rankin@gmail.com */ #ifdef VMS_POSIX #undef VMS #include "vms/redirect.h" #endif /* For QNX, based on submission from Michael Hunter, mphunter@qnx.com */ #ifdef __QNX__ #define GETPGRP_VOID 1 #endif /* For MacOS X, which is almost BSD Unix */ #ifdef __APPLE__ #define HAVE_MKTIME 1 #endif /* For ULTRIX 4.3 */ #ifdef ultrix #define HAVE_MKTIME 1 #define GETGROUPS_NOT_STANDARD 1 #endif /* For whiny users */ #ifdef USE_INCLUDED_STRFTIME #undef HAVE_STRFTIME #endif /* For HP/UX with gcc */ #if defined(hpux) || defined(_HPUX_SOURCE) #undef HAVE_TZSET #define HAVE_TZSET 1 #define _TZSET 1 #endif /* 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 gawk-4.0.1+dfsg.orig/po/0000755000175000017500000000000011734667243014000 5ustar schotschotgawk-4.0.1+dfsg.orig/po/ChangeLog0000644000175000017500000000126211734667065015555 0ustar schotschot2012-03-28 Arnold D. Robbins * 4.0.1: Release tar ball made. 2011-07-17 Arnold D. Robbins * 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. 2011-06-23 Arnold D. Robbins * Makefile.in.in (dist2): Add README to list of files checked for manually. * 4.0.0: Remake the tar ball. 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. gawk-4.0.1+dfsg.orig/po/it.gmo0000644000175000017500000012621211734667243015124 0ustar schotschotÞ•œ !‘! ¢!¯!Ì!ß!÷!"3"K"]"l"‡"˜"©"Å"Ø"õ"+ #6#U# f#t#Ž#£#µ#Ô#%ï#y$+$7»$<ó$"0%-S%%:˜%3Ó%&&2&D&V&r&,„&,±&'Þ&-' 4'(U')~'&¨'(Ï':ø'%3(Y(y(-™('Ç(ï( )+*)(V)]*#Ý*++5+Q+[i+$Å+ê+ü+,(,A,J,i,,!›,"½,#à,--#2-V-/q-'¡-É-'Ñ-ëù-å.ø. // ./A;/A}/…¿/E03c0—0!°05Ò0 1)1#H18l1"¥1È1!æ12 #2/D2(t2"20À2ñ2&3"83[3#w3(›3Ä3,Ý3 4)4&F4m4€4!42¿48ò4(+5)T5"~5#¡5#Å5$é5&6*56+`6Œ61¨6+Ú6&7--7([7&„7.«70Ú7 8$&8K8j84Š8<¿8#ü8$ 9,E92r9¥9Å9ã9$ÿ9#$:$H:1m:/Ÿ:&Ï:ö:;!,;N;n;*ˆ;³;#Ò;$ö;5<EQ<*—<-Â< ð<-û<2)=.\=4‹=$À="å=$>$->#R>v>&•>¼>.Ô>$?(?"C?#f?"Š?+­?(Ù?/@'2@Z@"x@@›@!Ü@!þ@" ACA+KA wA"˜A5»A5ñA''B8OB(ˆB0±B7âB C*;C.fC.•CÄC%àC+D2D(:D?cDP£D4ôD?)E?iE©EFÉEFG)FqF&yF6 FW×F//G9_G™G=³G>ñG80HFiH#°H<ÔH5I6GI%~It¤I(JNBJ)‘J*»J,æJ"K"6K$YK~KžK»K$ÛK L"!L"DL5gL;LAÙL+M,GM7tM)¬M%ÖM>üM$;N.`N/N3¿N4óN0(O'YO(O$ªO5ÏO-P'3P'[P)ƒP%­PÓPçP1ÿP41Q(fQ0Q8ÀQ&ùQ' R1HR2zR<­R$êR(S)8S1bS7”S'ÌS(ôS)T)GT)qT›T@»TüTKU]U&lU'“U(»U/äU&V';V(cV3ŒV9ÀV9úV64W2kW)žW)ÈW1òW)$X*NX5yX;¯XAëX+-Y,YY0†Y!·YÙY"öYZ#3Z$WZ*|Z&§Z4ÎZ&[&*[#Q[$u[š[ª[?Â[&\.)\,X\&…\J¬\÷\]?3]/s]4£]$Ø]*ý],(^$U^2z^­^%Ì^"ò^%_0;_#l__¤_!¶_2Ø_ `"`0B`s`"‡`1ª`@Ü`Aa_a ya2ƒa8¶a(ïa)b]Bb c³cÂcÞcñc d(dEd]dod~d™dªd»d×dêde9e Vewe ˆe–e°eÅe$×e'üe+$f„Pf-Õf@gGDg"Œg9¯gégNh6Oh †h§hÀhÓhåhi.i.Ei+ti/ i Ði,ñi/j*Nj,yjD¦j5ëj!kAk5ak)—kÁkÞk5ükB2l[um!Ñmóm(n#B7.¹%è€%-€)S€}€'€)Å€4ï€5$?ZFš0á2‚ E‚:Q‚:Œ‚.Ç‚1ö‚!(ƒJƒ4jƒ+Ÿƒ*˃$öƒ-„I„3^„1’„Ä„&ã„# …".…3Q…6……C¼…*† +†#L†Ap†&²†&Ù†'‡(‡71‡!i‡‹‡B§‡>ê‡1)ˆJ[ˆ&¦ˆ8͈@‰"G‰1j‰7œ‰;Ô‰Š'.Š-VŠ„Š3ŠLÁŠQ‹>`‹JŸ‹Lê‹'7ŒY_Œ¹ŒZÒŒ-&3;ZU–3ì; Ž\ŽEwŽE½ŽFTJ"Ÿ9Â8ü;5,q‡ž/&‘aV‘+¸‘-ä‘5’H’$d’/‰’+¹’å’(“%*“#P“t““7«“:ã“=”)\”+†”?²”.ò”*!•;L•%ˆ•A®•Dð•Q5–R‡–3Ú–3—*B—!m—@—9З2 ˜4=˜6r˜6©˜à˜'ù˜3!™7U™5™5Ù=ù™,7š-dš;’š7ΚC›:J›0…›1¶›3è›6œ%Sœ'yœ/¡œ/Ñœ1)3?]aµž+-ž+Yž/…ž5µž/ëž,Ÿ.HŸGwŸF¿ŸF PM 2ž 2Ñ -¡52¡1h¡2š¡7Í¡:¢=@¢)~¢+¨¢DÔ¢ £":£]£}£0–£"Ç£/ê£+¤<F¤,ƒ¤(°¤Ù¤!ö¤¥(¥KD¥&¥-·¥.å¥-¦\B¦Ÿ¦½¦CÛ¦.§7N§&†§/­§9ݧ%¨F=¨„¨& ¨$Ǩ&ì¨4©-H©v©©(¯©7Ø©#ª/4ª?dª¤ª$ºª1ߪF«GX« « À«4Í«7¬&:¬(a¬½‰.„l&FP13As› £ÎY3Öß7»¦³bdcÃó`¤š8~ã2yõ,GÕ7„[>¸r_È:Y§NL tî÷)X“JÓMéûkT‡àOÉsTEÜÝï{D( ‘-np:8Š€B/‹$!g&=¶m\µ59o#ÏÆü‚{Š@©QnMˆ­#Ñ$ìÄèÂ?iSÊy*ÀžÞåø<_çbvN-UÐi}H<IC'+Ëma,KŽýù(´Ø±eÛ ŒJhoFBöW09¨ŸR}O E]aq*rHjºpV¹¼0D|Sä¬4;RÚ¿ÌœCkƒ|†Awñ=·híæ’+4w;%j cëX …'lx^‹/%ˆ¾P5^!®¯Iò66‚t e.Zêð–\K‰Z[úx2…fW²v•‡  °˜Gu~«?×ÇŽ Å Òâþ"g†1¢€—¥Q)>@ÿ™zUz`"VÙ ªfáq”ôƒÍ]Œud¡ÔÁL # %s block(s) # Rule(s) # gawk profile, created %s -C --copyright -E file --exec=file -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R file --command=file -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -e 'program-text' --source='program-text' -f progfile --file=progfile -g --gen-pot -h --help -n --non-decimal-data -r --re-interval -t --lint-old -v var=val --assign=var=val # Function Call Stack: # Functions, listed alphabetically To report bugs, see node `Bugs' in `gawk.info', which is section `Reporting Problems and Bugs' in the printed version. %d is invalid as number of arguments for %s%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)%s blocks must have an action part%s third parameter is not a changeable object%s to "%s" failed (%s)%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk%s: `%s' argument to `-v' not in `var=value' form %s: array_ref to %s %s: close failed (%s)%s: empty (null) %s: empty (zero) %s: invalid option -- '%c' %s: is parameter %s: option '%c%s' doesn't allow an argument %s: option '--%s' doesn't allow an argument %s: option '--%s' requires an argument %s: option '-W %s' doesn't allow an argument %s: option '-W %s' is ambiguous %s: option '-W %s' requires an argument %s: option `-W %s' unrecognized, ignored %s: option requires an argument -- %c %s: option requires an argument -- '%c' %s: string literal as last arg of substitute has no effect%s: table_size = %d, array_size = %d %s: unrecognized option '%c%s' %s: unrecognized option '--%s' 'system' function not allowed in sandbox mode-Ft does not set FS to tab in POSIX awk-m option usage: `-m[fr] nnn'@include is a gawk extensionBINMODE value `%s' is invalid, treated as 3Copyright (C) 1989, 1991-%d Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Examples: gawk '{ sum += $1 }; END { print sum }' file gawk -F: '{ print $1 }' /etc/passwd IPv6 communication is not supportedInvalid back referenceInvalid character class nameInvalid collation characterInvalid content of \{\}Invalid multibyte data detected. There may be a mismatch between your data and your locale.Invalid preceding regular expressionInvalid range endInvalid regular expressionMemory exhaustedNF set to negative valueNo matchNo previous regular expressionOperation Not SupportedPOSIX does not allow `%s'POSIX does not allow `\x' escapesPOSIX does not allow operator `**'POSIX does not allow operator `**='POSIX options: GNU long options: (standard) Premature end of regular expressionRegular expression too bigShort options: GNU long options: (extensions) Sorry, don't know how to interpret `%s'SuccessTCP/IP communications are not supportedThis 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. Trailing backslashUnmatched ( or \(Unmatched ) or \)Unmatched [ or [^Unmatched \{Usage: %s [POSIX or GNU style options] -f progfile [--] file ... Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ... You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. `%s' is a Bell Labs extension`%s' is a built-in function, it cannot be redefined`%s' is a gawk extension`%s' is not a legal variable name`%s' is not a variable name, looking for file `%s=%s'`%s' is not supported in old awk`--posix' overrides `--binary'`--posix' overrides `--traditional'`--posix'/`--traditional' overrides `--non-decimal-data'`-m[fr]' option irrelevant in gawk`BINMODE' is a gawk extension`FIELDWIDTHS' is a gawk extension`FPAT' is a gawk extension`IGNORECASE' is a gawk extension`break' is not allowed outside a loop or switch`continue' is not allowed outside a loop`delete array' is a gawk extension`delete(array)' is a non-portable tawk extension`extension' is a gawk extension`getline var' invalid inside `%s' rule`getline' invalid inside `%s' rule`goto' considered harmful! `length(array)' is a gawk extension`next' cannot be called from a `%s' rule`next' used in %s action`nextfile' cannot be called from a `%s' rule`nextfile' is a gawk extension`nextfile' used in %s action`return' used outside function context`|&' not supportedadump: argument not an arrayalready included source file `%s'and(%lf, %lf): fractional values will be truncatedand(%lf, %lf): negative values will give strange resultsand: received non-numeric first argumentand: received non-numeric second argumentasort: first argument not an arrayasort: second argument not an arrayasorti: first argument not an arrayasorti: second argument not an arrayassignment used in conditional contextatan2: received non-numeric first argumentatan2: received non-numeric second argumentattempt to access field %ldattempt to field reference from non-numeric valueattempt to field reference from null stringattempt to use a scalar value as arrayattempt to use array `%s' in a scalar contextattempt to use function `%s' as an arrayattempt to use scalar `%s' as an arrayattempt to use scalar `%s["%.*s"]' as an arrayattempt to use scalar parameter `%s' as an arraybackslash at end of stringbackslash not last character on linebad `%sFMT' specification `%s'buffer overflow in genflags2strcall of `length' without parentheses is not portablecan not use special variable `%s' for indirect function callcan't open pipe `%s' for input (%s)can't open pipe `%s' for output (%s)can't open source file `%s' for reading (%s)can't open two way pipe `%s' for input/output (%s)can't read sourcefile `%s' (%s)can't redirect from `%s' (%s)can't redirect to `%s' (%s)can't set binary mode on stderr (%s)can't set binary mode on stdin (%s)can't set binary mode on stdout (%s)can't use function name `%s' as variable or arraycannot create child process for `%s' (fork: %s)cannot open file `%s' for reading (%s)cannot open pipe `%s' (%s)close of `%s' failed (%s).close of fd %d (`%s') failed (%s)close of master pty failed (%s)close of pipe failed (%s)close of redirection that was never openedclose of slave pty failed (%s)close of stdin in child failed (%s)close of stdout in child failed (%s)close: `%.*s' is not an open file, pipe or co-processclose: redirection `%s' not opened with `|&', second argument ignoredclose: second argument is a gawk extensionclose: second argument must be `to' or `from'cmd. line:co-process flush of pipe to `%s' failed (%s).command line argument `%s' is a directory: skippedcompl(%lf): fractional value will be truncatedcompl(%lf): negative value will give strange resultscompl: received non-numeric argumentcos: received non-numeric argumentcould not allocate more input memorycould not open `%s' for writing (%s)could not open `%s' for writing: %scould not open `%s', mode `%s'could not pre-open /dev/null for fd %ddata file `%s' is emptydcgettext: `%s' is not a valid locale categorydelete: index `%s' not in array `%s'division by zero attempteddivision by zero attempted in `%%'division by zero attempted in `%%='division by zero attempted in `/='duplicate `default' detected in switch bodyduplicate case values in switch body: %seach rule must have a pattern or an action partempty argument to `-e/--source' ignoredempty filename after @includeempty program text on command lineenvironment variable `POSIXLY_CORRECT' set: turning on `--posix'error reading input file `%s': %serror writing standard error (%s)error writing standard output (%s)error: escape sequence `\%c' treated as plain `%c'exp: argument %g is out of rangeexp: received non-numeric argumentexpression for `%s' redirection has null string valueexpression in `%s' redirection only has numeric valueextension: can't redefine function `%s'extension: can't use gawk built-in `%s' as function nameextension: function `%s' already definedextension: function name `%s' previously definedextension: illegal character `%c' in function name `%s'extension: missing function nameextensions are not allowed in sandbox modefailure status (%d) on file close of `%s' (%s)failure status (%d) on pipe close of `%s' (%s)fatal error: internal errorfatal error: internal error: segfaultfatal error: internal error: stack overflowfatal: fatal: extension: cannot open `%s' (%s) fatal: extension: library `%s': cannot call function `%s' (%s) fatal: extension: library `%s': does not define `plugin_is_GPL_compatible' (%s) fflush: `%s' is not an open file, pipe or co-processfflush: cannot flush: file `%s' opened for reading, not writingfflush: cannot flush: pipe `%s' opened for reading, not writingfile flush of `%s' failed (%s).filename `%s' for `%s' redirection may be result of logical expressionfloating point exceptionfor loop: array `%s' changed size from %ld to %ld during loop executionfrom %sfunction `%s' called but never definedfunction `%s' called with more arguments than declaredfunction `%s' called with space between name and `(', or used as a variable or an arrayfunction `%s' defined but never called directlyfunction `%s' defined to take no more than %d argument(s)function `%s' not definedfunction `%s': argument #%d: attempt to use array as a scalarfunction `%s': argument #%d: attempt to use scalar as an arrayfunction `%s': can't use function name as parameter namefunction `%s': can't use special variable `%s' as a function parameterfunction `%s': missing argument #%dfunction `%s': parameter #%d, `%s', duplicates parameter #%dfunction `%s': parameter `%s' shadows global variablefunction called indirectly through `%s' does not existfunction name `%s' previously definedgawk is a pattern scanning and processing language. By default it reads standard input and writes standard output. gensub: third argument of 0 treated as 1hex escape \x%.*s of %d characters probably not interpreted the way you expectindex: received non-string first argumentindex: received non-string second argumentindirect function calls are a gawk extensionint: received non-numeric argumentinternal error: %s with null vnameinvalid FIELDWIDTHS value, near `%s'invalid char '%c' in expressioninvalid subscript expressionlength: received array argumentlength: received non-string argumentlocal port %s invalid in `/inet'log: received negative argument %glog: received non-numeric argumentlshift(%lf, %lf): fractional values will be truncatedlshift(%lf, %lf): negative values will give strange resultslshift(%lf, %lf): too large shift value will give strange resultslshift: received non-numeric first argumentlshift: received non-numeric second argumentmake_builtin: negative argument count for function `%s'match: third argument is a gawk extensionmatch: third argument is not an arraymktime: at least one of the values is out of the default rangemktime: received non-string argumentmoving pipe to stdin in child failed (dup: %s)moving pipe to stdout in child failed (dup: %s)moving slave pty to stdin in child failed (dup: %s)moving slave pty to stdout in child failed (dup: %s)multicharacter value of `RS' is a gawk extensionmultistage two-way pipelines don't workmust supply a remote hostname to `/inet'must supply a remote port to `/inet'no (known) protocol supplied in special filename `%s'no explicit close of co-process `%s' providedno explicit close of file `%s' providedno explicit close of pipe `%s' providedno explicit close of socket `%s' providedno hex digits in `\x' escape sequenceno pre-opened fd %dno program text at all!non-redirected `getline' invalid inside `%s' rulenon-redirected `getline' undefined inside END actionnull string for `FS' is a gawk extensionold awk does not support multidimensional arraysold awk does not support multiple `BEGIN' or `END' rulesold awk does not support operator `**'old awk does not support operator `**='old awk does not support regexps as value of `FS'old awk does not support the `\%c' escape sequenceold awk does not support the keyword `in' except after `for'opcode %s not an operator or keywordoperator `^' is not supported in old awkoperator `^=' is not supported in old awkor(%lf, %lf): fractional values will be truncatedor(%lf, %lf): negative values will give strange resultsor: received non-numeric first argumentor: received non-numeric second argumentpatsplit: fourth argument is not an arraypatsplit: second argument is not an arraypatsplit: third argument must be non-nullpipe flush of `%s' failed (%s).plain `print' in BEGIN or END rule should probably be `print ""'printf: no argumentsreached system limit for open files: starting to multiplex file descriptorsreason unknownredir2str: unknown redirection type %dredirection not allowed in sandbox modereference to uninitialized argument `%s'reference to uninitialized element `%s["%.*s"]'reference to uninitialized field `$%d'reference to uninitialized field `$%ld'reference to uninitialized variable `%s'regexp component `%.*s' should probably be `[%.*s]'regexp constant `/%s/' looks like a C comment, but is notregexp constant `//' looks like a C++ comment, but is notregexp constant for parameter #%d yields boolean valueregular expression on left of `~' or `!~' operatorregular expression on right of assignmentregular expression on right of comparisonremote host and port information (%s, %s) invalidrestoring stdin in parent process failed restoring stdout in parent process failed rshift(%lf, %lf): fractional values will be truncatedrshift(%lf, %lf): negative values will give strange resultsrshift(%lf, %lf): too large shift value will give strange resultsrshift: received non-numeric first argumentrshift: received non-numeric second argumentrunning %s setuid root may be a security problemsending profile to standard errorshadow_funcs() called twice!sin: received non-numeric argumentsource file `%s' is emptysource file does not end in newlinespecial file name `%s' is incompletesplit: fourth argument is a gawk extensionsplit: fourth argument is not an arraysplit: null string for third arg is a gawk extensionsplit: second argument is not an arraysqrt: called with negative argument %gsqrt: received non-numeric argumentsrand: received non-numeric argumentstandard outputstatement has no effectstrftime: format value in PROCINFO["strftime"] has numeric typestrftime: received empty format stringstrftime: received non-numeric second argumentstrftime: received non-string first argumentsubscript of array `%s' is null stringsubstr: length %g at start index %g exceeds length of first argument (%lu)substr: length %g is not >= 0substr: length %g is not >= 1substr: length %g too big for string indexing, truncating to %gsubstr: non-integer length %g will be truncatedsubstr: non-integer start index %g will be truncatedsubstr: source string is zero lengthsubstr: start index %g is invalid, using 1substr: start index %g is past end of stringsystem: received non-string argumenttawk regex modifier `/.../%c' doesn't work in gawkthere were shadowed variables.tolower: received non-string argumenttoo many pipes or input files opentoupper: received non-string argumentturning off `--lint' due to assignment to `LINT'unexpected newline or end of stringunknown nodetype %dunknown opcode %dunknown value for field spec: %d unnecessary mixing of `>' and `>>' for file `%.*s'unterminated regexpunterminated regexp at end of fileunterminated regexp ends with `\' at end of fileunterminated stringunwind_stack: unexpected type `%s'use of `\ #...' line continuation is not portableuse of dcgettext(_"...") is incorrect: remove leading underscoreuse of dcngettext(_"...") is incorrect: remove leading underscoreuse of non-array as arraywarning: xor(%lf, %lf): fractional values will be truncatedxor(%lf, %lf): negative values will give strange resultsxor: received non-numeric first argumentxor: received non-numeric second argumentProject-Id-Version: gawk 3.1.81 Report-Msgid-Bugs-To: arnold@skeeve.com POT-Creation-Date: 2012-03-28 22:03+0200 PO-Revision-Date: 2011-03-19 16:52+0100 Last-Translator: Antonio Colombo Language-Team: Italian Language: it MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8-bit # blocco(hi) %s # Regola(e) # profilo gawk, creato %s -C --copyright -E file --exec=file -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R file --command=file -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -e 'testo-del-programma' --source='testo-del-programma' -f fileprog --file=file-prog. -g --gen-pot -h --help -n --non-decimal-data -r --re-interval -t --lint-old -v var=valore --assign=var=valore # 'Stack' (Pila) Chiamate Funzione: # Funzioni, listate in ordine alfabetico Per segnalare problemi, vedi nodo `Bugs' in `gawk.info', oppure la sezione `Reporting Problems and Bugs' nella versione a stampa. %d non valido come numero di argomenti per %s%s %s `%s': non riesco a ottenere flag 'fd': (fcntl F_GETFD: %s)%s %s `%s': non riesco a impostare 'close-on-exec': (fcntl F_SETFD: %s)blocchi %s richiedono una 'azione'il terzo parametro di '%s' non è un oggetto modificabile%s a "%s" fallita (%s)%s: %d: modificatore di espressione regolare tawk `/.../%c' non valido in gawk%s: `%s' argomento di `-v' non in forma `var=valore' %s: riferimento_vettoriale a %s %s: 'close' fallita (%s)%s: vuoto (nullo) %s: vuoto (zero) %s: opzione non valida -- '%c' %s: è parametro %s: l'opzione '%c%s' non ammette un argomento %s: l'opzione '--%s' non ammette un argomento %s: l'opzione '--%s' richiede un argomento %s: l'opzione '-W %s' non ammette un argomento %s: l'opzione '-W %s' è ambigua %s: l'opzione '-W %s' richiede un argomento %s: opzione `-W %s' non riconosciuta, ignorata %s: l'opzione richiede un argomento -- %c %s: l'opzione richiede un argomento -- '%c' %s: una stringa come ultimo argomento di 'substitute' non ha effetto%s: dimensione_tabella = %d, dimensione_vettore = %d %s: opzione sconosciuta '%c%s' %s: opzione sconosciuta '--%s' la funzione 'system' non è permessa in modo 'sandbox'-Ft non imposta FS a 'tab' nell'awk POSIX-m uso opzione: `-m[fr] nnn'@include è un'estensione gawkvalore di BINMODE `%s' non valido, considerato come 3Copyright (C) 1989, 1991-%d Free Software Foundation. Questo software è libero; lo puoi distribuire e/o modificare alle condizioni stabilite nella 'GNU General Public License' pubblicata dalla Free Software Foundation; fai riferimento alla versione 3 della Licenza, o (a tua scelta) a una qualsiasi versione successiva. Esempi: gawk '{ sum += $1 }; END { print sum }' file gawk -F: '{ print $1 }' /etc/passwd comunicazioni IPv6 non supportateRiferimento indietro non validoNome di 'classe di caratteri' non validoCarattere di ordinamento non validoContenuto di \{\} non validoTrovati dati multi-byte invalidi. Può esserci una differenza tra i dati e la codifica locale.Espressione regolare precedente invalidaFine di intervallo non validoEspressione regolare invalidaMemoria esauritaNF impostato a un valore negativoNessuna corrispondenzaNessuna espressione regolare precedenteOperazione Non SupportataPOSIX non permette `%s'POSIX non permette escape `\x'POSIX non permette l'operatore `**'POSIX non permette l'operatore `**='Opzioni POSIX: opzioni lunghe GNU: (standard) Fine di espressione regolare inaspettataEspressione regolare troppo complessaOpzioni brevi: opzioni lunghe GNU: (estensioni) Spiacente, non so come interpretare `%s'Successocomunicazioni TCP/IP non supportateQuesto programma è distribuito con la speranza che sia utile, ma SENZA ALCUNA GARANZIA; senza neppure la garanzia implicita di COMMERCIABILITÀ o IDONEITÀ AD UN PARTICOLARE SCOPO. Vedi la 'GNU General Public License' per ulteriori dettagli. '\' finale( o \( non chiusa) o \) non aperta[ o [^ non chiusa\{ non chiusaUso: %s [opzioni in stile POSIX o GNU] -f file-prog. [--] file ... Usage: %s [opzioni in stile POSIX o GNU] [--] %cprogramma%c file ... Dovresti aver ricevuto una copia della GNU General Public License assieme a questo programma; se non è così, vedi http://www.gnu.org/licenses/. `%s' è un'estensione Bell Labs`%s' è una funzione interna, non si può ridefinire`%s' è un'estensione gawk`%s' non è un nome di variabile ammesso`%s' non è un nome di variabile, cerco il file `%s=%s'`%s' non è supportato nel vecchio awk`--posix' annulla `--binary`--posix' annulla `--traditional'`--posix'/`--traditional' annulla `--non-decimal-data'`-m[fr]' opzione irrilevante per gawk`BINMODE' è un'estensione gawk`FIELDWIDTHS' è un'estensione gawk`FPAT' è un'estensione gawk`IGNORECASE' è un'estensione gawk`break' non permesso fuori da un ciclo o da uno 'switch'`continue' non permesso fuori da un un ciclo`delete array' è un'estensione gawk`delete(array)' è un'estensione tawk non-portabile`extension' è un'estensione gawk`getline var' invalida all'interno della regola `%s'`getline' invalida all'interno della regola `%s'`goto' considerato pericoloso! `length(array)' è un'estensione gawk`next' non può essere chiamato da una regola `%s'`next' usato in 'azione' %s`nextfile' non può essere chiamato da una regola `%s'`nextfile' è un'estensione gawk`nextfile' usato in 'azione' %s`return' usato fuori da una funzione`|&' non supportatoadump: l'argomento non è un vettorefile sorgente `%s' già inclusoand(%lf, %lf): valori con decimali verranno troncatiand(%lf, %lf): valori negativi daranno risultati straniand: il primo argomento non è numericoand: il secondo argomento non è numericoasort: il primo argomento non è un vettoreasort: il secondo argomento non è un vettoreasorti: il primo argomento non è un vettoreasorti: il secondo argomento non è un vettoreassegnamento usato nel contesto di un test condizionaleatan2: il primo argomento non è numericoatan2: il secondo argomento non è numericotentativo di accedere al campo %ldtentativo di riferimento a un campo da valore non numericotentativo di riferimento a un campo da una stringa nullatentativo di usare valore scalare come vettoretentativo di usare vettore `%s' in un contesto scalaretentativo di usare funzione '%s' come vettoretentativo di usare scalare '%s' come vettoretentativo di usare scalare`%s["%.*s"]' come vettoretentativo di usare il parametro scalare `%s' come un vettore'\' a fine stringa'\' non è l'ultimo carattere della lineaspecificazione invalida `%sFMT' `%s'superamento limiti buffer in 'genflags2str'chiamata a `length' senza parentesi non portabilenon posso usare la variabile speciale `%s' come parametro indiretto di funzione non posso aprire 'pipe' `%s' in lettura (%s)non posso aprire 'pipe' `%s' in scrittura (%s)non riesco ad aprire file sorgente `%s' in lettura (%s)non posso aprire 'pipe' bidirezionale `%s' per lettura/scrittura (%s)non riesco a leggere file sorgente `%s' (%s)non posso re-dirigere da `%s' (%s)non posso re-dirigere a `%s' (%s)non posso impostare modalità binaria su 'stderr'(%s)non posso impostare modalità binaria su 'stdin'(%s)non posso impostare modalità binaria su 'stdout'(%s)non posso usare nome di funzione `%s' come variabile o vettorenon riesco a creare processo-figlio per `%s' (fork: %s)non riesco ad aprire file `%s' in lettura (%s)non riesco ad aprire 'pipe' `%s' (%s)chiusura di `%s' fallita (%s).chiusura di fd %d (`%s') fallita (%s)fallita chiusura di 'pty' principale (%s)fallita chiusura di 'pipe' (%s)chiusura di una re-direzione mai apertafallita chiusura di 'pty' secondaria (%s)fallita chiusura di 'stdin' nel processo-figlio (%s)fallita chiusura di 'stdout' nel processo-figlio (%s)close: `%.*s' non è un file aperto, una 'pipe' o un co-processoclose: re-direzione `%s' non aperta con `|&', ignoro secondo argomentoclose: il secondo argomento è un'estensione gawkclose: il secondo argomento deve essere `a' o `da'linea com.:scaricamento da co-processo di 'pipe' a `%s' fallita (%s).l'argomento in linea comando `%s' è una directory: saltatocompl(%lf): valore con decimali verrà troncatocompl(%lf): valore negativo darà risultati stranicompl: l'argomento non è numericocos: l'argomento non è numericonon riesco ad allocare ulteriore memoria per l'inputnon riesco ad aprire `%s' in scrittura (%s)non riesco ad aprire `%s' in scrittura: %snon riesco ad aprire `%s', modo `%s'non riesco a pre-aprire /dev/null per 'fd' %dfile dati `%s' vuotodcgettext: `%s' non è una categoria 'locale' validadelete: indice `%s' non presente nel vettore `%s'tentativo di dividere per zerotentativo di dividere per zero in `%%'divisione per zero tentata in `%%='divisione per zero tentata in `/='valori di default doppi all'interno di uno 'switch'valori di 'case' doppi all'interno di uno 'switch': %sogni regola deve avere una parte 'espressione' o una parte 'azione'argomento di `-e/--source' nullo, ignoratonome-file mancante dopo @includeprogramma nullo sulla linea comandivariable d'ambiente `POSIXLY_CORRECT' impostata: attivo `--posix'errore leggendo file di input `%s': %serrore scrivendo 'standard error' (%s)errore scrivendo 'standard output' (%s)errore: sequenza di escape `\%c' considerata come semplice `%c'exp: argomento %g non accettabileexp: argomento non numericoespressione nella re-direzione `%s' ha per valore la stringa nullaespressione nella re-direzione `%s' ha solo un valore numericoestensione: non riesco a ridefinire funzione `%s'estensione: nome funzione interna gawk `%s' non ammesso come nome funzioneestensione: funzione `%s' già definitaestensione: funzione di nome `%s' definita in precedenzaestensione: carattere non ammesso `%c' nel nome di funzione `%s'estensione: manca nome di funzionele estensioni non sono permesse in modo 'sandbox'errore ritornato (%d) dalla chiusura del file `%s' (%s)errore ritornato (%d) dalla chiusura della 'pipe' `%s' (%s)errore fatale: errore internoerrore fatale: errore interno: segfaulterrore fatale: errore interno: stack overflowfatale: fatale: estensione: non riesco ad aprire `%s' (%s) fatale: estensione: libreria `%s': non riesco a chiamare funzione `%s' (%s) fatale: estensione: libreria `%s': non definisce `plugin_is_GPL_compatible' (%s) fflush: `%s' non è un file aperto, una 'pipe' o un co-processofflush: non posso scaricare: file `%s' aperto in lettura, non in scritturafflush: non posso scaricare: 'pipe' `%s' aperta in lettura, non in scritturascaricamento di file `%s' fallita (%s).nome-file `%s' per la re-direzione `%s' può essere il risultato di una espressione logicaeccezione floating pointciclo for: vettore `%s' ha cambiato dimensione da %ld a %ld durante l'esecuzione del cicloda %sfunzione `%s' chiamata ma mai definitafunzione `%s' chiamata con più argomenti di quelli previstifunzione `%s' chiamata con spazio tra il nome e `(', o usata come variabile o vettorefunzione `%s' definita ma mai chiamata direttamentefunzione `%s' definita per avere al massimo %d argomenti(o)funzione `%s' non definitafunzione `%s': argomento #%d: tentativo di usare vettore come scalarefunzione `%s': argomento #%d: tentativo di usare scalare come vettorefunzione `%s': non posso usare nome della funzione come nome parametrofunzione `%s': non posso usare la variabile speciale `%s' come parametro di funzionefunzione `%s': manca argomento #%dfunzione `%s': parametro #%d, `%s', duplica parametro #%dfunzione `%s': parametro `%s' nasconde variabile globalela funzione chiamata indirettamente tramite `%s' non esistefunzione di nome `%s' definita in precedenzagawk è un linguaggio per scandire e processare espressioni. Senza parametri, legge da 'standard input' e scrive su 'standard output'. gensub: il terzo argomento è 0, trattato come 1sequenza di escape esadec.\x%.*s di %d caratteri probabilmente non interpretata nel modo previstoindex: il primo argomento non è una stringaindex: il secondo argomento non è una stringachiamate a funzione indirette sono un'estensione gawkint: argomento non numericoerrore interno: %s con 'vname' nullovalore di FIELDWIDTHS non valido, vicino a `%s'carattere '%c' non valido in un'espressioneespressione indice invalidalength: l'argomento fornito è un vettorelength: l'argomento non è una stringaporta locale %s invalida in `/inet'log: argomento negativo %glog: argomento non numericolshift(%lf, %lf): valori con decimali verranno troncatilshift(%lf, %lf): valori negativi daranno risultati stranilshift(%lf, %lf): valori troppo alti daranno risultati stranilshift: il primo argomento non è numericolshift: il secondo argomento non è numericomake_builtin: contatore argomenti negativo per la funzione `%s'match: il terzo argomento è un'estensione gawkmatch: il terzo argomento non è un vettoremktime: almeno un valore è fuori dall'intervallo di defaultmktime: l'argomento non è una stringafallito passaggio di pipe a 'stdin' nel processo-figlio (dup: %s)fallito passaggio di 'pipe' a 'stdout' nel processo-figlio (dup: %s)fallito trasferimento di 'pty' secondaria a 'stdin' nel processo-figlio (dup: %s)fallito trasferimento di 'pty' secondaria a 'stdout' nel processo-figlio (dup: %s)valore multicarattere per `RS' è un'estensione gawk'pipeline' multistadio bidirezionali non funzionanova fornito nome di 'host' remoto a `/inet'va fornita porta remota a `/inet'nessuno protocollo (noto) specificato nel filename speciale `%s'nessuna chiusura esplicita richiesta per co-processo `%s'nessuna chiusura esplicita richiesta per file `%s'nessuna chiusura esplicita richiesta per 'pipe' `%s'nessuna chiusura esplicita richiesta per 'socket' `%s'niente cifre esadecimali nella sequenza di escape `\x'manca 'fd' pre-aperta %dmanca del tutto il testo del programma!`getline' non-diretta indefinita dentro regola '%s'`getline' non re-diretta indefinita dentro 'azione' ENDla stringa nulla usata come `FS' è un'estensione gawkil vecchio awk non supporta vettori multidimensionaliil vecchio awk non supporta più di una regola `BEGIN' o `END'il vecchio awk non supporta l'operatore `**'il vecchio awk non supporta l'operatore `**='il vecchio awk non supporta espressioni come valori di `FS'il vecchio awk non supporta la sequenza di escape '\%c'il vecchio awk non supporta la parola-chiave `in' se non dopo `for'codice operativo %s non è un operatore o una parola chiavel'operatore `^' non è supportato nel vecchio awkl'operatore `^=' non è supportato nel vecchio awkor(%lf, %lf): valori con decimali verranno troncatior(%lf, %lf): valori negativi daranno risultati stranior: il primo argomento non è numericoor: il secondo argomento non è numericopatsplit: il secondo argomento non è un vettorepatsplit: il secondo argomento non è un vettorepatsplit: il terzo argomento non può essere nulloscaricamento di 'pipe' `%s' fallita (%s).`print' da solo in BEGIN o END dovrebbe forse essere `print ""'printf: manca argomentonumero massimo consentito di file aperti raggiunto: comincio a riutilizzare i descrittori di fileragione indeterminataredir2str: tipo di re-direzione non noto %dre-direzione non permessa in modo 'sandbox'riferimento ad argomento non inizializzato `%s'riferimento a elemento non inizializzato `%s["%.*s"]'riferimento a variabile non inizializzata `$%d'riferimento a campo non inizializzato `$%ld'riferimento a variabile non inizializzata `%s'componente di espressione `%.*s' dovrebbe probabilmente essere `[%.*s]'espressione regolare costante `/%s/' sembra un commento C, ma non lo èespressione regolare costante `//' sembra un commento C++, ma non lo èespressione regolare di valore costante per parametro #%d genera valore booleanoespressione regolare prima di operatore `~' o `!~'espressione regolare usata per assegnare un valoreespressione regolare a destra in un confrontohost remoto e informazione di porta (%s, %s) invalidifallito ripristino di 'stdin' nel processo-padre fallito ripristino di 'stdout' nel processo-padre rshift(%lf, %lf): valori con decimali verranno troncatirshift(%lf, %lf): valori negativi daranno risultati stranirshift(%lf, %lf): valori troppo alti daranno risultati stranirshift: il primo argomento non è numericorshift: il secondo argomento non è numericoeseguire %s con 'setuid' root può essere un rischio per la sicurezzamando profilo a 'standard error'shadow_funcs() chiamata due volte!sin: l'argomento non è numericofile sorgente `%s' vuotofile sorgente non termina con carattere 'a capo'nome-file speciale `%s' incompletosplit: il quarto argomento è un'estensione gawksplit: il quarto argomento non è un vettoresplit: la stringa nulla come terzo arg. è un'estensione gawksplit: il secondo argomento non è un vettoresqrt: chiamata con argomento negativo %gsqrt: argomento non numericosrand: l'argomento non è numericostandard outputistruzione che non fa nullastrftime: il valore del 'format' in PROCINFO["strftime"] è di tipo numericostrftime: 'format' è una stringa nullastrftime: il secondo argomento non è numericostrftime: il primo argomento non è una stringal'indice del vettore '%s' è una stringa nullasubstr: lunghezza %g all'indice di partenza %g supera la lunghezza del primo argomento (%lu)substr: lunghezza %g non >= 0substr: lunghezza %g non >= 1substr: lunghezza %g troppo elevata per indice stringa, tronco a %gsubstr: lunghezza non intera %g: sarà troncatasubstr: indice di partenza non intero %g: sarà troncatosubstr: stringa di partenza lunga zerosubstr: indice di partenza %g non valido, uso 1substr: indice di partenza %g oltre la fine della stringasystem: l'argomento non è una stringamodificatore di espressione regolare tawk `/.../%c' non valido in gawkc'erano variabili nascoste.tolower: l'argomento non è una stringatroppe 'pipe' o file di input apertitoupper: l'argomento non è una stringadisabilito `--lint' a causa di assegnamento a `LINT'carattere 'a capo' o fine stringa inaspettatitipo nodo sconosciuto %dcodice operativo sconosciuto %dvalore non noto per specifica campo: %d mistura non necessaria di `>' e `>>' per il file `%.*s'espressione regolare non completataespressione regolare non completata a fine fileespressione regolare non completata termina con `\' a fine filestringa non terminataunwind_stack: tipo non previsto `%s'uso di `\ #...' continuazione linea non portabileuso scorretto di dcgettext(_"..."): togliere il carattere '_' inizialeuso scorretto di dcngettext(_"..."): togliere il carattere '_' inizialeuso di non-vettore come vettoreattenzione: xor(%lf, %lf): valori con decimali verranno troncatixor(%lf, %lf): valori negativi daranno risultati stranixor: il primo argomento non è numericoxor: il secondo argomento non è numericogawk-4.0.1+dfsg.orig/po/POTFILES.in0000644000175000017500000000046311463242060015541 0ustar schotschot# List of source files containing translatable strings. # Copyright (C) 1999, 2002 Free Software Foundation, Inc. array.c awkgram.c builtin.c eval.c ext.c field.c gawkmisc.c getopt.c getopt1.c io.c main.c msg.c node.c posix/gawkmisc.c profile.c random.c re.c regcomp.c regex_internal.c regexec.c replace.c gawk-4.0.1+dfsg.orig/po/stamp-po0000644000175000017500000000001211734667243015454 0ustar schotschottimestamp gawk-4.0.1+dfsg.orig/po/fi.gmo0000644000175000017500000014533011734667243015110 0ustar schotschotÞ•ºì Q¼%% %%<%O%g%†%£%»%Í%Ü%÷%&&5&H&e&#z&+ž&Ê&é& ú&'"'?'T'f'…'% 'yÆ'+@(7l(<¤("á(-)2):I)3„)¸)Í)ã)õ)*#*,5*,b*'*-·* å*(+)/+&Y+(€+:©+%ä+ ,*,-J,'x, ,¾,+Û,(-]0.#Ž.².É.æ./[/$v/›/­/È/Ù/ò/û/020!L0"n0#‘0-µ0#ã01/"1'R1z1'‚1ëª1–2©2»2Í2 ß2Aì2A.3…p38ö35/4e4|43š4Î4"ç4! 55,5 b5ƒ5#¢58Æ5"ÿ5"6!@6b6 }6*ž6/É6(ù6""70E7.v7¥7&Å7"ì78*+8*V8#8(¥8Î8,ç8939&P9w9Š9!§92É98ü9(5:)^:8ˆ:8Á:"ú:#;9A;9{;#µ;$Ù;&þ;*%<+P<|<1˜<+Ê<&ö<-=5K=(=&ª=.Ñ=0>1>$L>q>>4°><å>#"?$F?,k?2˜?Ë?ë? @$%@#J@$n@1“@/Å@&õ@A)7A-aAA!ªAÌAìA*B1B#PB$tB5™BEÏB*C-@C nC-yC2§C.ÚC4 D$>D"cD$†D$«D#ÐDôD&E:E.RE$E¦E"ÁE#äE"F++F(WF/€F'°FØF"öF@G!ZG!|G"žGÁG+ÉG õG"H59H5oH'¥H8ÍH(I0/I7`I ˜I*¹I.äI.JBJ%^J+„J°J*¸J/ãJ0K0DK0uKD¦K%ëK(L?:LPzL/ËL>ûL4:M4oM?¤M?äM8$N)]N‡NF§NîNGOOO&WO6~OWµO/ P9=PwP=‘P>ÏP8QFGQ#ŽQ<²Q5ïQ6%R%\Rt‚R(÷RN SGoS)·S*áS, T"9T"\T$T¤TÄTáT$U &U"GU"jU5U;ÃUAÿU+AV,mV7šV)ÒV%üV>"W$aW.†W/µW3åW4X0NX'X(§X$ÐX5õX-+Y'YY'Y)©Y%ÓYùY Z1%Z4WZ(ŒZ0µZ8æZ&['F[1n[2 [<Ó[$\(5\)^\1ˆ\7º\'ò\(]<C]<€]>½])ü])&^)P^z^@š^'Û^_/_KH_”_&£_'Ê_(ò_/`&K`'r`(š`3Ã`9÷`91a6ka2¢a)Õa)ÿa1)b)[b*…b5°b;æbA"c+dc,c0½c!îc'd8d"Ud,xd¥d#¿d$ãd9e9Be;|e*¸e&ãe4 f&?f&ff#f$±fÖfæf?þf&>g.eg,”g;Ág&ýgJ$hohh?«h/ëh4i$Pi*ui, i$Íi2òi%j%Dj-jj"˜j%»j0áj#k6kJk!\k2~k±k"Åk0èkl"-l1Pl@‚lAÃlm m2)m8\m(•m)¾m©èm’o£o³oÏoâoþop:pRpdpsp“p¤pµpÑpäpq+q+Bq,nq›q «q¹q$Óqøq r%rEr1]rŸr;/s>ksCªs#îs.t(At<jtN§t"öt u:uMu&auˆu-šu-Èu*öu.!v0Pv+v5­v%ãv+ wP5w%†w&¬w&Ów:úw*5x%`x†x<¡x*Þxe zozŠz¢zÀzÜzrøz/k{›{$¹{ Þ{ ì{ |)|G|#Z|&~|$¥|%Ê|3ð|.$}$S};x}"´}×}à}ñý}ï~ , =WHP šñ3Œ€AÀ€ L>‹'¦&Î>õ.4‚7c‚<›‚YØ‚22ƒeƒ#…ƒ©ƒ"ƃ2éƒD„4a„$–„7»„6ó„!*…<L…8‰…-Â…2ð…2#†%V†1|†#®†5Ò† ‡')‡5Q‡‡‡!™‡-»‡&é‡9ˆ<Jˆ6‡ˆU¾ˆU‰.j‰(™‰V‰VŠ/pŠ) Š.ÊŠ>ùŠ88‹!q‹;“‹.Ï‹.þ‹=-ŒEkŒ3±Œ3åŒ;<U’'°(Ø)Ž<+ŽHhŽ-±Ž-ߎ; II*“-¾,ì02J1}B¯<ò5/‘!e‘8‡‘RÀ‘9’CM’-‘’#¿’2ã’.“<E“<‚“>¿“bþ“*a”:Œ” Ç”KÔ”7 •"X•6{•1²•/ä•%–<:–;w–/³–Iã– -—<N—3‹—¿—1Ù—0 ˜/<˜5l˜:¢˜9ݘ:™'R™$z™bŸ™-š*0š,[šˆš@š-К/þšA.›Ap›<²›\ï›.Lœ:{œ@¶œ÷œ-3E0yª.É,ø%ž<.žHkž8´ž8íž8&Ÿ__ŸF¿Ÿ6 M= [‹ Mç U5¡F‹¡=Ò¡Y¢Vj¢=Á¢1ÿ¢A1£Zs£Σ_࣠@¤FN¤C•¤uÙ¤LO¥Fœ¥$ã¥L¦LU¦B¢¦På¦*6§Da§=¦§Eä§3*¨q^¨:Шf ©Mr©>À©8ÿ©,8ª/eª&•ª1¼ª)(8«2a«;”«-Ы/þ«).¬<X¬?•¬?Õ¬9­EO­*•­(À­Cé­2-®M`®M®®Xü®XU¯)®¯1د7 °2B°Lu°<°9ÿ°69±:p±:«±0æ±²K5²L²Cβ*³?=³&}³'¤³?̳2 ´D?´/„´.´´/ã´%µ89µ;rµ5®µVäµW;¶S“¶,ç¶+·+@·?l·Y¬·,¸3¸BK¸hޏ÷¸-¹54¹+j¹2–¹*ɹ+ô¹) ºXJºR£ºRöºEI»N»5Þ»3¼5H¼:~¼;¹¼)õ¼<½?\½?œ½9ܽI¾&`¾.‡¾!¶¾/ؾ7¿!@¿+b¿,Ž¿S»¿SÀPcÀ+´À)àÀ@ Á(KÁ-tÁ0¢Á1ÓÁ ÂÂE/Â.uÂ;¤ÂAàÂR"Ã/uÃU¥ÃûÃÄO7Ä9‡ÄAÁÄ)Å=-Å7kÅ2£Å4ÖÅ$ Æ30Æ4dÆ.™Æ3ÈÆGüÆ-DÇrÇŒÇ*¦ÇGÑÇ(È:BÈT}ÈÒÈ)îÈ9ÉBRÉC•ÉÙÉ ùÉ&Ê9*Ê<dÊ6¡ÊˆC‰vÇ6?Ò)Ýl£Jl¤ã‹Kz­!2ôu©]·3¢³¼H”t¦ Šæì/‘4F¶ ye I «Ñ†»P,w˜ ŒN>Afo™•U^Q~ õ†9šºýð÷"å.Ö®pø :¢¿Óïþ$Gò¯:¸xü_¾Ãªú¥a–`’U„.c–¹f Ÿ=*î-û›;,6[j+‡ä>¨u=ŽSž©#cí¤yvYZbq(´s^… „™mÜ‘;dO®³~«*TŠkg4/CɈE_S&\ë2kpœè¦XB‹zÿMQ?ö²˜Žr 5½À µA‚Ëœ3hW¬{—<")°Ù5jš’}eo[ùF—W{X¡±1êâV“¹(•¬MJÁ&d“\@8G°žÏ…|D¶¡ƒÈ$²Í”#¯0·ÄihwL×9‚Z<gÕ!H8`ÛµV%Ð1¸qóÊnÎRŸxÌÚØbYŒ€R'ñÔ¥'E 7|±rÂinBtç-DaT£ÅºÞ}m¨ ­Pª‡N7á§K@§ƒL+ à%逛´‰O]IÆ0sß # %s block(s) # Rule(s) # gawk profile, created %s -C --copyright -E file --exec=file -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R file --command=file -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[file] --dump-variables[=file] -e 'program-text' --source='program-text' -f progfile --file=progfile -g --gen-pot -h --help -n --non-decimal-data -p[file] --profile[=file] -r --re-interval -t --lint-old -v var=val --assign=var=val # Function Call Stack: # Functions, listed alphabetically To report bugs, see node `Bugs' in `gawk.info', which is section `Reporting Problems and Bugs' in the printed version. %d is invalid as number of arguments for %s%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)%s blocks must have an action part%s third parameter is not a changeable object%s to "%s" failed (%s)%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk%s: `%s' argument to `-v' not in `var=value' form %s: array_ref to %s %s: close failed (%s)%s: empty (null) %s: empty (zero) %s: invalid option -- '%c' %s: is parameter %s: option '%c%s' doesn't allow an argument %s: option '--%s' doesn't allow an argument %s: option '--%s' requires an argument %s: option '-W %s' doesn't allow an argument %s: option '-W %s' is ambiguous %s: option '-W %s' requires an argument %s: option `-W %s' unrecognized, ignored %s: option requires an argument -- %c %s: option requires an argument -- '%c' %s: string literal as last arg of substitute has no effect%s: table_size = %d, array_size = %d %s: unrecognized option '%c%s' %s: unrecognized option '--%s' 'system' function not allowed in sandbox mode-Ft does not set FS to tab in POSIX awk-m option usage: `-m[fr] nnn'@include is a gawk extensionBINMODE value `%s' is invalid, treated as 3Copyright (C) 1989, 1991-%d Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Examples: gawk '{ sum += $1 }; END { print sum }' file gawk -F: '{ print $1 }' /etc/passwd IPv6 communication is not supportedInvalid back referenceInvalid character class nameInvalid collation characterInvalid content of \{\}Invalid multibyte data detected. There may be a mismatch between your data and your locale.Invalid preceding regular expressionInvalid range endInvalid regular expressionMemory exhaustedNF set to negative valueNo matchNo previous regular expressionOperation Not SupportedPOSIX does not allow `%s'POSIX does not allow `\x' escapesPOSIX does not allow operator `**'POSIX does not allow operator `**='POSIX options: GNU long options: (standard) Premature end of regular expressionRegular expression too bigShort options: GNU long options: (extensions) Sorry, don't know how to interpret `%s'SuccessTCP/IP communications are not supportedThis 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. Trailing backslashUnmatched ( or \(Unmatched ) or \)Unmatched [ or [^Unmatched \{Usage: %s [POSIX or GNU style options] -f progfile [--] file ... Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ... You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. [s]printf: format specifier does not have control letter[s]printf: value %g is out of range for `%%%c' format^ ran out for this one`%s' is a Bell Labs extension`%s' is a built-in function, it cannot be redefined`%s' is a gawk extension`%s' is invalid as a function name`%s' is not a legal variable name`%s' is not a variable name, looking for file `%s=%s'`%s' is not supported in old awk`--posix' overrides `--binary'`--posix' overrides `--traditional'`--posix'/`--traditional' overrides `--non-decimal-data'`-m[fr]' option irrelevant in gawk`BINMODE' is a gawk extension`FIELDWIDTHS' is a gawk extension`FPAT' is a gawk extension`IGNORECASE' is a gawk extension`L' is meaningless in awk formats; ignored`break' is not allowed outside a loop or switch`continue' is not allowed outside a loop`delete array' is a gawk extension`delete(array)' is a non-portable tawk extension`exit' cannot be called in the current context`extension' is a gawk extension`getline var' invalid inside `%s' rule`getline' invalid inside `%s' rule`goto' considered harmful! `h' is meaningless in awk formats; ignored`l' is meaningless in awk formats; ignored`length(array)' is a gawk extension`next' cannot be called from a `%s' rule`next' used in %s action`nextfile' cannot be called from a `%s' rule`nextfile' is a gawk extension`nextfile' used in %s action`return' used outside function context`|&' not supportedadump: argument not an arrayalready included source file `%s'and(%lf, %lf): fractional values will be truncatedand(%lf, %lf): negative values will give strange resultsand: received non-numeric first argumentand: received non-numeric second argumentasort: cannot use a subarray of first arg for second argasort: cannot use a subarray of second arg for first argasort: first argument not an arrayasort: second argument not an arrayasorti: cannot use a subarray of first arg for second argasorti: cannot use a subarray of second arg for first argasorti: first argument not an arrayasorti: second argument not an arrayassignment used in conditional contextatan2: received non-numeric first argumentatan2: received non-numeric second argumentattempt to access field %ldattempt to field reference from non-numeric valueattempt to field reference from null stringattempt to use a scalar value as arrayattempt to use array `%s' in a scalar contextattempt to use array `%s["%.*s"]' in a scalar contextattempt to use function `%s' as an arrayattempt to use scalar `%s' as an arrayattempt to use scalar `%s["%.*s"]' as an arrayattempt to use scalar parameter `%s' as an arraybackslash at end of stringbackslash not last character on linebad `%sFMT' specification `%s'buffer overflow in genflags2strcall of `length' without parentheses is not portablecan not use special variable `%s' for indirect function callcan't open pipe `%s' for input (%s)can't open pipe `%s' for output (%s)can't open source file `%s' for reading (%s)can't open two way pipe `%s' for input/output (%s)can't read sourcefile `%s' (%s)can't redirect from `%s' (%s)can't redirect to `%s' (%s)can't set binary mode on stderr (%s)can't set binary mode on stdin (%s)can't set binary mode on stdout (%s)can't use function name `%s' as variable or arraycannot create child process for `%s' (fork: %s)cannot open file `%s' for reading (%s)cannot open pipe `%s' (%s)cannot use function `%s' as variable namecannot use gawk builtin `%s' as variable nameclose of `%s' failed (%s).close of fd %d (`%s') failed (%s)close of master pty failed (%s)close of pipe failed (%s)close of redirection that was never openedclose of slave pty failed (%s)close of stdin in child failed (%s)close of stdout in child failed (%s)close: `%.*s' is not an open file, pipe or co-processclose: redirection `%s' not opened with `|&', second argument ignoredclose: second argument is a gawk extensionclose: second argument must be `to' or `from'cmd. line:co-process flush of pipe to `%s' failed (%s).command line argument `%s' is a directory: skippedcompl(%lf): fractional value will be truncatedcompl(%lf): negative value will give strange resultscompl: received non-numeric argumentcos: received non-numeric argumentcould not allocate more input memorycould not open `%s' for writing (%s)could not open `%s' for writing: %scould not open `%s', mode `%s'could not pre-open /dev/null for fd %ddata file `%s' is emptydcgettext: `%s' is not a valid locale categorydelete: index `%s' not in array `%s'division by zero attempteddivision by zero attempted in `%%'division by zero attempted in `%%='division by zero attempted in `/='duplicate `default' detected in switch bodyduplicate case values in switch body: %seach rule must have a pattern or an action partempty argument to `-e/--source' ignoredempty filename after @includeempty program text on command lineenvironment variable `POSIXLY_CORRECT' set: turning on `--posix'error reading input file `%s': %serror writing standard error (%s)error writing standard output (%s)error: escape sequence `\%c' treated as plain `%c'exp: argument %g is out of rangeexp: received non-numeric argumentexpression for `%s' redirection has null string valueexpression in `%s' redirection only has numeric valueextension: can't redefine function `%s'extension: can't use gawk built-in `%s' as function nameextension: function `%s' already definedextension: function name `%s' previously definedextension: illegal character `%c' in function name `%s'extension: missing function nameextensions are not allowed in sandbox modefailure status (%d) on file close of `%s' (%s)failure status (%d) on pipe close of `%s' (%s)fatal error: internal errorfatal error: internal error: segfaultfatal error: internal error: stack overflowfatal: fatal: `$' is not permitted in awk formatsfatal: `$' not permitted after period in formatfatal: `L' is not permitted in POSIX awk formatsfatal: `h' is not permitted in POSIX awk formatsfatal: `l' is not permitted in POSIX awk formatsfatal: arg count %ld greater than total number of supplied argumentsfatal: arg count with `$' must be > 0fatal: extension: cannot open `%s' (%s) fatal: extension: library `%s': cannot call function `%s' (%s) fatal: extension: library `%s': does not define `plugin_is_GPL_compatible' (%s) fatal: must use `count$' on all formats or nonefatal: no `$' supplied for positional field width or precisionfatal: not enough arguments to satisfy format stringfflush: `%s' is not an open file, pipe or co-processfflush: cannot flush: file `%s' opened for reading, not writingfflush: cannot flush: pipe `%s' opened for reading, not writingfield width and precision are ignored for `%%' specifierfield width is ignored for `%%' specifierfile flush of `%s' failed (%s).filename `%s' for `%s' redirection may be result of logical expressionfloating point exceptionfor loop: array `%s' changed size from %ld to %ld during loop executionfrom %sfunction `%s' called but never definedfunction `%s' called with more arguments than declaredfunction `%s' called with space between name and `(', or used as a variable or an arrayfunction `%s' defined but never called directlyfunction `%s' defined to take no more than %d argument(s)function `%s' not definedfunction `%s': argument #%d: attempt to use array as a scalarfunction `%s': argument #%d: attempt to use scalar as an arrayfunction `%s': can't use function name as parameter namefunction `%s': can't use special variable `%s' as a function parameterfunction `%s': missing argument #%dfunction `%s': parameter #%d, `%s', duplicates parameter #%dfunction `%s': parameter `%s' shadows global variablefunction called indirectly through `%s' does not existfunction name `%s' previously definedgawk is a pattern scanning and processing language. By default it reads standard input and writes standard output. gensub: third argument of 0 treated as 1hex escape \x%.*s of %d characters probably not interpreted the way you expectignoring unknown format specifier character `%c': no argument convertedindex: received non-string first argumentindex: received non-string second argumentindirect function calls are a gawk extensionint: received non-numeric argumentinternal error: %s with null vnameinvalid FIELDWIDTHS value, near `%s'invalid char '%c' in expressioninvalid subscript expressionlength: received array argumentlength: received non-string argumentlocal port %s invalid in `/inet'log: received negative argument %glog: received non-numeric argumentlshift(%lf, %lf): fractional values will be truncatedlshift(%lf, %lf): negative values will give strange resultslshift(%lf, %lf): too large shift value will give strange resultslshift: received non-numeric first argumentlshift: received non-numeric second argumentmake_builtin: negative argument count for function `%s'match: third argument is a gawk extensionmatch: third argument is not an arraymktime: at least one of the values is out of the default rangemktime: received non-string argumentmoving pipe to stdin in child failed (dup: %s)moving pipe to stdout in child failed (dup: %s)moving slave pty to stdin in child failed (dup: %s)moving slave pty to stdout in child failed (dup: %s)multicharacter value of `RS' is a gawk extensionmultistage two-way pipelines don't workmust supply a remote hostname to `/inet'must supply a remote port to `/inet'no (known) protocol supplied in special filename `%s'no explicit close of co-process `%s' providedno explicit close of file `%s' providedno explicit close of pipe `%s' providedno explicit close of socket `%s' providedno hex digits in `\x' escape sequenceno pre-opened fd %dno program text at all!non-redirected `getline' invalid inside `%s' rulenon-redirected `getline' undefined inside END actionnull string for `FS' is a gawk extensionold awk does not support multidimensional arraysold awk does not support multiple `BEGIN' or `END' rulesold awk does not support operator `**'old awk does not support operator `**='old awk does not support regexps as value of `FS'old awk does not support the `\%c' escape sequenceold awk does not support the keyword `in' except after `for'opcode %s not an operator or keywordoperator `^' is not supported in old awkoperator `^=' is not supported in old awkor(%lf, %lf): fractional values will be truncatedor(%lf, %lf): negative values will give strange resultsor: received non-numeric first argumentor: received non-numeric second argumentpatsplit: cannot use a subarray of fourth arg for second argpatsplit: cannot use a subarray of second arg for fourth argpatsplit: cannot use the same array for second and fourth argspatsplit: fourth argument is not an arraypatsplit: second argument is not an arraypatsplit: third argument must be non-nullpipe flush of `%s' failed (%s).plain `print' in BEGIN or END rule should probably be `print ""'precision is ignored for `%%' specifierprintf: no argumentsrange of the form `[%c-%c]' is locale dependentreached system limit for open files: starting to multiplex file descriptorsreason unknownredir2str: unknown redirection type %dredirection not allowed in sandbox modereference to uninitialized argument `%s'reference to uninitialized element `%s["%.*s"]'reference to uninitialized field `$%d'reference to uninitialized field `$%ld'reference to uninitialized variable `%s'regexp component `%.*s' should probably be `[%.*s]'regexp constant `/%s/' looks like a C comment, but is notregexp constant `//' looks like a C++ comment, but is notregexp constant for parameter #%d yields boolean valueregular expression on left of `~' or `!~' operatorregular expression on right of assignmentregular expression on right of comparisonremote host and port information (%s, %s) invalidrestoring stdin in parent process failed restoring stdout in parent process failed rshift(%lf, %lf): fractional values will be truncatedrshift(%lf, %lf): negative values will give strange resultsrshift(%lf, %lf): too large shift value will give strange resultsrshift: received non-numeric first argumentrshift: received non-numeric second argumentrunning %s setuid root may be a security problemsending profile to standard errorsending variable list to standard errorshadow_funcs() called twice!sin: received non-numeric argumentsort comparison function `%s' is not definedsource file `%s' is emptysource file does not end in newlinespecial file name `%s' is incompletesplit: cannot use a subarray of fourth arg for second argsplit: cannot use a subarray of second arg for fourth argsplit: cannot use the same array for second and fourth argssplit: fourth argument is a gawk extensionsplit: fourth argument is not an arraysplit: null string for third arg is a gawk extensionsplit: second argument is not an arraysqrt: called with negative argument %gsqrt: received non-numeric argumentsrand: received non-numeric argumentstandard outputstatement has no effectstrftime: format value in PROCINFO["strftime"] has numeric typestrftime: received empty format stringstrftime: received non-numeric second argumentstrftime: received non-string first argumentstrftime: second argument less than 0 or too big for time_tsubscript of array `%s' is null stringsubstr: length %g at start index %g exceeds length of first argument (%lu)substr: length %g is not >= 0substr: length %g is not >= 1substr: length %g too big for string indexing, truncating to %gsubstr: non-integer length %g will be truncatedsubstr: non-integer start index %g will be truncatedsubstr: source string is zero lengthsubstr: start index %g is invalid, using 1substr: start index %g is past end of stringsystem: received non-string argumenttawk regex modifier `/.../%c' doesn't work in gawkthere were shadowed variables.tolower: received non-string argumenttoo many arguments supplied for format stringtoo many pipes or input files opentoupper: received non-string argumentturning off `--lint' due to assignment to `LINT'unexpected newline or end of stringunknown nodetype %dunknown opcode %dunknown value for field spec: %d unnecessary mixing of `>' and `>>' for file `%.*s'unterminated regexpunterminated regexp at end of fileunterminated regexp ends with `\' at end of fileunterminated stringunwind_stack: unexpected type `%s'use of `\ #...' line continuation is not portableuse of dcgettext(_"...") is incorrect: remove leading underscoreuse of dcngettext(_"...") is incorrect: remove leading underscoreuse of non-array as arraywarning: xor(%lf, %lf): fractional values will be truncatedxor(%lf, %lf): negative values will give strange resultsxor: received non-numeric first argumentxor: received non-numeric second argumentProject-Id-Version: gawk 4.0.0h Report-Msgid-Bugs-To: arnold@skeeve.com POT-Creation-Date: 2012-03-28 22:03+0200 PO-Revision-Date: 2012-03-13 18:00+0200 Last-Translator: Jorma Karvonen Language-Team: Finnish Language: fi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); # %s-lohko(t) # Säännöt # gawk-profiili, luotu %s -C --copyright -E file --exec=tiedosto -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R tiedosto --exec=tiedosto -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[tiedosto] --dump-variables[=tiedosto] -e 'program-text' --source='program-text' -f ohjelmatiedosto --file=ohjelmatiedosto -g --gen-po -h --help -n --non-decimal-data -p[tiedosto] --profile[=tiedosto] -r --re-interval -t --lint-old -v var=arvo --assign=muuttuja=arvo # Funktiokutsupino: # Funktiot, luetteloitu aakkosjärjestyksessä Virheiden ilmoittamista varten, katso solmua â€Bugs†tiedostossa â€gawk.infoâ€, joka on kappale â€Reporting Problems and Bugs†painetussa versiossa. %d on virheellinen argumenttilukumäärä operaattorille %s%s %s â€%sâ€: ei voitu hakea fd-lippuja: (fcntl F_GETFD: %s)%s %s â€%sâ€: ei voitu asettaa close-on-exec: (fcntl F_SETFD: %s)%s lohkoilla on oltava toiminto-osa%s kolmas parametri ei ole vaihdettava objekti%s kohteeseen â€%s†epäonnistui (%s)%s: %d: tawk:n regex-määre â€/.../%c†ei toimi gawk:ssa%s: â€%s†argumentti valitsimelle â€-v†ei ole â€var=arvoâ€-muodossa %s: array_ref-viite taulukkoon %s %s: sulkeminen epäonnistui (%s)%s: tyhjä (null) %s: tyhjä (nolla) %s: virheellinen valitsin -- ’%c’ %s: on parametri %s: valitsin ’%c%s’ ei salli argumenttia %s: valitsin ’--%s’ ei salli argumenttia %s: valitsin ’--%s’ vaatii argumentin %s: valitsin ’-W %s’ ei salli argumenttia %s: valitsin ’-W %s’ ei ole yksiselitteinen %s: valitsin ’-W %s’ vaatii argumentin %s: valitsin â€-W %s†on tunnistamaton, ohitetaan %s: valitsin vaatii argumentin -- %c %s: valitsin vaatii argumentin -- ’%c’ %s: merkkijonoliteraalilla ei ole vaikutusta korvauksen viimeisenä argumenttina%s: table_size = %d, array_size = %d %s: tunnistamaton valitsin ’%c%s’ %s: tunnistamaton valitsin ’--%s’ â€systemâ€-funktio ei ole sallittu hiekkalaatikkotilassa-Ft ei aseta FS välilehteen POSIX awk:ssa-m valitsinkäyttö: â€-m[fr] nnnâ€@include on gawk-laajennusBINMODE-arvo â€%s†on virheellinen, käsiteltiin arvona 3Copyright © 1989, 1991-%d Free Software Foundation. Tämä ohjelma on ilmainen; voit jakaa sitä edelleen ja/tai muokata sitä Free Software Foundation julkaisemien GNU General Public License-lisenssin version 3, tai (valintasi mukaan) minkä tahansa myöhäisemmän version ehtojen mukaisesti. Esimerkkejä: gawk '{ sum += $1 }; END { print sum }' tiedosto gawk -F: '{ print $1 }' /etc/passwd IPv6-viestintää ei tuetaVirheellinen paluuviiteVirheellinen merkkiluokkanimiVirheellinen vertailumerkkiVirheellinen \{\}-sisältöVirheellinen monitavutieto havaittu. Paikallisasetuksesi ja tietojesi välillä saattaa olla täsmäämättömyys.Virheellinen edeltävä säännöllinen lausekeVirheellinen lukualueen loppuVirheellinen säännöllinen lausekeMuisti loppuiNF asetettu negatiiviseen arvoonEi täsmäystäEi edellistä säännöllistä lausekettaToimintoa ei tuetaPOSIX ei salli operaattori â€%sâ€POSIX ei salli â€\xâ€-koodinvaihtojaPOSIX ei salli operaattoria â€**â€POSIX ei salli operaattoria â€**=â€POSIX-valitsimet: GNU-pitkät valitsimet: (vakio) Ennenaikainen säännöllisen lausekkeen loppuSäännöllinen lauseke on liian isoLyhyet valitsimet: GNU-pitkät valitsimet: (laajennukset) Ei osata tulkita kohdetta â€%sâ€OnnistuiTCP/IP-viestintää ei tuetaTätä ohjelmaa levitetään toivossa, että se on hyödyllinen, mutta ILMAN MITÄÄN TAKUUTA; ilman edes viitattua takuuta KAUPALLISUUDESTA tai SOPIVUUDESTA TIETTYYN TARKOITUKSEEN. Katso yksityiskohdat GNU General Public License-ehdoista. Jäljessä oleva kenoviivaPariton ( tai \(Pariton ) tai \)Pariton [ tai [^Pariton \{Käyttö: %s [POSIX- tai GNU-tyyliset valitsimet] -f ohjelmatiedosto [--] tiedosto ... Käyttö: %s [POSIX- tai GNU-tyyliset valitsimet] [--] %cohjelma%c tiedosto ... Sinun pitäisi vastaanottaa kopion GNU General Public Licence-lisenssistä tämän ohjelman mukana. Jos näin ei ole, katso http://www.gnu.org/licenses/. [s]printf: muotoargumentilla ei ole ohjauskirjainta[s]printf: arvo %g on lukualueen ulkopuolella â€%%%câ€-muodolle^ tällainen loppui keskenâ€%s†on Bell Labs -laajennusâ€%s†on sisäänrakennettu funktio. Sitä ei voi määritellä uudelleenâ€%s†on gawk-laajennusâ€%s†on virheellinen funktionimenäâ€%s†ei ole laillinen muuttujanimiâ€%s†ei ole muuttujanimi, etsitään tiedostoa â€%s=%sâ€â€%s†ei ole tuettu vanhassa awk-ohjelmassavalitsin â€--posix†korvaa valitsimen â€--binaryâ€valitsin â€--posix†korvaa valitsimen â€--traditionalâ€valitsin â€--posix†tai â€--traditional†korvaa valitsimen â€--non-decimal-dataâ€â€-m[fr]â€-valitsin asiaanliittymätön gawk:ssaâ€BINMODE†on gawk-laajennusâ€FIELDWIDTHS†on gawk-laajennusâ€FPAT†on gawk-laajennusâ€IGNORECASE†on gawk-laajennusâ€L†on merkityksetön awk-muodoissa; ohitetaanâ€break†ei ole sallittu silmukan tai switch-lauseen ulkopuolellaâ€continue†ei ole sallittu silmukan ulkopuolellaâ€delete array†on gawk-laajennusâ€delete(array)†ei ole siirrettävä tawk-laajennusâ€exit†ei voida kutsua nykyisessä asiayhteydessäâ€extension†on gawk-laajennusâ€getline var†virheellinen säännön â€%s†sisälläâ€getline†virheellinen säännön â€%s†sisälläâ€gotoâ€-käskyä pidetään haitallisena! â€h†on merkityksetön awk-muodoissa; ohitetaanâ€l†on merkityksetön awk-muodoissa; ohitetaanâ€length(array)†on gawk-laajennusâ€next†ei voida kutsua â€%sâ€-säännöstäâ€next†käytetty %s-toiminnossaâ€nextfile†ei voida kutsua â€%sâ€-säännöstäâ€nextfile†on gawk-laajennusâ€nextfile†käytetty %s-toiminnossaâ€return†käytetty funktiokontekstin ulkopuolellaâ€|&†ei tuetaadump: argumentti ei ole taulukkoon jo sisällytetty lähdetiedostoon â€%sâ€and(%lf, %lf): jaosarvot typistetäänand(%lf, %lf): negatiiviset arvot antavat outoja tuloksiaand: ensimmäinen vastaanotettu argumentti ei ole numeerinenand: toinen vastaanotettu argumentti ei ole numeerinenasort: ei voida käyttää ensimmäisen argumentin alitaulukkoa toiselle argumentilleasort: ei voida käyttää toisen argumentin alitaulukkoa ensimmäiselle argumentilleasort: ensimmäinen argumentti ei ole taulukkoasort: toinen argumentti ei ole taulukkoasorti: ei voida käyttää ensimmäisen argumentin alitaulukkoa toiselle argumentilleasorti: ei voida käyttää toisen argumentin alitaulukkoa ensimmäiselle argumentilleasorti: ensimmäinen argumentti ei ole taulukkoasorti: toinen argumentti ei ole taulukkosijoitusta käytetty ehdollisessa kontekstissaatan2: ensimmäinen vastaanotettu argumentti ei ole numeerinenatan2: toinen vastaanotettu argumentti ei ole numeerinenyritettiin saantia kenttään %ldyritettiin kenttäviitettä arvosta, joka ei ole numeerinenyritettiin kenttäviitettä null-merkkijonostayritettiin käyttää skalaariarvoa taulukkonayritettiin käyttää taulukkoa â€%s†skalaarikontekstissayritettiin käyttää taulukkoa â€%s["%.*s"]†skalaarikontekstissayritettiin käyttää funktiota â€%s†taulukkonayritettiin käyttää skalaaria â€%s†taulukkonayritettiin käyttää skalaaria â€%s["%.*s"]†taulukkonayritettiin käyttää skalaariparametria â€%s†taulukkonakenoviiva merkkijonon lopussakenoviiva ei ole rivin viimeinen merkkiväärä â€%sFMTâ€-määritys â€%sâ€puskurin ylivuoto funktiossa genflags2strâ€lengthâ€-kutsu ilman sulkumerkkejä ei ole siirrettäväei voi käyttää erikoismuuttujaa â€%s†epäsuoralle funktiokutsulleei voi avata putkea â€%s†syötteelle (%s)ei voi avata putkea â€%s†tulosteelle (%s)ei voi avata lähdetiedostoa â€%s†lukemista varten (%s)ei voi avata kaksisuuntaista putkea â€%s†syötteelle/tulosteelle (%s)ei voi lukea lähdetiedostoa â€%s†(%s)ei voi uudelleenohjata putkesta â€%s†(%s)ei voi uudelleenohjata putkeen â€%s†(%s)ei voi asettaa binaaritilaa vakiovirheessä (%s)ei voi asettaa binaaritilaa vakiosyötteessä (%s)ei voi asettaa binaaritilaa vakiotulosteessa (%s)funktionimeä â€%s†ei voi käyttää muuttujana tai taulukkonaei voida luoda lapsiprosessia komennolle â€%s†(fork: %s)ei voi avata tiedostoa â€%s†lukemista varten (%s)ei voi avata putkea â€%s†(%s)funktionimeä â€%s†ei voi käyttää muuttujanimenäei voi käyttää gawk-ohjelman sisäistä â€%sâ€-määrittelyä muuttujanimenäuudelleenohjauksen â€%s†sulkeminen epäonnistui (%s).tiedostomäärittelijän %d (â€%sâ€) sulkeminen epäonnistui (%s)â€master ptyâ€-sulkeminen epäonnistui (%s)putken sulkeminen epäonnistui (%s)suljettiin uudelleenohjaus, jota ei avattu koskaanâ€slave ptyâ€:n sulkeminen epäonnistui (%s)vakiosyötteen sulkeminen lapsiprosessissa epäonnistui (%s)vakiotulosteen sulkeminen lapsiprosessissa epäonnistui (%s)close: â€%.*s†ei ole avoin tiedosto, putki tai apuprosessiclose: uudelleenohjaus â€%s†ei ole avattu operaattoreilla â€|&â€, toinen argumentti ohitettuclose: toinen argumentti on gawk-laajennusclose: toisen argumentin on oltava â€to†tai â€fromâ€komentorivi:putken apuprosessityhjennys uudelleenohjaukseen â€%s†epäonnistui (%s).komentoriviargumentti â€%s†on hakemisto: ohitettiincompl(%lf): jaosarvo typistetääncompl(%lf): negatiiviset arvot antavat outoja tuloksiacompl: vastaanotettu argumentti ei ole numeerinencos: vastaanotettu argumentti ei ole numeerinenei voitu varata lisää syötemuistiaei voitu avata tiedostoa â€%s†kirjoittamista varten (%s)ei voitu avata tiedostoa â€%s†kirjoittamista varten: %sei voitu avata laitetta â€%sâ€, tila â€%sâ€ei voitu avata uudelleen laitetta /dev/null tiedostomäärittelijälle %ddata-tiedosto â€%s†on tyhjädcgettext: â€%s†ei ole kelvollinen paikallinen kategoriadelete: indeksi â€%s†ei ole taulukossa â€%sâ€nollalla jakoa yritettiinjakoa nollalla yritettiin operaattorissa â€%%â€jakoa nollalla yritettiin operaatiossa â€%%=â€jakoa nollalla yritettiin operaatiossa â€/=â€kaksoiskappale â€default†havaittu switch-rungossakaksi samanlaista case-arvoa switch-rakenteen rungossa: %sjokaisella säännöllä on oltava malli tai toiminto-osatyhjä argumentti valitsimelle â€-e/--source†ohitetaantyhjä tiedostonimi @include:n jälkeentyhjä ohjelmateksti komentorivilläympäristömuuttuja â€POSIXLY_CORRECT†asetettu: käännetään päälle valitsin â€--posixâ€virhe luettaessa syötetiedostoa â€%sâ€: %svirhe kirjoitettaessa vakiovirheeseen (%s)virhe kirjoitettaessa vakiotulosteeseen (%s)virhe:koodinvaihtosekvenssi â€\%c†käsitelty kuin pelkkä â€%câ€exp: argumentti %g on lukualueen ulkopuolellaexp: vastaanotettu argumentti ei ole numeerinenlausekkeella â€%sâ€-uudelleenohjauksessa on null-merkkijonoarvolausekkeella â€%sâ€-uudellenohjauksessa on vain numeerinen arvoextension: ei voi määritellä uudelleen funktiota â€%sâ€extension: ei voi käyttää gawk-ohjelman sisäistä muuttujanimeä â€%s†funktionimenäextension: funktio â€%s†on jo määriteltyextension: funktionimi â€%s†on määritelty jo aiemminextension: virheellinen merkki â€%c†funktionimessä â€%sâ€extension: puuttuva funktionimilaajennuksia ei sallita hiekkalaatikkotilassavirhetila (%d) tiedoston â€%s†sulkemisessa (%s)virhetila (%d) putken â€%s†sulkemisessa (%s)tuhoisa virhe: sisäinen virhetuhoisa virhe: sisäinen virhe: segmenttivirhetuhoisa virhe: sisäinen virhe: pinoylivuototuhoisa:kohtalokas: â€$â€-argumentti ei ole sallittu awk-muodoissakohtalokas: â€$â€-argumentti ei ole sallittu pisteen jälkeen muodossakohtalokas: â€L†ei ole sallittu POSIX awk -muodoissakohtalokas: â€h†ei ole sallittu POSIX awk -muodoissakohtalokas: â€l†ei ole sallittu POSIX awk -muodoissakohtalokas: argumenttilukumäärä %ld on suurempi kuin toimitettujen argumenttien lukumääräkohtalokas: argumenttilukumäärän argumentilla â€$†on oltava > 0tuhoisa: extension: ei voi avata solmua â€%s†(%s) tuhoisa: extension: kirjasto â€%sâ€: ei voi kutsua funktiota â€%s†(%s) tuhoisa: extension: kirjasto â€%sâ€: ei määrittele â€plugin_is_GPL_compatible†(%s) kohtalokas: on käytettävä â€count$†kaikilla muodoilla tai ei missäänkohtalokas: ei â€$â€-argumenttia tarjottu sijantikenttäleveydelle tai tarkkuudellekohtalokas: ei kylliksi argumentteja muotomerkkijonon tyydyttämiseksifflush: â€%s†ei ole avoin tiedosto, putki tai apuprosessifflush: ei voi tyhjentää: tiedosto â€%s†avattu lukemista varten, ei kirjoittamiseenfflush: ei voi tyhjentää: putki â€%s†avattu lukemista varten, ei kirjoittamiseenkenttäleveys ja tarkkuus ohitetaan â€%%%%â€-määritteellekenttäleveys ohitetaan â€%%%%â€-määritteelleuudelleenohjauksen â€%s†tiedostontyhjennys epäonnistui (%s).tiedostonimi â€%s†â€%sâ€-uudelleenohjaukselle saattaa olla loogisen lausekkeen tulosliukulukupoikkeusfor-silmukka: taulukon â€%s†koko muuttui arvosta %ld arvoon %ld silmukan suorituksen aikanataulukosta %sfunktiota â€%s†kutsuttiin, mutta sitä ei ole koskaan määriteltyfunktio â€%s†kutsuttiin useammalla argumentilla kuin esiteltiinfunktio â€%s†kutsuttu välilyönnillä nimen ja â€(â€-merkin välillä, tai käytetty muuttujana tai taulukkonafunktio â€%s†määriteltiin, mutta sitä ei ole koskaan kutsuttu suoraanfunktio â€%s†on määritelty ottamaan enemmän kuin %d argumenttiafunktio â€%s†ei ole määriteltyfunktio â€%sâ€: argumentti #%d: yritettiin käyttää taulukkoa skalaarinafunktio â€%sâ€: argumentti #%d: yritettiin käyttää skalaaria taulukkonafunktio â€%sâ€: ei voi käyttää funktionimeä parametrinimenäfunktio â€%sâ€: ei voi käyttää erikoismuuttujaa â€%s†funktioparametrinafunction â€%sâ€: puuttuva argumentti #%dfunktio â€%sâ€: parametri #%d, â€%sâ€, samanlainen parametri #%dfunktio â€%sâ€: parametri â€%s†varjostaa yleismuuttujaakohteen â€%s†kautta epäsuorasti kutsuttu funktio ei ole olemassafunktionimi â€%s†on jo aikaisemmin määriteltygawk on mallietsintä- ja käsittelykieli. Oletuksena se lukee vakiosyötettä ja kirjoittaa vakiotulosteeseen. gensub: 0-arvoinen kolmas argumentti käsitellään kuin 1heksadesimaalikoodinvaihtomerkkejä \x%.*s / %d ei ole luultavasti tulkittu sillä tavalla kuin odotatohitetaan tuntematon muotoargumenttimerkki â€%câ€: ei muunnettu argumenttiaindex: ensimmäinen vastaanotettu argumentti ei ole merkkijonoindex: toinen vastaanotettu argumentti ei ole merkkijonoepäsuorat funktiokutsut ovat gawk-laajennusint: vastaanotettu argumentti ei ole numeerinensisäinen virhe: %s null vname-arvollavirheellinen FIELDWIDTHS-arvo, lähellä â€%sâ€virheellinen merkki ’%c’ lausekkeessavirheellinen indeksointilausekelength: vastaanotettu taulukkoargumenttilength: vastaanotettu argumentti ei ole merkkijonopaikallinen portti %s virheellinen pistokkeessa â€/inetâ€log: vastaanotettu negatiivinen argumentti %glog: vastaanotettu argumentti ei ole numeerinenlshift(%lf, %lf): jaosarvot typistetäänlshift(%lf, %lf): negatiiviset arvot antavat outoja tuloksialshift(%lf, %lf): liian suuri siirrosarvo antaa outoja tuloksialshift: ensimmäinen vastaanotettu argumentti ei ole numeerinenlshift: toinen vastaanotettu argumentti ei ole numeerinenmake_builtin: negatiivinen argumenttilukumäärä funktiolle â€%sâ€match: kolmas argumentti on gawk-laajennusmatch: kolmas argumentti ei ole taulukkomktime: vähintään yksi arvoista on oletuslukualueen ulkopuolellamktime: vastaanotettu argumentti ei ole merkkijonoputken siirtäminen vakiosyötteeseen lapsiprosessissa epäonnistui (dup: %s)putken siirtäminen vakiotulosteeseen lapsiprosessissa epäonnistui (dup: %s)â€slave ptyâ€:n siirtäminen vakiosyötteeseen lapsiprosessissa epäonnistui (dup: %s)â€slave ptyâ€:n siirtäminen vakiotulosteeseen lapsiprosessissa epäonnistui (dup: %s)â€RSâ€-monimerkkiarvo on gawk-laajennusmonivaiheiset kaksisuuntaiset putket eivät toimion tarjottava etäkoneen nimi pistokkeeseen â€/inetâ€on tarjottava etäportti pistokkeeseen â€/inetâ€ei (tunnettua) yhteyskäytäntöä tarjottu erikoistiedostonimessä â€%sâ€apuprosessin â€%s†eksplisiittistä sulkemista ei tarjotatiedoston â€%s†eksplisiittistä sulkemista ei tarjotaputken â€%s†eksplisiittistä sulkemista ei tarjotapistokkeen â€%s†eksplisiittistä sulkemista ei tarjotaei heksadesimaalilukuja â€\xâ€-koodinvaihtosekvenssissäei avattu uudelleen tiedostomäärittelijää %dei ohjelmatekstiä ollenkaan!edelleenohjaamaton â€getline†virheellinen â€%sâ€-säännön sisälläedelleenohjaamaton â€getline†määrittelemätön END-toiminnon sisällänull-merkkijono â€FSâ€-kenttäerotinmuuttujalle on gawk-laajennusvanha awk ei tue moniulotteisia taulukkojavanha awk ei tue useita â€BEGINâ€- tai â€ENDâ€-sääntöjävanha awk ei tue operaattoria â€**â€vanha awk ei tue operaattoria â€**=â€vanha awk ei tue regexp-arvoja â€FSâ€-kenttäerotinmuuttujanavanha awk ei tue â€\%câ€-koodinvaihtosekvenssiävanha awk ei tue avainsanaa â€in†paitsi â€forâ€-sanan jälkeenkäskykoodi %s ei ole operaattori tai avainsanaoperaattoria â€^†ei tueta vanhassa awk:ssaoperaattoria â€^=†ei tueta vanhassa awk:ssaor(%lf, %lf): jaosarvot typistetäänor(%lf, %lf): negatiiviset arvot antavat outoja tuloksiaor: ensimmäinen vastaanotettu argumentti ei ole numeerinenor: toinen vastaanotettu argumentti ei ole numeerinenpatsplit: ei voida käyttää neljännen argumentin alitaulukkoa toiselle argumentillepatsplit: ei voida käyttää toisen argumentin alitaulukkkoa neljännelle argumentillepatsplit: ei voida käyttää samaa taulukkoa toiselle ja neljännelle argumentillepatsplit: neljäs argumentti ei ole taulukkopatsplit: toinen argumentti ei ole taulukkopatsplit: kolmas argumentti ei ole taulukkouudelleenohjauksen â€%s†putken tyhjennys epäonnistui (%s).pelkkä â€print†BEGIN- tai END-säännössä pitäisi luultavasti olla â€print ""â€tarkkuus ohitetaan â€%%%%â€-määritteelleprintf: ei argumenttejamuodon â€[%c-%c]†lukualue on paikallisasetuksesta riippuvainensaavutettiin avoimien tiedostojen järjestelmäraja: aloitetaan tiedostomäärittelijöiden lomittaminensyy tuntematonredir2str: tuntematon edelleenohjaustyyppi %dedelleenohjaus ei ole sallittua hiekkalaatikkotilassaviite alustamattomaan argumenttiin â€%sâ€viite alustamattomaan elementtiin â€%s["%.*s"]â€viite alustamattomaan kenttään â€$%dâ€viite alustamattomaan kenttään â€$%ldâ€viite alustamattomaan muuttujaan â€%sâ€säännöllisen lausekkeen komponentin â€%.*s†pitäisi luultavasti olla â€[%.*s]â€säännöllisen lausekkeen vakio â€/%s/†näyttää C-kommentilta, mutta ei olesäännöllisen lausekkeen vakio â€//†näyttää C++-kommentilta, mutta ei olesäännöllisen lausekkeen vakio parametrille #%d antaa boolean-arvonsäännöllinen lauseke â€~â€- tai â€!~â€-operaattorin vasemmalla puolellasäännöllinen lauseke sijoituksen oikealla puolellasäännöllinen lauseke vertailun oikealla puolellaetäkone- ja porttitiedot (%s, %s) ovat virheellisiävakiosyötön palauttaminen äitiprosessissa epäonnistui vakiotulosteen palauttaminen äitiprosessissa epäonnistui rshift(%lf, %lf): jaosarvot typistetäänrshift(%lf, %lf): negatiiviset arvot antavat outoja tuloksiarshift(%lf, %lf): liian suuri siirrosarvo antaa outoja tuloksiarshift: ensimmäinen vastaanotettu argumentti ei ole numeerinenrshift: toinen vastaanotettu argumentti ei ole numeerinensuorittaminen â€%s setuid rootâ€-käyttäjänä saattaa olla turvapulmalähetetään profiili vakiovirheeseenlähetetään muuttujaluettelo vakiovirheeseenshadow_funcs() kutsuttu kahdesti!sin: vastaanotettu argumentti ei ole numeerinenlajitteluvertailufunktiota â€%s†ei ole määriteltylähdetiedosto â€%s†on tyhjälähdetiedoston lopussa ei ole rivinvaihtoaerikoistiedostonimi â€%s†on vaillinainensplit: ei voida käyttää neljännen argumentin alitaulukkoa toiselle argumentillesplit: ei voida käyttää toisen argumentin alitaulukkoa neljännelle argumentillesplit: ei voida käyttää samaa taulukkoa toiselle ja neljännelle argumentillesplit: neljäs argumentti on gawk-laajennussplit: neljäs argumentti ei ole taulukkosplit: null-merkkijono kolmantena argumenttina on gawk-laajennussplit: toinen argumentti ei ole taulukkosqrt: kutsuttu negatiivisella argumentilla %gsqrt: vastaanotettu argumentti ei ole numeerinensrand: vastaanotettu argumentti ei ole numeerinenvakiotulostekäskyllä ei ole vaikutustastrftime: muotoarvolla kohteessa PROCINFO["strftime"] on numerotyyppistrftime: vastaanotettu tyhjä muotomerkkijonostrftime: toinen vastaanotettu argumentti ei ole numeerinenstrftime: ensimmäinen vastaanotettu argumentti ei ole merkkijonostrftime: toinen argumentti on pienempi kuin 0 tai liian suuri time_t-rakenteeseentaulukon alaindeksi â€%s†on null-merkkijonosubstr: pituus %g alkuindeksissä %g ylittää ensimmäisen argumentin pituuden (%lu)substr: pituus %g ei ole >= 0substr: pituus %g ei ole >= 1substr: pituus %g liian suuri merkkijononindeksointiin, typistetään arvoon %gsubstr: typistetään pituus %g, joka ei ole kokonaislukusubstr: typistetään aloitusindeksi %g, joka ei ole kokonaislukusubstr: lähdemerkkijono on nollapituinensubstr: aloitusindeksi %g on virheellinen, käytetään 1:täsubstr: aloitusindeksi %g on merkkijonon lopun jälkeensystem: vastaanotettu argumentti ei ole merkkijonotawkin regex-määre â€/.../%c†ei toimi gawkissasiellä oli varjostettuja muuttujia.tolower: vastaanotettu argumentti ei ole merkkijonomuotomerkkijonoon toimitettu liian monta argumenttiaavoinna liian monta putkea tai syötetiedostoatoupper: vastaanotettu argumentti ei ole merkkijonokäännetään pois â€--lintâ€-valitsin â€LINTâ€-sijoituksen vuoksiodottamaton rivinvaihto tai merkkijonon lopputuntematon solmutyyppi %dtuntematon käskykoodi %dtuntematon arvo kenttämääritteelle: %d turha merkkien â€>†ja â€>>†sekoittaminen tiedostolle â€%.*sâ€päättämätön säännöllinen lausekepäättämätön säännöllinen lauseke tiedoston lopussapäättämätön säännöllinen lauseke loppuu â€\â€-merkkeihin tiedoston lopussapäättämätön merkkijonounwind_stack: odottamaton tyyppi â€%sâ€â€\ #...â€-rivijatkamisen käyttö ei ole siirrettävädcgettext(_"...")-käyttö on virheellinen: poista alaviiva alustadcngettext(_"...")-käyttö on virheellinen: poista alaviiva alustaei-taulukon käyttö taulukkonavaroitus:xor(%lf, %lf): jaosarvot typistetäänxor(%lf, %lf): negatiiviset arvot antavat outoja tuloksiaxor: ensimmäinen vastaanotettu argumentti ei ole numeerinenxor: toinen vastaanotettu argumentti ei ole numeerinengawk-4.0.1+dfsg.orig/po/pl.po0000644000175000017500000020565111734667243014764 0ustar schotschot# Polish translations for GNU AWK package. # 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, 2010, 2011, 2012. # additional help by Sergey Poznyakoff , 2003. # 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-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: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: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:257 #, c-format msgid "attempt to use scalar `%s' as an array" msgstr "próba użycia skalaru `%s' jako tablicy" #: 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 "próba użycia tablicy `%s' w kontekÅ›cie skalaru" #: array.c:513 #, c-format msgid "reference to uninitialized element `%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:723 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: indeks `%s' nie jest w tablicy `%s'" #: 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:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: pusty (zero)\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: jest parametrem\n" #: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: array_ref do %s\n" #: 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: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: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: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: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: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:528 #, c-format msgid "duplicate case values in switch body: %s" msgstr "powielone wartoÅ›ci case w ciele switch: %s" #: 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 "`next' used in %s action" msgstr "`next' użyty w akcji %s" #: awkgram.y:836 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' jest rozszerzeniem gawk" #: 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: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:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "`delete tablica' jest rozszerzeniem gawk" #: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(tablica)' jest nieprzenoÅ›nym rozszerzeniem tawk" #: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "wieloetapowe dwukierunkowe linie potokowe nie dziaÅ‚ajÄ…" #: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "wyrażanie regularne po prawej stronie przypisania" #: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "wyrażenie regularne po lewej stronie operatora `~' lub `!~'" #: 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:1275 msgid "regular expression on right of comparison" msgstr "wyrażenie regularne po prawej stronie porównania" #: 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:1421 msgid "old awk does not support multidimensional arrays" msgstr "stary awk nie wspiera wielowymiarowych tablic" #: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "wywoÅ‚anie `length' bez nawiasów jest nieprzenoÅ›ne" #: awkgram.y:1580 msgid "indirect function calls are a gawk extension" msgstr "poÅ›rednie wywoÅ‚ania funkcji sÄ… rozszerzeniem gawk" #: 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:1671 msgid "invalid subscript expression" msgstr "nieprawidÅ‚owe wyrażenie indeksowe" #: 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: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: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:2620 #, c-format msgid "source file `%s' is empty" msgstr "plik źródÅ‚owy `%s' jest pusty" #: 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: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: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: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:2935 msgid "unterminated regexp" msgstr "niezakoÅ„czone wyrażenie regularne" #: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "niezakoÅ„czone wyrażenie regularne na koÅ„cu pliku" #: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "użycie `\\ #...' kontynuacji linii nie jest przenoÅ›ne" #: awkgram.y:3014 msgid "backslash not last character on line" msgstr "backslash nie jest ostatnim znakiem w wierszu" #: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX nie zezwala na operator `**='" #: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "stary awk nie wspiera operatora `**='" #: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX nie zezwala na operator `**'" #: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "stary awk nie wspiera operatora `**'" #: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "operator `^=' nie jest wspierany w starym awk" #: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "operator `^' nie jest wspierany w starym awk" #: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "niezakoÅ„czony Å‚aÅ„cuch" #: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "nieprawidÅ‚owy znak '%c' w wyrażeniu" #: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' jest rozszerzeniem gawk" #: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' jest rozszerzeniem Bell Labs" #: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX nie zezwala na `%s'" #: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' nie jest wspierany w starym awk" #: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "`goto' uważane za szkodliwe!\n" #: 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: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:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s trzeci parametr nie jest zmiennym obiektem" #: 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:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "nieprawidÅ‚owe użycie dcgettext(_\"...\"): usuÅ„ znak podkreÅ›lenia" #: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "nieprawidÅ‚owe użycie dcngettext(_\"...\"): usuÅ„ znak podkreÅ›lenia" #: 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:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funkcja `%s': parametr `%s' zasÅ‚ania globalnÄ… zmiennÄ…" #: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "nie można otworzyć `%s' do zapisu (%s)" #: awkgram.y:4112 msgid "sending variable list to standard error" msgstr "wysyÅ‚anie listy zmiennych na standardowe wyjÅ›cie diagnostyczne" #: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s: zamkniÄ™cie nie powiodÅ‚o siÄ™ (%s)" #: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() wywoÅ‚ana podwójnie!" #: awkgram.y:4176 msgid "there were shadowed variables." msgstr "wystÄ…piÅ‚y przykryte zmienne." #: 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: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:4226 #, c-format msgid "function name `%s' previously defined" msgstr "nazwa funkcji `%s' zostaÅ‚a zdefiniowana poprzednio" #: 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:4403 #, c-format 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: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:4544 #, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" "funkcja `%s' zostaÅ‚a wywoÅ‚ana z biaÅ‚ymi znakami pomiÄ™dzy jej nazwÄ… a znakiem " "`(',\n" "lub użyta jako zmienna lub jako tablica" #: awkgram.y:4791 eval.c:2056 msgid "division by zero attempted" msgstr "próba dzielenia przez zero" #: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "próba dzielenia przez zero w `%%'" #: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s do \"%s\" nie powiódÅ‚ siÄ™ (%s)" #: builtin.c:121 msgid "standard output" msgstr "standardowe wyjÅ›cie" #: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "exp: otrzymano argument nie bÄ™dÄ…cy liczbÄ…" #: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argument %g jest poza zasiÄ™giem" #: 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: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: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:333 msgid "index: received non-string first argument" msgstr "index: otrzymano pierwszy argument, który nie jest Å‚aÅ„cuchem" #: builtin.c:335 msgid "index: received non-string second argument" msgstr "index: otrzymano drugi argument, który nie jest Å‚aÅ„cuchem" #: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int: otrzymano argument, który nie jest liczbÄ…" #: 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:504 msgid "length: received non-string argument" msgstr "length: otrzymano argument, który nie jest Å‚aÅ„cuchem" #: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log: otrzymano argument, który nie jest liczbÄ…" #: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log: otrzymano ujemny argument %g" #: 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:762 #, c-format msgid "field width is ignored for `%%' specifier" msgstr "szerokość pola jest ignorowana dla specyfikatora `%%'" #: builtin.c:764 #, c-format msgid "precision is ignored for `%%' specifier" msgstr "precyzja jest ignorowana dla specyfikatora `%%'" #: builtin.c:766 #, c-format msgid "field width and precision are ignored for `%%' specifier" msgstr "szerokość pola i precyzja sÄ… ignorowane dla specyfikatora `%%'" #: builtin.c:817 msgid "fatal: `$' is not permitted in awk formats" msgstr "fatal: `$' jest niedozwolony w formatach awk" #: builtin.c:826 msgid "fatal: arg count with `$' must be > 0" msgstr "fatal: argument count z `$' musi być > 0" #: builtin.c:830 #, c-format 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:834 msgid "fatal: `$' not permitted after period in format" msgstr "fatal: `$' jest niedozwolony po kropce w formacie" #: 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:921 msgid "`l' is meaningless in awk formats; ignored" msgstr "`l' jest bezsensowny w formatach awk; zignorowany" #: builtin.c:925 msgid "fatal: `l' is not permitted in POSIX awk formats" msgstr "fatal: `l' jest niedozwolony w formatach POSIX awk" #: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' jest bezsensowny w formatach awk; zignorowany" #: builtin.c:942 msgid "fatal: `L' is not permitted in POSIX awk formats" msgstr "fatal: `L' jest niedozwolony w formatach POSIX awk" #: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' jest bezsensowny w formatach awk; zignorowany" #: builtin.c:959 msgid "fatal: `h' is not permitted in POSIX awk formats" msgstr "fatal: `h' jest niedozwolony w formatach POSIX awk" #: 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'" #: builtin.c:1332 #, c-format msgid "ignoring unknown format specifier character `%c': no argument converted" msgstr "" "pominiÄ™cie nieznanego formatu specyfikatora znaku `%c': nie skonwertowano " "argumentu" #: builtin.c:1337 msgid "fatal: not enough arguments to satisfy format string" msgstr "" "fatal: brak wystarczajÄ…cej liczby argumentów, aby zaspokoić Å‚aÅ„cuch " "formatujÄ…cy" #: builtin.c:1339 msgid "^ ran out for this one" msgstr "zabrakÅ‚o ^" #: builtin.c:1346 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: specyfikator formatu nie posiada kontrolnej litery" #: builtin.c:1349 msgid "too many arguments supplied for format string" msgstr "zbyt dużo podanych argumentów w Å‚aÅ„cuchu formatujÄ…cym" #: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: brak argumentów" #: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt: otrzymano argument, który nie jest liczbÄ…" #: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" #: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: dÅ‚ugość %g nie jest >= 1" #: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: dÅ‚ugość %g nie jest >= 0" #: 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: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: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: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:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" "substr: dÅ‚ugość %g zaczynajÄ…c od %g przekracza dÅ‚ugość pierwszego argumentu " "(%lu)" #: 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:1696 msgid "strftime: received empty format string" msgstr "strftime: otrzymano pusty Å‚aÅ„cuch formatujÄ…cy" #: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime: otrzymano argument, który nie jest Å‚aÅ„cuchem" #: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" msgstr "mktime: przynajmniej jedna z wartoÅ›ci jest poza domyÅ›lnym zakresem" #: 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: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:2028 msgid "tolower: received non-string argument" msgstr "tolower: otrzymano argument, który nie jest Å‚aÅ„cuchem" #: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper: otrzymano argument, który nie jest Å‚aÅ„cuchem" #: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2: otrzymano pierwszy argument, który nie jest liczbÄ…" #: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2: otrzymano drugi argument, który nie jest liczbÄ…" #: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin: otrzymano argument, który nie jest liczbÄ…" #: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos: otrzymano argument, który nie jest liczbÄ…" #: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand: otrzymano argument, który nie jest liczbÄ…" #: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match: otrzymano trzeci argument, który nie jest tablicÄ…" #: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: trzeci argument 0 potraktowany jako 1" #: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift: otrzymano pierwszy argument, który nie jest liczbÄ…" #: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift: otrzymano drugi argument, który nie jest liczbÄ…" #: 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: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: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:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift: otrzymano pierwszy argument, który nie jest liczbÄ…" #: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift: otrzymano drugi argument, który nie jest liczbÄ…" #: 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: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: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:2850 msgid "and: received non-numeric first argument" msgstr "and: otrzymano pierwszy argument, który nie jest liczbÄ…" #: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and: otrzymano drugi argument, który nie jest liczbÄ…" #: 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: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:2885 msgid "or: received non-numeric first argument" msgstr "or: otrzymano pierwszy argument, który nie jest liczbÄ…" #: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or: otrzymano drugi argument, który nie jest liczbÄ…" #: 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: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:2923 msgid "xor: received non-numeric first argument" msgstr "xor: otrzymano pierwszy argument, który nie jest liczbÄ…" #: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor: otrzymano drugi argument, który nie jest liczbÄ…" #: 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: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:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl: otrzymano argument, który nie jest liczbÄ…" #: 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:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" #: 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:412 #, c-format msgid "unknown nodetype %d" msgstr "nieznany typ wÄ™zÅ‚a %d" #: eval.c:423 eval.c:437 #, c-format msgid "unknown opcode %d" msgstr "nieznany opcode %d" #: eval.c:434 #, c-format msgid "opcode %s not an operator or keyword" msgstr "opcode %s nie jest operatorem ani sÅ‚owem kluczowym" #: eval.c:488 msgid "buffer overflow in genflags2str" msgstr "przepeÅ‚nienie bufora w genflags2str" #: eval.c:698 #, c-format msgid "" "\n" "\t# Function Call Stack:\n" "\n" msgstr "" "\n" "\t# Stos WywoÅ‚awczy Funkcji:\n" "\n" #: eval.c:725 msgid "`IGNORECASE' is a gawk extension" msgstr "`IGNORECASE' jest rozszerzeniem gawk" #: eval.c:754 msgid "`BINMODE' is a gawk extension" msgstr "`BINMODE' jest rozszerzeniem gawk" #: 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:902 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "zÅ‚a specyfikacja `%sFMT' `%s'" #: 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:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "odwoÅ‚anie do niezainicjowanego argumentu `%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:1179 msgid "attempt to field reference from null string" msgstr "próba odwoÅ‚ania z zerowego Å‚aÅ„cucha" #: eval.c:1185 #, c-format msgid "attempt to access field %ld" msgstr "próba dostÄ™pu do pola %ld" #: 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:1437 #, c-format msgid "unwind_stack: unexpected type `%s'" msgstr "unwind_stack: niespodziewany typ `%s'" #: eval.c:1532 msgid "division by zero attempted in `/='" msgstr "próba dzielenia przez zero w `/='" #: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "próba dzielenia przez zero w `%%='" #: eval.c:1876 eval.c:2122 #, c-format 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 "" "pÄ™tla for: tablica `%s' zmieniÅ‚a rozmiar z %ld do %ld podczas wykonywania " "pÄ™tli" #: 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:2511 #, c-format msgid "non-redirected `getline' invalid inside `%s' rule" msgstr "" "komenda `getline' bez przekierowania jest nieprawidÅ‚owa wewnÄ…trz reguÅ‚y `%s'" #: eval.c:2600 #, c-format msgid "error reading input file `%s': %s" msgstr "błąd podczas czytania z pliku `%s': %s" #: eval.c:2614 #, c-format 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: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:2700 #, c-format 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:2766 #, c-format msgid "Sorry, don't know how to interpret `%s'" msgstr "Niestety nie wiem jak zinterpretować `%s'" #: ext.c:54 msgid "extensions are not allowed in sandbox mode" msgstr "rozszerzenia nie sÄ… dozwolone w trybie piaskownicy" #: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" msgstr "`extension' jest rozszerzeniem gawk" #: ext.c:75 #, c-format msgid "fatal: extension: cannot open `%s' (%s)\n" msgstr "fatal: rozszerzenie: nie można otworzyć `%s' (%s)\n" #: ext.c:84 #, c-format 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: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:132 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "rozszerzenie: nieprawidÅ‚owy znak `%c' w nazwie funkcji `%s'" #: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "rozszerzenie: nie można zredefiniować funkcji `%s'" #: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "rozserzenie: funkcja `%s' zostaÅ‚a już zdefiniowana" #: 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:156 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: ujemny licznik argumentów dla funkcji `%s'" #: 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:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "funkcja `%s': brakuje #%d argumentu" #: 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: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:296 msgid "Operation Not Supported" msgstr "Operacja nie jest wspierana" #: field.c:328 msgid "NF set to negative value" msgstr "NF ustawiony na wartość ujemnÄ…" #: 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: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: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:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "nieprawidÅ‚owa wartość FIELDWIDTHS, w pobliżu `%s'" #: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "zerowy Å‚aÅ„cuch dla `FS' jest rozszerzeniem gawk" #: 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'" #: 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: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: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:740 getopt.c:759 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: opcja '--%s' wymaga argumentu\n" #: getopt.c:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: nieznana opcja '--%s'\n" #: getopt.c:808 getopt.c:811 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: nieznana opcja '%c%s'\n" #: getopt.c:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: błędna opcja -- '%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: opcja wymaga argumentu -- '%c'\n" #: 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: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:1068 getopt.c:1086 #, c-format msgid "%s: option '-W %s' requires an argument\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: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:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "zamkniÄ™cie fd %d (`%s') nie powiodÅ‚o siÄ™ (%s)" #: io.c:578 msgid "redirection not allowed in sandbox mode" msgstr "przekierowanie nie jest dozwolone w trybie piaskownicy" #: 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: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: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:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "niepotrzebne mieszanie `>' i `>>' dla pliku `%.*s'" #: 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: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: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:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "nie można przekierować z `%s' (%s)" #: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "nie można przekierować do `%s' (%s)" #: 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:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "zamkniÄ™cie `%s' nie powiodÅ‚o siÄ™ (%s)." #: 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:934 msgid "close: second argument must be `to' or `from'" msgstr "close: drugim argumentem musi być `to' lub `from'" #: 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:956 msgid "close of redirection that was never opened" msgstr "zamkniÄ™cie przekierowania, które nigdy nie zostaÅ‚o otwarte" #: 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:1069 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "status awarii (%d) podczas zamykania potoku `%s' (%s)" #: 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:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "brak jawnego zamkniÄ™cia gniazdka `%s'" #: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "brak jawnego zamkniÄ™cia procesu pomocniczego `%s'" #: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "brak jawnego zamkniÄ™cia potoku `%s'" #: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "brak jawnego zamkniÄ™cia pliku `%s'" #: 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: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:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "opróżnienie potoku `%s' nie powiodÅ‚o siÄ™ (%s)." #: 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:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "opróżnienie pliku `%s' nie powiodÅ‚o siÄ™ (%s)." #: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "nieprawidÅ‚owy lokalny port %s w `/inet'" #: 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:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "nie dostarczono (znanego) protokoÅ‚u w specjalnym pliku `%s'" #: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "specjalna nazwa pliku `%s' jest niekompletna" #: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "należy dostarczyć nazwÄ™ zdalnego hosta do `/inet'" #: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "należy dostarczyć numer zdalnego portu do `/inet'" #: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "Komunikacja TCP/IP nie jest wspierana" #: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "nie można otworzyć `%s', tryb `%s'" #: 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: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: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: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: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: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: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: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: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:1893 msgid "restoring stdin in parent process failed\n" msgstr "" "odzyskanie standardowego wejÅ›cia w procesie potomnym nie powiodÅ‚o siÄ™\n" #: 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:1973 msgid "`|&' not supported" msgstr "`|&' nie jest wspierany" #: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "nie można otworzyć potoku `%s' (%s)" #: 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:2520 #, c-format msgid "data file `%s' is empty" msgstr "plik danych `%s' jest pusty" #: 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:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "wieloznakowa wartość `RS' jest rozszerzeniem gawk" #: io.c:3232 msgid "IPv6 communication is not supported" msgstr "Komunikacja IPv6 nie jest wspierana" #: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "nieistotna opcja `-m[fr]' w gawk" #: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "użycie opcji -m: `-m[fr] nnn'" #: 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:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: opcja musi mieć argument -- %c\n" #: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "zmienna Å›rodowiskowa `POSIXLY_CORRECT' ustawiona: `--posix' zostaÅ‚ włączony" #: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "opcja `--posix' zostanie użyta nad `--traditional'" #: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' użyte nad opcjÄ… `--non-decimal-data'" #: 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: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: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: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:657 msgid "no program text at all!" msgstr "brak tekstu programu!" #: 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: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:741 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "Opcje POSIX:\t\tDÅ‚ugie opcje GNU (standard):\n" #: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f program\t\t--file=program\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 zmienna=wartość\t--assign=zmienna=wartość\n" #: main.c:745 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-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-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'tekst-programu'\t--source='tekst-programu'\n" #: main.c:751 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-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\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: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" "Aby zgÅ‚osić błąd, prosimy zobaczyć wÄ™zeÅ‚ `Bugs' w `gawk.info'\n" "lub rozdziaÅ‚ p.t. `Reporting Problems and Bugs' w wydrukowanej\n" "dokumentacji.\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 jest jÄ™zykiem skanowania i przetwarzania wzorców.\n" "Program domyÅ›lnie czyta standardowe wejÅ›cie i zapisuje standardowe wyjÅ›cie.\n" "\n" #: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" "PrzykÅ‚ady:\n" "\tgawk '{ suma += $1 }; END { print suma }' plik\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 (C) 1989, 1991-%d Free Software Foundation.\n" "\n" "Ten program jest wolnym oprogramowaniem; możesz go rozprowadzać dalej\n" "i/lub modyfikować na warunkach Powszechnej Licencji Publicznej GNU,\n" "wydanej przez FundacjÄ™ Wolnego Oprogramowania - wedÅ‚ug wersji 3-ciej\n" "tej Licencji lub którejÅ› z późniejszych wersji.\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 "" "Ten program rozpowszechniany jest z nadziejÄ…, iż bÄ™dzie on\n" "użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyÅ›lnej\n" "gwarancji PRZYDATNOÅšCI HANDLOWEJ albo PRZYDATNOÅšCI DO OKREÅšLONYCH\n" "ZASTOSOWAŃ. W celu uzyskania bliższych informacji przeczytaj\n" "PowszechnÄ… LicencjÄ™ PublicznÄ… GNU.\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 "" "Z pewnoÅ›ciÄ… wraz z niniejszym programem otrzymaÅ‚eÅ› też egzemplarz\n" "Powszechnej Licencji Publicznej GNU (GNU General Public License);\n" "jeÅ›li zaÅ› nie - odwiedź stronÄ™ http://www.gnu.org/licenses/.\n" #: 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: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" "\n" msgstr "" "%s: argument `%s' dla `-v' nie jest zgodny ze skÅ‚adniÄ… `zmienna=wartość'\n" "\n" #: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' nie jest dozwolonÄ… nazwÄ… zmiennej" #: 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: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:1269 msgid "fatal error: internal error" msgstr "fatalny błąd: wewnÄ™trzny błąd" #: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "fatalny błąd: wewnÄ™trzny błąd: błąd segmentacji" #: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "fatalny błąd: wewnÄ™trzny błąd: przepeÅ‚nienie stosu" #: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "brak już otwartego fd %d" #: 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" #: msg.c:63 #, c-format msgid "cmd. line:" msgstr "linia poleceÅ„:" #: msg.c:107 msgid "error: " msgstr "błąd: " #: node.c:406 msgid "backslash at end of string" msgstr "backslash na koÅ„cu Å‚aÅ„cucha" #: 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:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX nie zezwala na sekwencjÄ™ ucieczki `\\x'" #: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "brak liczb szesnastkowych w sekwencji ucieczki `\\x'" #: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " "expect" msgstr "" "szesnastkowa sekwencja ucieczki \\x%.*s %d znaków prawdopodobnie nie zostaÅ‚a " "zinterpretowana jak tego oczekujesz" #: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "sekwencja ucieczki `\\%c' potraktowana jako zwykÅ‚e `%c'" #: 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." #: posix/gawkmisc.c:176 #, c-format 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)" #: posix/gawkmisc.c:188 #, c-format 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:83 #, c-format msgid "could not open `%s' for writing: %s" msgstr "nie można otworzyć `%s' do zapisu: %s" #: profile.c:85 msgid "sending profile to standard error" msgstr "wysyÅ‚anie profilu na standardowe wyjÅ›cie diagnostyczne" #: profile.c:203 #, c-format msgid "" "\t# %s block(s)\n" "\n" msgstr "" "\t# %s blok(i)\n" "\n" #: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" "\t# ReguÅ‚a(i)\n" "\n" #: profile.c:279 #, c-format msgid "internal error: %s with null vname" msgstr "wewnÄ™trzny błąd: %s z zerowym vname" #: 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" "\t# Functions, listed alphabetically\n" msgstr "" "\n" "\t# Funkcje, spis alfabetyczny\n" #: profile.c:1370 #, c-format msgid "redir2str: unknown redirection type %d" msgstr "redir2str: nieznany typ przekierowania %d" #: re.c:573 #, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "zasiÄ™g formy `[%c-%c]' jest zależny od lokalizacji" #: re.c:600 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "komponent regexp `%.*s' powinien być prawdopodobnie `[%.*s]'" #: regcomp.c:131 msgid "Success" msgstr "Sukces" #: regcomp.c:134 msgid "No match" msgstr "Brak dopasowania" #: regcomp.c:137 msgid "Invalid regular expression" msgstr "NieprawidÅ‚owe wyrażenie regularne" #: regcomp.c:140 msgid "Invalid collation character" msgstr "NieprawidÅ‚owy znak porównania" #: regcomp.c:143 msgid "Invalid character class name" msgstr "NieprawidÅ‚owa nazwa klasy znaku" #: regcomp.c:146 msgid "Trailing backslash" msgstr "KoÅ„cowy znak backslash" #: regcomp.c:149 msgid "Invalid back reference" msgstr "NieprawidÅ‚owe odwoÅ‚anie wsteczne" #: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "Niedopasowany znak [ lub [^" #: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "Niedopasowany znak ( lub \\(" #: regcomp.c:158 msgid "Unmatched \\{" msgstr "Niedopasowany znak \\{" #: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "NieprawidÅ‚owa zawartość \\{\\}" #: regcomp.c:164 msgid "Invalid range end" msgstr "NieprawidÅ‚owy koniec zakresu" #: regcomp.c:167 msgid "Memory exhausted" msgstr "Pamięć wyczerpana" #: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "NieprawidÅ‚owe poprzedzajÄ…ce wyrażenie regularne" #: regcomp.c:173 msgid "Premature end of regular expression" msgstr "Przedwczesny koniec wyrażenia regularnego" #: regcomp.c:176 msgid "Regular expression too big" msgstr "Wyrażenie regularne jest zbyt duże" #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Niedopasowany znak ) lub \\)" #: 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)" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: niewÅ‚aÅ›ciwa opcja -- %c\n" #~ msgid "function %s called\n" #~ msgstr "wywoÅ‚ano funkcjÄ™ %s\n" #~ msgid "field %d in FIELDWIDTHS, must be > 0" #~ msgstr "pole nr %d w FIELDWIDTHS musi być wiÄ™ksze od zera" #~ msgid "delete: illegal use of variable `%s' as array" #~ msgstr "delete: nieprawidÅ‚owe użycie zmiennej `%s' jako tablicy" #~ msgid "" #~ "\n" #~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" #~ msgstr "" #~ "\n" #~ "Aby zgÅ‚osić błędy, prosimy zobaczyć wÄ™zeÅ‚ `Bugs' w `gawk.info', który " #~ "jest\n" #~ msgid "invalid syntax in name `%s' for variable assignment" #~ msgstr "błąd skÅ‚adni w nazwie `%s' dla przypisania zmiennej" #~ msgid "internal error: Node_var_array with null vname" #~ msgstr "wewnÄ™trzny błąd: Node_var_array z zerowym vname" #~ msgid "or used in other expression context" #~ msgstr "lub użyty w innym kontekÅ›cie wyrażenia" #~ msgid "`%s' is a function, assignment is not allowed" #~ msgstr "`%s' jest funkcjÄ…, zatem przypisanie nie jest dozwolone" #~ msgid "BEGIN blocks must have an action part" #~ msgstr "Blok BEGIN musi posiadać część dotyczÄ…cÄ… akcji" #~ msgid "`nextfile' used in BEGIN or END action" #~ msgstr "`nextfile' użyty w akcji BEGIN lub END" #~ msgid "non-redirected `getline' undefined inside BEGIN or END action" #~ msgstr "" #~ "komenda `getline' bez przekierowania nie jest zdefiniowana wewnÄ…trz akcji " #~ "BEGIN lub END" #~ msgid "fptr %x not in tokentab\n" #~ msgstr "brak fptr %x w tokentab\n" #~ msgid "gsub third parameter is not a changeable object" #~ msgstr "trzeci parametr gsub nie jest zmiennym obiektem" #~ msgid "Unfinished \\ escape" #~ msgstr "NiedokoÅ„czona sekwencja ucieczki \\" #~ msgid "unfinished repeat count" #~ msgstr "niedokoÅ„czona liczba powtórzeÅ„" #~ msgid "malformed repeat count" #~ msgstr "źle sformatowana liczba powtórzeÅ„" #~ msgid "Unbalanced [" #~ msgstr "[ nie do pary" #~ msgid "Unbalanced (" #~ msgstr "( nie do pary" #~ msgid "No regexp syntax bits specified" #~ msgstr "Nie zostaÅ‚y podane bity skÅ‚adni wyrażenia regularnego" #~ msgid "Unbalanced )" #~ msgstr ") nie do pary" #~ msgid "internal error: file `%s', line %d\n" #~ msgstr "wewnÄ™trzny błąd: plik `%s', linia %d\n" gawk-4.0.1+dfsg.orig/po/da.po0000644000175000017500000017305411734667242014735 0ustar schotschot# Danish translation of gawk # Copyright (C) 2001 Free Software Foundation, Inc. # 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 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-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: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 et array" #: array.c:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "forsøg på at bruge skalarparameteren '%s' som et array" #: array.c:257 #, c-format msgid "attempt to use scalar `%s' as an array" msgstr "forsøg på at bruge skalar '%s' som et array" #: 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 #, c-format msgid "reference to uninitialized 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 array '%s' er en tom streng" #: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: indeks '%s' findes ikke i array '%s'" #: 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 (null)\n" #: array.c:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: tom (nul)\n" #: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: tabelstørrelse = %d, arraystørrelse = %d\n" #: array.c:954 #, c-format msgid "%s: is parameter\n" msgstr "%s: er parameter\n" #: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: arrayreference til %s\n" #: 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 "%s-blokke skal have en handlingsdel" #: awkgram.y:252 msgid "each rule must have a pattern or an action part" msgstr "hver regel skal have et mønster eller en handlingsdel" #: awkgram.y:323 awkgram.y:334 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "" "gamle versioner af awk understøtter ikke flere 'BEGIN'- eller 'END'-regler" #: 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" #: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "regexp-konstanten '//' ser ud som en C++-kommentar, men er det ikke" #: 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" #: awkgram.y:528 #, c-format msgid "duplicate case values in switch body: %s" msgstr "dublet case-værdier i switch-krop %s" #: 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: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" #: 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" #: awkgram.y:925 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "alenestående 'print' i BEGIN eller END-regel skulle muligvis være 'print " "\"\"'" #: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "'delete array' er en gawk-udvidelse" #: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "'delete array' er en ikke-portabel udvidelse fra tawk" #: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "flertrins dobbeltrettede datakanaler fungerer ikke" #: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "regulært udtryk i højreleddet af en tildeling" #: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "regulært udtryk på venstre side af en '~'- eller '!~'-operator" #: awkgram.y:1265 awkgram.y:1419 msgid "old awk does not support the keyword `in' except after `for'" msgstr "" "gamle versioner af awk understøtter ikke nøgleordet 'in' undtagen efter 'for'" #: awkgram.y:1275 msgid "regular expression on right of comparison" msgstr "regulært udtryk i højreleddet af en sammenligning" #: 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 inden i END-handling" #: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" msgstr "gamle versioner af awk understøtter ikke flerdimensionale array" #: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "kald af 'length' uden parenteser er ikke portabelt" #: awkgram.y:1580 msgid "indirect function calls are a gawk extension" msgstr "indirekte funktionskald er en gawk-udvidelse" #: 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:1671 msgid "invalid subscript expression" msgstr "ugyldigt indeksudtryk" #: awkgram.y:1711 msgid "use of non-array as array" msgstr "brug af ikke-array som array" #: awkgram.y:1975 awkgram.y:1995 msg.c:98 msgid "warning: " msgstr "advarsel: " #: 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)" #: awkgram.y:2301 awkgram.y:2359 builtin.c:122 msgid "reason unknown" msgstr "ukendt årsag" #: 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)" #: awkgram.y:2620 #, c-format msgid "source file `%s' is empty" msgstr "kildefilen '%s' er tom" #: awkgram.y:2797 msgid "source file does not end in newline" msgstr "kildefilen slutter ikke med en ny linje" #: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" msgstr "uafsluttet regulært udtryk slutter med '\\' i slutningen af filen" #: awkgram.y:2924 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "%s: %d: regex-ændringstegn '/.../%c' fra tawk virker ikke i gawk" #: awkgram.y:2928 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "regex-ændringstegn '/.../%c' fra tawk virker ikke i gawk" #: awkgram.y:2935 msgid "unterminated regexp" msgstr "uafsluttet regulært udtryk" #: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "uafsluttet regulært udtryk i slutningen af filen" #: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "brug af '\\ #...' for linjefortsættelse er ikke portabelt" #: awkgram.y:3014 msgid "backslash not last character on line" msgstr "sidste tegn på linjen er ikke en omvendt skråstreg" #: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX tillader ikke operatoren '**='" #: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "gamle versioner af awk understøtter ikke operatoren '**='" #: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX tillader ikke operatoren '**'" #: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "gamle versioner af awk understøtter ikke operatoren '**'" #: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "operatoren '^=' understøttes ikke i gamle versioner af awk" #: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "operatoren '^' understøttes ikke i gamle versioner af awk" #: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "uafsluttet streng" #: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "ugyldigt tegn '%c' i udtryk" #: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "'%s' er en gawk-udvidelse" #: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "'%s' er en Bell Labs-udvidelse" #: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX tillader ikke '%s'" #: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "'%s' understøttes ikke i gamle versioner af awk" #: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "'goto' anses for skadelig!\n" #: 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: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:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s: tredje argument er ikke et ændringsbart objekt" #: 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:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "brug af dcgettext(_\"...\") er forkert: fjern det indledende " "understregningstegn" #: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "brug af dcgettext(_\"...\") er forkert: fjern det indledende " "understregningstegn" #: 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" #: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funktionen '%s': parameteren '%s' overskygger en global variabel" #: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "kunne ikke åbne '%s' for skrivning (%s)" #: awkgram.y:4112 msgid "sending variable list to standard error" msgstr "sender variabelliste til standard fejl" #: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s: lukning mislykkedes (%s)" #: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() kaldt to gange!" #: awkgram.y:4176 msgid "there were shadowed variables." msgstr "der var skyggede variable." #: 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" #: awkgram.y:4210 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "funktionen '%s': kan ikke bruge specialvariabel '%s' som en " "funktionsparameter" #: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" msgstr "funktionsnavnet '%s' er allerede defineret" #: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" msgstr "funktionen '%s' kaldt, men aldrig defineret" #: awkgram.y:4403 #, c-format msgid "function `%s' defined but never called directly" msgstr "funktionen '%s' defineret, men aldrig kaldt direkte" #: 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: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" "eller brugt som en variabel eller et array" #: awkgram.y:4791 eval.c:2056 msgid "division by zero attempted" msgstr "forsøgte at dividere med nul" #: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "forsøgte at dividere med nul i '%%'" #: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s til '%s' mislykkedes (%s)" #: builtin.c:121 msgid "standard output" msgstr "standard ud" #: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "exp: fik et ikke-numerisk argument" #: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argumentet %g er uden for det tilladte område" #: builtin.c:200 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: kan ikke rense: datakanalen '%s' åbnet for læsning, ikke skrivning" #: builtin.c:203 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "fflush: kan ikke rense: filen '%s' åbnet for læsning, ikke skrivning" #: 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" #: builtin.c:333 msgid "index: received non-string first argument" msgstr "indeks: første argument er ikke en streng" #: builtin.c:335 msgid "index: received non-string second argument" msgstr "indeks: andet argument er ikke en streng" #: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int: fik et ikke-numerisk argument" #: builtin.c:493 msgid "length: received array argument" msgstr "length: fik et array-argument" #: builtin.c:496 msgid "`length(array)' is a gawk extension" msgstr "'length(array)' er en gawk-udvidelse" #: builtin.c:504 msgid "length: received non-string argument" msgstr "length: fik et argument som ikke er en streng" #: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log: fik et ikke-numerisk argument" #: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log: fik et negativt argument %g" #: 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:762 #, c-format msgid "field width is ignored for `%%' specifier" msgstr "feltbredde ignoreret for '%%'-angivelse" #: builtin.c:764 #, c-format msgid "precision is ignored for `%%' specifier" msgstr "præcision ignoreret for '%%'-angivelse" #: builtin.c:766 #, c-format msgid "field width and precision are ignored for `%%' specifier" msgstr "feltbredde og præcision ignoreret for '%%'-angivelse" #: builtin.c:817 msgid "fatal: `$' is not permitted in awk formats" msgstr "fatal: '$' tillades ikke i awk-formater" #: builtin.c:826 msgid "fatal: arg count with `$' must be > 0" msgstr "fatal: argumentantallet med '$' skal være > 0" #: 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:834 msgid "fatal: `$' not permitted after period in format" msgstr "fatal: '$' tillades ikke efter et punktum i formatet" #: 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" #: builtin.c:925 msgid "fatal: `l' is not permitted in POSIX awk formats" msgstr "fatal: 'l' tillades ikke i POSIX awk-formater" #: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "'L' er meningsløst i awk-formater, ignoreret" #: builtin.c:942 msgid "fatal: `L' is not permitted in POSIX awk formats" msgstr "fatal: 'L' tillades ikke i POSIX awk-formater" #: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "'h' er meningsløst i awk-formater, ignoreret" #: builtin.c:959 msgid "fatal: `h' is not permitted in POSIX awk formats" msgstr "fatal: 'h' tillades ikke i POSIX awk-formater" #: builtin.c:1272 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" 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:1337 msgid "fatal: not enough arguments to satisfy format string" msgstr "fatal: for få argumenter til formatstrengen" #: 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: formatspecifikation har intet kommandobogstav" #: builtin.c:1349 msgid "too many arguments supplied for format string" msgstr "for mange argumenter til formatstrengen" #: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: ingen argumenter" #: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt: fik ikke-numerisk argument" #: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: kaldt med negativt argument %g" #: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: længden %g er ikke >= 1" #: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: længden %g er ikke >= 0" #: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: længden %g som ikke er et heltal vil blive trunkeret" #: builtin.c:1517 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "substr: længden %g for stor til strengindeksering, trunkerer til %g" #: 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:1575 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: startindeks %g er forbi slutningen på strengen" #: builtin.c:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" "substr: længden %g ved startindeks %g overskrider længden af første argument " "(%lu)" #: 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:1696 msgid "strftime: received empty format string" msgstr "strftime: fik en tom formatstreng" #: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime: fik et argument som ikke er en streng" #: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" msgstr "mktime: mindst én af værdierne er udenfor standardområdet" #: 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: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 felt '$%d'" #: builtin.c:2028 msgid "tolower: received non-string argument" msgstr "tolower: fik et argument som ikke er en streng" #: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper: fik et argument som ikke er en streng" #: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2: fik et ikke-numerisk første argument" #: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2: fik et ikke-numerisk andet argument" #: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin: fik et ikke-numerisk argument" #: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos: fik et ikke-numerisk argument" #: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand: fik et ikke-numerisk argument" #: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match: tredje argument er ikke et array" #: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: 0 i tredje argument behandlet som 1" #: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift: fik et ikke-numerisk første argument" #: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift: fik et ikke-numerisk andet argument" #: 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:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): kommatalsværdier vil blive trunkeret" #: 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:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift: fik et ikke-numerisk første argument" #: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift: fik et ikke-numerisk andet argument" #: 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:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): kommatalsværdier vil blive trunkeret" #: 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:2850 msgid "and: received non-numeric first argument" msgstr "and: fik et ikke-numerisk første argument" #: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and: fik et ikke-numerisk andet argument" #: 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:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): kommatalsværdier vil blive trunkeret" #: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "or: fik et ikke-numerisk første argument" #: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or: fik et ikke-numerisk andet argument" #: 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:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): kommatalsværdier vil blive trunkeret" #: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "xor: fik et ikke-numerisk første argument" #: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor: fik et ikke-numerisk andet argument" #: 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:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): kommatalsværdier vil blive trunkeret" #: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl: fik et ikke-numerisk argument" #: 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:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): kommatalsværdier vil blive trunkeret" #: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: '%s' er ikke en gyldig lokalitetskategori" #: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "ukendt nodetype %d" #: 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:698 #, c-format msgid "" "\n" "\t# Function Call Stack:\n" "\n" msgstr "" "\n" "\t# Funktionskaldsstak:\n" "\n" #: eval.c:725 msgid "`IGNORECASE' is a gawk extension" msgstr "'IGNORECASE' er en gawk-udvidelse" #: 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: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 array" #: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "reference til ikke-initieret argument '%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:1179 msgid "attempt to field reference from null string" msgstr "forsøg på at referere til et felt fra tom streng" #: eval.c:1185 #, c-format msgid "attempt to access field %ld" msgstr "forsøg på at få adgang til felt %ld" #: eval.c:1194 #, c-format msgid "reference to uninitialized field `$%ld'" msgstr "reference til ikke-initieret felt '$%ld'" #: eval.c:1256 #, c-format 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:1532 msgid "division by zero attempted in `/='" msgstr "forsøgte at dividere med nul i '/='" #: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "forsøgte at dividere med nul i '%%='" #: eval.c:1876 eval.c:2122 #, c-format 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: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:2343 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "for-løkke: array '%s' ændrede størrelse fra %ld til %ld under udførelse af " "løkken" #: eval.c:2458 #, c-format msgid "function called indirectly through `%s' does not exist" msgstr "funktion kaldt indirekte via '%s' eksisterer ikke" #: eval.c:2470 #, c-format msgid "function `%s' not defined" msgstr "funktionen '%s' er ikke defineret" #: eval.c:2511 #, c-format msgid "non-redirected `getline' invalid inside `%s' rule" msgstr "ikke-omdirigeret 'getline' ugyldig inden i '%s'-regel" #: eval.c:2600 #, c-format msgid "error reading input file `%s': %s" msgstr "fejl ved læsning af inddatafilen '%s': %s" #: 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:2661 msgid "`exit' cannot be called in the current context" msgstr "'exit' kan ikke kaldes i den aktuelle kontekst" #: eval.c:2700 #, c-format msgid "`next' cannot be called from a `%s' rule" msgstr "'next' kan ikke kaldes fra en '%s'-regel" #: eval.c:2766 #, c-format msgid "Sorry, don't know how to interpret `%s'" msgstr "Véd desværre ikke hvordan '%s' skal fortolkes" #: ext.c:54 msgid "extensions are not allowed in sandbox mode" msgstr "udvidelser er ikke tilladt i sandkasse-tilstand" #: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" msgstr "'extension' er en gawk-udvidelse" #: ext.c:75 #, c-format msgid "fatal: extension: cannot open `%s' (%s)\n" msgstr "atalt: extension: kan ikke åbne '%s' (%s)\n" #: ext.c:84 #, c-format 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: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: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: ugyldigt tegn '%c' i funktionsnavn '%s'" #: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "extension: kan ikke omdefinere funktion '%s'" #: ext.c:145 #, c-format msgid "extension: function `%s' already defined" 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:152 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "extension: kan ikke bruge gawk's indbyggede '%s' som funktionsnavn" #: ext.c:156 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: negativt argumentantal for funktion '%s'" #: ext.c:259 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "funktionen '%s' defineret til at tage ikke mere end %d argumenter" #: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "funktion '%s': mangler argument nummer %d" #: ext.c:279 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "" "funktion '%s': argument nummer %d: forsøg på at bruge skalar som et array" #: 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:296 msgid "Operation Not Supported" msgstr "Operationen understøttes ikke" #: field.c:328 msgid "NF set to negative value" msgstr "NF sat til en negativ værdi" #: 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 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: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: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" #: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "ugyldig FIELDWIDTHS værdi, nær '%s" #: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "tom streng som 'FS' er en gawk-udvidelse" #: field.c:1250 msgid "old awk does not support regexps as value of `FS'" msgstr "gamle versioner af awk understøtter ikke regexp'er som værdi for 'FS'" #: field.c:1369 msgid "`FPAT' is a gawk extension" msgstr "'FPAT' er en gawk-udvidelse" #: 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" #: 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" #: 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" #: getopt.c:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: ukendt flag '--%s'\n" #: getopt.c:808 getopt.c:811 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: ukendt flag '%c%s'\n" #: getopt.c:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: ugyldigt flag - '%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: flaget kræver et argument - '%c'\n" #: getopt.c:989 getopt.c:1005 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: flaget '-W %s' er flertydigt\n" #: 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" #: getopt.c:1068 getopt.c:1086 #, c-format msgid "%s: option '-W %s' requires an 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:283 io.c:385 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "kan ikke åbne filen '%s' for læsning (%s)" #: io.c:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "lukning af fd %d ('%s') mislykkedes (%s)" #: io.c:578 msgid "redirection not allowed in sandbox mode" msgstr "omdirigering ikke tilladt i sandkasse-tilstand" #: io.c:612 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "udtrykket i '%s'-omdirigering har kun numerisk værdi" #: 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" #: 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" #: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "unødig blanding af '>' og '>>' for filen '%.*s'" #: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "kan ikke åbne datakanalen '%s' for udskrivning (%s)" #: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "kan ikke åbne datakanalen '%s' for indtastning (%s)" #: io.c:752 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "kan ikke åbne tovejsdatakanalen '%s' for ind-/uddata (%s)" #: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "kan ikke omdirigere fra '%s' (%s)" #: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "kan ikke omdirigere til '%s' (%s)" #: 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:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "lukning af '%s' mislykkedes (%s)." #: io.c:912 msgid "too many pipes or input files open" msgstr "for mange datakanaler eller inddatafiler åbne" #: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close: andet argument skal være 'to' eller 'from'" #: 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" #: io.c:956 msgid "close of redirection that was never opened" msgstr "lukning af omdirigering som aldrig blev åbnet" #: io.c:1053 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: omdirigeringen '%s' blev ikke åbnet med '|&', andet argument ignoreret" #: io.c:1069 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "fejlstatus (%d) fra lukning af datakanalen '%s' (%s)" #: io.c:1072 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "fejlstatus (%d) fra fillukning af '%s' (%s)" #: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "ingen eksplicit lukning af soklen '%s' angivet" #: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "ingen eksplicit lukning af ko-processen '%s' angivet" #: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "ingen eksplicit lukning af datakanalen '%s' angivet" #: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "ingen eksplicit lukning af filen '%s' angivet" #: 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:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "fejl ved skrivning til standard fejl (%s)" #: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "datakanalsrensning af '%s' mislykkedes (%s)." #: io.c:1144 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "ko-procesrensning af datakanalen til '%s' mislykkedes (%s)." #: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "filrensning af '%s' mislykkedes (%s)." #: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "lokal port %s ugyldig i '/inet'" #: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "fjernvært og portinformation (%s, %s) ugyldige" #: io.c:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "ingen (kendt) protokol opgivet i special-filnavn '%s'" #: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "special-filnavn '%s' er ufuldstændigt" #: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "fjernmaskinenavn til '/inet' skal angives" #: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "fjernport til '/inet' skal angives" #: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-kommunikation understøttes ikke" #: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "kunne ikke åbne '%s', tilstand '%s'" #: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "lukning af master-pty mislykkedes (%s)" #: 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 underproces mislykkedes (%s)" #: io.c:1752 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "flytning af slave-pty til standard ud i underproces mislykkedes (dup: %s)" #: io.c:1754 io.c:1922 #, c-format msgid "close of stdin in child failed (%s)" msgstr "lukning af standard ind i underproces mislykkedes (%s)" #: io.c:1757 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "flytning af slave-pty til standard ind i underproces mislykkedes (dup: %s)" #: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" msgstr "lukning af slave-pty mislykkedes (%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 "" "flytning af datakanal til standard ud i underproces mislykkedes (dup: %s)" #: io.c:1865 io.c:1925 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" "flytning af datakanalen til standard ind i underproces mislykkedes (dup: %s)" #: 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:1893 msgid "restoring stdin in parent process failed\n" msgstr "genskabelse af standard ind i forælderprocessen mislykkedes\n" #: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" msgstr "lukning af datakanalen mislykkedes (%s)" #: io.c:1973 msgid "`|&' not supported" msgstr "'|&' understøttes ikke" #: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "kan ikke åbne datakanalen '%s' (%s)" #: io.c:2087 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "kan ikke oprette barneproces for '%s' (fork: %s)" #: io.c:2520 #, c-format msgid "data file `%s' is empty" msgstr "datafilen '%s' er tom" #: io.c:2561 io.c:2569 msgid "could not allocate more input memory" msgstr "kunne ikke allokere mere hukommelse til inddata" #: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "'RS' som flertegnsværdi er en gawk-udvidelse" #: io.c:3232 msgid "IPv6 communication is not supported" msgstr "IPv6-kommunikation understøttes ikke" #: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "'-m[fr]'-flaget er irrelevant i gawk" #: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "brug af flaget -m: '-m[fr] nnn'" #: 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:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: flaget kræver et argument -- %c\n" #: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "miljøvariablen 'POSIXLY_CORRECT' sat: aktiverer '--posix'" #: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "'--posix' tilsidesætter '--traditional'" #: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "'--posix'/'--traditional' tilsidesætter '--non-decimal-data'" #: 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: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 binær tilstand på standard ind (%s)" #: main.c:616 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "kan ikke sætte binær tilstand på standard ud (%s)" #: main.c:618 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "kan ikke sætte binær tilstand på standard fejl (%s)" #: main.c:657 msgid "no program text at all!" msgstr "ingen programtekst overhovedet!" #: main.c:734 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Brug: %s [flag i POSIX- eller GNU-stil] -f progfil [--] fil ...\n" #: main.c:736 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Brug: %s [flag i POSIX- eller GNU-stil] %cprogram%c fil ...\n" #: main.c:741 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "POSIX-flag:\t\tlange GNU-flag: (standard)\n" #: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f progfil\t\t--file=progfil\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=værdi\t\t--assign=var=værdi\n" #: main.c:745 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-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-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'programtekst'\t--source='programtekst'\n" #: main.c:751 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-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\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: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" "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: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: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: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" "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 3 af licensen, eller (hvis du " "vil)\n" "enhver senere version.\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 "" "Dette program distribueres i håb om at det vil være nyttigt,\n" "men UDEN NOGEN SOM HELST GARANTI, også uden underforstået garanti\n" "om SALGBARHED eller EGNETHED FOR NOGET SPECIELT FORMÅL. Se GNU\n" "General Public License for yderligere information.\n" "\n" #: main.c: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å se http://www.gnu.org/licenses/.\n" #: 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: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:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "'%s' er ikke et gyldigt variabelnavn" #: main.c:1200 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" 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: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:1269 msgid "fatal error: internal error" msgstr "fatal fejl: intern fejl" #: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "fatal fejl: intern fejl: segmentfejl" #: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "fatal fejl: intern fejl: stakoverløb" #: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "ingen fd %d åbnet i forvejen" #: main.c:1353 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "kunne ikke i forvejen åbne /dev/null for fd %d" #: msg.c:63 #, c-format msgid "cmd. line:" msgstr "kommandolinje:" #: msg.c:107 msgid "error: " msgstr "fejl: " #: node.c:406 msgid "backslash at end of string" msgstr "omvendt skråstreg i slutningen af strengen" #: node.c:517 #, c-format msgid "old awk does not support the `\\%c' escape sequence" msgstr "gamle versioner af awk understøtter ikke '\\%c' undvigesekvens" #: node.c:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX tillader ikke '\\x'-kontrolsekvenser" #: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "ingen heksadecimale cifre i '\\x'-kontrolsekvenser" #: 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:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "kontrolsekvensen '\\%c' behandlet som kun '%c'" #: 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." #: posix/gawkmisc.c:176 #, c-format 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)" #: posix/gawkmisc.c:188 #, c-format 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:83 #, c-format msgid "could not open `%s' for writing: %s" msgstr "kunne ikke åbne '%s' for skrivning: %s" #: profile.c:85 msgid "sending profile to standard error" msgstr "sender profilen til standard fejl" #: profile.c:203 #, c-format msgid "" "\t# %s block(s)\n" "\n" msgstr "" "\t# %s blokke\n" "\n" #: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" "\t# Regler\n" "\n" #: profile.c:279 #, c-format 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:1331 #, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" msgstr "" "\n" "\t# Funktioner, listede alfabetisk\n" #: profile.c:1370 #, c-format msgid "redir2str: unknown redirection type %d" msgstr "redir2str: uykendt omdirigeringstype %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:131 msgid "Success" msgstr "Lykkedes" #: regcomp.c:134 msgid "No match" msgstr "Mislykkedes" #: regcomp.c:137 msgid "Invalid regular expression" msgstr "Ugyldigt regulært udtryk" #: regcomp.c:140 msgid "Invalid collation character" msgstr "Ugyldigt sorteringstegn" #: regcomp.c:143 msgid "Invalid character class name" msgstr "Ugyldigt tegnklassenavn" #: regcomp.c:146 msgid "Trailing backslash" msgstr "Efterfølgende omvendt skråstreg" #: regcomp.c:149 msgid "Invalid back reference" msgstr "Ugyldig bagudreference" #: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "Ubalanceret [ eller [^" #: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "Ubalanceret ( eller \\(" #: regcomp.c:158 msgid "Unmatched \\{" msgstr "Ubalanceret \\{" #: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Ugyldigt indhold i \\{\\}" #: regcomp.c:164 msgid "Invalid range end" msgstr "Ugyldig intervalslutning" #: regcomp.c:167 msgid "Memory exhausted" msgstr "Hukommelsen opbrugt" #: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Ugyldigt foregående regulært udtryk" #: regcomp.c:173 msgid "Premature end of regular expression" msgstr "For tidligt slut på regulært udtryk" #: regcomp.c:176 msgid "Regular expression too big" msgstr "Regulært udtryk for stort" #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Ubalanceret ) eller \\)" #: regcomp.c:700 msgid "No previous regular expression" msgstr "Intet foregående regulært udtryk" #~ msgid "could not find groups: %s" #~ msgstr "kunne ikke finde grupper: %s" #~ msgid "assignment is not allowed to result of builtin function" #~ msgstr "tildeling er ikke tilladt til resultatet fra en indbygget funktion" #~ msgid "attempt to use array in a scalar context" #~ msgstr "forsøg på at bruge array i skalarsammenhæng" #~ msgid "statement may have no effect" #~ msgstr "kommandoen har måske ikke nogen effekt" #~ msgid "out of memory" #~ msgstr "slut på hukommelsen" #~ msgid "attempt to use scalar `%s' as array" #~ msgstr "forsøg på at bruge skalaren '%s' som array" #~ msgid "attempt to use array `%s' in scalar context" #~ msgstr "forsøg på at bruge array '%s' i skalarsammenhæng" #~ msgid "call of `length' without parentheses is deprecated by POSIX" #~ msgstr "kald af 'length' uden parenteser er forældet ifølge POSIX" #~ msgid "division by zero attempted in `/'" #~ msgstr "forsøgte at dividere med nul i '/'" #~ msgid "length: untyped parameter argument will be forced to scalar" #~ msgstr "length: parameter uden type vil blive brugt som skalar" #~ msgid "length: untyped argument will be forced to scalar" #~ msgstr "length: argument uden type vil blive brugt som skalar" #~ 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 "" #~ "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 "invalid tree type %s in redirect()" #~ msgstr "ugyldig trætype %s i redirect()" #~ msgid "/inet/raw client not ready yet, sorry" #~ msgstr "/inet/raw-klient er desværre ikke klar endnu" #~ msgid "only root may use `/inet/raw'." #~ msgstr "kun root kan bruge '/inet/raw'." #~ msgid "/inet/raw server not ready yet, sorry" #~ msgstr "/inet/raw-server er desværre ikke klar endnu" #~ msgid "file `%s' is a directory" #~ msgstr "filen '%s' er et katalog" #~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'" #~ msgstr "brug 'PROCINFO[\"%s\"]' i stedet for '%s'" #~ msgid "use `PROCINFO[...]' instead of `/dev/user'" #~ msgstr "brug 'PROCINFO[...]' i stedet for '/dev/user'" #~ msgid "\t-m[fr] val\n" #~ msgstr "\t-m[fr] værdi\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 "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 "unexpected type %s in prec_level" #~ msgstr "uventet type %s i prec_level" #~ msgid "Unknown node type %s in pp_var" #~ msgstr "Ukendt nodetype %s i pp_var" gawk-4.0.1+dfsg.orig/po/Makefile.in.in0000644000175000017500000003744211654051011016441 0ustar schotschot# Makefile for PO directory in any package using GNU gettext. # 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 # License but which still want to provide support for the GNU gettext # functionality. # 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.18 GETTEXT_MACRO_VERSION = 0.18 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ localedir = @localedir@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ # We use $(mkdir_p). # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, # @install_sh@ does not start with $(SHELL), so we add it. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake # versions, $(mkinstalldirs) and $(install_sh) are unused. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) MSGFMT_ = @MSGFMT@ MSGFMT_no = @MSGFMT@ MSGFMT_yes = @MSGFMT_015@ MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 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-$@ mv t-$@ $@ all: check-macro-version all-@USE_NLS@ all-yes: stamp-po all-no: # Ensure that the gettext macros and this Makefile.in.in are in sync. check-macro-version: @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ exit 1; \ } # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. # In this case, stamp-po is a nop (i.e. a phony target). # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent # invocations of "make" will do nothing. This timestamp would not be necessary # if updating the $(CATALOGS) would always touch them; however, the rule for # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ echo "touch stamp-po" && \ echo timestamp > stamp-poT && \ mv stamp-poT stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \ package_gnu='GNU '; \ else \ package_gnu=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ else \ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ fi; \ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ *) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --package-name="$${package_gnu}@PACKAGE@" \ --package-version='@VERSION@' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ esac test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(srcdir)/$(DOMAIN).pot @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) $(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 install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(MAKE) update-po @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: stamp-po $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir) || exit 1; \ else \ cp -p $(srcdir)/$$file $(distdir) || exit 1; \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ 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 \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): 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 force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gawk-4.0.1+dfsg.orig/po/quot.sed0000644000175000017500000000023111504446322015445 0ustar schotschots/"\([^"]*\)"/“\1â€/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“â€/""/g gawk-4.0.1+dfsg.orig/po/fi.po0000644000175000017500000020137011734667243014741 0ustar schotschot# 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" gawk-4.0.1+dfsg.orig/po/boldquot.sed0000644000175000017500000000033111504446322016307 0ustar schotschots/"\([^"]*\)"/“\1â€/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“â€/""/g s/“/“/g s/â€/â€/g s/‘/‘/g s/’/’/g gawk-4.0.1+dfsg.orig/po/es.po0000644000175000017500000020714511734667242014757 0ustar schotschot# 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, 2011, 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-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=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: 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" #: 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'" #: array.c:257 #, c-format msgid "attempt to use scalar `%s' as an array" msgstr "se intentó usar el escalar `%s' como una matriz" #: 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 "se intentó usar la matriz `%s' en un contexto escalar" #: array.c:513 #, c-format msgid "reference to uninitialized element `%s[\"%.*s\"]'" msgstr "referencia al elemento sin inicializar `%s[\"%.*s\"]'" #: 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" #: array.c:723 #, c-format msgid "delete: index `%s' not in array `%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:910 #, c-format msgid "%s: empty (null)\n" msgstr "%s: vacío (nulo)\n" #: array.c:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: vacío (cero)\n" #: 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" #: array.c:954 #, c-format msgid "%s: is parameter\n" msgstr "%s: es un parámetro\n" #: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: array_ref a %s\n" #: 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" #: 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" #: 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'" #: 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" #: 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 " "lo es" #: 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 " "lo es" #: 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:828 #, c-format msgid "`next' used in %s action" msgstr "se usó `next' en la acción %s" #: awkgram.y:836 msgid "`nextfile' is a gawk extension" 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:865 msgid "`return' used outside function context" msgstr "se usó `return' fuera del contexto de la función" #: 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:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "`delete array' es una extensión de gawk" #: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(array)' es una extensión de tawk que no es transportable" #: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "las líneas de trabajo de dos vías multiestado no funcionan" #: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "expresión regular del lado derecho de una asignación" #: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "expresión regular a la izquierda del operador `~' o `!~'" #: 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'" #: awkgram.y:1275 msgid "regular expression on right of comparison" msgstr "expresión regular a la derecha de una comparación" #: 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" #: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" msgstr "el awk antiguo no admite matrices multidimensionales" #: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" 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: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:1711 msgid "use of non-array as array" msgstr "uso de una matriz que no es matriz" #: awkgram.y:1975 awkgram.y:1995 msg.c:98 msgid "warning: " msgstr "aviso: " #: awkgram.y:1993 msg.c:130 msgid "fatal: " msgstr "fatal: " #: awkgram.y:2043 msgid "unexpected newline or end of string" msgstr "nueva línea o fin de la cadena inesperados" #: 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: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:2620 #, c-format msgid "source file `%s' is empty" msgstr "el fichero fuente `%s' está vacío" #: awkgram.y:2797 msgid "source file does not end in newline" msgstr "el fichero fuente no termina con línea nueva" #: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" msgstr "expresión regular sin terminar termina con `\\` al final del fichero" #: 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 " "gawk" #: 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" #: awkgram.y:2935 msgid "unterminated regexp" msgstr "expresión regular sin terminar" #: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "expresión regular sin terminar al final del fichero" #: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "el uso de la continuación de línea `\\ #...' no es transportable" #: awkgram.y:3014 msgid "backslash not last character on line" msgstr "la barra invertida no es el último caracter en la línea" #: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX no permite el operador `**='" #: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "el awk antiguo no admite el operador `**='" #: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX no permite el operador `**'" #: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "el awk antiguo no admite el operador `**='" #: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "el operador `^=' no se admite en el awk antiguo" #: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "el operador `^' no se admite en el awk antiguo" #: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "cadena sin terminar" #: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "caracter '%c' inválido en la expresión" #: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' es una extensión de gawk" #: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' es una extensión de Bell Labs" #: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX no permite `%s'" #: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' no se admite en el awk antiguo" #: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "¡`goto' se considera dañino!\n" #: 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: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" #: awkgram.y:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "el tercer argumento de %s no es un objecto modificable" #: 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" #: 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:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "el uso de dcngettext(_\"...\") es incorrecto: quite el subrayado inicial" #: 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" #: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "función `%s': parámetro `%s' oscurece la variable global" #: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "no se puede abrir `%s' para escritura (%s)" #: 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:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s: falló close (%s)" #: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "¡se llamó shadow_funcs() dos veces!" #: awkgram.y:4176 msgid "there were shadowed variables." msgstr "hay variables opacadas." #: 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" #: 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" #: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" msgstr "el nombre de función `%s' se definió previamente" #: 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ó" #: awkgram.y:4403 #, c-format msgid "function `%s' defined but never called directly" msgstr "se definió la función `%s' pero nunca se llamó directamente" #: 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" #: 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" #: awkgram.y:4791 eval.c:2056 msgid "division by zero attempted" msgstr "se intentó una división por cero" #: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "se intentó una división por cero en `%%'" #: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "falló %s a \"%s\" (%s)" #: builtin.c:121 msgid "standard output" msgstr "salida estándar" #: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "exp: se recibió un argumento que no es númerico" #: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: el argumento %g está fuera de rango" #: 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 " "escritura" #: 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 " "escritura" #: 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" #: builtin.c:333 msgid "index: received non-string first argument" msgstr "index: el primer argumento recibido no es una cadena" #: builtin.c:335 msgid "index: received non-string second argument" msgstr "index: el segundo argumento recibido no es una cadena" #: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int: se recibió un argumento que no es númerico" #: builtin.c:493 msgid "length: received array argument" msgstr "length: se recibió un argumento de matriz" #: builtin.c:496 msgid "`length(array)' is a gawk extension" msgstr "`length(array)' es una extensión de gawk" #: builtin.c:504 msgid "length: received non-string argument" msgstr "length: se recibió un argumento que no es una cadena" #: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log: se recibió un argumento que no es númerico" #: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log: se recibió el argumento negativo %g" #: 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:762 #, c-format msgid "field width is ignored for `%%' specifier" msgstr "se descarta la anchura del campo para el especificador `%%'" #: builtin.c:764 #, c-format msgid "precision is ignored for `%%' specifier" msgstr "se descarta la precisión para el especificador `%%'" #: builtin.c:766 #, c-format msgid "field width and precision are ignored for `%%' specifier" msgstr "" "se descartan la anchura del campo y la precisión para el especificador `%%'" #: builtin.c:817 msgid "fatal: `$' is not permitted in awk formats" msgstr "fatal: no se permite `$' en los formatos de awk" #: builtin.c:826 msgid "fatal: arg count with `$' must be > 0" msgstr "fatal: la cuenta de argumentos con `$' debe ser > 0" #: builtin.c:830 #, c-format msgid "fatal: arg count %ld greater than total number of supplied arguments" msgstr "" "fatal: la cuenta de argumentos %ld es mayor que el número total de " "argumentos proporcionados" #: 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:850 msgid "fatal: no `$' supplied for positional field width or precision" msgstr "" "fatal: no se proporciona `$' para la anchura o la precisión del campo " "posicional" #: 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: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:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' no tiene significado en los formatos de awk; se descarta" #: 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:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' no tiene significado en los formatos de awk; se descarta" #: 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: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'" #: 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" #: 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:1339 msgid "^ ran out for this one" msgstr "se acabó ^ para éste" #: builtin.c:1346 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: el especificador de formato no tiene letras de control" #: builtin.c:1349 msgid "too many arguments supplied for format string" msgstr "se proporcionaron demasiados argumentos para la cadena de formato" #: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: sin argumentos" #: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt: se recibió un argumento que no es un númerico" #: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: se llamó con el argumento negativo %g" #: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: la longitud %g no es >= 1" #: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: la longitud %g no es >= 0" #: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: se truncará la longitud no entera %g" #: 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 " "trunca a %g" #: 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: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" #: 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 " "argumento (%lu)" #: 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:1696 msgid "strftime: received empty format string" msgstr "strftime: se recibió una cadena de formato vacía" #: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime: se recibió un argumento que no es una cadena" #: 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" #: 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" #: 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:2028 msgid "tolower: received non-string argument" msgstr "tolower: se recibió un argumento que no es una cadena" #: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper: se recibió un argumento que no es una cadena" #: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2: el primer argumento recibido no es númerico" #: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2: el segundo argumento recibido no es númerico" #: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin: se recibió un argumento que no es númerico" #: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos: se recibió un argumento que no es númerico" #: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand: se recibió un argumento que no es númerico" #: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match: el tercer argumento no es una matriz" #: 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:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift: el primer argumento recibido no es númerico" #: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift: el segundo argumento recibido no es númerico" #: 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" #: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): los valores fraccionarios se truncarán" #: 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" #: builtin.c:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift: el primer argumento recibido no es númerico" #: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift: el segundo argumento recibido no es númerico" #: 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" #: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): los valores fraccionarios serán truncados" #: 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" #: builtin.c:2850 msgid "and: received non-numeric first argument" msgstr "and: el primer argumento recibido no es númerico" #: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and: el segundo argumento recibido no es númerico" #: 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" #: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): los valores fraccionarios serán truncados" #: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "or: el primer argumento recibido no es númerico" #: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or: el segundo argumento recibido no es númerico" #: 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" #: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): los valores fraccionarios serán truncados" #: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "xor: el primer argumento recibido no es númerico" #: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor: el segundo argumento recibido no es númerico" #: 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" #: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): los valores fraccionarios se truncarán" #: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl: se recibió un argumento que no es númerico" #: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): el valor negativo dará resultados extraños" #: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): el valor fraccionario se truncará" #: 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" #: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "tipo de nodo %d desconocido" #: 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:698 #, c-format 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:812 #, c-format msgid "BINMODE value `%s' is invalid, treated as 3" msgstr "el valor BINMODE `%s' es inválido; se trata como 3" #: eval.c:902 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "especificación `%sFMT' `%s' errónea" #: 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: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" #: 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: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:1179 msgid "attempt to field reference from null string" msgstr "se intentó una referencia de campo desde una cadena nula" #: eval.c:1185 #, c-format msgid "attempt to access field %ld" msgstr "se intentó acceder al campo %ld" #: eval.c:1194 #, c-format msgid "reference to uninitialized field `$%ld'" msgstr "referencia al campo sin inicializar `$%ld'" #: eval.c:1256 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "se llamó a la función `%s' con más argumentos de los declarados" #: eval.c: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 `/='" #: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "se intentó una división por cero en `%%='" #: eval.c:1876 eval.c:2122 #, c-format 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: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:2343 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "bucle for: la matriz `%s' cambió de tamaño de %ld a %ld durante la ejecución " "del bucle" #: eval.c:2458 #, c-format msgid "function called indirectly through `%s' does not exist" msgstr "no existe la función llamada indirectamente a través de `%s'" #: eval.c:2470 #, c-format msgid "function `%s' not defined" msgstr "la función `%s' no está definida" #: eval.c:2511 #, c-format msgid "non-redirected `getline' invalid inside `%s' rule" msgstr "`getline' no redirigido es inválido dentro de la regla `%s'" #: eval.c:2600 #, c-format msgid "error reading input file `%s': %s" msgstr "error al leer el fichero de entrada `%s': %s" #: 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:2661 msgid "`exit' cannot be called in the current context" msgstr "`exit' no se puede llamar en el contexto actual" #: eval.c:2700 #, c-format msgid "`next' cannot be called from a `%s' rule" msgstr "`next' no se puede llamar desde una regla `%s'" #: eval.c:2766 #, c-format msgid "Sorry, don't know how to interpret `%s'" msgstr "Perdón, no se cómo interpretar `%s'" #: ext.c:54 msgid "extensions are not allowed in sandbox mode" msgstr "no se permiten las extensiones en modo sandbox" #: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" 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:84 #, c-format 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:93 #, c-format msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" msgstr "" "fatal: extension: la biblioteca `%s': no puede llamar a la función `" "%s' (%s)\n" #: ext.c:127 msgid "extension: missing function name" msgstr "extension: falta el nombre de la función" #: 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'" #: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "extension: no se puede redefinir la función `%s'" #: ext.c:145 #, c-format msgid "extension: function `%s' already defined" 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: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" #: ext.c:156 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: cuenta de argumento negativa para la función `%s'" #: 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)" #: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "función `%s': falta el argumento #%d" #: 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" #: 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" #: ext.c:296 msgid "Operation Not Supported" msgstr "No Se Admite La Operación" #: field.c:328 msgid "NF set to negative value" msgstr "se definió NF con un valor negativo" #: 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: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" #: field.c:1050 msgid "patsplit: fourth argument is not an array" msgstr "patsplit: el cuarto argumento no es una matriz" #: 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" #: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "valor de FIELDWIDTHS inválido, cerca de `%s'" #: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "la cadena nula para `FS' es una extensión de gawk" #: 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'" #: 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: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" #: 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" #: 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" #: getopt.c:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: no se reconoce la opción '--%s'\n" #: 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" #: getopt.c:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: opción inválida -- '%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: la opción requiere un argumento -- '%c'\n" #: 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" #: 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" #: 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" #: 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: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:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "falló al cerrar el df %d (`%s') (%s)" #: io.c:578 msgid "redirection not allowed in sandbox mode" msgstr "no se permite la redirección en modo sandbox" #: 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 valor numérico" #: 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" #: 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" #: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "mezcla innecesaria de `>' y `>>' para el fichero `%.*s'" #: 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)" #: 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)" #: 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)" #: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "no se puede redirigir desde `%s' (%s)" #: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "no se puede redirigir a `%s' (%s)" #: 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 " "multiplexar los descriptores de fichero" #: io.c:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "falló al cerrar `%s' (%s)." #: io.c:912 msgid "too many pipes or input files open" msgstr "demasiadas tuberías o ficheros de entrada abiertos" #: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close: el segundo argumento debe ser `to' o `from'" #: 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" #: io.c:956 msgid "close of redirection that was never opened" msgstr "se cerró una redirección que nunca se abrió" #: io.c:1053 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: la redirección `%s' no se abrió con `|&', se descarta el segundo " "argumento" #: 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)" #: 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:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "no se provee el cerrado explícito del `socket' `%s'" #: 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'" #: 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'" #: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "no se provee el cerrado explícito del fichero `%s'" #: 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)" #: 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)" #: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "falló la limpieza de la tubería de `%s' (%s)." #: 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)." #: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "falló la limpieza del fichero de `%s' (%s)." #: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "puerto local %s inválido en `/inet'" #: 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: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 " "especial `%s'" #: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "el nombre de fichero especial `%s' está incompleto" #: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "se debe proporcionar a `/inet' un nombre de anfitrión remoto" #: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "se debe proporcionar a `/inet' un puerto remoto" #: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "no se admiten las comunicaciones TCP/IP" #: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "no se puede abrir `%s', modo `%s'" #: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "falló al cerrar el pty maestro (%s)" #: 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)" #: 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)" #: 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)" #: 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)" #: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" msgstr "falló al cerrar el pty esclavo (%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 "falló el movimiento a la salida estándar en el hijo (dup: %s)" #: 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)" #: 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" #: 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" #: 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)" #: io.c:1973 msgid "`|&' not supported" msgstr "no se admite `|&'" #: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "no se puede abrir la tubería `%s' (%s)" #: 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:2520 #, c-format msgid "data file `%s' is empty" msgstr "el fichero de datos `%s' está vacío" #: 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:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "el valor multicaracter de `RS' es una extensión de gawk" #: io.c:3232 msgid "IPv6 communication is not supported" msgstr "no se admite la comunicación IPv6" #: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "la opción -m[fr] es irrelevante en gawk" #: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "uso de la opción -m: `-m[fr]' nnn" #: 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 descarta\n" #: main.c:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: la opción requiere un argumento -- %c\n" #: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "la variable de ambiente `POSIXLY_CORRECT' está definida: se activa `--posix'" #: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "`--posix' se impone a `--traditional'" #: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' se imponen a `--non-decimal-data'" #: 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: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)" #: 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)" #: 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)" #: main.c:657 msgid "no program text at all!" msgstr "¡No hay ningún programa de texto!" #: 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: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:741 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "Opciones POSIX:\t\tOpciones largas GNU: (estándar)\n" #: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f fichprog\t\t--file=fichprog\n" #: 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: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:745 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-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-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'texto-prog'\t--source='texto-prog'\n" #: main.c:751 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E fichero\t\t--exec=fichero\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\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: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" "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 " "impresa.\n" "Reporte los errores de los mensajes en español a .\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 es un lenguaje de reconocimiento y procesamiento de patrones.\n" "Por defecto lee la entrada estándar y escribe en la salida estándar.\n" "\n" #: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" "Ejemplos:\n" "\tgawk '{ sum += $1 }; END { print sum }' fichero\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 (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 " "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" "\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 "" "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" "\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 "" "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: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: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" "\n" msgstr "" "%s: el argumento `%s' para `-v' no es de la forma `var=valor'\n" "\n" #: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' no es un nombre de variable legal" #: 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: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" #: main.c:1269 msgid "fatal error: internal error" msgstr "error fatal: error interno" #: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "error fatal: error interno: falla de segmentación" #: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "error fatal: error interno: desbordamiento de pila" #: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "no existe el df %d abierto previamente" #: 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" #: msg.c:63 #, c-format msgid "cmd. line:" msgstr "línea ord.:" #: msg.c:107 msgid "error: " msgstr "error: " #: node.c:406 msgid "backslash at end of string" msgstr "barra invertida al final de la cadena" #: 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:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX no permite escapes `\\x'" #: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "no hay dígitos hexadecimales en la secuencia de escape `\\x'" #: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " "expect" msgstr "" "el escape hexadecimal \\x%.*s de %d caracteres tal vez no se interprete de " "la forma esperada" #: 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'" #: 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." #: posix/gawkmisc.c:176 #, c-format 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)" #: posix/gawkmisc.c:188 #, c-format 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:83 #, c-format msgid "could not open `%s' for writing: %s" msgstr "no se puede abrir `%s' para escritura: %s" #: profile.c:85 msgid "sending profile to standard error" msgstr "se envía el perfil a la salida estándar de error" #: profile.c:203 #, c-format msgid "" "\t# %s block(s)\n" "\n" msgstr "" "\t# bloque(s) %s\n" "\n" #: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" "\t# Regla(s)\n" "\n" #: profile.c:279 #, c-format msgid "internal error: %s with null vname" msgstr "error interno: %s con vname nulo" #: 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" #: profile.c:1370 #, c-format msgid "redir2str: unknown redirection type %d" msgstr "redir2str: tipo de redirección %d desconocida" #: re.c:573 #, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "el rango de la forma `[%c-%c]' depende del local" #: re.c:600 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "" "el componente de expresión regular `%.*s' probablemente debe ser `[%.*s]'" #: regcomp.c:131 msgid "Success" msgstr "Éxito" #: regcomp.c:134 msgid "No match" msgstr "No hay coincidencia" #: regcomp.c:137 msgid "Invalid regular expression" msgstr "Expresión regular inválida" #: regcomp.c:140 msgid "Invalid collation character" msgstr "Caracter de ordenación inválido" #: regcomp.c:143 msgid "Invalid character class name" msgstr "Nombre de clase de caracter inválido" #: regcomp.c:146 msgid "Trailing backslash" msgstr "Barra invertida extra al final" #: regcomp.c:149 msgid "Invalid back reference" msgstr "Referencia hacia atrás inválida" #: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "[ o [^ desemparejados" #: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "( o \\( desemparejados" #: regcomp.c:158 msgid "Unmatched \\{" msgstr "\\{ desemparejado" #: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Contenido inválido de \\{\\}" #: regcomp.c:164 msgid "Invalid range end" msgstr "Final de rango inválido" #: regcomp.c:167 msgid "Memory exhausted" msgstr "Memoria agotada" #: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Expresión regular precedente inválida" #: regcomp.c:173 msgid "Premature end of regular expression" msgstr "Fin prematuro de la expresión regular" #: regcomp.c:176 msgid "Regular expression too big" msgstr "La expresión regular es demasiado grande" #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") o \\) desemparejados" #: regcomp.c:700 msgid "No previous regular expression" 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)" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: opción ilegal -- %c\n" #~ msgid "function %s called\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" #~ 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 " #~ "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 "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" #~ msgid "or used in other expression context" #~ 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" #~ msgid "BEGIN blocks must have an action part" #~ 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" #~ msgid "non-redirected `getline' undefined inside BEGIN or END action" #~ msgstr "" #~ "`getline' no redirigido indefinido dentro de la acción de BEGIN o END" # tokentab? cfuga #~ msgid "fptr %x not in 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" #~ msgid "Unbalanced [" #~ msgstr "[ desbalanceado" #~ msgid "Unfinished \\ escape" #~ msgstr "Escape \\ sin terminar" #~ msgid "unfinished repeat count" #~ msgstr "cuenta de repetición sin terminar" #~ msgid "malformed repeat count" #~ 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" #~ msgid "Unbalanced )" #~ msgstr ") desbalanceado" #~ msgid "internal error: file `%s', line %d\n" #~ msgstr "error interno: fichero `%s', línea %d\n" #~ msgid "" #~ "\n" #~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" #~ msgstr "" #~ "\n" #~ "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)" #~ 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)" gawk-4.0.1+dfsg.orig/po/ja.gmo0000644000175000017500000015415111734667243015105 0ustar schotschotÞ•·Ô KŒ¸$¹$ Ê$×$ô$%%>%[%s%…%”%¯%À%Ñ%í%&&#2&+V&‚&¡& ²&À&Ú&÷& ''='%X'y~'+ø'7$(<\("™(-¼(ê(:)3<)p)…)›)­)¿)Û),í),*'G*-o* *(¾*)ç*&+(8+:a+%œ+Â+â+-,'0,X,v,+“,(¿,]è-#F.j..ž.º.[Ò.$./S/e/€/‘/ª/³/Ò/ê/!0"&0#I0-m0#›0¿0/Ú0' 121':1ëb1N2a2s2…2 —2A¤2Aæ2…(38®35ç34443R4†4"Ÿ4!Â45ä4 5;5#Z58~5"·5Ú5!ø56 56*V6/6(±6"Ú60ý6.7&N7"u7˜7*´7*ß7# 8(.8W8,p88¼8&Ù899!092R98…9(¾9)ç98:8J:"ƒ:#¦:9Ê:9;#>;$b;&‡;*®;+Ù;<1!<+S<&<-¦<5Ô<( =&3=.Z=0‰=º=$Õ=ú=>49><n>#«>$Ï>,ô>2!?T?t?’?$®?#Ó?$÷?1@/N@&~@¥@)À@-ê@A!3AUAuA*AºA#ÙA$ýA5"BEXB*žB-ÉB ÷B-C20C.cC4’C$ÇC"ìC$D$4D#YD}D&œDÃD.ÛD$ E/E"JE#mE"‘E+´E(àE/ F'9FaF"F@¢F!ãF!G"'GJG+RG ~G"ŸG5ÂG5øG'.H8VH(H0¸H7éH !I*BI.mI.œIËI%çI+ J9J*AJ/lJ0œJ0ÍJ0þJD/K%tK(šK?ÃKPL/TL>„L4ÃL4øL?-M?mM8­M)æMNF0NwNGNØN&àN6OW>O/–O9ÆOP=P>XP8—PFÐP#Q<;Q5xQ6®Q%åQt R(€RN©RGøR)@S*jS,•S"ÂS"åS$T-TMTjT$ŠT ¯T"ÐT"óT5U;LUAˆU+ÊU,öU7#V)[V%…V>«V$êV.W/>W3nW4¢W0×W'X(0X$YX5~X-´X'âX' Y)2Y%\Y‚Y–Y1®Y4àY(Z0>Z8oZ&¨Z'ÏZ1÷Z2)[<\[$™[(¾[)ç[1\7C\'{\(£\<Ì\< ]>F])…])¯])Ù]^@#^'d^Œ^K¡^í^&ü^'#_(K_/t_&¤_'Ë_(ó_3`9P`9Š`6Ä`2û`).a)Xa1‚a)´a*Þa5 b;?bA{b+½b,éb0c!Gc'ic‘c"®c,Ñcþc#d$î†$-‡7R‡!Ї;¬‡7è‡0 ˆEQˆB—ˆ%Úˆ:‰8;‰Gt‰ ¼‰<݉6Š QŠ+rŠ?žŠ9ÞŠK‹5d‹5š‹[Ћ[,Œ1ˆŒ1ºŒ\ìŒ\I2¦2Ù< Ž7IŽ7Ž5¹Ž<ïŽJ,9wH±Pú6K<‚D¿E‘HJ‘H“‘$Ü‘I’:K’N†’2Õ’2“D;“>€“8¿“1ø“.*”DY”Až”Aà”E"•@h•;©•)å•6–GF–.Ž–6½–:ô–)/—BY—:œ—>×—G˜b^˜vÁ˜(8™Ka™­™^Ä™Y#š6}šH´š1ýš//›<_›4œ›3Ñ›)œ6/œ*fœ4‘œHÆœ-8=6v5­BãG&žKnž8ºž6óž3*Ÿl^ŸOËŸ, )H  r I~ !È )ê 5¡PJ¡2›¡[Ρ8*¢;c¢WŸ¢&÷¢K£\j£YÇ£#!¤FE¤FŒ¤ Ó¤AߤS!¥Gu¥G½¥G¦XM¦Q¦¦Bø¦e;§k¡§… ¨a“¨Mõ¨^C©‚¢©%ªG¥ª8íª;&«rb«Õ«gë« S¬0]¬Zެ™é¬Zƒ­NÞ­*-®OX®O¨®Cø®U<¯*’¯J½¯F°JO°0š°³Ë°C±qñb5²@˜²@Ù²-³5H³0~³-¯³-ݳ ´,'´;T´6´-Ç´5õ´<+µNhµQ·µ8 ¶8B¶5{¶(±¶1Ú¶J ·2W·OŠ·OÚ·W*¸W‚¸KÚ¸H&¹Jo¹Mº¹iº?rº9²º6ìº9#»D]»*¢»+Í»[ù»^U¼>´¼8ó¼T,½8½9º½Jô½N?¾Q޾Fà¾7'¿8_¿8˜¿JÑ¿4À4QÀ[†À[âÀ[>Á4šÁ4ÏÁ@Â8EÂ_~Â8Þ Ãx8à ±Ã3¾ÃWòÃ9JÄA„ÄCÆÄD Å9OÅK‰ÅSÕÅR)ÆD|ÆIÁÆ< Ç?HÇIˆÇ:ÒÇ: È<HÈN…ÈQÔÈ8&É8_Ém˜É9Ê6@Ê1wÊ/©Ê9ÙÊ'Ë6;Ë6rËX©ËXÌX[Ì(´Ì1ÝÌOÍ1_ÍC‘Í6ÕÍ1 Î >ÎKÎ@jÎ7«Î:ãÎ=Ï-\ÏpŠÏ3ûÏ3/ÐNcÐ?²ÐZòÐ,MÑIzÑKÄÑ;ÒILÒ*–Ò3ÁÒ?õÒN5Ó3„Ó;¸Ó3ôÓ(Ô"HÔ8kÔO¤Ô*ôÔ?ÕY_Õ'¹Õ,áÕ9ÖsHÖt¼Ö<1×n×9w×K±×5ý×53Ø=îÍ0r3 ¯;™S!È%›‡®G ^ \èan–G#‘JD€[Çä,ð8¶íOås–ûÉ”›/ZÊ•]óys„fÒ Ú¢ý<«½()Ÿ2Ðk¢˨>R _…‚4NP:Žõ´ž8t7‚T$ϯÆMšk·I*ÁB[”bvø­ƒ!<´-wöŠL·=&Wnëch’Cd6"° £¾&VœM‰%Õ£±²€U\/Ñjzqì^``oAï7žmÃ?0÷¥‹ªheâoÔgy:d˜D¬*§“f,V³6CÎÛW'|¿+aÂzþ¬J?¨¶F†+Ä»gpŒHã•FqúRœ3¤µl˜é×i ç Nbáò@­>©.Kˆ}“$Q{ Eôù®9rvµ¡„ÿL«ê²Q1‰5ß]Žu;u@P¡Å4|ŸmA¦‹XY'Ó}Ý-Š‘#U¸±ˆ~¼tƒ¦†_©jle ŒS~‡Ù ™p ذàwBx —x.¤¹§)’ü9ñETZ1(c—5šæªÀÜiÞ¥"ÌOXºÖ{H2Y ³K…I # %s block(s) # Rule(s) # gawk profile, created %s -C --copyright -E file --exec=file -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R file --command=file -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[file] --dump-variables[=file] -e 'program-text' --source='program-text' -f progfile --file=progfile -g --gen-pot -h --help -n --non-decimal-data -p[file] --profile[=file] -r --re-interval -t --lint-old -v var=val --assign=var=val # Function Call Stack: # Functions, listed alphabetically To report bugs, see node `Bugs' in `gawk.info', which is section `Reporting Problems and Bugs' in the printed version. %d is invalid as number of arguments for %s%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)%s blocks must have an action part%s third parameter is not a changeable object%s to "%s" failed (%s)%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk%s: `%s' argument to `-v' not in `var=value' form %s: array_ref to %s %s: close failed (%s)%s: empty (null) %s: empty (zero) %s: invalid option -- '%c' %s: is parameter %s: option '%c%s' doesn't allow an argument %s: option '--%s' doesn't allow an argument %s: option '--%s' requires an argument %s: option '-W %s' doesn't allow an argument %s: option '-W %s' is ambiguous %s: option '-W %s' requires an argument %s: option `-W %s' unrecognized, ignored %s: option requires an argument -- %c %s: option requires an argument -- '%c' %s: string literal as last arg of substitute has no effect%s: table_size = %d, array_size = %d %s: unrecognized option '%c%s' %s: unrecognized option '--%s' 'system' function not allowed in sandbox mode-Ft does not set FS to tab in POSIX awk-m option usage: `-m[fr] nnn'@include is a gawk extensionBINMODE value `%s' is invalid, treated as 3Copyright (C) 1989, 1991-%d Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Examples: gawk '{ sum += $1 }; END { print sum }' file gawk -F: '{ print $1 }' /etc/passwd IPv6 communication is not supportedInvalid back referenceInvalid character class nameInvalid collation characterInvalid content of \{\}Invalid multibyte data detected. There may be a mismatch between your data and your locale.Invalid preceding regular expressionInvalid range endInvalid regular expressionMemory exhaustedNF set to negative valueNo matchNo previous regular expressionOperation Not SupportedPOSIX does not allow `%s'POSIX does not allow `\x' escapesPOSIX does not allow operator `**'POSIX does not allow operator `**='POSIX options: GNU long options: (standard) Premature end of regular expressionRegular expression too bigShort options: GNU long options: (extensions) Sorry, don't know how to interpret `%s'SuccessTCP/IP communications are not supportedThis 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. Trailing backslashUnmatched ( or \(Unmatched ) or \)Unmatched [ or [^Unmatched \{Usage: %s [POSIX or GNU style options] -f progfile [--] file ... Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ... You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. [s]printf: format specifier does not have control letter[s]printf: value %g is out of range for `%%%c' format^ ran out for this one`%s' is a Bell Labs extension`%s' is a built-in function, it cannot be redefined`%s' is a gawk extension`%s' is invalid as a function name`%s' is not a legal variable name`%s' is not a variable name, looking for file `%s=%s'`%s' is not supported in old awk`--posix' overrides `--binary'`--posix' overrides `--traditional'`--posix'/`--traditional' overrides `--non-decimal-data'`-m[fr]' option irrelevant in gawk`BINMODE' is a gawk extension`FIELDWIDTHS' is a gawk extension`FPAT' is a gawk extension`IGNORECASE' is a gawk extension`L' is meaningless in awk formats; ignored`break' is not allowed outside a loop or switch`continue' is not allowed outside a loop`delete array' is a gawk extension`delete(array)' is a non-portable tawk extension`extension' is a gawk extension`getline var' invalid inside `%s' rule`getline' invalid inside `%s' rule`goto' considered harmful! `h' is meaningless in awk formats; ignored`l' is meaningless in awk formats; ignored`length(array)' is a gawk extension`next' cannot be called from a `%s' rule`next' used in %s action`nextfile' cannot be called from a `%s' rule`nextfile' is a gawk extension`nextfile' used in %s action`return' used outside function context`|&' not supportedadump: argument not an arrayalready included source file `%s'and(%lf, %lf): fractional values will be truncatedand(%lf, %lf): negative values will give strange resultsand: received non-numeric first argumentand: received non-numeric second argumentasort: cannot use a subarray of first arg for second argasort: cannot use a subarray of second arg for first argasort: first argument not an arrayasort: second argument not an arrayasorti: cannot use a subarray of first arg for second argasorti: cannot use a subarray of second arg for first argasorti: first argument not an arrayasorti: second argument not an arrayassignment used in conditional contextatan2: received non-numeric first argumentatan2: received non-numeric second argumentattempt to access field %ldattempt to field reference from non-numeric valueattempt to field reference from null stringattempt to use a scalar value as arrayattempt to use array `%s' in a scalar contextattempt to use array `%s["%.*s"]' in a scalar contextattempt to use function `%s' as an arrayattempt to use scalar `%s' as an arrayattempt to use scalar `%s["%.*s"]' as an arrayattempt to use scalar parameter `%s' as an arraybackslash at end of stringbackslash not last character on linebad `%sFMT' specification `%s'buffer overflow in genflags2strcall of `length' without parentheses is not portablecan not use special variable `%s' for indirect function callcan't open pipe `%s' for input (%s)can't open pipe `%s' for output (%s)can't open source file `%s' for reading (%s)can't open two way pipe `%s' for input/output (%s)can't read sourcefile `%s' (%s)can't redirect from `%s' (%s)can't redirect to `%s' (%s)can't set binary mode on stderr (%s)can't set binary mode on stdin (%s)can't set binary mode on stdout (%s)can't use function name `%s' as variable or arraycannot create child process for `%s' (fork: %s)cannot open file `%s' for reading (%s)cannot open pipe `%s' (%s)cannot use function `%s' as variable namecannot use gawk builtin `%s' as variable nameclose of `%s' failed (%s).close of fd %d (`%s') failed (%s)close of master pty failed (%s)close of pipe failed (%s)close of redirection that was never openedclose of slave pty failed (%s)close of stdin in child failed (%s)close of stdout in child failed (%s)close: `%.*s' is not an open file, pipe or co-processclose: redirection `%s' not opened with `|&', second argument ignoredclose: second argument is a gawk extensionclose: second argument must be `to' or `from'cmd. line:co-process flush of pipe to `%s' failed (%s).command line argument `%s' is a directory: skippedcompl(%lf): fractional value will be truncatedcompl(%lf): negative value will give strange resultscompl: received non-numeric argumentcos: received non-numeric argumentcould not allocate more input memorycould not open `%s' for writing (%s)could not open `%s' for writing: %scould not open `%s', mode `%s'could not pre-open /dev/null for fd %ddata file `%s' is emptydcgettext: `%s' is not a valid locale categorydelete: index `%s' not in array `%s'division by zero attempteddivision by zero attempted in `%%'division by zero attempted in `%%='division by zero attempted in `/='duplicate `default' detected in switch bodyduplicate case values in switch body: %seach rule must have a pattern or an action partempty argument to `-e/--source' ignoredempty filename after @includeempty program text on command lineenvironment variable `POSIXLY_CORRECT' set: turning on `--posix'error reading input file `%s': %serror writing standard error (%s)error writing standard output (%s)error: escape sequence `\%c' treated as plain `%c'exp: argument %g is out of rangeexp: received non-numeric argumentexpression for `%s' redirection has null string valueexpression in `%s' redirection only has numeric valueextension: can't redefine function `%s'extension: can't use gawk built-in `%s' as function nameextension: function `%s' already definedextension: function name `%s' previously definedextension: illegal character `%c' in function name `%s'extension: missing function nameextensions are not allowed in sandbox modefailure status (%d) on file close of `%s' (%s)failure status (%d) on pipe close of `%s' (%s)fatal error: internal errorfatal error: internal error: segfaultfatal error: internal error: stack overflowfatal: fatal: `$' is not permitted in awk formatsfatal: `$' not permitted after period in formatfatal: `L' is not permitted in POSIX awk formatsfatal: `h' is not permitted in POSIX awk formatsfatal: `l' is not permitted in POSIX awk formatsfatal: arg count %ld greater than total number of supplied argumentsfatal: arg count with `$' must be > 0fatal: extension: cannot open `%s' (%s) fatal: extension: library `%s': cannot call function `%s' (%s) fatal: extension: library `%s': does not define `plugin_is_GPL_compatible' (%s) fatal: must use `count$' on all formats or nonefatal: no `$' supplied for positional field width or precisionfatal: not enough arguments to satisfy format stringfflush: `%s' is not an open file, pipe or co-processfflush: cannot flush: file `%s' opened for reading, not writingfflush: cannot flush: pipe `%s' opened for reading, not writingfield width and precision are ignored for `%%' specifierfield width is ignored for `%%' specifierfile flush of `%s' failed (%s).filename `%s' for `%s' redirection may be result of logical expressionfloating point exceptionfor loop: array `%s' changed size from %ld to %ld during loop executionfrom %sfunction `%s' called but never definedfunction `%s' called with more arguments than declaredfunction `%s' called with space between name and `(', or used as a variable or an arrayfunction `%s' defined but never called directlyfunction `%s' defined to take no more than %d argument(s)function `%s' not definedfunction `%s': argument #%d: attempt to use array as a scalarfunction `%s': argument #%d: attempt to use scalar as an arrayfunction `%s': can't use function name as parameter namefunction `%s': can't use special variable `%s' as a function parameterfunction `%s': missing argument #%dfunction `%s': parameter #%d, `%s', duplicates parameter #%dfunction `%s': parameter `%s' shadows global variablefunction called indirectly through `%s' does not existfunction name `%s' previously definedgawk is a pattern scanning and processing language. By default it reads standard input and writes standard output. gensub: third argument of 0 treated as 1hex escape \x%.*s of %d characters probably not interpreted the way you expectignoring unknown format specifier character `%c': no argument convertedindex: received non-string first argumentindex: received non-string second argumentindirect function calls are a gawk extensionint: received non-numeric argumentinternal error: %s with null vnameinvalid FIELDWIDTHS value, near `%s'invalid char '%c' in expressioninvalid subscript expressionlength: received array argumentlength: received non-string argumentlocal port %s invalid in `/inet'log: received negative argument %glog: received non-numeric argumentlshift(%lf, %lf): fractional values will be truncatedlshift(%lf, %lf): negative values will give strange resultslshift(%lf, %lf): too large shift value will give strange resultslshift: received non-numeric first argumentlshift: received non-numeric second argumentmake_builtin: negative argument count for function `%s'match: third argument is a gawk extensionmatch: third argument is not an arraymktime: at least one of the values is out of the default rangemktime: received non-string argumentmoving pipe to stdin in child failed (dup: %s)moving pipe to stdout in child failed (dup: %s)moving slave pty to stdin in child failed (dup: %s)moving slave pty to stdout in child failed (dup: %s)multicharacter value of `RS' is a gawk extensionmultistage two-way pipelines don't workmust supply a remote hostname to `/inet'must supply a remote port to `/inet'no (known) protocol supplied in special filename `%s'no explicit close of co-process `%s' providedno explicit close of file `%s' providedno explicit close of pipe `%s' providedno explicit close of socket `%s' providedno hex digits in `\x' escape sequenceno pre-opened fd %dno program text at all!non-redirected `getline' invalid inside `%s' rulenon-redirected `getline' undefined inside END actionnull string for `FS' is a gawk extensionold awk does not support multidimensional arraysold awk does not support multiple `BEGIN' or `END' rulesold awk does not support operator `**'old awk does not support operator `**='old awk does not support regexps as value of `FS'old awk does not support the `\%c' escape sequenceold awk does not support the keyword `in' except after `for'opcode %s not an operator or keywordoperator `^' is not supported in old awkoperator `^=' is not supported in old awkor(%lf, %lf): fractional values will be truncatedor(%lf, %lf): negative values will give strange resultsor: received non-numeric first argumentor: received non-numeric second argumentpatsplit: cannot use a subarray of fourth arg for second argpatsplit: cannot use a subarray of second arg for fourth argpatsplit: cannot use the same array for second and fourth argspatsplit: fourth argument is not an arraypatsplit: second argument is not an arraypatsplit: third argument must be non-nullpipe flush of `%s' failed (%s).plain `print' in BEGIN or END rule should probably be `print ""'precision is ignored for `%%' specifierprintf: no argumentsreached system limit for open files: starting to multiplex file descriptorsreason unknownredir2str: unknown redirection type %dredirection not allowed in sandbox modereference to uninitialized argument `%s'reference to uninitialized element `%s["%.*s"]'reference to uninitialized field `$%d'reference to uninitialized field `$%ld'reference to uninitialized variable `%s'regexp component `%.*s' should probably be `[%.*s]'regexp constant `/%s/' looks like a C comment, but is notregexp constant `//' looks like a C++ comment, but is notregexp constant for parameter #%d yields boolean valueregular expression on left of `~' or `!~' operatorregular expression on right of assignmentregular expression on right of comparisonremote host and port information (%s, %s) invalidrestoring stdin in parent process failed restoring stdout in parent process failed rshift(%lf, %lf): fractional values will be truncatedrshift(%lf, %lf): negative values will give strange resultsrshift(%lf, %lf): too large shift value will give strange resultsrshift: received non-numeric first argumentrshift: received non-numeric second argumentrunning %s setuid root may be a security problemsending profile to standard errorsending variable list to standard errorshadow_funcs() called twice!sin: received non-numeric argumentsort comparison function `%s' is not definedsource file `%s' is emptysource file does not end in newlinespecial file name `%s' is incompletesplit: cannot use a subarray of fourth arg for second argsplit: cannot use a subarray of second arg for fourth argsplit: cannot use the same array for second and fourth argssplit: fourth argument is a gawk extensionsplit: fourth argument is not an arraysplit: null string for third arg is a gawk extensionsplit: second argument is not an arraysqrt: called with negative argument %gsqrt: received non-numeric argumentsrand: received non-numeric argumentstandard outputstatement has no effectstrftime: format value in PROCINFO["strftime"] has numeric typestrftime: received empty format stringstrftime: received non-numeric second argumentstrftime: received non-string first argumentsubscript of array `%s' is null stringsubstr: length %g at start index %g exceeds length of first argument (%lu)substr: length %g is not >= 0substr: length %g is not >= 1substr: length %g too big for string indexing, truncating to %gsubstr: non-integer length %g will be truncatedsubstr: non-integer start index %g will be truncatedsubstr: source string is zero lengthsubstr: start index %g is invalid, using 1substr: start index %g is past end of stringsystem: received non-string argumenttawk regex modifier `/.../%c' doesn't work in gawkthere were shadowed variables.tolower: received non-string argumenttoo many arguments supplied for format stringtoo many pipes or input files opentoupper: received non-string argumentturning off `--lint' due to assignment to `LINT'unexpected newline or end of stringunknown nodetype %dunknown opcode %dunknown value for field spec: %d unnecessary mixing of `>' and `>>' for file `%.*s'unterminated regexpunterminated regexp at end of fileunterminated regexp ends with `\' at end of fileunterminated stringunwind_stack: unexpected type `%s'use of `\ #...' line continuation is not portableuse of dcgettext(_"...") is incorrect: remove leading underscoreuse of dcngettext(_"...") is incorrect: remove leading underscoreuse of non-array as arraywarning: xor(%lf, %lf): fractional values will be truncatedxor(%lf, %lf): negative values will give strange resultsxor: received non-numeric first argumentxor: received non-numeric second argumentProject-Id-Version: gawk 4.0.0 Report-Msgid-Bugs-To: arnold@skeeve.com POT-Creation-Date: 2012-03-28 22:03+0200 PO-Revision-Date: 2011-07-17 08:28+0900 Last-Translator: Yasuaki Taniguchi Language-Team: Japanese Language: ja MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=1; plural=0; # %s ブロック # ルール # gawk プロファイルã€ä½œæˆæ—¥æ™‚ %s -C --copyright -E file --exec=file -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R file --command=file -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[file] --dump-variables[=file] -e 'program-text' --source='program-text' -f progfile --file=progfile -g --gen-pot -h --help -n --non-decimal-data -p[file] --profile[=file] -r --re-interval -t --lint-old -v var=val --assign=var=val # 呼出関数スタック: # 関数一覧(アルファベット順) ãƒã‚°ã‚’報告ã™ã‚‹ã«ã¯ã€`gawk.info(英文)' ã® `Bugs' ノードを å‚ç…§ã—ã¦ãã ã•ã„。 å°åˆ·ã•れãŸãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã§å¯¾å¿œã™ã‚‹ã‚»ã‚¯ã‚·ãƒ§ãƒ³ ã¯ã€`Reporting Problems and Bugs' ã§ã™ã€‚ 翻訳ã«é–¢ã™ã‚‹ãƒã‚°ã¯ã«å ±å‘Šã—ã¦ãã ã•ã„。 %d 㯠%s 用ã®å¼•æ•°ã®æ•°ã¨ã—ã¦ã¯ç„¡åйã§ã™%s %s `%s': fd フラグをå–å¾—ã§ãã¾ã›ã‚“: (fcntl F_GETFD: %s)%s %s `%s': close-on-exec を設定ã§ãã¾ã›ã‚“: (fcntl F_SETFD: %s)%s ブロックã«ã¯ã‚¢ã‚¯ã‚·ãƒ§ãƒ³éƒ¨ãŒå¿…é ˆã§ã™%s 第三仮引数ã¯å¯å¤‰ã‚ªãƒ–ジェクトã§ã¯ã‚りã¾ã›ã‚“%s ã‹ã‚‰ "%s" ã¸å‡ºåŠ›ã§ãã¾ã›ã‚“ (%s)。%s: %d: tawk ã®æ­£è¦è¡¨ç¾ä¿®é£¾å­ `/.../%c' 㯠gawk ã§ä½¿ç”¨ã§ãã¾ã›ã‚“%s: オプション `-v' ã®å¼•æ•° `%s' ㌠`変数=代入値' ã®å½¢å¼ã«ãªã£ã¦ã„ã¾ã›ã‚“。 %s: %s ã¸ã®é…列å‚ç…§ (array_ref) ã§ã™ %s: é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)%s: 空 (null) %s: 空 (zero) %s: 無効ãªã‚ªãƒ—ション -- '%c' %s: 仮引数ã§ã™ %s: オプション '%c%s' ã¯å¼•æ•°ã‚’å–ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ %s: オプション '--%s' ã¯å¼•æ•°ã‚’å–ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ %s: オプション '--%s' ã«ã¯å¼•æ•°ãŒå¿…è¦ã§ã™ %s: オプション '-W %s' ã¯å¼•æ•°ã‚’å–ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ %s: オプション '-W %s' ã¯æ›–昧ã§ã™ %s: オプション '-W %s' ã«ã¯å¼•æ•°ãŒå¿…è¦ã§ã™ %s: オプション `-W %s' ã¯èªè­˜ã§ãã¾ã›ã‚“。無視ã•れã¾ã—㟠%s: 引数ãŒå¿…è¦ãªã‚ªãƒ—ション -- %c %s: オプションã«ã¯å¼•æ•°ãŒå¿…è¦ã§ã™ -- '%c' %s: æ–‡å­—åˆ—ãƒªãƒ†ãƒ©ãƒ«ã‚’ç½®ãæ›ãˆæœ€å¾Œã®å¼•æ•°ã«ä½¿ç”¨ã™ã‚‹ã¨åŠ¹æžœãŒã‚りã¾ã›ã‚“%s: テーブルサイズ (table_size) = %d, é…列サイズ (array_size) = %d %s: オプション '%c%s' ã‚’èªè­˜ã§ãã¾ã›ã‚“ %s: オプション '--%s' ã‚’èªè­˜ã§ãã¾ã›ã‚“ サンドボックスモードã§ã¯ 'system' 関数ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“POSIX awk ã§ã¯ -Ft 㯠FS をタブã«è¨­å®šã—ã¾ã›ã‚“-m オプションã®ä½¿ç”¨æ³•: `-m[fr] 数値'@include 㯠gawk æ‹¡å¼µã§ã™BINMODE 値 `%s' ã¯ç„¡åйã§ã™ã€‚代ã‚り㫠3 を使用ã—ã¾ã™Copyright (C) 1989, 1991-%d Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 使用例: gawk '{ sum += $1 }; END { print sum }' file gawk -F: '{ print $1 }' /etc/passwd IPv6 通信ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“無効ãªå‰æ–¹å‚ç…§ã§ã™ç„¡åŠ¹ãªæ–‡å­—クラスåã§ã™ç„¡åйãªç…§åˆæ–‡å­—ã§ã™\{\} ã®ä¸­èº«ãŒç„¡åйã§ã™ç„¡åйãªãƒžãƒ«ãƒãƒã‚¤ãƒˆãƒ‡ãƒ¼ã‚¿ãŒæ¤œå‡ºã•れã¾ã—ãŸã€‚データã¨ãƒ­ã‚±ãƒ¼ãƒ«ãŒä¸€è‡´ã—ã¦ã„ãªã„よã†ã§ã™ã€‚無効ãªå‰æ–¹æ­£è¦è¡¨ç¾ã§ã™ç„¡åйãªç¯„囲終了ã§ã™ç„¡åŠ¹ãªæ­£è¦è¡¨ç¾ã§ã™ãƒ¡ãƒ¢ãƒªã‚’ä½¿ã„æžœãŸã—ã¾ã—ãŸNF ãŒè² ã®å€¤ã«è¨­å®šã•れã¦ã„ã¾ã™ä¸€è‡´ã—ã¾ã›ã‚“以å‰ã«æ­£è¦è¡¨ç¾ãŒã‚りã¾ã›ã‚“ã“ã®æ“作ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“POSIX ã§ã¯ `%s' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“POSIX ã§ã¯ `\x' エスケープã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“POSIX ã§ã¯æ¼”ç®—å­ `**' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“POSIX ã§ã¯æ¼”ç®—å­ `**=' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“POSIX オプション: GNU é•·ã„å½¢å¼ã®ã‚ªãƒ—ション: (標準) æ­£è¦è¡¨ç¾ãŒé€”中ã§çµ‚了ã—ã¾ã—ãŸæ­£è¦è¡¨ç¾ãŒå¤§ãã™ãŽã¾ã™çŸ­ã„オプション: GNU é•·ã„å½¢å¼ã®ã‚ªãƒ—ション: (æ‹¡å¼µ) 申ã—訳ã‚りã¾ã›ã‚“㌠`%s' ã‚’ã©ã®ã‚ˆã†ã«è§£é‡ˆã™ã‚‹ã‹åˆ†ã‹ã‚Šã¾ã›ã‚“æˆåŠŸã§ã™TCP/IP 通信ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“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. 終端ã®ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥( ã¾ãŸã¯ \( ãŒä¸ä¸€è‡´ã§ã™) ã¾ãŸã¯ \) ãŒä¸ä¸€è‡´ã§ã™[ ã¾ãŸã¯ [^ ãŒä¸ä¸€è‡´ã§ã™\{ ãŒä¸ä¸€è‡´ã§ã™ä½¿ç”¨æ³•: %s [POSIX ã¾ãŸã¯ GNU å½¢å¼ã®ã‚ªãƒ—ション] -f progfile [--] file ... 使用法: %s [POSIX ã¾ãŸã¯ GNU å½¢å¼ã®ã‚ªãƒ—ション] [--] %cprogram%c file ... You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. [s]printf: æ›¸å¼æŒ‡å®šå­ã«åˆ¶å¾¡æ–‡å­—ãŒã‚りã¾ã›ã‚“[s]printf: 値 %g ã¯æ›¸å¼ `%%%c' ã®ç¯„囲外ã§ã™^ ã“ã“ã‹ã‚‰è¶³ã‚Šã¾ã›ã‚“`%s' ã¯ãƒ™ãƒ«ç ”究所ã«ã‚ˆã‚‹æ‹¡å¼µã§ã™`%s' ã¯çµ„è¾¼ã¿é–¢æ•°ã§ã™ã€‚å†å®šç¾©ã§ãã¾ã›ã‚“`%s' 㯠gawk æ‹¡å¼µã§ã™`%s' ã¯é–¢æ•°åã¨ã—ã¦ã¯ç„¡åйã§ã™`%s' ã¯ä¸æ­£ãªå¤‰æ•°åã§ã™`%s' ã¯å¤‰æ•°åã§ã¯ã‚りã¾ã›ã‚“。`%s=%s' ã®ãƒ•ァイルを探ã—ã¾ã™ã€‚å¤ã„ awk 㯠`%s' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“`--posix' 㯠`--binary' を上書ãã—ã¾ã™ã‚ªãƒ—ション `--posix' 㯠`--traditional' を無効ã«ã—ã¾ã™ã€‚オプション `--posix'/`--traditional' 㯠`--non-decimal-data' を無効ã«ã—ã¾ã™ã€‚gawk ã§ã¯ã‚ªãƒ—ション `-m[fr]' ã«åŠ¹æžœã¯ã‚りã¾ã›ã‚“。`BINMODE' 㯠gawk æ‹¡å¼µã§ã™`FIELDWIDTHS' 㯠gawk æ‹¡å¼µã§ã™`FPAT' 㯠gawk æ‹¡å¼µã§ã™`IGNORECASE' 㯠gawk æ‹¡å¼µã§ã™awk ã®æ›¸å¼æŒ‡å®šã§ã¯ `L' ã¯ç„¡æ„味ã§ã™ã€‚無視ã—ã¾ã™ã€‚`break' ã¯ãƒ«ãƒ¼ãƒ—ã¾ãŸã¯ switch ã®å¤–ã§ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“`continue' ã¯ãƒ«ãƒ¼ãƒ—ã®å¤–ã§ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“`delete array' 㯠gawk æ‹¡å¼µã§ã™`delete(array)' ã¯ç§»æ¤æ€§ã®ç„¡ã„ tawk æ‹¡å¼µã§ã™`extension' 㯠gawk æ‹¡å¼µã§ã™`%s' ルールã®å†…部ã§ã¯ `getline var' ã¯ç„¡åйã§ã™`%s' ルールã®å†…部ã§ã¯ `getline' ã¯ç„¡åйã§ã™`goto' ã¯æœ‰å®³ã ã¨è¦‹ãªã•れã¦ã„ã¾ã™! awk ã®æ›¸å¼æŒ‡å®šã§ã¯ `h' ã¯ç„¡æ„味ã§ã™ã€‚無視ã—ã¾ã™ã€‚awk ã®æ›¸å¼æŒ‡å®šã§ã¯ `l' ã¯ç„¡æ„味ã§ã™ã€‚無視ã—ã¾ã™`length(array)' 㯠gawk æ‹¡å¼µã§ã™`next' 㯠`%s' ã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“%s アクション内㧠`next' ãŒä½¿ç”¨ã•れã¾ã—ãŸ`nextfile' 㯠`%s' ルールã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“`nextfile' 㯠gawk æ‹¡å¼µã§ã™`nextfile' ㌠%s アクション内ã§ä½¿ç”¨ã•れã¾ã—ãŸ`return' ãŒé–¢æ•°å®šç¾©æ–‡ã®å¤–ã§ä½¿ã‚れã¾ã—ãŸ`|&' ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。adump: 引数ãŒé…列ã§ã¯ã‚りã¾ã›ã‚“ソースファイル `%s' ã¯æ—¢ã«èª­ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™and(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™and(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™and: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸand: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸasort: 第一引数ã®éƒ¨åˆ†é…列を第二引数用ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“asort: 第二引数ã®éƒ¨åˆ†é…列を第一引数用ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“asort: 第一引数ãŒé…列ã§ã¯ã‚りã¾ã›ã‚“asort: 第二引数ãŒé…列ã§ã¯ã‚りã¾ã›ã‚“asorti: 第一引数ã®éƒ¨åˆ†é…列を第二引数用ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“asorti: 第二引数ã®éƒ¨åˆ†é…列を第一引数用ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“asorti: 第一引数ãŒé…列ã§ã¯ã‚りã¾ã›ã‚“asorti: 第二引数ãŒé…列ã§ã¯ã‚りã¾ã›ã‚“æ¡ä»¶ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆå†…ã§ä»£å…¥ãŒä½¿ç”¨ã•れã¾ã—ãŸatan2: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸatan2: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸãƒ•ィールド %ld ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã®è©¦ã¿ã§ã™éžæ•°å€¤ã‚’使用ã—ãŸãƒ•イールドå‚ç…§ã®è©¦ã¿ã§ã™NULL 文字列を使用ã—ã¦ãƒ•ィールドã®å‚照を試ã¿ã¦ã„ã¾ã™ã‚¹ã‚«ãƒ©ãƒ¼å€¤ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™ã‚¹ã‚«ãƒ©ãƒ¼ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§é…列 `%s' を使用ã™ã‚‹è©¦ã¿ã§ã™ã‚¹ã‚«ãƒ©ãƒ¼ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆå†…ã§é…列 `%s["%.*s"]' ã®ä½¿ç”¨ã®è©¦ã¿ã§ã™é–¢æ•° `%s' ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™ã‚¹ã‚«ãƒ©ãƒ¼ `%s' ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™ã‚¹ã‚«ãƒ©ãƒ¼ `%s["%.*s"]' ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™ã‚¹ã‚«ãƒ©ãƒ¼ä»®å¼•æ•° `%s' ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™æ–‡å­—列ã®çµ‚りã«ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ãŒä½¿ã‚れã¦ã„ã¾ã™ã€‚ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ãŒè¡Œæœ€å¾Œã®æ–‡å­—ã«ãªã£ã¦ã„ã¾ã›ã‚“。誤ã£ãŸ `%sFMT' 指定 `%s' ã§ã™genflags2str 内ã§ãƒãƒƒãƒ•ァオーãƒãƒ¼ãƒ•ローãŒç™ºç”Ÿã—ã¾ã—ãŸå°æ‹¬å¼§ãŒç„¡ã„ `length' ã¯ç§»æ¤æ€§ãŒã‚りã¾ã›ã‚“特別ãªå¤‰æ•° `%s' ã¯é–“接関数呼ã³å‡ºã—用ã«ã¯ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“入力用ã«ãƒ‘イプ `%s' ã‚’é–‹ã‘ã¾ã›ã‚“ (%s)出力用ã«ãƒ‘イプ `%s' ã‚’é–‹ã‘ã¾ã›ã‚“ (%s)ソースファイル `%s' を読ã¿è¾¼ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ (%s)入出力用ã®åŒæ–¹å‘パイプ `%s' ãŒé–‹ã‘ã¾ã›ã‚“ (%s)ソースファイル `%s' を読ã¿è¾¼ã‚ã¾ã›ã‚“ (%s)`%s' ã‹ã‚‰ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã§ãã¾ã›ã‚“ (%s)`%s' ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã§ãã¾ã›ã‚“ (%s)標準エラーをãƒã‚¤ãƒŠãƒªãƒ¢ãƒ¼ãƒ‰ã«è¨­å®šã§ãã¾ã›ã‚“ (%s)標準入力をãƒã‚¤ãƒŠãƒªãƒ¢ãƒ¼ãƒ‰ã«è¨­å®šã§ãã¾ã›ã‚“ (%s)標準出力をãƒã‚¤ãƒŠãƒªãƒ¢ãƒ¼ãƒ‰ã«è¨­å®šã§ãã¾ã›ã‚“ (%s)関数å `%s' ã¯å¤‰æ•°ã¾ãŸã¯é…列ã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“`%s' 用ã®å­ãƒ—ロセスを実行ã§ãã¾ã›ã‚“ (fork: %s)。ファイル `%s' を読ã¿è¾¼ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ (%s)パイプ `%s' ãŒé–‹ã‘ã¾ã›ã‚“ (%s)。関数 `%s' ã¯å¤‰æ•°åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“gawk ã«çµ„ã¿è¾¼ã¿ã® `%s' ã¯å¤‰æ•°åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“`%s' ã‚’é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)fd %d (`%s') ã‚’é–‰ã˜ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ (%s)マスター pty ã‚’é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)パイプを閉ã˜ã‚‰ã‚Œã¾ã›ã‚“ (%s)。開ã„ã¦ãªã„リダイレクトを閉ã˜ã‚ˆã†ã¨ã—ã¦ã„ã¾ã™ã‚¹ãƒ¬ãƒ¼ãƒ– pty ã‚’é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)å­ãƒ—ãƒ­ã‚»ã‚¹ãŒæ¨™æº–入力を閉ã˜ã‚‰ã‚Œã¾ã›ã‚“ (%s)。å­ãƒ—ãƒ­ã‚»ã‚¹ãŒæ¨™æº–出力を閉ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)close: `%.*s' ã¯é–‹ã„ã¦ã„るファイルã€ãƒ‘イプã€ãƒ—ロセス共有ã§ã¯ã‚りã¾ã›ã‚“close: リダイレクト `%s' 㯠`|&' を使用ã—ã¦é–‹ã‹ã‚Œã¦ã„ã¾ã›ã‚“。第二引数ã¯ç„¡è¦–ã•れã¾ã—ãŸclose: 第二引数㯠gawk æ‹¡å¼µã§ã™close: 第二引数㯠`to' ã¾ãŸã¯ `from' ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“コマンドライン:`%s' ã¸æŽ¥ç¶šã™ã‚‹ãƒ‘イプを並行プロセスã‹ã‚‰ãƒ•ラッシュã§ãã¾ã›ã‚“ (%s)。コマンドライン引数 `%s' ã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§ã™: スキップã•れã¾ã—ãŸcompl(%lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™compl(%lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™compl: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸcos: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸå…¥åŠ›ç”¨ãƒ¡ãƒ¢ãƒªãƒ¼ã‚’ã“れ以上確ä¿ã§ãã¾ã›ã‚“。`%s' を書込ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ã§ã—㟠(%s)`%s' を書込ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ã§ã—ãŸ: %s`%s' をモード `%s' ã§é–‹ã‘ã¾ã›ã‚“事å‰ã« fd %d 用㫠/dev/null ã‚’é–‹ã‘ã¾ã›ã‚“。データファイル `%s' ã¯ç©ºã§ã™ã€‚dcgettext: `%s' ã¯ç„¡åйãªãƒ­ã‚±ãƒ¼ãƒ«åŒºåˆ†ã§ã™delete: é…列 `%2$s' 内ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `%1$s' ãŒã‚りã¾ã›ã‚“ゼロã«ã‚ˆã‚‹é™¤ç®—ãŒè©¦ã¿ã‚‰ã‚Œã¾ã—ãŸ`%%' 内ã§ã‚¼ãƒ­ã«ã‚ˆã‚‹é™¤ç®—ãŒè©¦ã¿ã‚‰ã‚Œã¾ã—ãŸ`%%=' 内ã§ã‚¼ãƒ­ã«ã‚ˆã‚‹é™¤ç®—ãŒè¡Œã‚れã¾ã—ãŸ`/=' 内ã§ã‚¼ãƒ­ã«ã‚ˆã‚‹é™¤ç®—ãŒè¡Œã‚れã¾ã—ãŸswitch æ–‡ã®ä¸­ã§é‡è¤‡ã—㟠`default' ãŒæ¤œå‡ºã•れã¾ã—ãŸswitch æ–‡ã®ä¸­ã§é‡è¤‡ã—㟠case 値ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™: %så„ルールã«ã¯ãƒ‘ターンã¾ãŸã¯ã‚¢ã‚¯ã‚·ãƒ§ãƒ³éƒ¨ãŒå¿…é ˆã§ã™ã€‚`-e/--source' ã¸ã®ç©ºã®å¼•æ•°ã¯ç„¡è¦–ã•れã¾ã—ãŸ@include ã®å¾Œã«ç©ºã®ãƒ•ァイルåãŒã‚りã¾ã™ã‚³ãƒžãƒ³ãƒ‰è¡Œã®ãƒ—ログラム表記ãŒç©ºã§ã™ç’°å¢ƒå¤‰æ•° `POSIXLY_CORRECT' ãŒæŒ‡å®šã•れã¦ã„ã¾ã™ã€‚オプション `--posix' を有効ã«ã—ã¾ã™å…¥åŠ›ãƒ•ã‚¡ã‚¤ãƒ« `%s' を読ã¿è¾¼ã¿ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ: %s標準エラーã¸ã®æ›¸è¾¼ã¿ã‚¨ãƒ©ãƒ¼ (%s)標準出力ã¸ã®æ›¸è¾¼ã¿ã‚¨ãƒ©ãƒ¼ (%s)エラー: エスケープシーケンス `\%c' 㯠`%c' ã¨åŒç­‰ã«æ‰±ã‚れã¾ã™exp: 引数 %g ãŒç¯„囲外ã§ã™exp: å¼•æ•°ãŒæ•°å€¤ã§ã¯ã‚りã¾ã›ã‚“`%s' リダイレクトã®å‘½ä»¤å¼ãŒç©ºåˆ—ã§ã™ã€‚`%s' リダイレクトã®å‘½ä»¤å¼ã«æ•°å€¤ã—ã‹è¨˜è¿°ã•れã¦ã„ã¾ã›ã‚“。extension: 関数 `%s' ã‚’å†å®šç¾©ã§ãã¾ã›ã‚“extension: gawk ã«çµ„ã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ `%s' ã¯é–¢æ•°åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“extension: 関数 `%s' ã¯æ—¢ã«å®šç¾©ã•れã¦ã„ã¾ã™extension: 関数å `%s' ã¯å‰ã«å®šç¾©ã•れã¦ã„ã¾ã™extension: 関数å `%2$s' ã®ä¸­ã§ä¸æ­£ãªæ–‡å­— `%1$c' ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™extension: 関数åãŒã‚りã¾ã›ã‚“サンドボックスモード内ã§ã¯æ‹¡å¼µã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“ファイル `%2$s' ã‚’é–‰ã˜ãŸã¨ãã®çŠ¶æ…‹ã‚³ãƒ¼ãƒ‰ãŒå¤±æ•— (%1$d) ã§ã—㟠(%3$s)。パイプ `%2$s' ã‚’é–‰ã˜ãŸã¨ãã®çŠ¶æ…‹ã‚³ãƒ¼ãƒ‰ãŒå¤±æ•— (%1$d) ã§ã—㟠(%3$s)。致命的エラー: 内部エラー致命的エラー: 内部エラー: セグメンテーションé•å致命的エラー: 内部エラー: スタックオーãƒãƒ¼ãƒ•ロー致命的: 致命的: `$' 㯠awk å½¢å¼å†…ã§ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“致命的: `$' ã¯æ›¸å¼æŒ‡å®šå†…ã®ãƒ”リオド `.' ã®å¾Œã«ä½¿ç”¨ã§ãã¾ã›ã‚“致命的: POSIX awk 書å¼å†…ã§ã¯ `L' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“致命的: POSIX awk 書å¼å†…ã§ã¯ `h' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“致命的: POSIX awk 書å¼å†…ã§ã¯ `l' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“致命的: 引数ã®ç•ªå· %ld ã¯å¼•æ•°ã¨ã—ã¦ä¸Žãˆã‚‰ã‚ŒãŸæ•°ã‚ˆã‚Šå¤§ãã„ã§ã™è‡´å‘½çš„: `$' ã§æŒ‡å®šã™ã‚‹å¼•æ•°ã®ç•ªå·ã¯æ­£ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“致命的: extension: `%s' ã‚’é–‹ãã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ (%s) 致命的: extension: ライブラリ `%s': 関数 `%s' を呼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ (%s) 致命的: extension: ライブラリ `%s': `plugin_is_GPL_compatible' ãŒå®šç¾©ã•れã¦ã„ã¾ã›ã‚“ (%s) 致命的: `count$’ ã¯å…¨ã¦ã®æ›¸å¼ä½¿ç”¨ã™ã‚‹ã€ã¾ãŸã¯å…¨ã¦ã«ä½¿ç”¨ã—ãªã„ã®ã„ãšã‚Œã‹ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“致命的: フィールド幅ã€ã¾ãŸã¯ç²¾åº¦ã®æŒ‡å®šå­ã« `$' ãŒä¸Žãˆã‚‰ã‚Œã¦ã„ã¾ã›ã‚“致命的: æ›¸å¼æ–‡å­—列を満ãŸã™ååˆ†ãªæ•°ã®å¼•æ•°ãŒã‚りã¾ã›ã‚“fflush: `%s' ãŒé–‹ã‹ã‚ŒãŸãƒ•ァイルã€ãƒ‘イプã€ãƒ—ロセス共有ã§ã¯ã‚りã¾ã›ã‚“fflush: flush ã§ãã¾ã›ã‚“: ファイル `%s' ã¯èª­ã¿è¾¼ã¿ç”¨ã«é–‹ã‹ã‚Œã¦ã„ã¾ã™ã€‚書ãè¾¼ã¿ç”¨ã§ã¯ã‚りã¾ã›ã‚“fflush: flush ã§ãã¾ã›ã‚“: パイプ `%s' ã¯èª­ã¿è¾¼ã¿ç”¨ã«é–‹ã‹ã‚Œã¦ã„ã¾ã™ã€‚書ãè¾¼ã¿ç”¨ã§ã¯ã‚りã¾ã›ã‚“`%%' 指定用ã®ãƒ•ィールド幅ãŠã‚ˆã³ç²¾åº¦ã¯ç„¡è¦–ã•れã¾ã™`%%' 指定用ã®ãƒ•ィールド幅ã¯ç„¡è¦–ã•れã¾ã™ãƒ•ァイル `%s' をフラッシュã§ãã¾ã›ã‚“ (%s)。`%2$s' リダイレクトã«è«–ç†æ¼”ç®—ã®çµæžœã¨æ€ã‚れるファイルå `%1$s' ãŒä½¿ã‚れã¦ã„ã¾ã™ã€‚æµ®å‹•å°æ•°ç‚¹ä¾‹å¤–for ループ: ループ実行中ã«é…列 `%s' ã®ã‚µã‚¤ã‚ºãŒ %ld ã‹ã‚‰ %ld ã¸å¤‰æ›´ã•れã¾ã—ãŸ%s ã‹ã‚‰æœªå®šç¾©ã®é–¢æ•° `%s' を呼ã³å‡ºã—ã¾ã—ãŸå®£è¨€ã•れã¦ã„る数より多ã„引数を使ã£ã¦é–¢æ•° `%s' を呼ã³å‡ºã—ã¾ã—ãŸé–¢æ•°å㨠`(' ã®é–“ã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’入れã¦é–¢æ•° `%s' を呼ã³å‡ºã—ã¦ã„ã¾ã™ã€‚ ã¾ãŸã¯ã€å¤‰æ•°ã‹é…列ã¨ã—ã¦ä½¿ã‚れã¦ã„ã¾ã™ã€‚関数 `%s' ã¯å®šç¾©ã•れã¦ã„ã¾ã™ãŒã€ä¸€åº¦ã‚‚直接呼ã³å‡ºã•れã¦ã„ã¾ã›ã‚“関数 `%s' ã«ä½¿ãˆã‚‹å¼•æ•°ã®æ•°ã¯ `%d' 以下ã¨å®šç¾©ã•れã¦ã„ã¾ã™é–¢æ•° `%s' ã¯å®šç¾©ã•れã¦ã„ã¾ã›ã‚“関数 `%s': 引数 #%d: é…列をスカラーã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™é–¢æ•° `%s': 引数 #%d: スカラーをé…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™é–¢æ•° `%s': 関数åを仮引数åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“関数 `%s': 特別ãªå¤‰æ•° `%s' ã¯é–¢æ•°ã®ä»®å¼•æ•°ã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“関数 `%s': 引数 #%d ãŒã‚りã¾ã›ã‚“関数 `%s': 仮引数 #%d, `%s' ãŒä»®å¼•æ•° #%d ã¨é‡è¤‡ã—ã¦ã„ã¾ã™é–¢æ•° `%s': 仮引数 `%s' ãŒå¤§åŸŸå¤‰æ•°ã‚’覆ã„éš ã—ã¦ã„ã¾ã™`%s' を通ã—ã¦é–“接的ã«å‘¼ã³å‡ºã•れãŸé–¢æ•°ãŒå­˜åœ¨ã—ã¾ã›ã‚“関数å `%s' ã¯å‰ã«å®šç¾©ã•れã¦ã„ã¾ã™gawk ã¯ã€ãƒ‘ターンを検索をã—ã¦ã€ãれを処ç†ã™ã‚‹è¨€èªžã§ã™ã€‚ デフォルト設定ã§ã¯ã€æ¨™æº–入力を読ã¿è¾¼ã¿ã€æ¨™æº–å‡ºåŠ›ã«æ›¸ã出ã—ã¾ã™ã€‚ gensub: 第三引数㌠0 ã§ã™ã€‚1 を代ã‚りã«ä½¿ç”¨ã—ã¾ã™å六進エスケープ \x%.*s (%d 文字) ã¯ãŠãらã予期ã—ãŸã‚ˆã†ã«ã¯è§£é‡ˆã•れãªã„ã§ã—ょã†ä¸æ˜Žãªæ›¸å¼æŒ‡å®šæ–‡å­— `%c' を無視ã—ã¦ã„ã¾ã™: 変æ›ã•れる引数ã¯ã‚りã¾ã›ã‚“index: 文字列ã§ã¯ç„¡ã„第一引数をå—ã‘å–りã¾ã—ãŸindex: 文字列ã§ã¯ç„¡ã„第二引数をå—ã‘å–りã¾ã—ãŸé–“接関数呼ã³å‡ºã—㯠gawk æ‹¡å¼µã§ã™int: 数値ã§ã¯ç„¡ã„引数をå—ã‘å–りã¾ã—ãŸå†…部エラー: %s ã® vname ãŒç„¡åйã§ã™ã€‚`%s' 付近㮠FIELDWIDTHS 値ãŒç„¡åйã§ã™å¼å†…ã«ç„¡åŠ¹ãªæ–‡å­— '%c' ãŒã‚りã¾ã™æ·»å­—ã®å¼ãŒç„¡åйã§ã™length: é…列引数をå—ã‘å–りã¾ã—ãŸlength: 文字列ã§ã¯ç„¡ã„引数をå—ã‘å–りã¾ã—ãŸ`/inet' 内ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒãƒ¼ãƒˆ %s ãŒç„¡åйã§ã™log: è² ã®å¼•æ•° %g ã‚’å—ã‘å–りã¾ã—ãŸlog: 数値ã§ã¯ç„¡ã„引数をå—ã‘å–りã¾ã—ãŸlshift(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™lshift(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™lshift(%lf, %lf): シフト値ãŒå¤§ãéŽãŽã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™lshift: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸlshift: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸmake_builtin: 関数 `%s' ã®å¼•æ•°ã®æ•°ãŒè² ã§ã™match: 第三引数㯠gawk æ‹¡å¼µã§ã™match: 第三引数ãŒé…列ã§ã¯ã‚りã¾ã›ã‚“mktime: 一ã¤ä»¥ä¸Šã®å€¤ãŒãƒ‡ãƒ•ォルトã®ç¯„囲を超ãˆã¦ã„ã¾ã™mktime: éžæ–‡å­—列引数をå—ã‘å–りã¾ã—ãŸå­ãƒ—ロセスãŒãƒ‘イプを標準入力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。å­ãƒ—ロセスãŒãƒ‘イプを標準出力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。å­ãƒ—ロセスãŒã‚¹ãƒ¬ãƒ¼ãƒ– pty を標準入力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。å­ãƒ—ロセスãŒã‚¹ãƒ¬ãƒ¼ãƒ– pty を標準出力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)ã€‚è¤‡æ•°ã®æ–‡å­—ã‚’ `RS' ã«ä½¿ç”¨ã™ã‚‹ã®ã¯ gawk ç‰¹æœ‰ã®æ‹¡å¼µã§ã™ã€‚多段階ã§åŒæ–¹å‘パイプを利用ã—ãŸå¼ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“`/inet' ã«ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ›ã‚¹ãƒˆåを与ãˆãªã‘れã°ã„ã‘ã¾ã›ã‚“`/inet' ã«ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒãƒ¼ãƒˆç•ªå·ã‚’与ãˆãªã‘れã°ã„ã‘ã¾ã›ã‚“スペシャルファイルå `%s' ã«ï¼ˆèªè­˜ã§ãã‚‹ï¼‰ãƒ—ãƒ­ãƒˆã‚³ãƒ«ãŒæŒ‡å®šã•れã¦ã„ã¾ã›ã‚“並行プロセス `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。ファイル `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。パイプ `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。ソケット `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。`\x' エスケープシーケンスã«å六進数ãŒã‚りã¾ã›ã‚“fd %d ãŒäº‹å‰ã«é–‹ã„ã¦ã„ã¾ã›ã‚“。プログラム文ãŒå…¨ãã‚りã¾ã›ã‚“!`%s' ルールã®å†…å´ã§ã¯ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã•れã¦ã„ãªã„ `getline' ã¯ç„¡åйã§ã™ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã•れã¦ã„ãªã„ `getline' 㯠END アクションã§ã¯æœªå®šç¾©ã§ã™ã€‚`FS' ã« NULL 文字列を使用ã™ã‚‹ã®ã¯ gawk æ‹¡å¼µã§ã™å¤ã„ awk ã¯å¤šæ¬¡å…ƒé…列をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“å¤ã„ awk ã¯è¤‡æ•°ã® `BEGIN' ã¾ãŸã¯ `END' ルールをサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“å¤ã„ awk ã¯æ¼”ç®—å­ `**' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“å¤ã„ awk ã¯æ¼”ç®—å­ `**=' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“å¤ã„ awk 㯠`FS' ã®å€¤ã¨ã—ã¦æ­£è¦è¡¨ç¾ã‚’サãƒãƒ¼ãƒˆã—ã¾ã›ã‚“å¤ã„ awk 㯠`\%c' エスケープシーケンスをサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“å¤ã„ awk ã§ã¯ `in' 予約語㯠`for' ã®å¾Œã‚’除ãサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“オペコード %s ã¯æ¼”ç®—å­ã¾ãŸã¯äºˆç´„語ã§ã¯ã‚りã¾ã›ã‚“å¤ã„ awk ã¯æ¼”ç®—å­ `^' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“å¤ã„ awk ã¯æ¼”ç®—å­ `^=' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“or(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™or(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™or: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸor: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸpatsplit: 第二引数ã«ç¬¬å››å¼•æ•°ã®éƒ¨åˆ†é…列を使用ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“patsplit: 第四引数ã«ç¬¬äºŒå¼•æ•°ã®éƒ¨åˆ†é…列を使用ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“patsplit: 第二引数ã¨ç¬¬å››å¼•æ•°ã«åŒã˜é…列を使用ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“patsplit: 第四引数ãŒé…列ã§ã¯ã‚りã¾ã›ã‚“patsplit: 第二引数ãŒé…列ã§ã¯ã‚りã¾ã›ã‚“patsplit: 第三引数ã¯éž NULL ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“パイプ `%s' をフラッシュã§ãã¾ã›ã‚“ (%s)。BEGIN ã¾ãŸã¯ END ルール内ã®å¼•æ•°ã®ç„¡ã„ `print' 㯠`print ""' ã ã¨æ€ã‚れã¾ã™`%%' 指定用ã®ãƒ•ィールド幅ã¯ç„¡è¦–ã•れã¾ã™printf: 引数ãŒã‚りã¾ã›ã‚“é–‹ã„ã¦ã„ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ãŒã‚·ã‚¹ãƒ†ãƒ åˆ¶é™ã«é”ã—ã¾ã—ãŸã€‚ファイル記述å­ã‚’多é‡åŒ–ã—ã¾ã™ã€‚åŽŸå› ä¸æ˜Žredir2str: 䏿˜Žãªãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆåž‹ %d ã§ã™ã‚µãƒ³ãƒ‰ãƒœãƒƒã‚¯ã‚¹ãƒ¢ãƒ¼ãƒ‰å†…ã§ã¯ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“åˆæœŸåŒ–ã•れã¦ã„ãªã„引数 `%s' ã¸ã®å‚ç…§ã§ã™åˆæœŸåŒ–ã•れã¦ã„ãªã„è¦ç´  `%s["%.*s"]' ã¸ã®å‚ç…§ã§ã™åˆæœŸåŒ–ã•れã¦ã„ãªã„フィールド `$%d' ã¸ã®å‚ç…§ã§ã™åˆæœŸåŒ–ã•れã¦ã„ãªã„フィールド `$%ld' ã¸ã®å‚ç…§ã§ã™åˆæœŸåŒ–ã•れã¦ã„ãªã„変数 `%s' ã¸ã®å‚ç…§ã§ã™æ­£è¦è¡¨ç¾ã®è¦ç´  `%.*s' ã¯ãŠãらã `[%.*s]' ã§ã‚ã‚‹ã¹ãã§ã™æ­£è¦è¡¨ç¾å®šæ•° `/%s/' 㯠C コメントã«ä¼¼ã¦ã„ã¾ã™ãŒã€ç•°ãªã‚Šã¾ã™æ­£è¦è¡¨ç¾å®šæ•° `//' 㯠C++コメントã«ä¼¼ã¦ã„ã¾ã™ãŒã€é•ã„ã¾ã™ã€‚仮引数 #%d ç”¨ã®æ­£è¦è¡¨ç¾å®šæ•°ã¯çœŸå½å€¤ã‚’出力ã—ã¾ã™`~' ã‚„ `!~' 演算å­ã®å·¦è¾ºã«æ­£è¦è¡¨ç¾ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™æ­£è¦è¡¨ç¾ãŒä»£å…¥å¼ã®å³è¾ºã«ä½¿ç”¨ã•れã¦ã„ã¾ã™æ¯”較å¼ã®å³è¾ºã«æ­£è¦è¡¨ç¾ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚リモートã®ãƒ›ã‚¹ãƒˆãŠã‚ˆã³ãƒãƒ¼ãƒˆæƒ…å ± (%s, %s) ãŒç„¡åйã§ã™è¦ªãƒ—ãƒ­ã‚»ã‚¹ãŒæ¨™æº–入力を復旧ã§ãã¾ã›ã‚“。 è¦ªãƒ—ãƒ­ã‚»ã‚¹ãŒæ¨™æº–出力を復旧ã§ãã¾ã›ã‚“。 rshift(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™rshift(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™rshift(%lf, %lf): シフト値ãŒå¤§ãéŽãŽã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™rshift: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸrshift: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸsetuid root ã§ %s を実行ã™ã‚‹ã¨ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¸Šã®å•題ãŒç™ºç”Ÿã™ã‚‹å ´åˆãŒã‚りã¾ã™ã€‚プロファイルを標準エラーã«é€ã£ã¦ã„ã¾ã™å¤‰æ•°ãƒªã‚¹ãƒˆã‚’標準エラーã«é€ã£ã¦ã„ã¾ã™shadow_funcs() を二回呼ã³å‡ºã—ã¦ã„ã¾ã™!sin: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸã‚½ãƒ¼ãƒˆæ¯”較関数 `%s' ãŒå®šç¾©ã•れã¦ã„ã¾ã›ã‚“ソースファイル `%s' ã¯ç©ºã§ã™ã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ”¹è¡Œã§çµ‚ã£ã¦ã„ã¾ã›ã‚“スペシャルファイルå `%s' ã¯ä¸å®Œå…¨ã§ã™split: 第二引数ã«ç¬¬å››å¼•æ•°ã®éƒ¨åˆ†é…列を使用ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“split: 第四引数ã«ç¬¬äºŒå¼•æ•°ã®éƒ¨åˆ†é…列を使用ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“split: 第二引数ã¨ç¬¬å››å¼•æ•°ã«åŒã˜é…列を使用ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“split: 第四引数㯠gawk æ‹¡å¼µã§ã™split: 第四引数ãŒé…列ã§ã¯ã‚りã¾ã›ã‚“split: 第三引数㫠NULL 文字列を使用ã™ã‚‹ã“ã¨ã¯ gawk æ‹¡å¼µã§ã™split: 第二引数ãŒé…列ã§ã¯ã‚りã¾ã›ã‚“sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸsqrt: 数値ã§ã¯ç„¡ã„引数をå—ã‘å–りã¾ã—ãŸsrand: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸæ¨™æº–出力文ã«åŠ¹æžœãŒã‚りã¾ã›ã‚“strftime: PROCINFO["strftime"] ã®æ›¸å¼ã®å€¤ã¯æ•°å€¤åž‹ã§ã™strftime: ç©ºã®æ›¸å¼æ–‡å­—列をå—ã‘å–りã¾ã—ãŸstrftime: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸstrftime: éžæ–‡å­—列ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸé…列 `%s' ã®æ·»å­—㌠NULL 文字列ã§ã™substr: 開始インデックス %2$g ã‹ã‚‰ã®é•·ã• %1$g ã¯ç¬¬ä¸€å¼•æ•°ã®é•·ã•ã‚’è¶…ãˆã¦ã„ã¾ã™ (%3$lu)substr: é•·ã• %g ㌠0 以上ã§ã¯ã‚りã¾ã›ã‚“substr: é•·ã• %g ㌠1 以上ã§ã¯ã‚りã¾ã›ã‚“substr: 文字数 %g ã¯æœ€å¤§å€¤ã‚’è¶…ãˆã¦ã„ã¾ã™ã€‚%g を使ã„ã¾ã™ã€‚substr: 文字数 %g ã®å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã¾ã™ã€‚substr: 開始インデックス %g ãŒéžæ•´æ•°ã®ãŸã‚ã€å€¤ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™substr: 文字列ã®é•·ã•ãŒã‚¼ãƒ­ã§ã™ã€‚substr: 開始インデックス %g ãŒç„¡åйã§ã™ã€‚1を使用ã—ã¾ã™substr: 開始インデックス %g ãŒæ–‡å­—列終端ã®å¾Œã«ã‚りã¾ã™system: 文字列ã§ã¯ç„¡ã„引数をå—ã‘å–りã¾ã—ãŸtawk ã®æ­£è¦è¡¨ç¾ä¿®é£¾å­ `/.../%c' 㯠gawk ã§ä½¿ç”¨ã§ãã¾ã›ã‚“覆ã„éš ã•れãŸå¤‰æ•°ãŒã‚りã¾ã—ãŸtolower: éžæ–‡å­—列引数をå—ã‘å–りã¾ã—ãŸæ›¸å¼æ–‡å­—列ã«ä¸Žãˆã‚‰ã‚Œã¦ã„る引数ãŒå¤šã™ãŽã¾ã™é–‹ã„ã¦ã„るパイプã¾ãŸã¯å…¥åŠ›ãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ãŒå¤šéŽãŽã¾ã™ã€‚toupper: éžæ–‡å­—列引数をå—ã‘å–りã¾ã—ãŸ`LINT' ã¸ã®ä»£å…¥ã«å¾“ã„ `--lint' を無効ã«ã—ã¾ã™äºˆæœŸã—ãªã„改行ã¾ãŸã¯æ–‡å­—列終端ã§ã™ä¸æ˜ŽãªãƒŽãƒ¼ãƒ‰åž‹ %d ã§ã™ä¸æ˜Žãªã‚ªãƒšã‚³ãƒ¼ãƒ‰ %d ã§ã™ãƒ•ィールド指定ã«ä¸æ˜Žãªå€¤ãŒã‚りã¾ã™: %d ファイル `%.*s' ã§å¿…è¦ä»¥ä¸Šã« `>' 㨠`>>' を組åˆã›ã¦ã„ã¾ã™ã€‚æ­£è¦è¡¨ç¾ãŒçµ‚端ã•れã¦ã„ã¾ã›ã‚“ファイルã®ä¸­ã§æ­£è¦è¡¨ç¾ãŒçµ‚端ã•れã¦ã„ã¾ã›ã‚“終端ã•れã¦ã„ãªã„æ­£è¦è¡¨ç¾ãŒãƒ•ァイル最後㮠`\' ã§çµ‚ã£ã¦ã„ã¾ã™ã€‚文字列ãŒçµ‚端ã•れã¦ã„ã¾ã›ã‚“unwind_stack: 予期ã—ãªã„åž‹ `%s' ã§ã™`\ #...' å½¢å¼ã®è¡Œç¶™ç¶šã¯ç§»æ¤æ€§ãŒã‚りã¾ã›ã‚“dcgettext(_"...")ã®ä½¿ç”¨æ³•ãŒé–“é•ã£ã¦ã„ã¾ã™: 先頭ã®ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢(_)を削除ã—ã¦ãã ã•ã„dcngettext(_"...")ã®ä½¿ç”¨æ³•ãŒé–“é•ã£ã¦ã„ã¾ã™: 先頭ã®ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢(_)を削除ã—ã¦ãã ã•ã„é…列ã§ãªã„ã‚‚ã®ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã—ã¦ã„ã¾ã™è­¦å‘Š: xor(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™xor(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™xor: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸxor: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸgawk-4.0.1+dfsg.orig/po/es.gmo0000644000175000017500000014475311734667243015131 0ustar schotschotÞ•ºì Q¼%% %%<%O%g%†%£%»%Í%Ü%÷%&&5&H&e&#z&+ž&Ê&é& ú&'"'?'T'f'…'% 'yÆ'+@(7l(<¤("á(-)2):I)3„)¸)Í)ã)õ)*#*,5*,b*'*-·* å*(+)/+&Y+(€+:©+%ä+ ,*,-J,'x, ,¾,+Û,(-]0.#Ž.².É.æ./[/$v/›/­/È/Ù/ò/û/020!L0"n0#‘0-µ0#ã01/"1'R1z1'‚1ëª1–2©2»2Í2 ß2Aì2A.3…p38ö35/4e4|43š4Î4"ç4! 55,5 b5ƒ5#¢58Æ5"ÿ5"6!@6b6 }6*ž6/É6(ù6""70E7.v7¥7&Å7"ì78*+8*V8#8(¥8Î8,ç8939&P9w9Š9!§92É98ü9(5:)^:8ˆ:8Á:"ú:#;9A;9{;#µ;$Ù;&þ;*%<+P<|<1˜<+Ê<&ö<-=5K=(=&ª=.Ñ=0>1>$L>q>>4°><å>#"?$F?,k?2˜?Ë?ë? @$%@#J@$n@1“@/Å@&õ@A)7A-aAA!ªAÌAìA*B1B#PB$tB5™BEÏB*C-@C nC-yC2§C.ÚC4 D$>D"cD$†D$«D#ÐDôD&E:E.RE$E¦E"ÁE#äE"F++F(WF/€F'°FØF"öF@G!ZG!|G"žGÁG+ÉG õG"H59H5oH'¥H8ÍH(I0/I7`I ˜I*¹I.äI.JBJ%^J+„J°J*¸J/ãJ0K0DK0uKD¦K%ëK(L?:LPzL/ËL>ûL4:M4oM?¤M?äM8$N)]N‡NF§NîNGOOO&WO6~OWµO/ P9=PwP=‘P>ÏP8QFGQ#ŽQ<²Q5ïQ6%R%\Rt‚R(÷RN SGoS)·S*áS, T"9T"\T$T¤TÄTáT$U &U"GU"jU5U;ÃUAÿU+AV,mV7šV)ÒV%üV>"W$aW.†W/µW3åW4X0NX'X(§X$ÐX5õX-+Y'YY'Y)©Y%ÓYùY Z1%Z4WZ(ŒZ0µZ8æZ&['F[1n[2 [<Ó[$\(5\)^\1ˆ\7º\'ò\(]<C]<€]>½])ü])&^)P^z^@š^'Û^_/_KH_”_&£_'Ê_(ò_/`&K`'r`(š`3Ã`9÷`91a6ka2¢a)Õa)ÿa1)b)[b*…b5°b;æbA"c+dc,c0½c!îc'd8d"Ud,xd¥d#¿d$ãd9e9Be;|e*¸e&ãe4 f&?f&ff#f$±fÖfæf?þf&>g.eg,”g;Ág&ýgJ$hohh?«h/ëh4i$Pi*ui, i$Íi2òi%j%Dj-jj"˜j%»j0áj#k6kJk!\k2~k±k"Åk0èkl"-l1Pl@‚lAÃlm m2)m8\m(•m)¾mdèmMo _omo‹ožo»oÚo÷op!p 0pQpbpspp¢p¿p)Ôp'þp&qEq Vqdq"~q¡q¶q"Èq$ëq+r×tRTt?§tçtûtu$u7uVu2lu2Ÿu,Òu3ÿu"3v-Vv3„v+¸v-ävMw,`w%w%³w2Ùw2 x"?x"bx3…xH¹x`z"cz!†z%¨z!Îzðz\ {'i{‘{ª{Ç{$×{ü{$|5|P|f|!„|"¦|2É|&ü|)#}5M}%ƒ}©}'°}ñØ}Ê~é~ÿ~+N<O‹ÛAk€C­€ñ€#3,`,&¬=Ó#‚ 5‚%V‚;|‚(¸‚#á‚$ƒ *ƒ&Kƒ<rƒ0¯ƒ*àƒ( „A4„/v„%¦„/Ì„+ü„(…<H…<……)Â….ì…†2;†$n†#“†2·†ê†$ü†%!‡9G‡@‡1‡2ô‡T'ˆT|ˆ+ш,ýˆU*‰U€‰,Ö‰-Š21Š3dŠ4˜Š ÍŠFîŠ95‹1o‹6¡‹>Ø‹1Œ0IŒ=zŒ;¸Œ%ôŒ9%T9z:´Lï7<Ž6tŽ:«ŽHæŽ,/%\!‚K¤CðB4Ew6½3ô'(‘9P‘JБՑ%ñ‘$’!<’.^’$’5²’4è’=“S[“5¯“2å“ ”=%”Ec”.©”8Ø”3•1E•,w•*¤•)Ï•!ù•5–%Q–2w–2ª–"Ý–*—++—*W—<‚—5¿—7õ—2-˜-`˜0Ž˜M¿˜, ™6:™-q™Ÿ™:§™)â™1 šE>šA„š1ÆšUøš-N›=|›Aº›)ü›.&œ6Uœ7ŒœÄœ2ßœ2E/M;}5¹5ï5%ž][ž3¹ž.ížNŸPkŸC¼ŸQ KR <ž VÛ W2¡LŠ¡;ס,¢W@¢˜¢Y´¢£3£BK£iŽ£>ø£B7¤"z¤I¤Iç¤O1¥X¥%Ú¥>¦:?¦>z¦2¹¦‹ì¦0x§[©§f¨4l¨5¡¨=ר1© G©-h©(–©"¿©*â©5 ª$Cª)hª1’ª9ĪCþªRB«4•«5Ê«@¬4A¬+v¬I¢¬5ì¬O"­?r­P²­O®8S®<Œ®=É®/¯S7¯6‹¯3¯7ö¯4.°<c°& °#ǰ<ë°>(±2g±4š±:ϱ* ²*5²A`²5¢²HزA!³.c³/’³8³?û³0;´1l´Wž´Wö´NNµ.µ/̵.üµ/+¶K[¶4§¶ܶ0ó¶o$·”·.§·-Ö·,¸31¸)e¸*¸-º¸Jè¸R3¹R†¹NÙ¹9(º6bº3™º>ͺD »CQ»<•»CÒ»R¼4i¼5ž¼?Ô¼2½>G½%†½1¬½BÞ½#!¾-E¾3s¾T§¾Tü¾KQ¿4¿+Ò¿Hþ¿,GÀ,tÀ5¡À3×À ÁÁJ<Á2‡Á7ºÁ7òÁL*Â1wÂ]©Â!Ã!)ÃUKÃ-¡Ã6ÏÃ/Ä66ÄCmÄ5±ÄJçÄ2Å6JÅAÅ3ÃÅ6÷Å7.Æ+fÆ’Æ$®Æ7ÓÆ7 ÇCÇ4cÇD˜ÇÝÇ"ñÇAÈEVÈFœÈ"ãÈÉ6É@EÉ1†É2¸ÉˆC‰vÇ6?Ò)Ýl£Jl¤ã‹Kz­!2ôu©]·3¢³¼H”t¦ Šæì/‘4F¶ ye I «Ñ†»P,w˜ ŒN>Afo™•U^Q~ õ†9šºýð÷"å.Ö®pø :¢¿Óïþ$Gò¯:¸xü_¾Ãªú¥a–`’U„.c–¹f Ÿ=*î-û›;,6[j+‡ä>¨u=ŽSž©#cí¤yvYZbq(´s^… „™mÜ‘;dO®³~«*TŠkg4/CɈE_S&\ë2kpœè¦XB‹zÿMQ?ö²˜Žr 5½À µA‚Ëœ3hW¬{—<")°Ù5jš’}eo[ùF—W{X¡±1êâV“¹(•¬MJÁ&d“\@8G°žÏ…|D¶¡ƒÈ$²Í”#¯0·ÄihwL×9‚Z<gÕ!H8`ÛµV%Ð1¸qóÊnÎRŸxÌÚØbYŒ€R'ñÔ¥'E 7|±rÂinBtç-DaT£ÅºÞ}m¨ ­Pª‡N7á§K@§ƒL+ à%逛´‰O]IÆ0sß # %s block(s) # Rule(s) # gawk profile, created %s -C --copyright -E file --exec=file -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R file --command=file -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[file] --dump-variables[=file] -e 'program-text' --source='program-text' -f progfile --file=progfile -g --gen-pot -h --help -n --non-decimal-data -p[file] --profile[=file] -r --re-interval -t --lint-old -v var=val --assign=var=val # Function Call Stack: # Functions, listed alphabetically To report bugs, see node `Bugs' in `gawk.info', which is section `Reporting Problems and Bugs' in the printed version. %d is invalid as number of arguments for %s%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)%s blocks must have an action part%s third parameter is not a changeable object%s to "%s" failed (%s)%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk%s: `%s' argument to `-v' not in `var=value' form %s: array_ref to %s %s: close failed (%s)%s: empty (null) %s: empty (zero) %s: invalid option -- '%c' %s: is parameter %s: option '%c%s' doesn't allow an argument %s: option '--%s' doesn't allow an argument %s: option '--%s' requires an argument %s: option '-W %s' doesn't allow an argument %s: option '-W %s' is ambiguous %s: option '-W %s' requires an argument %s: option `-W %s' unrecognized, ignored %s: option requires an argument -- %c %s: option requires an argument -- '%c' %s: string literal as last arg of substitute has no effect%s: table_size = %d, array_size = %d %s: unrecognized option '%c%s' %s: unrecognized option '--%s' 'system' function not allowed in sandbox mode-Ft does not set FS to tab in POSIX awk-m option usage: `-m[fr] nnn'@include is a gawk extensionBINMODE value `%s' is invalid, treated as 3Copyright (C) 1989, 1991-%d Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Examples: gawk '{ sum += $1 }; END { print sum }' file gawk -F: '{ print $1 }' /etc/passwd IPv6 communication is not supportedInvalid back referenceInvalid character class nameInvalid collation characterInvalid content of \{\}Invalid multibyte data detected. There may be a mismatch between your data and your locale.Invalid preceding regular expressionInvalid range endInvalid regular expressionMemory exhaustedNF set to negative valueNo matchNo previous regular expressionOperation Not SupportedPOSIX does not allow `%s'POSIX does not allow `\x' escapesPOSIX does not allow operator `**'POSIX does not allow operator `**='POSIX options: GNU long options: (standard) Premature end of regular expressionRegular expression too bigShort options: GNU long options: (extensions) Sorry, don't know how to interpret `%s'SuccessTCP/IP communications are not supportedThis 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. Trailing backslashUnmatched ( or \(Unmatched ) or \)Unmatched [ or [^Unmatched \{Usage: %s [POSIX or GNU style options] -f progfile [--] file ... Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ... You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. [s]printf: format specifier does not have control letter[s]printf: value %g is out of range for `%%%c' format^ ran out for this one`%s' is a Bell Labs extension`%s' is a built-in function, it cannot be redefined`%s' is a gawk extension`%s' is invalid as a function name`%s' is not a legal variable name`%s' is not a variable name, looking for file `%s=%s'`%s' is not supported in old awk`--posix' overrides `--binary'`--posix' overrides `--traditional'`--posix'/`--traditional' overrides `--non-decimal-data'`-m[fr]' option irrelevant in gawk`BINMODE' is a gawk extension`FIELDWIDTHS' is a gawk extension`FPAT' is a gawk extension`IGNORECASE' is a gawk extension`L' is meaningless in awk formats; ignored`break' is not allowed outside a loop or switch`continue' is not allowed outside a loop`delete array' is a gawk extension`delete(array)' is a non-portable tawk extension`exit' cannot be called in the current context`extension' is a gawk extension`getline var' invalid inside `%s' rule`getline' invalid inside `%s' rule`goto' considered harmful! `h' is meaningless in awk formats; ignored`l' is meaningless in awk formats; ignored`length(array)' is a gawk extension`next' cannot be called from a `%s' rule`next' used in %s action`nextfile' cannot be called from a `%s' rule`nextfile' is a gawk extension`nextfile' used in %s action`return' used outside function context`|&' not supportedadump: argument not an arrayalready included source file `%s'and(%lf, %lf): fractional values will be truncatedand(%lf, %lf): negative values will give strange resultsand: received non-numeric first argumentand: received non-numeric second argumentasort: cannot use a subarray of first arg for second argasort: cannot use a subarray of second arg for first argasort: first argument not an arrayasort: second argument not an arrayasorti: cannot use a subarray of first arg for second argasorti: cannot use a subarray of second arg for first argasorti: first argument not an arrayasorti: second argument not an arrayassignment used in conditional contextatan2: received non-numeric first argumentatan2: received non-numeric second argumentattempt to access field %ldattempt to field reference from non-numeric valueattempt to field reference from null stringattempt to use a scalar value as arrayattempt to use array `%s' in a scalar contextattempt to use array `%s["%.*s"]' in a scalar contextattempt to use function `%s' as an arrayattempt to use scalar `%s' as an arrayattempt to use scalar `%s["%.*s"]' as an arrayattempt to use scalar parameter `%s' as an arraybackslash at end of stringbackslash not last character on linebad `%sFMT' specification `%s'buffer overflow in genflags2strcall of `length' without parentheses is not portablecan not use special variable `%s' for indirect function callcan't open pipe `%s' for input (%s)can't open pipe `%s' for output (%s)can't open source file `%s' for reading (%s)can't open two way pipe `%s' for input/output (%s)can't read sourcefile `%s' (%s)can't redirect from `%s' (%s)can't redirect to `%s' (%s)can't set binary mode on stderr (%s)can't set binary mode on stdin (%s)can't set binary mode on stdout (%s)can't use function name `%s' as variable or arraycannot create child process for `%s' (fork: %s)cannot open file `%s' for reading (%s)cannot open pipe `%s' (%s)cannot use function `%s' as variable namecannot use gawk builtin `%s' as variable nameclose of `%s' failed (%s).close of fd %d (`%s') failed (%s)close of master pty failed (%s)close of pipe failed (%s)close of redirection that was never openedclose of slave pty failed (%s)close of stdin in child failed (%s)close of stdout in child failed (%s)close: `%.*s' is not an open file, pipe or co-processclose: redirection `%s' not opened with `|&', second argument ignoredclose: second argument is a gawk extensionclose: second argument must be `to' or `from'cmd. line:co-process flush of pipe to `%s' failed (%s).command line argument `%s' is a directory: skippedcompl(%lf): fractional value will be truncatedcompl(%lf): negative value will give strange resultscompl: received non-numeric argumentcos: received non-numeric argumentcould not allocate more input memorycould not open `%s' for writing (%s)could not open `%s' for writing: %scould not open `%s', mode `%s'could not pre-open /dev/null for fd %ddata file `%s' is emptydcgettext: `%s' is not a valid locale categorydelete: index `%s' not in array `%s'division by zero attempteddivision by zero attempted in `%%'division by zero attempted in `%%='division by zero attempted in `/='duplicate `default' detected in switch bodyduplicate case values in switch body: %seach rule must have a pattern or an action partempty argument to `-e/--source' ignoredempty filename after @includeempty program text on command lineenvironment variable `POSIXLY_CORRECT' set: turning on `--posix'error reading input file `%s': %serror writing standard error (%s)error writing standard output (%s)error: escape sequence `\%c' treated as plain `%c'exp: argument %g is out of rangeexp: received non-numeric argumentexpression for `%s' redirection has null string valueexpression in `%s' redirection only has numeric valueextension: can't redefine function `%s'extension: can't use gawk built-in `%s' as function nameextension: function `%s' already definedextension: function name `%s' previously definedextension: illegal character `%c' in function name `%s'extension: missing function nameextensions are not allowed in sandbox modefailure status (%d) on file close of `%s' (%s)failure status (%d) on pipe close of `%s' (%s)fatal error: internal errorfatal error: internal error: segfaultfatal error: internal error: stack overflowfatal: fatal: `$' is not permitted in awk formatsfatal: `$' not permitted after period in formatfatal: `L' is not permitted in POSIX awk formatsfatal: `h' is not permitted in POSIX awk formatsfatal: `l' is not permitted in POSIX awk formatsfatal: arg count %ld greater than total number of supplied argumentsfatal: arg count with `$' must be > 0fatal: extension: cannot open `%s' (%s) fatal: extension: library `%s': cannot call function `%s' (%s) fatal: extension: library `%s': does not define `plugin_is_GPL_compatible' (%s) fatal: must use `count$' on all formats or nonefatal: no `$' supplied for positional field width or precisionfatal: not enough arguments to satisfy format stringfflush: `%s' is not an open file, pipe or co-processfflush: cannot flush: file `%s' opened for reading, not writingfflush: cannot flush: pipe `%s' opened for reading, not writingfield width and precision are ignored for `%%' specifierfield width is ignored for `%%' specifierfile flush of `%s' failed (%s).filename `%s' for `%s' redirection may be result of logical expressionfloating point exceptionfor loop: array `%s' changed size from %ld to %ld during loop executionfrom %sfunction `%s' called but never definedfunction `%s' called with more arguments than declaredfunction `%s' called with space between name and `(', or used as a variable or an arrayfunction `%s' defined but never called directlyfunction `%s' defined to take no more than %d argument(s)function `%s' not definedfunction `%s': argument #%d: attempt to use array as a scalarfunction `%s': argument #%d: attempt to use scalar as an arrayfunction `%s': can't use function name as parameter namefunction `%s': can't use special variable `%s' as a function parameterfunction `%s': missing argument #%dfunction `%s': parameter #%d, `%s', duplicates parameter #%dfunction `%s': parameter `%s' shadows global variablefunction called indirectly through `%s' does not existfunction name `%s' previously definedgawk is a pattern scanning and processing language. By default it reads standard input and writes standard output. gensub: third argument of 0 treated as 1hex escape \x%.*s of %d characters probably not interpreted the way you expectignoring unknown format specifier character `%c': no argument convertedindex: received non-string first argumentindex: received non-string second argumentindirect function calls are a gawk extensionint: received non-numeric argumentinternal error: %s with null vnameinvalid FIELDWIDTHS value, near `%s'invalid char '%c' in expressioninvalid subscript expressionlength: received array argumentlength: received non-string argumentlocal port %s invalid in `/inet'log: received negative argument %glog: received non-numeric argumentlshift(%lf, %lf): fractional values will be truncatedlshift(%lf, %lf): negative values will give strange resultslshift(%lf, %lf): too large shift value will give strange resultslshift: received non-numeric first argumentlshift: received non-numeric second argumentmake_builtin: negative argument count for function `%s'match: third argument is a gawk extensionmatch: third argument is not an arraymktime: at least one of the values is out of the default rangemktime: received non-string argumentmoving pipe to stdin in child failed (dup: %s)moving pipe to stdout in child failed (dup: %s)moving slave pty to stdin in child failed (dup: %s)moving slave pty to stdout in child failed (dup: %s)multicharacter value of `RS' is a gawk extensionmultistage two-way pipelines don't workmust supply a remote hostname to `/inet'must supply a remote port to `/inet'no (known) protocol supplied in special filename `%s'no explicit close of co-process `%s' providedno explicit close of file `%s' providedno explicit close of pipe `%s' providedno explicit close of socket `%s' providedno hex digits in `\x' escape sequenceno pre-opened fd %dno program text at all!non-redirected `getline' invalid inside `%s' rulenon-redirected `getline' undefined inside END actionnull string for `FS' is a gawk extensionold awk does not support multidimensional arraysold awk does not support multiple `BEGIN' or `END' rulesold awk does not support operator `**'old awk does not support operator `**='old awk does not support regexps as value of `FS'old awk does not support the `\%c' escape sequenceold awk does not support the keyword `in' except after `for'opcode %s not an operator or keywordoperator `^' is not supported in old awkoperator `^=' is not supported in old awkor(%lf, %lf): fractional values will be truncatedor(%lf, %lf): negative values will give strange resultsor: received non-numeric first argumentor: received non-numeric second argumentpatsplit: cannot use a subarray of fourth arg for second argpatsplit: cannot use a subarray of second arg for fourth argpatsplit: cannot use the same array for second and fourth argspatsplit: fourth argument is not an arraypatsplit: second argument is not an arraypatsplit: third argument must be non-nullpipe flush of `%s' failed (%s).plain `print' in BEGIN or END rule should probably be `print ""'precision is ignored for `%%' specifierprintf: no argumentsrange of the form `[%c-%c]' is locale dependentreached system limit for open files: starting to multiplex file descriptorsreason unknownredir2str: unknown redirection type %dredirection not allowed in sandbox modereference to uninitialized argument `%s'reference to uninitialized element `%s["%.*s"]'reference to uninitialized field `$%d'reference to uninitialized field `$%ld'reference to uninitialized variable `%s'regexp component `%.*s' should probably be `[%.*s]'regexp constant `/%s/' looks like a C comment, but is notregexp constant `//' looks like a C++ comment, but is notregexp constant for parameter #%d yields boolean valueregular expression on left of `~' or `!~' operatorregular expression on right of assignmentregular expression on right of comparisonremote host and port information (%s, %s) invalidrestoring stdin in parent process failed restoring stdout in parent process failed rshift(%lf, %lf): fractional values will be truncatedrshift(%lf, %lf): negative values will give strange resultsrshift(%lf, %lf): too large shift value will give strange resultsrshift: received non-numeric first argumentrshift: received non-numeric second argumentrunning %s setuid root may be a security problemsending profile to standard errorsending variable list to standard errorshadow_funcs() called twice!sin: received non-numeric argumentsort comparison function `%s' is not definedsource file `%s' is emptysource file does not end in newlinespecial file name `%s' is incompletesplit: cannot use a subarray of fourth arg for second argsplit: cannot use a subarray of second arg for fourth argsplit: cannot use the same array for second and fourth argssplit: fourth argument is a gawk extensionsplit: fourth argument is not an arraysplit: null string for third arg is a gawk extensionsplit: second argument is not an arraysqrt: called with negative argument %gsqrt: received non-numeric argumentsrand: received non-numeric argumentstandard outputstatement has no effectstrftime: format value in PROCINFO["strftime"] has numeric typestrftime: received empty format stringstrftime: received non-numeric second argumentstrftime: received non-string first argumentstrftime: second argument less than 0 or too big for time_tsubscript of array `%s' is null stringsubstr: length %g at start index %g exceeds length of first argument (%lu)substr: length %g is not >= 0substr: length %g is not >= 1substr: length %g too big for string indexing, truncating to %gsubstr: non-integer length %g will be truncatedsubstr: non-integer start index %g will be truncatedsubstr: source string is zero lengthsubstr: start index %g is invalid, using 1substr: start index %g is past end of stringsystem: received non-string argumenttawk regex modifier `/.../%c' doesn't work in gawkthere were shadowed variables.tolower: received non-string argumenttoo many arguments supplied for format stringtoo many pipes or input files opentoupper: received non-string argumentturning off `--lint' due to assignment to `LINT'unexpected newline or end of stringunknown nodetype %dunknown opcode %dunknown value for field spec: %d unnecessary mixing of `>' and `>>' for file `%.*s'unterminated regexpunterminated regexp at end of fileunterminated regexp ends with `\' at end of fileunterminated stringunwind_stack: unexpected type `%s'use of `\ #...' line continuation is not portableuse of dcgettext(_"...") is incorrect: remove leading underscoreuse of dcngettext(_"...") is incorrect: remove leading underscoreuse of non-array as arraywarning: xor(%lf, %lf): fractional values will be truncatedxor(%lf, %lf): negative values will give strange resultsxor: received non-numeric first argumentxor: received non-numeric second argumentProject-Id-Version: gawk 4.0.0h Report-Msgid-Bugs-To: arnold@skeeve.com POT-Creation-Date: 2012-03-28 22:03+0200 PO-Revision-Date: 2012-01-30 07:42-0600 Last-Translator: Cristian Othón Martínez Vera Language-Team: Spanish Language: es MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # bloque(s) %s # Regla(s) # perfil de gawk, creado %s -C --copyright -E fichero --exec=fichero -F sc --field-separator=sc -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R fichero --command=fichero -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[fichero] --dump-variables[=fichero] -e 'texto-prog' --source='texto-prog' -f fichprog --file=fichprog -g --gen-pot -h --help -n --non-decimal-data -p[fichero] --profile[=fichero] -r --re-interval -t --lint-old -v var=valor --assign=var=valor # Pila de Llamadas de Funciones: # Funciones, enumeradas alfabéticamente Para reportar bichos, consulte el nodo `Bugs' en `gawk.info', el cual corresponde a la sección `Reporting Problems and Bugs' en la versión impresa. Reporte los errores de los mensajes en español a . %d es inválido como número de argumentos para %s%s %s `%s': no se pueden obtener las opciones del fd: (fcntl F_GETFD: %s)%s %s `%s': no se puede establecer close-on-exec: (fcntl F_SETFD: %s)los bloques %s deben tener una parte de acciónel tercer argumento de %s no es un objecto modificablefalló %s a "%s" (%s)%s: %d: el modificador de expresión regular `/.../%c` de tawk no funciona en gawk%s: el argumento `%s' para `-v' no es de la forma `var=valor' %s: array_ref a %s %s: falló close (%s)%s: vacío (nulo) %s: vacío (cero) %s: opción inválida -- '%c' %s: es un parámetro %s: la opción '%c%s' no admite ningún argumento %s: la opción '--%s' no admite ningún argumento %s: la opción '--%s' requiere un argumento %s: la opción '-W %s' no admite ningún argumento %s: la opción '-W %s' es ambigua %s: la opción '-W %s' requiere un argumento %s: no se reconoce la opción `-W %s', se descarta %s: la opción requiere un argumento -- %c %s: la opción requiere un argumento -- '%c' %s: la literal de cadena como último argumento de substitute no tiene efecto%s: tamaño_tabla = %d, tamaño_matriz = %d %s: no se reconoce la opción '%c%s' %s: no se reconoce la opción '--%s' no se permite la función 'system' en modo sandbox-Ft no establece FS a tabulador en el awk de POSIXuso de la opción -m: `-m[fr]' nnn@include es una extensión de gawkel valor BINMODE `%s' es inválido; se trata como 3Copyright (C) 1989, 1991-%d Free Software Foundation. Este programa es software libre; se puede redistribuir y/o modificar bajo los términos de la Licencia Pública General de GNU tal como es publicada por la Free Software Foundation; ya sea por la versión 3 de la Licencia, o (a su elección) cualquier versión posterior. Ejemplos: gawk '{ sum += $1 }; END { print sum }' fichero gawk -F: '{ print $1 }' /etc/passwd no se admite la comunicación IPv6Referencia hacia atrás inválidaNombre de clase de caracter inválidoCaracter de ordenación inválidoContenido inválido de \{\}Se detectaron datos multibyte inválidos. Puede ser que no coincidan sus datos con su local.Expresión regular precedente inválidaFinal de rango inválidoExpresión regular inválidaMemoria agotadase definió NF con un valor negativoNo hay coincidenciaNo hay una expresión regular previaNo Se Admite La OperaciónPOSIX no permite `%s'POSIX no permite escapes `\x'POSIX no permite el operador `**'POSIX no permite el operador `**='Opciones POSIX: Opciones largas GNU: (estándar) Fin prematuro de la expresión regularLa expresión regular es demasiado grandeOpciones cortas: Opciones largas GNU: (extensiones) Perdón, no se cómo interpretar `%s'Éxitono se admiten las comunicaciones TCP/IPEste programa se distribuye con la esperanza que será útil, pero SIN NINGUNA GARANTÃA; aún sin la garantía implícita de COMERCIABILIDAD o IDONEIDAD PARA UN FIN DETERMINADO. Vea la Licencia Pública General de GNU para más detalles. Barra invertida extra al final( o \( desemparejados) o \) desemparejados[ o [^ desemparejados\{ desemparejadoModo de empleo: %s [opciones estilo POSIX o GNU] -f fichprog [--] fichero ... Modo de empleo: %s [opciones estilo POSIX o GNU] [--] %cprograma%c fichero ... Debió recibir una copia de la Licencia Pública General de GNU junto con este programa. Si no es así, consulte http://www.gnu.org/licenses/. [s]printf: el especificador de formato no tiene letras de control[s]printf: el valor %g está fuera del rango para el formato `%%%c'se acabó ^ para éste`%s' es una extensión de Bell Labs`%s' es una función interna, no se puede redefinir`%s' es una extensión de gawk`%s' es inválido como un nombre de función`%s' no es un nombre de variable legal`%s' no es un nombre de variable, se busca el fichero `%s=%s'`%s' no se admite en el awk antiguo`--posix' se impone a `--binary'`--posix' se impone a `--traditional'`--posix'/`--traditional' se imponen a `--non-decimal-data'la opción -m[fr] es irrelevante en gawk`BINMODE' es una extensión de gawk`FIELDWIDTHS' es una extensión gawk`FPAT' es una extensión de gawk`IGNORECASE' es una extensión de gawk`L' no tiene significado en los formatos de awk; se descartano se permite `break' fuera de un bucle o switchno se permite `continue' fuera de un bucle`delete array' es una extensión de gawk`delete(array)' es una extensión de tawk que no es transportable`exit' no se puede llamar en el contexto actual`extension' es una extensión de gawk`getline var' inválido dentro de la regla `%s'`getline' inválido dentro de la regla `%s'¡`goto' se considera dañino! `h' no tiene significado en los formatos de awk; se descarta`l' no tiene significado en los formatos de awk; se descarta`length(array)' es una extensión de gawk`next' no se puede llamar desde una regla `%s'se usó `next' en la acción %s`nextfile' no se puede llamar desde una regla `%s'`nextfile' es una extensión de gawkse usó `nextfile' en la acción %sse usó `return' fuera del contexto de la funciónno se admite `|&'adump: el argumento no es una matrizya se incluyó el fichero fuente `%s'and(%lf, %lf): los valores fraccionarios serán truncadosand(%lf, %lf): los valores negativos darán resultados extrañosand: el primer argumento recibido no es númericoand: el segundo argumento recibido no es númericoasort: no se puede usar una submatriz del primer argumento para el segundo argumentoasort: no se puede usar una submatriz del segundo argumento para el primer argumentoasort: el primer argumento no es una matrizasort: el segundo argumento no es una matrizasorti: no se puede usar una submatriz del primer argumento para el segundo argumentoasorti: no se puede usar una submatriz del segundo argumento para el primer argumentoasorti: el primer argumento no es una matrizasorti: el segundo argumento no es una matrizse usó una asignación en un contexto condicionalatan2: el primer argumento recibido no es númericoatan2: el segundo argumento recibido no es númericose intentó acceder al campo %ldse intentó una referencia de campo desde un valor que no es númericose intentó una referencia de campo desde una cadena nulase intentó usar un valor escalar como una matrizse intentó usar la matriz `%s' en un contexto escalarse intentó usar la matriz `%s["%.*s"]' en un contexto escalarse intentó usar la función `%s' como una matrizse intentó usar el escalar `%s' como una matrizse intentó usar el dato escalar `%s["%.*s"]' como una matrizse intentó usar el parámetro escalar `%s como una matriz'barra invertida al final de la cadenala barra invertida no es el último caracter en la líneaespecificación `%sFMT' `%s' erróneadesbordamiento de almacenamiento temporal en genflags2strla llamada de `length' sin paréntesis no es transportableno se puede usar la variable especial `%s' como llamada indirecta a funciónno se puede abrir la tubería `%s' para la entrada (%s)no se puede abrir la tubería `%s' para la salida (%s)no se puede abrir el fichero fuente `%s' para lectura (%s)no se puede abrir la tubería de dos vías `%s' para entrada/salida (%s)no se puede leer el fichero fuente `%s' (%s)no se puede redirigir desde `%s' (%s)no se puede redirigir a `%s' (%s)no se puede establecer el modo binario en la salida estándar de error (%s)no se puede establecer el modo binario en la entrada estándar (%s)no se puede establecer el modo binario en la salida estándar (%s)no se puede usar el nombre de la función `%s' como variable o matrizno se puede crear el proceso hijo para `%s' (fork: %s)no se puede abrir el fichero `%s' para lectura (%s)no se puede abrir la tubería `%s' (%s)no se puede usar la función `%s' como nombre de variableno se puede utilizar la orden interna de gawk `%s' como nombre de variablefalló al cerrar `%s' (%s).falló al cerrar el df %d (`%s') (%s)falló al cerrar el pty maestro (%s)falló al cerrar la tubería (%s)se cerró una redirección que nunca se abriófalló al cerrar el pty esclavo (%s)falló al cerrar la entrada estándar en el hijo (%s)falló al cerrar la salida estándar en el hijo (%s)close: `%.*s' no es un fichero abierto, tubería o co-procesoclose: la redirección `%s' no se abrió con `|&', se descarta el segundo argumentoclose: el segundo argumento es una extensión de gawkclose: el segundo argumento debe ser `to' o `from'línea ord.:falló la limpieza del co-proceso de la tubería a `%s' (%s).el argumento de la línea de órdenes `%s' es un directorio: se saltacompl(%lf): el valor fraccionario se truncarácompl(%lf): el valor negativo dará resultados extrañoscompl: se recibió un argumento que no es númericocos: se recibió un argumento que no es númericono se puede reservar más memoria de entradano se puede abrir `%s' para escritura (%s)no se puede abrir `%s' para escritura: %sno se puede abrir `%s', modo `%s'no se puede abrir previamente /dev/null para el df %del fichero de datos `%s' está vacíodcgettext: `%s' no es una categoría local válidadelete: el índice `%s' no está en la matriz `%s'se intentó una división por cerose intentó una división por cero en `%%'se intentó una división por cero en `%%='se intentó una división por cero en `/='se detectó un `default' duplicado en el cuerpo de un switchvalores case duplicados en el cuerpo de un switch: %scada regla debe tener un patrón o una parte de acciónse descarta el argumento vacío para `-e/--source'nombre de fichero vacío después de @includetexto de programa vacío en la linea de órdenesla variable de ambiente `POSIXLY_CORRECT' está definida: se activa `--posix'error al leer el fichero de entrada `%s': %serror al escribir en la salida estándar de error (%s)error al escribir en la salida estándar (%s)error: la secuencia de escape `\%c' se trata como una simple `%c'exp: el argumento %g está fuera de rangoexp: se recibió un argumento que no es númericola expresión para la redirección `%s' tiene un valor de cadena nulala expresión en la redirección `%s' sólo tiene valor numéricoextension: no se puede redefinir la función `%s'extension: no se puede utilizar la orden interna de gawk `%s' como nombre de funciónextension: la función `%s' ya está definidaextension: el nombre de función `%s' se definió previamenteextension: carácter ilegal `%c' en el nombre de la función `%s'extension: falta el nombre de la funciónno se permiten las extensiones en modo sandboxestado de fallo (%d) al cerrar el fichero de `%s' (%s)estado de fallo (%d) al cerrar la tubería de `%s' (%s)error fatal: error internoerror fatal: error interno: falla de segmentaciónerror fatal: error interno: desbordamiento de pilafatal: fatal: no se permite `$' en los formatos de awkfatal: no se permite `$' después de un punto en el formatofatal: no se permite `L' en los formatos POSIX de awkfatal: no se permite `h' en los formatos POSIX de awkfatal: no se permite `l' en los formatos POSIX de awkfatal: la cuenta de argumentos %ld es mayor que el número total de argumentos proporcionadosfatal: la cuenta de argumentos con `$' debe ser > 0fatal: extension: no se puede abrir `%s' (%s) fatal: extension: la biblioteca `%s': no puede llamar a la función `%s' (%s) fatal: extension: la biblioteca `%s': no define `plugin_is_GPL_compatible' (%s) fatal: se debe utilizar `count$' en todos los formatos o en ningunofatal: no se proporciona `$' para la anchura o la precisión del campo posicionalfatal: no hay suficientes argumentos para satisfacer a la cadena de formatofflush: `%s' no es un fichero abierto, tubería o co-procesofflush: no se puede limpiar: se abrió el fichero `%s' para lectura, no para escriturafflush: no se puede limpiar: se abrió la tubería `%s' para lectura, no para escriturase descartan la anchura del campo y la precisión para el especificador `%%'se descarta la anchura del campo para el especificador `%%'falló la limpieza del fichero de `%s' (%s).el fichero `%s' para la redirección `%s' puede ser resultado de una expresión lógicaexcepción de coma flotantebucle for: la matriz `%s' cambió de tamaño de %ld a %ld durante la ejecución del bucledesde %sse llamó a la función `%s' pero nunca se definióse llamó a la función `%s' con más argumentos de los declaradosse llamó la función `%s' con espacio entre el nombre y el `(', o se usó como una variable o una matrizse definió la función `%s' pero nunca se llamó directamentela función `%s' se definió para tomar no más de %d argumento(s)la función `%s' no está definidafunción `%s': argumento #%d: se intentó usar una matriz como un escalarfunción `%s': argumento #%d: se intentó usar un escalar como una matrizfunción `%s': no se puede usar un nombre de función como nombre de parámetrofunción `%s': no se puede usar la variable especial `%s' como un parámetro de funciónfunción `%s': falta el argumento #%dfunción `%s': parámetro #%d, `%s', duplica el parámetro #%dfunción `%s': parámetro `%s' oscurece la variable globalno existe la función llamada indirectamente a través de `%s'el nombre de función `%s' se definió previamentegawk es un lenguaje de reconocimiento y procesamiento de patrones. Por defecto lee la entrada estándar y escribe en la salida estándar. gensub: el tercer argumento de 0 se trata como 1el escape hexadecimal \x%.*s de %d caracteres tal vez no se interprete de la forma esperadase descarta el carácter especificador de formato `%c' desconocido: no se convirtió ningún argumentoindex: el primer argumento recibido no es una cadenaindex: el segundo argumento recibido no es una cadenalas llamadas indirectas a función son una extensión de gawkint: se recibió un argumento que no es númericoerror interno: %s con vname nulovalor de FIELDWIDTHS inválido, cerca de `%s'caracter '%c' inválido en la expresiónexpresión de subíndice inválidalength: se recibió un argumento de matrizlength: se recibió un argumento que no es una cadenapuerto local %s inválido en `/inet'log: se recibió el argumento negativo %glog: se recibió un argumento que no es númericolshift(%lf, %lf): los valores fraccionarios se truncaránlshift(%lf, %lf): los valores negativos darán resultados extrañoslshift(%lf, %lf): un valor de desplazamiento muy grande dará resultados extrañoslshift: el primer argumento recibido no es númericolshift: el segundo argumento recibido no es númericomake_builtin: cuenta de argumento negativa para la función `%s'match: el tercer argumento es una extensión de gawkmatch: el tercer argumento no es una matrizmktime: por lo menos uno de los valores está fuera del rango por defectomktime: se recibió un argumento que no es una cadenafalló el movimiento de la tubería a la entrada estándar en el hijo (dup: %s)falló el movimiento a la salida estándar en el hijo (dup: %s)falló el movimiento del pty esclavo a la entrada estándar en el hijo (dup: %s)falló el movimiento del pty esclavo a la salida estándar en el hijo (dup: %s)el valor multicaracter de `RS' es una extensión de gawklas líneas de trabajo de dos vías multiestado no funcionanse debe proporcionar a `/inet' un nombre de anfitrión remotose debe proporcionar a `/inet' un puerto remotono se proporciona algún protocolo (conocido) en el nombre de fichero especial `%s'no se provee el cerrado explícito del co-proceso `%s'no se provee el cerrado explícito del fichero `%s'no se provee el cerrado explícito del la tubería `%s'no se provee el cerrado explícito del `socket' `%s'no hay dígitos hexadecimales en la secuencia de escape `\x'no existe el df %d abierto previamente¡No hay ningún programa de texto!`getline' no redirigido es inválido dentro de la regla `%s'`getline' no redirigido indefinido dentro de la acción de ENDla cadena nula para `FS' es una extensión de gawkel awk antiguo no admite matrices multidimensionalesel awk antiguo no admite múltiples reglas `BEGIN' o `END'el awk antiguo no admite el operador `**='el awk antiguo no admite el operador `**='el awk antiguo no admite expresiones regulares como valor de `FS'el awk antiguo no admite la secuencia de escape `\%c'el awk antiguo no admite la palabra clave `in' excepto después de `for'el código de operación %s no es un operador o una palabra claveel operador `^' no se admite en el awk antiguoel operador `^=' no se admite en el awk antiguoor(%lf, %lf): los valores fraccionarios serán truncadosor(%lf, %lf): los valores negativos darán resultados extrañosor: el primer argumento recibido no es númericoor: el segundo argumento recibido no es númericopatsplit: no se puede usar una submatriz del cuarto argumento para el segundo argumentopatsplit: no se puede usar una submatriz del segundo argumento para el cuarto argumentopatsplit: no se puede usar la misma matriz para el segundo y cuarto argumentospatsplit: el cuarto argumento no es una matrizpatsplit: el segundo argumento no es una matrizpatsplit: el tercer argumento no debe ser nulofalló la limpieza de la tubería de `%s' (%s).el `print' simple en la regla BEGIN o END probablemente debe ser `print ""'se descarta la precisión para el especificador `%%'printf: sin argumentosel rango de la forma `[%c-%c]' depende del localse alcanzó el límite del sistema para ficheros abiertos: comenzando a multiplexar los descriptores de ficherorazón desconocidaredir2str: tipo de redirección %d desconocidano se permite la redirección en modo sandboxreferencia al argumento sin inicializar `%s'referencia al elemento sin inicializar `%s["%.*s"]'referencia al campo sin inicializar `$%d'referencia al campo sin inicializar `$%ld'referencia a la variable sin inicializar `%s'el componente de expresión regular `%.*s' probablemente debe ser `[%.*s]'la constante de expresión regular `/%s/' parece un comentario de C, pero no lo esla constante de expresión regular `//' parece un comentario de C++, pero no lo esla constante de expresión regular para el parámetro #%d da un valor booleanoexpresión regular a la izquierda del operador `~' o `!~'expresión regular del lado derecho de una asignaciónexpresión regular a la derecha de una comparaciónanfitrión remoto e información de puerto (%s, %s) inválidosfalló la restauración de la entrada estándar en el proceso padre falló la restauración de la salida estándar en el proceso padre rshift(%lf, %lf): los valores fraccionarios serán truncadosrshift(%lf, %lf): los valores negativos darán resultados extrañosrshift(%lf, %lf): un valor de desplazamiento muy grande dará resultados extrañosrshift: el primer argumento recibido no es númericorshift: el segundo argumento recibido no es númericoejecutar %s como setuid root puede ser un problema de seguridadse envía el perfil a la salida estándar de errorse envía la lista de variables a la salida estándar de error¡se llamó shadow_funcs() dos veces!sin: se recibió un argumento que no es númericola función de comparación de ordenamiento `%s' no está definidael fichero fuente `%s' está vacíoel fichero fuente no termina con línea nuevael nombre de fichero especial `%s' está incompletosplit: no se puede usar una submatriz del cuarto argumento para el segundo argumentosplit: no se puede usar una submatriz del segundo argumento para el cuarto argumentosplit: no se puede usar la misma matriz para el segundo y cuarto argumentossplit: el cuarto argumento es una extensión de gawksplit: el cuarto argumento no es una matrizsplit: la cadena nula para el tercer argumento es una extensión de gawksplit: el segundo argumento no es una matrizsqrt: se llamó con el argumento negativo %gsqrt: se recibió un argumento que no es un númericosrand: se recibió un argumento que no es númericosalida estándarla declaración no tiene efectostrftime: el valor de formato en PROCINFO["strftime"] tiene tipo numéricostrftime: se recibió una cadena de formato vacíastrftime: el segundo argumento recibido no es númericostrftime: el primer argumento recibido no es una cadenastrftime: el segundo argumento es menor que 0 o demasiado grande para time_tel subíndice de la matriz `%s' es la cadena nulasubstr: la cadena %g en el índice de inicio %g excede la longitud del primer argumento (%lu)substr: la longitud %g no es >= 0substr: la longitud %g no es >= 1substr: la longitud %g es demasiado grande para ser índice de cadena, se trunca a %gsubstr: se truncará la longitud no entera %gsubstr: se truncará el índice de inicio no entero %gsubstr: la cadena de origen es de longitud cerosubstr: el índice de inicio %g es inválido, se usa 1substr: el índice de inicio %g está después del fin de la cadenasystem: se recibió un argumento que no es una cadenael modificador de expresión regular `/.../%c` de tawk no funciona en gawkhay variables opacadas.tolower: se recibió un argumento que no es una cadenase proporcionaron demasiados argumentos para la cadena de formatodemasiadas tuberías o ficheros de entrada abiertostoupper: se recibió un argumento que no es una cadenase desactiva `--lint' debido a una asignación a `LINT'nueva línea o fin de la cadena inesperadostipo de nodo %d desconocidocódigo de operación %d desconocidovalor desconocido para la especificación de campo: %d mezcla innecesaria de `>' y `>>' para el fichero `%.*s'expresión regular sin terminarexpresión regular sin terminar al final del ficheroexpresión regular sin terminar termina con `\` al final del ficherocadena sin terminarunwind_stack: tipo `%s' inesperadoel uso de la continuación de línea `\ #...' no es transportableel uso de dcgettext(_"...") es incorrecto: quite el subrayado inicialel uso de dcngettext(_"...") es incorrecto: quite el subrayado inicialuso de una matriz que no es matrizaviso: xor(%lf, %lf): los valores fraccionarios se truncaránxor(%lf, %lf): los valores negativos darán resultados extrañosxor: el primer argumento recibido no es númericoxor: el segundo argumento recibido no es númericogawk-4.0.1+dfsg.orig/po/gawk.pot0000644000175000017500000011345711734667242015467 0ustar schotschot# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: gawk 4.0.1\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\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: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:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "" #: array.c:257 #, c-format msgid "attempt to use scalar `%s' as an array" msgstr "" #: 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 "" #: array.c:513 #, c-format msgid "reference to uninitialized element `%s[\"%.*s\"]'" msgstr "" #: array.c:519 #, c-format msgid "subscript of array `%s' is null string" msgstr "" #: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "" #: 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:915 #, c-format msgid "%s: empty (zero)\n" msgstr "" #: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "" #: array.c:954 #, c-format msgid "%s: is parameter\n" msgstr "" #: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "" #: 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:252 msgid "each rule must have a pattern or an action part" msgstr "" #: awkgram.y:323 awkgram.y:334 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "" #: awkgram.y:371 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "" #: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "" #: awkgram.y:436 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "" #: 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: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 "`next' used in %s action" msgstr "" #: awkgram.y:836 msgid "`nextfile' is a gawk extension" msgstr "" #: awkgram.y:841 #, c-format msgid "`nextfile' used in %s action" msgstr "" #: awkgram.y:865 msgid "`return' used outside function context" msgstr "" #: awkgram.y:925 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" #: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "" #: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "" #: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "" #: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "" #: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "" #: awkgram.y:1265 awkgram.y:1419 msgid "old awk does not support the keyword `in' except after `for'" msgstr "" #: awkgram.y:1275 msgid "regular expression on right of comparison" msgstr "" #: 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:1421 msgid "old awk does not support multidimensional arrays" msgstr "" #: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "" #: awkgram.y:1580 msgid "indirect function calls are a gawk extension" msgstr "" #: awkgram.y:1593 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "" #: awkgram.y:1671 msgid "invalid subscript expression" msgstr "" #: awkgram.y:1711 msgid "use of non-array as array" msgstr "" #: awkgram.y:1975 awkgram.y:1995 msg.c:98 msgid "warning: " msgstr "" #: 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: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:2620 #, c-format msgid "source file `%s' is empty" msgstr "" #: awkgram.y:2797 msgid "source file does not end in newline" msgstr "" #: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" #: awkgram.y:2924 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" #: awkgram.y:2928 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" #: awkgram.y:2935 msgid "unterminated regexp" msgstr "" #: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "" #: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "" #: awkgram.y:3014 msgid "backslash not last character on line" msgstr "" #: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "" #: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "" #: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "" #: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "" #: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "" #: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "" #: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "" #: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "" #: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "" #: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "" #: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "" #: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "" #: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "" #: awkgram.y:3619 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "" #: awkgram.y:3654 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" #: awkgram.y:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "" #: 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:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" #: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" #: awkgram.y:3911 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "" #: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "" #: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "" #: awkgram.y:4112 msgid "sending variable list to standard error" msgstr "" #: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "" #: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "" #: awkgram.y:4176 msgid "there were shadowed variables." msgstr "" #: awkgram.y:4206 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "" #: awkgram.y:4210 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" #: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" msgstr "" #: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" msgstr "" #: awkgram.y:4403 #, c-format msgid "function `%s' defined but never called directly" msgstr "" #: awkgram.y:4435 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" #: 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:4791 eval.c:2056 msgid "division by zero attempted" msgstr "" #: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "" #: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "" #: builtin.c:121 msgid "standard output" msgstr "" #: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "" #: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" msgstr "" #: builtin.c:200 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" #: builtin.c:203 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" #: builtin.c:215 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "" #: builtin.c:333 msgid "index: received non-string first argument" msgstr "" #: builtin.c:335 msgid "index: received non-string second argument" msgstr "" #: builtin.c:457 msgid "int: received non-numeric argument" msgstr "" #: builtin.c:493 msgid "length: received array argument" msgstr "" #: builtin.c:496 msgid "`length(array)' is a gawk extension" msgstr "" #: builtin.c:504 msgid "length: received non-string argument" msgstr "" #: builtin.c:535 msgid "log: received non-numeric argument" msgstr "" #: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "" #: builtin.c:694 builtin.c:699 msgid "fatal: must use `count$' on all formats or none" msgstr "" #: builtin.c:762 #, c-format msgid "field width is ignored for `%%' specifier" msgstr "" #: builtin.c:764 #, c-format msgid "precision is ignored for `%%' specifier" msgstr "" #: builtin.c:766 #, c-format msgid "field width and precision are ignored for `%%' specifier" msgstr "" #: builtin.c:817 msgid "fatal: `$' is not permitted in awk formats" msgstr "" #: builtin.c:826 msgid "fatal: arg count with `$' must be > 0" msgstr "" #: builtin.c:830 #, c-format msgid "fatal: arg count %ld greater than total number of supplied arguments" msgstr "" #: builtin.c:834 msgid "fatal: `$' not permitted after period in format" msgstr "" #: builtin.c:850 msgid "fatal: no `$' supplied for positional field width or precision" msgstr "" #: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" msgstr "" #: builtin.c:925 msgid "fatal: `l' is not permitted in POSIX awk formats" msgstr "" #: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "" #: builtin.c:942 msgid "fatal: `L' is not permitted in POSIX awk formats" msgstr "" #: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "" #: builtin.c:959 msgid "fatal: `h' is not permitted in POSIX awk formats" msgstr "" #: builtin.c:1272 #, 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:1337 msgid "fatal: not enough arguments to satisfy format string" msgstr "" #: builtin.c:1339 msgid "^ ran out for this one" msgstr "" #: builtin.c:1346 msgid "[s]printf: format specifier does not have control letter" msgstr "" #: builtin.c:1349 msgid "too many arguments supplied for format string" msgstr "" #: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "" #: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "" #: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "" #: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "" #: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "" #: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "" #: builtin.c:1517 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" #: builtin.c:1529 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "" #: builtin.c:1534 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "" #: builtin.c:1559 msgid "substr: source string is zero length" msgstr "" #: builtin.c:1575 #, c-format msgid "substr: start index %g is past end of string" msgstr "" #: builtin.c:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" #: builtin.c:1657 msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" msgstr "" #: builtin.c:1680 msgid "strftime: received non-numeric second argument" msgstr "" #: 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 "" #: builtin.c:1696 msgid "strftime: received empty format string" msgstr "" #: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "" #: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" msgstr "" #: builtin.c:1814 msgid "'system' function not allowed in sandbox mode" msgstr "" #: builtin.c:1819 msgid "system: received non-string argument" msgstr "" #: 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:2028 msgid "tolower: received non-string argument" msgstr "" #: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "" #: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "" #: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "" #: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "" #: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "" #: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "" #: builtin.c:2219 msgid "match: third argument is not an array" msgstr "" #: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "" #: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "" #: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "" #: builtin.c:2784 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "" #: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "" #: builtin.c:2788 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" #: builtin.c:2813 msgid "rshift: received non-numeric first argument" msgstr "" #: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "" #: builtin.c:2821 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "" #: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "" #: builtin.c:2825 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" #: builtin.c:2850 msgid "and: received non-numeric first argument" msgstr "" #: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "" #: builtin.c:2858 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "" #: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "" #: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "" #: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "" #: builtin.c:2893 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "" #: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "" #: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "" #: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "" #: builtin.c:2931 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "" #: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "" #: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "" #: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "" #: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "" #: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "" #: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "" #: eval.c:423 eval.c:437 #, c-format msgid "unknown opcode %d" msgstr "" #: eval.c:434 #, c-format msgid "opcode %s not an operator or keyword" msgstr "" #: eval.c:488 msgid "buffer overflow in genflags2str" msgstr "" #: eval.c:698 #, c-format msgid "" "\n" "\t# Function Call Stack:\n" "\n" msgstr "" #: eval.c:725 msgid "`IGNORECASE' is a gawk extension" msgstr "" #: eval.c:754 msgid "`BINMODE' is a gawk extension" msgstr "" #: eval.c:812 #, c-format msgid "BINMODE value `%s' is invalid, treated as 3" msgstr "" #: eval.c:902 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "" #: eval.c:980 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "" #: eval.c:1127 eval.c:1777 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "" #: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "" #: eval.c:1177 msgid "attempt to field reference from non-numeric value" msgstr "" #: eval.c:1179 msgid "attempt to field reference from null string" msgstr "" #: eval.c:1185 #, c-format msgid "attempt to access field %ld" msgstr "" #: 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:1437 #, c-format msgid "unwind_stack: unexpected type `%s'" msgstr "" #: eval.c:1532 msgid "division by zero attempted in `/='" msgstr "" #: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "" #: eval.c:1876 eval.c:2122 #, c-format msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" msgstr "" #: eval.c:1907 msgid "assignment used in conditional context" msgstr "" #: eval.c:1911 msgid "statement has no effect" msgstr "" #: eval.c:2343 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" #: eval.c:2458 #, c-format msgid "function called indirectly through `%s' does not exist" msgstr "" #: eval.c:2470 #, c-format msgid "function `%s' not defined" msgstr "" #: eval.c:2511 #, c-format msgid "non-redirected `getline' invalid inside `%s' rule" msgstr "" #: eval.c:2600 #, c-format msgid "error reading input file `%s': %s" msgstr "" #: eval.c:2614 #, c-format msgid "`nextfile' cannot be called from a `%s' rule" msgstr "" #: eval.c:2661 msgid "`exit' cannot be called in the current context" msgstr "" #: eval.c:2700 #, c-format msgid "`next' cannot be called from a `%s' rule" msgstr "" #: eval.c:2766 #, c-format msgid "Sorry, don't know how to interpret `%s'" msgstr "" #: ext.c:54 msgid "extensions are not allowed in sandbox mode" msgstr "" #: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" msgstr "" #: ext.c:75 #, c-format msgid "fatal: extension: cannot open `%s' (%s)\n" msgstr "" #: ext.c:84 #, c-format msgid "" "fatal: extension: library `%s': does not define " "`plugin_is_GPL_compatible' (%s)\n" msgstr "" #: 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:132 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "" #: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "" #: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "" #: 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:156 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "" #: ext.c:259 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "" #: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "" #: ext.c:279 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "" #: ext.c:283 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "" #: ext.c:296 msgid "Operation Not Supported" msgstr "" #: field.c:328 msgid "NF set to negative value" msgstr "" #: 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: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: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:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "" #: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "" #: field.c:1250 msgid "old awk does not support regexps as value of `FS'" msgstr "" #: field.c:1369 msgid "`FPAT' is a gawk extension" msgstr "" #: getopt.c:604 getopt.c:633 #, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "" #: getopt.c:679 getopt.c:683 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "" #: getopt.c:692 getopt.c:697 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "" #: getopt.c:740 getopt.c:759 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "" #: getopt.c:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "" #: getopt.c:808 getopt.c:811 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "" #: getopt.c:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "" #: 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:989 getopt.c:1005 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "" #: getopt.c:1029 getopt.c:1047 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "" #: getopt.c:1068 getopt.c:1086 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "" #: 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:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "" #: io.c:578 msgid "redirection not allowed in sandbox mode" msgstr "" #: io.c:612 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "" #: io.c:618 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "" #: io.c:623 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" #: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "" #: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "" #: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "" #: io.c:752 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" #: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "" #: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "" #: io.c:888 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" #: io.c:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "" #: io.c:912 msgid "too many pipes or input files open" msgstr "" #: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "" #: io.c:951 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "" #: io.c:956 msgid "close of redirection that was never opened" msgstr "" #: io.c:1053 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" #: io.c:1069 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "" #: io.c:1072 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "" #: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "" #: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "" #: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "" #: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "" #: io.c:1129 io.c:1184 main.c:794 main.c:831 #, c-format msgid "error writing standard output (%s)" msgstr "" #: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "" #: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "" #: io.c:1144 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "" #: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "" #: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "" #: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "" #: io.c:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" #: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "" #: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "" #: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "" #: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "" #: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "" #: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "" #: io.c:1749 io.c:1917 io.c:2074 #, c-format msgid "close of stdout in child failed (%s)" msgstr "" #: io.c:1752 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" #: io.c:1754 io.c:1922 #, c-format msgid "close of stdin in child failed (%s)" msgstr "" #: io.c:1757 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" #: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" msgstr "" #: 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:1865 io.c:1925 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" #: io.c:1885 io.c:2067 msgid "restoring stdout in parent process failed\n" msgstr "" #: io.c:1893 msgid "restoring stdin in parent process failed\n" msgstr "" #: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" msgstr "" #: io.c:1973 msgid "`|&' not supported" msgstr "" #: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "" #: io.c:2087 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "" #: io.c:2520 #, c-format msgid "data file `%s' is empty" msgstr "" #: io.c:2561 io.c:2569 msgid "could not allocate more input memory" msgstr "" #: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "" #: io.c:3232 msgid "IPv6 communication is not supported" msgstr "" #: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "" #: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "" #: main.c:391 msgid "empty argument to `-e/--source' ignored" msgstr "" #: main.c:462 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "" #: main.c:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "" #: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" #: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "" #: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" #: main.c:557 #, c-format msgid "running %s setuid root may be a security problem" msgstr "" #: 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:616 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "" #: main.c:618 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "" #: main.c:657 msgid "no program text at all!" msgstr "" #: main.c:734 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" #: main.c:736 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" #: main.c:741 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "" #: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "" #: main.c:743 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "" #: main.c:744 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "" #: main.c:745 msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "" #: main.c:746 msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "" #: main.c:747 msgid "\t-c\t\t\t--traditional\n" msgstr "" #: main.c:748 msgid "\t-C\t\t\t--copyright\n" msgstr "" #: main.c:749 msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "" #: main.c:750 msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "" #: main.c:751 msgid "\t-E file\t\t\t--exec=file\n" msgstr "" #: main.c:752 msgid "\t-g\t\t\t--gen-pot\n" msgstr "" #: main.c:753 msgid "\t-h\t\t\t--help\n" msgstr "" #: main.c:754 msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "" #: main.c:755 msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "" #: main.c:756 msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "" #: main.c:757 msgid "\t-O\t\t\t--optimize\n" msgstr "" #: main.c:758 msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "" #: main.c:759 msgid "\t-P\t\t\t--posix\n" msgstr "" #: main.c:760 msgid "\t-r\t\t\t--re-interval\n" msgstr "" #: main.c:762 msgid "\t-R file\t\t\t--command=file\n" msgstr "" #: main.c:763 msgid "\t-S\t\t\t--sandbox\n" msgstr "" #: main.c:764 msgid "\t-t\t\t\t--lint-old\n" msgstr "" #: main.c:765 msgid "\t-V\t\t\t--version\n" msgstr "" #: main.c:767 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "" #: main.c:770 msgid "\t-Y\t\t--parsedebug\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: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 "" #: 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:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" #: 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 "" #: 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 "" #: 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:856 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "" #: 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:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "" #: main.c:1200 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "" #: 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:1269 msgid "fatal error: internal error" msgstr "" #: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "" #: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "" #: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "" #: main.c:1353 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "" #: msg.c:63 #, c-format msgid "cmd. line:" msgstr "" #: msg.c:107 msgid "error: " msgstr "" #: node.c:406 msgid "backslash at end of string" msgstr "" #: node.c:517 #, c-format msgid "old awk does not support the `\\%c' escape sequence" msgstr "" #: node.c:568 msgid "POSIX does not allow `\\x' escapes" msgstr "" #: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "" #: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " "expect" msgstr "" #: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "" #: node.c:750 msgid "" "Invalid multibyte data detected. There may be a mismatch between your data " "and your locale." msgstr "" #: posix/gawkmisc.c:176 #, c-format msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "" #: posix/gawkmisc.c:188 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "" #: profile.c:83 #, c-format msgid "could not open `%s' for writing: %s" msgstr "" #: profile.c:85 msgid "sending profile to standard error" msgstr "" #: profile.c:203 #, c-format msgid "" "\t# %s block(s)\n" "\n" msgstr "" #: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" #: profile.c:279 #, c-format msgid "internal error: %s with null vname" msgstr "" #: profile.c:952 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "" #: profile.c:1331 #, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" msgstr "" #: profile.c:1370 #, c-format msgid "redir2str: unknown redirection type %d" msgstr "" #: re.c:573 #, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "" #: re.c:600 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "" #: regcomp.c:131 msgid "Success" msgstr "" #: regcomp.c:134 msgid "No match" msgstr "" #: regcomp.c:137 msgid "Invalid regular expression" msgstr "" #: regcomp.c:140 msgid "Invalid collation character" msgstr "" #: regcomp.c:143 msgid "Invalid character class name" msgstr "" #: regcomp.c:146 msgid "Trailing backslash" msgstr "" #: regcomp.c:149 msgid "Invalid back reference" msgstr "" #: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "" #: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "" #: regcomp.c:158 msgid "Unmatched \\{" msgstr "" #: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "" #: regcomp.c:164 msgid "Invalid range end" msgstr "" #: regcomp.c:167 msgid "Memory exhausted" msgstr "" #: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "" #: regcomp.c:173 msgid "Premature end of regular expression" msgstr "" #: regcomp.c:176 msgid "Regular expression too big" msgstr "" #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "" #: regcomp.c:700 msgid "No previous regular expression" msgstr "" gawk-4.0.1+dfsg.orig/po/Makevars0000644000175000017500000000344011463242060015456 0ustar schotschot# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Free Software Foundation, Inc. # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = arnold@skeeve.com # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = gawk-4.0.1+dfsg.orig/po/LINGUAS0000644000175000017500000000003611573744533015023 0ustar schotschotda de es fi fr it ja nl pl sv gawk-4.0.1+dfsg.orig/po/en@boldquot.header0000644000175000017500000000247111504446322017416 0ustar schotschot# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # gawk-4.0.1+dfsg.orig/po/insert-header.sin0000644000175000017500000000124011504446322017226 0ustar schotschot# Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } gawk-4.0.1+dfsg.orig/po/sv.po0000644000175000017500000016510711734667243015002 0ustar schotschot# Swedish translation of gawk # 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 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-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: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: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:257 #, c-format msgid "attempt to use scalar `%s' as an array" msgstr "försök att använda skalären \"%s\" som en vektor" #: 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 "försök att använda vektorn \"%s\" i skalärsammanhang" #: array.c:513 #, c-format msgid "reference to uninitialized 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:723 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: index \"%s\" finns inte i vektorn \"%s\"" #: 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:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: tom (noll)\n" #: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: tabellstorlek = %d, vektorstorlek = %d\n" #: array.c:954 #, c-format msgid "%s: is parameter\n" msgstr "%s: är en parameter\n" #: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: vektorreferens till %s\n" #: 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: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: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: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: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: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: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:828 #, c-format msgid "`next' used in %s action" msgstr "\"next\" använt i %s-åtgärd" #: awkgram.y:836 msgid "`nextfile' is a gawk extension" msgstr "\"nextfile\" är en gawk-utökning" #: 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: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:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "\"delete array\" är en gawk-utökning" #: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "\"delete(array)\" är en icke portabel tawk-utökning" #: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "flerstegs dubbelriktade rör fungerar inte" #: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "reguljärt uttryck i högerledet av en tilldelning" #: 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: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:1275 msgid "regular expression on right of comparison" msgstr "reguljärt uttryck i högerledet av en jämförelse" #: 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:1421 msgid "old awk does not support multidimensional arrays" msgstr "gamla awk stöder inte flerdimensionella vektorer" #: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "anrop av \"length\" utan parenteser är inte portabelt" #: awkgram.y:1580 msgid "indirect function calls are a gawk extension" msgstr "indirekta funktionsanrop är en gawk-utökning" #: 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:1671 msgid "invalid subscript expression" msgstr "ogiltig indexuttryck" #: 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: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: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:2620 #, c-format msgid "source file `%s' is empty" msgstr "källfilen \"%s\" är tom" #: awkgram.y:2797 msgid "source file does not end in newline" msgstr "källfilen slutar inte med en ny rad" #: 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: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: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:2935 msgid "unterminated regexp" msgstr "oavslutat reguljärt uttryck" #: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "oavslutat reguljärt uttryck i slutet av filen" #: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "Användning av \"\\ #...\" för radfortsättning är inte portabelt" #: awkgram.y:3014 msgid "backslash not last character on line" msgstr "sista tecknet på raden är inte ett omvänt snedstreck" #: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX tillåter inte operatorn \"**=\"" #: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "gamla awk stöder inte operatorn \"**=\"" #: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX tillåter inte operatorn \"**\"" #: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "gamla awk stöder inte operatorn \"**\"" #: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "operatorn \"^=\" stöds inte i gamla awk" #: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "operatorn \"^\" stöds inte i gamla awk" #: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "oavslutad sträng" #: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "ogiltigt tecken \"%c\" i uttryck" #: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "\"%s\" är en gawk-utökning" #: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "\"%s\" är en Bell Labs-utökning" #: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX tillåter inte \"%s\"" #: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "\"%s\" stöds inte i gamla awk" #: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "\"goto\" anses skadlig!\n" #: 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: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:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s: tredje argumentet är inte ett ändringsbart objekt" #: 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:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "användandet av dcgettext(_\"...\") är felaktigt: ta bort det inledande " "understrykningstecknet" #: 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: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:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funktionen \"%s\": parametern \"%s\" överskuggar en global variabel" #: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "kunde inte öppna \"%s\" för skrivning (%s)" #: awkgram.y:4112 msgid "sending variable list to standard error" msgstr "skickar variabellista till standard fel" #: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s: misslyckades att stänga (%s)" #: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() anropad två gånger!" #: awkgram.y:4176 msgid "there were shadowed variables." msgstr "det fanns överskuggade variabler." #: 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:4210 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "funktionen \"%s\": det går inte att använda specialvariabeln \"%s\" som en " "funktionsparameter" #: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" msgstr "funktionsnamnet \"%s\" är definierat sedan tidigare" #: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" msgstr "funktionen \"%s\" anropad men aldrig definierad" #: awkgram.y:4403 #, c-format msgid "function `%s' defined but never called directly" msgstr "funktionen \"%s\" definierad men aldrig anropad direkt" #: 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:4544 #, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" "funktionen \"%s\" anropad med blanktecken mellan namnet och \"(\",\n" "eller använd som variabel eller vektor" #: awkgram.y:4791 eval.c:2056 msgid "division by zero attempted" msgstr "försökte dividera med noll" #: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "försökte dividera med noll i \"%%\"" #: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s till \"%s\" misslyckades (%s)" #: builtin.c:121 msgid "standard output" msgstr "standard ut" #: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "exp: fick ett ickenumeriskt argument" #: 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: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: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: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:333 msgid "index: received non-string first argument" msgstr "index: första argumentet är inte en sträng" #: builtin.c:335 msgid "index: received non-string second argument" msgstr "index: andra argumentet är inte en sträng" #: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int: fick ett ickenumeriskt argument" #: 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:504 msgid "length: received non-string argument" msgstr "length: fick ett argument som inte är en sträng" #: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log: fick ett ickenumeriskt argument" #: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log: fick ett negativt argumentet %g" #: 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:762 #, c-format msgid "field width is ignored for `%%' specifier" msgstr "fältbredd ignoreras för \"%%\"-specificerare" #: builtin.c:764 #, c-format msgid "precision is ignored for `%%' specifier" msgstr "precision ignoreras för \"%%\"-specificerare" #: builtin.c:766 #, c-format msgid "field width and precision are ignored for `%%' specifier" msgstr "fältbredd och precision ignoreras för \"%%\"-specificerare" #: builtin.c:817 msgid "fatal: `$' is not permitted in awk formats" msgstr "ödesdigert: \"$\" tillåts inte i awk-format" #: builtin.c:826 msgid "fatal: arg count with `$' must be > 0" msgstr "ödesdigert: argumentantalet med \"$\" måste vara > 0" #: builtin.c:830 #, c-format 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:834 msgid "fatal: `$' not permitted after period in format" msgstr "ödesdigert: \"$\" tillåts inte efter en punkt i formatet" #: 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:921 msgid "`l' is meaningless in awk formats; ignored" msgstr "\"l\" är meningslös i awk-format, ignorerad" #: 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:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "\"L\" är meningslös i awk-format, ignorerad" #: 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:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "\"h\" är meningslös i awk-format, ignorerad" #: 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: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" #: builtin.c:1332 #, c-format msgid "ignoring unknown format specifier character `%c': no argument converted" msgstr "" "ignorerar okänt formatspecifikationstecken \"%c\": inget argument konverterat" #: builtin.c:1337 msgid "fatal: not enough arguments to satisfy format string" msgstr "ödesdigert: för få argument för formatsträngen" #: builtin.c:1339 msgid "^ ran out for this one" msgstr "^ tog slut här" #: builtin.c:1346 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: formatspecifieraren har ingen kommandobokstav" #: builtin.c:1349 msgid "too many arguments supplied for format string" msgstr "för många argument för formatsträngen" #: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: inga argument" #: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt: fick ickenumeriskt argument" #: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: anropad med negativt argument %g" #: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: längden %g är inte >= 1" #: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: längden %g är inte >= 0" #: 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: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: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:1575 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: startindex %g är bortom strängens slut" #: builtin.c:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" "substr: längden %g vid startindex %g överskrider det första argumentets " "längd (%lu)" #: 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:1696 msgid "strftime: received empty format string" msgstr "strftime: fick en tom formatsträng" #: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime: fick ett argument som inte är en sträng" #: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" 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:1819 msgid "system: received non-string argument" msgstr "system: fick ett argument som inte är en sträng" #: 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:2028 msgid "tolower: received non-string argument" msgstr "tolower: fick ett argument som inte är en sträng" #: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper: fick ett argument som inte är en sträng" #: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2: fick ett ickenumeriskt första argument" #: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2: fick ett ickenumeriskt andra argument" #: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin: fick ett ickenumeriskt argument" #: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos: fick ett ickenumeriskt argument" #: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand: fick ett ickenumeriskt argument" #: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match: tredje argumentet är inte en vektor" #: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: nollan i tredje argumentet behandlad som en etta" #: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift: fick ett ickenumeriskt första argument" #: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift: fick ett ickenumeriskt andra argument" #: 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:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): flyttalsvärden kommer trunkeras" #: 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:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift: fick ett ickenumeriskt första argument" #: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift: fick ett ickenumeriskt andra argument" #: 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:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): flyttalsvärden kommer trunkeras" #: 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:2850 msgid "and: received non-numeric first argument" msgstr "and: fick ett ickenumeriskt första argument" #: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and: fick ett ickenumeriskt andra argument" #: 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:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): flyttalsvärden kommer trunkeras" #: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "or: fick ett ickenumeriskt första argument" #: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or: fick ett ickenumeriskt andra argument" #: 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:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): flyttalsvärden kommer trunkeras" #: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "xor: fick ett ickenumeriskt första argument" #: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor: fick ett ickenumeriskt andra argument" #: 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:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): flyttalsvärden kommer trunkeras" #: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl: fick ett ickenumeriskt argument" #: 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:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): flyttalsvärden kommer trunkeras" #: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: \"%s\" är inte en giltig lokalkategori" #: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "okänd nodtyp %d" #: 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:698 #, c-format msgid "" "\n" "\t# Function Call Stack:\n" "\n" msgstr "" "\n" "\t# Funktionsanropsstack:\n" "\n" #: 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 "BINMODE value `%s' is invalid, treated as 3" msgstr "BINMODE-värde \"%s\" är ogiltigt, behandlas som 3" #: eval.c:902 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "felaktig \"%sFMT\"-specifikation \"%s\"" #: 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: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:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "referens till icke initierat argument \"%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:1179 msgid "attempt to field reference from null string" msgstr "försök till fältreferens från en tom sträng" #: eval.c:1185 #, c-format msgid "attempt to access field %ld" msgstr "försök att komma åt fält nummer %ld" #: eval.c:1194 #, c-format msgid "reference to uninitialized field `$%ld'" msgstr "referens till icke initierat fält \"$%ld\"" #: eval.c:1256 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "funktionen \"%s\" anropad med fler argument än vad som deklarerats" #: 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:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "försökte dividera med noll i \"%%=\"" #: eval.c:1876 eval.c:2122 #, c-format 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:1907 msgid "assignment used in conditional context" msgstr "tilldelning använt i jämförelsesammanhang" #: eval.c:1911 msgid "statement has no effect" msgstr "kommandot har ingen effekt" #: eval.c:2343 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "forslinga: vektorn \"%s\" ändrade storlek från %ld till %ld under " "slingexekvering" #: eval.c:2458 #, c-format msgid "function called indirectly through `%s' does not exist" msgstr "funktionen anropad indirekt genom \"%s\" finns inte" #: eval.c:2470 #, c-format msgid "function `%s' not defined" msgstr "funktionen \"%s\" är inte definierad" #: eval.c:2511 #, c-format msgid "non-redirected `getline' invalid inside `%s' rule" msgstr "icke omdirigerad \"getline\" odefinierad inuti \"%s\"-regel" #: eval.c:2600 #, c-format msgid "error reading input file `%s': %s" msgstr "fel vid läsning av indatafilen \"%s\": %s" #: 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:2661 msgid "`exit' cannot be called in the current context" msgstr "\"exit\" kan inte anropas i det aktuella sammanhanget" #: eval.c:2700 #, c-format msgid "`next' cannot be called from a `%s' rule" msgstr "\"next\" kan inte anropas från en \"%s\"-regel" #: eval.c:2766 #, c-format msgid "Sorry, don't know how to interpret `%s'" msgstr "Tyvärr, vet inte hur \"%s\" skall tolkas" #: ext.c:54 msgid "extensions are not allowed in sandbox mode" msgstr "utökningar är inte tillåtna i sandlådeläge" #: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" msgstr "\"extension\" är en gawk-utökning" #: 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 "" "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:93 #, c-format 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:127 msgid "extension: missing function name" msgstr "extension: saknar funktionsnamn" #: ext.c:132 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "extension: ogiltigt tecken \"%c\" i funktionsnamnet \"%s\"" #: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "extension: det går inte att definiera om funktionen \"%s\"" #: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "extension: funktionen \"%s\" är redan definierad" #: 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:156 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: negativt argumentantal för funktionen \"%s\"" #: 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:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "funktionen \"%s\": argument %d saknas" #: 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: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:296 msgid "Operation Not Supported" msgstr "Operationen stöds inte" #: field.c:328 msgid "NF set to negative value" msgstr "NF satt till ett negativt värde" #: 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: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: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:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "ogiltigt FIELDWITHS-värde i närheten av \"%s\"" #: 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: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\"" #: 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; possibilities:" msgstr "%s: flaggan \"%s\" är tvetydig\n" #: 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 något argument\n" #: 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 något argument\n" #: 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:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: okänd flagga \"--%s\"\n" #: 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:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: ogiltig flagga -- \"%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: flaggan kräver ett argument -- \"%c\"\n" #: 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: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:1068 getopt.c:1086 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: flaggan \"-W %s\" kräver ett argument\n" #: 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:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "stängning av fd %d (\"%s\") misslyckades (%s)" #: io.c:578 msgid "redirection not allowed in sandbox mode" msgstr "omdirigering är inte tillåten i sandlådeläge" #: 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: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: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:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "onödig blandning av \">\" och \">>\" för filen \"%.*s\"" #: 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: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: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:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "kan inte dirigera om från \"%s\" (%s)" #: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "kan inte dirigera om till \"%s\" (%s)" #: 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:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "stängning av \"%s\" misslyckades (%s)" #: io.c:912 msgid "too many pipes or input files open" msgstr "för många rör eller indatafiler öppna" #: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close: andra argumentet måste vara \"to\" eller \"from\"" #: 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:956 msgid "close of redirection that was never opened" msgstr "stängning av omdirigering som aldrig öppnades" #: 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: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: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:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "ingen explicit stängning av uttaget \"%s\" tillhandahållen" #: 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:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "ingen explicit stängning av röret \"%s\" tillhandahållen" #: 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: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:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "fel vid skrivning till standard fel (%s)" #: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "rörspolning av \"%s\" misslyckades (%s)" #: 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:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "filspolning av \"%s\" misslyckades (%s)" #: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "lokal port %s ogiltig i \"/inet\"" #: 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: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:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "speciellt filnamn \"%s\" är ofullständigt" #: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "måste tillhandahålla ett fjärrdatornamn till \"/inet\"" #: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "måste tillhandahålla en fjärrport till \"/inet\"" #: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-kommunikation stöds inte" #: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "kunde inte öppna \"%s\", läge \"%s\"" #: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "stängning av huvudpty misslyckades (%s)" #: 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: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: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: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:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" msgstr "stängning av slavpty misslyckades (%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 "flyttande av rör till standard ut i barnet misslyckades (dup: %s)" #: 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: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:1893 msgid "restoring stdin in parent process failed\n" msgstr "återställande av standard in i förälderprocessen misslyckades\n" #: 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:1973 msgid "`|&' not supported" msgstr "\"|&\" stöds inte" #: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "kan inte öppna röret \"%s\" (%s)" #: 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:2520 #, c-format msgid "data file `%s' is empty" msgstr "datafilen \"%s\" är tom" #: io.c:2561 io.c:2569 msgid "could not allocate more input memory" msgstr "kunde inte allokera mer indataminne" #: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "flerteckensvärdet av \"RS\" är en gawk-utökning" #: io.c:3232 msgid "IPv6 communication is not supported" msgstr "IPv6-kommunikation stöds inte" #: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "\"-m[fr]\"-flaggan är irrelevant i gawk" #: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "-m-flaggans användning: \"-m[fr] nnn\"" #: 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:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: flaggan kräver ett argument -- %c\n" #: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "miljövariabeln \"POSIXLY_CORRECT\" satt: slår på \"--posix\"" #: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "\"--posix\" åsidosätter \"--traditional\"" #: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "\"--posix\"/\"--traditional\" åsidosätter \"--non-decimal-data\"" #: 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: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: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: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:657 msgid "no program text at all!" msgstr "ingen programtext alls!" #: 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: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:741 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "POSIX-flaggor:\t\tGNU långa flaggor: (standard)\n" #: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f progfil\t\t--file=progfil\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=värde\t\t--assign=var=värde\n" #: main.c:745 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-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-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'programtext'\t--source='programtext'\n" #: main.c:751 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-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\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: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" "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" "\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 är ett mönsterskannande och -bearbetande språk.\n" "Normalt läser det från standard in och skriver till standard ut.\n" "\n" #: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" "Exempel:\n" "\tgawk '{ sum += $1 }; END { print sum }' fil\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" #: main.c: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" "Detta program är fri programvara. Du kan distribuera det och/eller\n" "modifiera det under villkoren i GNU General Public License, publicerad\n" "av Free Software Foundation, antingen version 3 eller (om du så vill)\n" "någon senare version.\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 "" "Detta program distribueras i hopp om att det ska vara användbart,\n" "men UTAN NÅGON SOM HELST GARANTI, även utan underförstådd garanti\n" "om SÄLJBARHET eller LÄMPLIGHET FÖR NÅGOT SPECIELLT ÄNDAMÅL. Se GNU\n" "General Public License för ytterligare information.\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 "" "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: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: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:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "\"%s\" är inte ett giltigt variabelnamn" #: 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: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:1269 msgid "fatal error: internal error" msgstr "ödesdigert fel: internt fel" #: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "ödesdigert fel: internt fel: segmenteringsfel" #: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "ödesdigert fel: internt fel: stackspill" #: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "ingen föröppnad fd %d" #: 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" #: msg.c:63 #, c-format msgid "cmd. line:" msgstr "kommandorad:" #: msg.c:107 msgid "error: " msgstr "fel: " #: node.c:406 msgid "backslash at end of string" msgstr "omvänt snedstreck i slutet av strängen" #: 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:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX tillåter inte \"\\x\"-kontrollsekvenser" #: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "inga hexadecimala siffror i \"\\x\"-kontrollsekvenser" #: 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:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "kontrollsekvensen \"\\%c\" behandlad som bara \"%c\"" #: 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." #: posix/gawkmisc.c:176 #, c-format 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)" #: posix/gawkmisc.c:188 #, c-format 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:83 #, c-format msgid "could not open `%s' for writing: %s" msgstr "kunde inte öppna \"%s\" för skrivning: %s" #: profile.c:85 msgid "sending profile to standard error" msgstr "skickar profilen till standard fel" #: profile.c:203 #, c-format msgid "" "\t# %s block(s)\n" "\n" msgstr "" "\t# %s-block\n" "\n" #: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" "\t# Regel/regler\n" "\n" #: profile.c:279 #, c-format msgid "internal error: %s with null vname" msgstr "internt fel: %s med null vname" #: 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" "\t# Functions, listed alphabetically\n" msgstr "" "\n" "\t# Funktioner, listade alfabetiskt\n" #: profile.c:1370 #, c-format msgid "redir2str: unknown redirection type %d" msgstr "redir2str: okänd omdirigeringstyp %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:131 msgid "Success" msgstr "Lyckades" #: regcomp.c:134 msgid "No match" msgstr "Misslyckades" #: regcomp.c:137 msgid "Invalid regular expression" msgstr "Ogiltigt reguljärt uttryck" #: regcomp.c:140 msgid "Invalid collation character" msgstr "Ogiltigt kollationeringstecken" #: regcomp.c:143 msgid "Invalid character class name" msgstr "Ogiltigt teckenklassnamn" #: regcomp.c:146 msgid "Trailing backslash" msgstr "Eftersläpande omvänt snedstreck" #: regcomp.c:149 msgid "Invalid back reference" msgstr "Ogiltig bakåtrerefens" #: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "Obalanserad [ eller [^" #: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "Obalanserad ( eller \\(" #: regcomp.c:158 msgid "Unmatched \\{" msgstr "Obalanserad \\{" #: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Ogiltigt innehåll i \\{\\}" #: regcomp.c:164 msgid "Invalid range end" msgstr "Ogiltigt omfångsslut" #: regcomp.c:167 msgid "Memory exhausted" msgstr "Minnet slut" #: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Ogiltigt föregående reguljärt uttryck" #: regcomp.c:173 msgid "Premature end of regular expression" msgstr "För tidigt slut på reguljärt uttryck" #: regcomp.c:176 msgid "Regular expression too big" msgstr "Reguljärt uttryck för stort" #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Obalanserad ) eller \\)" #: regcomp.c:700 msgid "No previous regular expression" msgstr "Inget föregående reguljärt uttryck" #~ msgid "could not find groups: %s" #~ msgstr "kunde inte hitta grupper: %s" gawk-4.0.1+dfsg.orig/po/nl.po0000644000175000017500000017447211734667243014770 0ustar schotschot# Dutch translations for GNU gawk. # Copyright (C) 2012 Free Software Foundation, Inc. # This file is distributed under the same license as the gawk package. # # Als het schone blinkt. # # Benno Schulenberg , 2005, 2007, 2010, 2011, 2012. # Erwin Poeze , 2009. 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-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: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:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "scalaire parameter '%s' wordt gebruikt als array" #: array.c:257 #, c-format msgid "attempt to use scalar `%s' as an array" msgstr "scalair '%s' wordt gebruikt als array" #: 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 "array '%s' wordt gebruikt in een scalaire context" #: array.c:513 #, c-format msgid "reference to uninitialized element `%s[\"%.*s\"]'" msgstr "verwijzing naar ongeïnitialiseerd element '%s[\"%.*s\"]'" #: array.c:519 #, c-format msgid "subscript of array `%s' is null string" msgstr "index van array '%s' is lege string" #: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: index '%s' niet in array '%s'" #: 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:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: leeg (nul)\n" #: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: tabelgrootte = %d, arraygrootte = %d\n" #: array.c:954 #, c-format msgid "%s: is parameter\n" msgstr "%s: is een parameter\n" #: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: array-verwijzing naar %s\n" #: 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: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: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: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: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: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:528 #, c-format msgid "duplicate case values in switch body: %s" msgstr "dubbele 'case'-waarde in 'switch'-opdracht: %s" #: 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 "`next' used in %s action" msgstr "'next' wordt gebruikt in %s-actie" #: awkgram.y:836 msgid "`nextfile' is a gawk extension" msgstr "'nextfile' is een gawk-uitbreiding" #: 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: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:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "'delete array' is een gawk-uitbreiding" #: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "'delete(array)' is een niet-overdraagbare 'tawk'-uitbreiding" #: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "meerfase-tweerichtings-pijplijnen werken niet" #: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "reguliere expressie rechts van toewijzing" #: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "reguliere expressie links van operator '~' of '!~'" #: 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:1275 msgid "regular expression on right of comparison" msgstr "reguliere expressie rechts van vergelijking" #: 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 "niet-omgeleide 'getline' is ongedefinieerd binnen een END-actie" #: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" msgstr "oude 'awk' kent geen meerdimensionale arrays" #: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "aanroep van 'length' zonder haakjes is niet overdraagbaar" #: awkgram.y:1580 msgid "indirect function calls are a gawk extension" msgstr "indirecte functieaanroepen zijn een gawk-uitbreiding" #: 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:1671 msgid "invalid subscript expression" msgstr "ongeldige index-expressie" #: 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: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: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:2620 #, c-format msgid "source file `%s' is empty" msgstr "bronbestand '%s' is leeg" #: awkgram.y:2797 msgid "source file does not end in newline" msgstr "bronbestand eindigt niet met een regeleindeteken (LF)" #: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" msgstr "onafgesloten reguliere expressie eindigt met '\\' aan bestandseinde" #: 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: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:2935 msgid "unterminated regexp" msgstr "onafgesloten reguliere expressie" #: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "onafgesloten reguliere expressie aan bestandseinde" #: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "gebruik van regelvoortzetting '\\ #...' is niet overdraagbaar" #: awkgram.y:3014 msgid "backslash not last character on line" msgstr "backslash is niet het laatste teken op de regel" #: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX staat operator '**=' niet toe" #: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "oude 'awk' kent de operator '**=' niet" #: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX staat operator '**' niet toe" #: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "oude 'awk' kent de operator '**' niet" #: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "oude 'awk' kent de operator '^=' niet" #: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "oude 'awk' kent de operator '^' niet" #: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "onafgesloten string" #: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "ongeldig teken '%c' in expressie" #: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "'%s' is een gawk-uitbreiding" #: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "'%s' is een uitbreiding door Bell Labs" #: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX staat '%s' niet toe" #: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "oude 'awk' kent '%s' niet" #: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "'goto' wordt als schadelijk beschouwd!\n" #: 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: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:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s: derde parameter is geen veranderbaar object" #: 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:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "dcgettext(_\"...\") is onjuist: verwijder het liggende streepje" #: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "dcngettext(_\"...\") is onjuist: verwijder het liggende streepje" #: 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:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "functie '%s': parameter '%s' schaduwt een globale variabele" #: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "kan '%s' niet openen om te schrijven (%s)" #: awkgram.y:4112 msgid "sending variable list to standard error" msgstr "variabelenlijst gaat naar standaardfoutuitvoer" #: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s: sluiten is mislukt (%s)" #: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() twee keer aangeroepen!" #: awkgram.y:4176 msgid "there were shadowed variables." msgstr "er waren geschaduwde variabelen." #: 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: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:4226 #, c-format msgid "function name `%s' previously defined" msgstr "functienaam '%s' is al eerder gedefinieerd" #: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" msgstr "functie '%s' wordt aangeroepen maar is nergens gedefinieerd" #: awkgram.y:4403 #, c-format msgid "function `%s' defined but never called directly" msgstr "functie '%s' is gedefinieerd maar wordt nergens direct aangeroepen" #: 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:4544 #, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" "functie '%s' wordt aangeroepen met een spatie tussen naam en '(',\n" "of wordt gebruikt als variabele of array" #: awkgram.y:4791 eval.c:2056 msgid "division by zero attempted" msgstr "deling door nul" #: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "deling door nul in '%%'" #: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s naar \"%s\" is mislukt (%s)" #: builtin.c:121 msgid "standard output" msgstr "standaarduitvoer" #: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "exp: argument is geen getal" #: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argument %g ligt buiten toegestane bereik" #: 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: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: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:333 msgid "index: received non-string first argument" msgstr "index: eerste argument is geen string" #: builtin.c:335 msgid "index: received non-string second argument" msgstr "index: tweede argument is geen string" #: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int: argument is geen getal" #: 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:504 msgid "length: received non-string argument" msgstr "length: argument is geen string" #: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log: argument is geen getal" #: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log: argument %g is negatief" #: 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:762 #, c-format msgid "field width is ignored for `%%' specifier" msgstr "veldbreedte wordt genegeerd voor opmaakaanduiding '%%'" #: builtin.c:764 #, c-format msgid "precision is ignored for `%%' specifier" msgstr "veldprecisie wordt genegeerd voor opmaakaanduiding '%%'" #: builtin.c:766 #, c-format msgid "field width and precision are ignored for `%%' specifier" msgstr "veldbreedte en -precisie worden genegeerd voor opmaakaanduiding '%%'" #: builtin.c:817 msgid "fatal: `$' is not permitted in awk formats" msgstr "fataal: '$' is niet toegestaan in awk-opmaak" #: builtin.c:826 msgid "fatal: arg count with `$' must be > 0" msgstr "fataal: het aantal argumenten met '$' moet > 0 zijn" #: builtin.c:830 #, c-format 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:834 msgid "fatal: `$' not permitted after period in format" msgstr "fataal: '$' is niet toegestaan na een punt in de opmaak" #: builtin.c:850 msgid "fatal: no `$' supplied for positional field width or precision" msgstr "fataal: geen '$' opgegeven bij positionele veldbreedte of -precisie" #: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" msgstr "'l' is betekenisloos in awk-opmaak; genegeerd" #: 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:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "'L' is betekenisloos in awk-opmaak; genegeerd" #: 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:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "'h' is betekenisloos in awk-opmaak; genegeerd" #: 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: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'" #: builtin.c:1332 #, c-format msgid "ignoring unknown format specifier character `%c': no argument converted" msgstr "" "onbekend opmaakteken '%c' wordt genegeerd: geen argument is geconverteerd" #: builtin.c:1337 msgid "fatal: not enough arguments to satisfy format string" msgstr "fataal: niet genoeg argumenten voor opmaakstring" #: builtin.c:1339 msgid "^ ran out for this one" msgstr "niet genoeg ^ voor deze" #: builtin.c:1346 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: opmaakaanduiding mist een stuurletter" #: builtin.c:1349 msgid "too many arguments supplied for format string" msgstr "te veel argumenten voor opmaakstring" #: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: geen argumenten" #: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt: argument is geen getal" #: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: argument %g is negatief" #: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: lengte %g is niet >= 1" #: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: lengte %g is niet >= 0" #: 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: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: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: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:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" "substr: lengte %g bij startindex %g is groter dan de lengte van het eerste " "argument (%lu)" #: 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:1696 msgid "strftime: received empty format string" msgstr "strftime: opmaakstring is leeg" #: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime: argument is geen string" #: 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: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: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:2028 msgid "tolower: received non-string argument" msgstr "tolower: argument is geen string" #: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper: argument is geen string" #: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2: eerste argument is geen getal" #: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2: tweede argument is geen getal" #: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin: argument is geen getal" #: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos: argument is geen getal" #: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand: argument is geen getal" #: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match: derde argument is geen array" #: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: derde argument is 0; wordt beschouwd als 1" #: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift: eerste argument is geen getal" #: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift: tweede argument is geen getal" #: 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:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): cijfers na de komma worden afgekapt" #: 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:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift: eerste argument is geen getal" #: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift: tweede argument is geen getal" #: 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:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): cijfers na de komma worden afgekapt" #: 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:2850 msgid "and: received non-numeric first argument" msgstr "and: eerste argument is geen getal" #: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and: tweede argument is geen getal" #: 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:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): cijfers na de komma worden afgekapt" #: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "or: eerste argument is geen getal" #: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or: tweede argument is geen getal" #: 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:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): cijfers na de komma worden afgekapt" #: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "xor: eerste argument is geen getal" #: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor: tweede argument is geen getal" #: 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:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): cijfers na de komma worden afgekapt" #: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl: argument is geen getal" #: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): negatieve waarden geven rare resultaten" #: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): cijfers na de komma worden afgekapt" #: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: '%s' is geen geldige taalregio-deelcategorie" #: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "onbekend knooptype %d" #: eval.c:423 eval.c:437 #, c-format msgid "unknown opcode %d" msgstr "onbekende opcode %d" #: eval.c:434 #, c-format 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:698 #, c-format msgid "" "\n" "\t# Function Call Stack:\n" "\n" msgstr "" "\n" "\t# Functieaanroepen-stack:\n" "\n" #: eval.c:725 msgid "`IGNORECASE' is a gawk extension" msgstr "'IGNORECASE' is een gawk-uitbreiding" #: eval.c:754 msgid "`BINMODE' is a gawk extension" msgstr "'BINMODE' is een gawk-uitbreiding" #: 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: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: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:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "verwijzing naar ongeïnitialiseerd argument '%s'" #: eval.c:1177 msgid "attempt to field reference from non-numeric value" msgstr "veldverwijzingspoging via een waarde die geen getal is" #: eval.c:1179 msgid "attempt to field reference from null string" msgstr "veldverwijzingspoging via een lege string" #: eval.c:1185 #, c-format msgid "attempt to access field %ld" msgstr "toegangspoging tot veld %ld" #: 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:1437 #, c-format msgid "unwind_stack: unexpected type `%s'" msgstr "unwind_stack(): onverwacht type '%s'" #: eval.c:1532 msgid "division by zero attempted in `/='" msgstr "deling door nul in '/='" #: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "deling door nul in '%%='" #: eval.c:1876 eval.c:2122 #, c-format msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" msgstr "array '%s[\"%.*s\"]' wordt gebruikt in een scalaire context" #: eval.c:1907 msgid "assignment used in conditional context" msgstr "toewijzing wordt gebruikt in een conditionele context" #: eval.c:1911 msgid "statement has no effect" msgstr "opdracht heeft geen effect" #: eval.c:2343 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "for: array '%s' veranderde van grootte %ld naar %ld tijdens uitvoer van de " "lus" #: eval.c:2458 #, c-format msgid "function called indirectly through `%s' does not exist" msgstr "indirect (via '%s') aangeroepen functie bestaat niet" #: eval.c:2470 #, c-format msgid "function `%s' not defined" msgstr "functie '%s' is niet gedefinieerd" #: eval.c:2511 #, c-format msgid "non-redirected `getline' invalid inside `%s' rule" msgstr "niet-omgeleide 'getline' is ongeldig binnen een '%s'-regel" #: eval.c:2600 #, c-format msgid "error reading input file `%s': %s" msgstr "fout tijdens lezen van invoerbestand '%s': %s" #: 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:2661 msgid "`exit' cannot be called in the current context" msgstr "'exit' kan niet aangeroepen worden in de huidige context" #: eval.c:2700 #, c-format msgid "`next' cannot be called from a `%s' rule" msgstr "'next' kan niet aangeroepen worden in een '%s'-regel" #: eval.c:2766 #, c-format msgid "Sorry, don't know how to interpret `%s'" msgstr "Kan '%s' niet interpreteren" #: ext.c:54 msgid "extensions are not allowed in sandbox mode" msgstr "uitbreidingen zijn niet toegestaan in sandbox-modus" #: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" msgstr "'extension' is een gawk-uitbreiding" #: ext.c:75 #, c-format msgid "fatal: extension: cannot open `%s' (%s)\n" msgstr "fatale fout: extension: kan '%s' niet openen (%s)\n" #: ext.c:84 #, c-format 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: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:132 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "extension: ongeldig teken '%c' in functienaam '%s'" #: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "extension: kan functie '%s' niet herdefiniëren" #: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "extension: functie '%s' is al gedefinieerd" #: 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:156 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: negatief aantal argumenten voor functie '%s'" #: 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:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "functie '%s': ontbrekend argument #%d" #: 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: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:296 msgid "Operation Not Supported" msgstr "Actie wordt niet ondersteund" #: field.c:328 msgid "NF set to negative value" msgstr "NF is op een negatieve waarde gezet" #: 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: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: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:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "ongeldige waarde voor FIELDWIDTHS, nabij '%s'" #: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "een lege string als 'FS' is een gawk-uitbreiding" #: 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'" #: 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: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: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:740 getopt.c:759 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: optie '--%s' vereist een argument\n" #: getopt.c:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: onbekende optie '--%s'\n" #: getopt.c:808 getopt.c:811 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: onbekende optie '%c%s'\n" #: getopt.c:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: ongeldige optie -- '%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: optie vereist een argument -- '%c'\n" #: 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: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: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: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:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "sluiten van bestandsdescriptor %d ('%s') is mislukt (%s)" #: io.c:578 msgid "redirection not allowed in sandbox mode" msgstr "omleiding is niet toegestaan in sandbox-modus" #: 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: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: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:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "onnodige mix van '>' en '>>' voor bestand '%.*s'" #: 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:729 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "kan pijp '%s' niet openen voor invoer (%s)" #: 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:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "kan niet omleiden van '%s' (%s)" #: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "kan niet omleiden naar '%s' (%s)" #: 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:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "sluiten van '%s' is mislukt (%s)" #: io.c:912 msgid "too many pipes or input files open" msgstr "te veel pijpen of invoerbestanden geopend" #: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close: tweede argument moet 'to' of 'from' zijn" #: 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:956 msgid "close of redirection that was never opened" msgstr "sluiten van een nooit-geopende omleiding" #: 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: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: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:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "geen expliciete sluiting van socket '%s' aangegeven" #: 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:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "geen expliciete sluiting van pijp '%s' aangegeven" #: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "geen expliciete sluiting van bestand '%s' aangegeven" #: 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:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "fout tijdens schrijven van standaardfoutuitvoer (%s)" #: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "leegmaken van pijp '%s' is mislukt (%s)" #: 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:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "leegmaken van bestand '%s' is mislukt (%s)" #: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "lokale poort %s is ongeldig in '/inet'" #: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "host- en poortinformatie (%s, %s) zijn ongeldig" #: 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:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "speciale bestandsnaam '%s' is onvolledig" #: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "'/inet' heeft een gindse hostnaam nodig" #: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "'/inet' heeft een gindse poort nodig" #: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-communicatie wordt niet ondersteund" #: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "kan '%s' niet openen -- modus '%s'" #: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "kan meester-pty van dochterproces niet sluiten (%s)" #: 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: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)" #: 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: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)" #: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" msgstr "kan slaaf-pty niet sluiten (%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 "" "kan pijp niet overzetten naar standaarduitvoer van dochterproces (dup: %s)" #: 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:1885 io.c:2067 msgid "restoring stdout in parent process failed\n" msgstr "kan standaarduitvoer van ouderproces niet herstellen\n" #: io.c:1893 msgid "restoring stdin in parent process failed\n" msgstr "kan standaardinvoer van ouderproces niet herstellen\n" #: 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:1973 msgid "`|&' not supported" msgstr "'|&' wordt niet ondersteund" #: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "kan pijp '%s' niet openen (%s)" #: 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:2520 #, c-format msgid "data file `%s' is empty" msgstr "databestand '%s' is leeg" #: io.c:2561 io.c:2569 msgid "could not allocate more input memory" msgstr "kan geen extra invoergeheugen meer toewijzen" #: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "een 'RS' van meerdere tekens is een gawk-uitbreiding" #: io.c:3232 msgid "IPv6 communication is not supported" msgstr "IPv6-communicatie wordt niet ondersteund" #: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "optie '-m[fr]' is irrelevant in gawk" #: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "gebruikswijze van optie -m: '-m[fr] nnn'" #: 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:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: optie vereist een argument -- %c\n" #: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "omgevingsvariabele 'POSIXLY_CORRECT' is gezet: '--posix' ingeschakeld" #: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "'--posix' overstijgt '--traditional'" #: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "'--posix'/'--traditional' overstijgen '--non-decimal-data'" #: 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: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:616 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "kan standaarduitvoer niet in binaire modus zetten (%s)" #: 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:657 msgid "no program text at all!" msgstr "helemaal geen programmatekst!" #: 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: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:741 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "\tPOSIX-opties:\t\tEquivalente GNU-opties: (standaard)\n" #: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f programmabestand\t--file=programmabestand\n" #: main.c:743 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F veldscheidingsteken\t--field-separator=veldscheidingsteken\n" #: main.c:744 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "" "\t-v var=waarde\t\t--assign=var=waarde\n" "\n" #: main.c:745 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-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-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'programmatekst'\t--source='programmatekst'\n" #: main.c:751 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E bestand\t\t--exec=bestand\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 [fataal]\t\t--lint[=fataal]\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[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: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" "Voor het rapporteren van programmagebreken, zie 'info gawk bugs'\n" "of de sectie 'Reporting Problems and Bugs' in de gedrukte versie.\n" "Meld fouten in de vertaling aan .\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' is een patroonherkennings- en bewerkingsprogramma.\n" "Standaard leest het van standaardinvoer en schrijft naar standaarduitvoer.\n" "\n" #: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" "Voorbeelden:\n" "\tgawk '{ som += $1 }; END { print som }' bestand\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 (C) 1989, 1991-%d Free Software Foundation.\n" "\n" "Dit programma is vrije software; u mag het verder verspreiden en/of\n" "wijzigen onder de voorwaarden van de GNU General Public License zoals\n" "uitgegeven door de Free Software Foundation, naar keuze ofwel onder\n" "versie 3 of onder een nieuwere versie van die licentie.\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 "" "Dit programma wordt uitgegeven in de hoop dat het nuttig is,\n" "maar ZONDER ENIGE GARANTIE; zelfs zonder de impliciete garantie\n" "van VERKOOPBAARHEID of GESCHIKTHEID VOOR EEN BEPAALD DOEL.\n" "Zie de GNU General Public License voor meer details.\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 "" "Bij dit programma hoort u een kopie van de GNU General Public License\n" "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:856 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft maakt van FS geen tab in POSIX-awk" #: 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" "\n" msgstr "" "%s: argument '%s' van '-v' is niet van de vorm 'var=waarde'\n" "\n" #: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "'%s' is geen geldige variabelenaam" #: 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: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 "drijvendekomma-berekeningsfout" #: main.c:1269 msgid "fatal error: internal error" msgstr "fatale fout: **interne fout**" #: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "fatale fout: **interne fout**: segmentatiefout" #: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "fatale fout: **interne fout**: stack is vol" #: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "geen reeds-geopende bestandsdescriptor %d" #: main.c:1353 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "kan /dev/null niet openen voor bestandsdescriptor %d" #: msg.c:63 #, c-format msgid "cmd. line:" msgstr "commandoregel:" #: msg.c:107 msgid "error: " msgstr "fout: " #: node.c:406 msgid "backslash at end of string" msgstr "backslash aan het einde van de string" #: 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:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX staat stuurcode '\\x' niet toe" #: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "geen hex cijfers in stuurcodereeks '\\x'" #: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " "expect" msgstr "" "hexadecimale stuurcode \\x%.*s van %d tekens wordt waarschijnlijk niet " "afgehandeld zoals u verwacht" #: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "stuurcodereeks '\\%c' behandeld als normale '%c'" #: 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." #: posix/gawkmisc.c:176 #, c-format 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)" #: posix/gawkmisc.c:188 #, c-format 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:83 #, c-format msgid "could not open `%s' for writing: %s" msgstr "kan '%s' niet openen om te schrijven: %s" #: profile.c:85 msgid "sending profile to standard error" msgstr "profiel gaat naar standaardfoutuitvoer" #: profile.c:203 #, c-format msgid "" "\t# %s block(s)\n" "\n" msgstr "" "\t# %s-blok(ken)\n" "\n" #: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" "\t# Regel(s)\n" "\n" #: profile.c:279 #, c-format msgid "internal error: %s with null vname" msgstr "**interne fout**: %s heeft een lege 'vname'" #: 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" "\t# Functions, listed alphabetically\n" msgstr "" "\n" "\t# Functies, alfabetisch geordend\n" #: profile.c:1370 #, c-format msgid "redir2str: unknown redirection type %d" msgstr "redir2str(): onbekend omleidingstype %d" #: re.c:573 #, c-format 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" #: 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:134 msgid "No match" msgstr "Geen overeenkomsten" #: regcomp.c:137 msgid "Invalid regular expression" msgstr "Ongeldige reguliere expressie" #: regcomp.c:140 msgid "Invalid collation character" msgstr "Ongeldig samengesteld teken" #: regcomp.c:143 msgid "Invalid character class name" msgstr "Ongeldige tekenklassenaam" #: regcomp.c:146 msgid "Trailing backslash" msgstr "Backslash aan het eind" #: regcomp.c:149 msgid "Invalid back reference" msgstr "Ongeldige terugverwijzing" #: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "Ongepaarde [ of [^" #: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "Ongepaarde ( of \\(" #: regcomp.c:158 msgid "Unmatched \\{" msgstr "Ongepaarde \\{" #: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Ongeldige inhoud van \\{\\}" #: regcomp.c:164 msgid "Invalid range end" msgstr "Ongeldig bereikeinde" #: regcomp.c:167 msgid "Memory exhausted" msgstr "Onvoldoende geheugen beschikbaar" #: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Ongeldige voorafgaande reguliere expressie" #: regcomp.c:173 msgid "Premature end of regular expression" msgstr "Voortijdig einde van reguliere expressie" #: regcomp.c:176 msgid "Regular expression too big" msgstr "Reguliere expressie is te groot" #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Ongepaarde ) of \\)" #: 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)" gawk-4.0.1+dfsg.orig/po/sv.gmo0000644000175000017500000013751611734667243015151 0ustar schotschotÞ•ºì Q¼%% %%<%O%g%†%£%»%Í%Ü%÷%&&5&H&e&#z&+ž&Ê&é& ú&'"'?'T'f'…'% 'yÆ'+@(7l(<¤("á(-)2):I)3„)¸)Í)ã)õ)*#*,5*,b*'*-·* å*(+)/+&Y+(€+:©+%ä+ ,*,-J,'x, ,¾,+Û,(-]0.#Ž.².É.æ./[/$v/›/­/È/Ù/ò/û/020!L0"n0#‘0-µ0#ã01/"1'R1z1'‚1ëª1–2©2»2Í2 ß2Aì2A.3…p38ö35/4e4|43š4Î4"ç4! 55,5 b5ƒ5#¢58Æ5"ÿ5"6!@6b6 }6*ž6/É6(ù6""70E7.v7¥7&Å7"ì78*+8*V8#8(¥8Î8,ç8939&P9w9Š9!§92É98ü9(5:)^:8ˆ:8Á:"ú:#;9A;9{;#µ;$Ù;&þ;*%<+P<|<1˜<+Ê<&ö<-=5K=(=&ª=.Ñ=0>1>$L>q>>4°><å>#"?$F?,k?2˜?Ë?ë? @$%@#J@$n@1“@/Å@&õ@A)7A-aAA!ªAÌAìA*B1B#PB$tB5™BEÏB*C-@C nC-yC2§C.ÚC4 D$>D"cD$†D$«D#ÐDôD&E:E.RE$E¦E"ÁE#äE"F++F(WF/€F'°FØF"öF@G!ZG!|G"žGÁG+ÉG õG"H59H5oH'¥H8ÍH(I0/I7`I ˜I*¹I.äI.JBJ%^J+„J°J*¸J/ãJ0K0DK0uKD¦K%ëK(L?:LPzL/ËL>ûL4:M4oM?¤M?äM8$N)]N‡NF§NîNGOOO&WO6~OWµO/ P9=PwP=‘P>ÏP8QFGQ#ŽQ<²Q5ïQ6%R%\Rt‚R(÷RN SGoS)·S*áS, T"9T"\T$T¤TÄTáT$U &U"GU"jU5U;ÃUAÿU+AV,mV7šV)ÒV%üV>"W$aW.†W/µW3åW4X0NX'X(§X$ÐX5õX-+Y'YY'Y)©Y%ÓYùY Z1%Z4WZ(ŒZ0µZ8æZ&['F[1n[2 [<Ó[$\(5\)^\1ˆ\7º\'ò\(]<C]<€]>½])ü])&^)P^z^@š^'Û^_/_KH_”_&£_'Ê_(ò_/`&K`'r`(š`3Ã`9÷`91a6ka2¢a)Õa)ÿa1)b)[b*…b5°b;æbA"c+dc,c0½c!îc'd8d"Ud,xd¥d#¿d$ãd9e9Be;|e*¸e&ãe4 f&?f&ff#f$±fÖfæf?þf&>g.eg,”g;Ág&ýgJ$hohh?«h/ëh4i$Pi*ui, i$Íi2òi%j%Dj-jj"˜j%»j0áj#k6kJk!\k2~k±k"Åk0èkl"-l1Pl@‚lAÃlm m2)m8\m(•m)¾mièm Ro`oroŒoŸoµoÔoño pp*pEpVpgpƒp–p³p"Èp)ëpq2q CqQqkq‡qœq"®qÑq$íqÌr(ßr<s?Es…s5¥sÛsMús>Ht‡t £tÄtÔtätu0u0Fu%wu1u Ïu(ðu%v&?v(fvIv+Ùvww37w'kw$“w¸w/Õwx["y~yœy²yËyêyUz%Yzz”z ¯z»z Ûz"èz {"{*;{"f{#‰{.­{$Ü{|0|&N|u|~|üž|›}»}Ò}é}~G~CW~›~8BT—¦7Äü&€%<€8b€›€ ·€%Ø€:þ€%9_!}Ÿ º)Û7‚-=‚"k‚1Ž‚3À‚ô‚*ƒ%?ƒeƒ)|ƒ)¦ƒ#Ѓ*ôƒ„.9„h„‡„ ¥„Æ„#Ö„ ú„.…:J…+……*±…TÜ…T1†*††)±†UÛ†U1‡+‡‡*³‡)Þ‡-ˆ,6ˆ#cˆ0‡ˆ+¸ˆ/äˆ2‰:G‰-‚‰.°‰6߉6Š&MŠ4tŠ#©ŠÍŠ3ìŠJ ‹,k‹,˜‹.Å‹7ô‹!,Œ#NŒ#rŒ-–Œ,ÄŒ,ñŒ?.^*¸1×: Ž#DŽ+hŽ'”Ž$¼Ž-áŽ&363j7žMÖ+$4P …5’6È+ÿ7+‘&c‘$Š‘#¯‘(Ó‘'ü‘ $’'E’m’/ƒ’,³’à’!û’"“!@“(b“'‹“4³“*è“” /”8P”'‰”(±”'Ú”•/•.8•$g•;Œ•6È•8ÿ•E8–.~–<­–6ê–!—*A—-l—-š—È—-ä—'˜ :˜)G˜6q˜/¨˜/ؘ/™C8™2|™0¯™Là™Y-š<‡šLÄš.›6@›Ew›E½›8œ*<œ%gœOœÝœOîœ>-F@teµ4ž<Pž"žB°žBóžA6ŸYxŸ#ÒŸ>öŸ?5 1u 1§ wÙ 8Q¡PŠ¡KÛ¡*'¢)R¢,|¢$©¢΢,í¢£9£N£/n£ž£$¾£$ã£1¤=:¤Cx¤.¼¤-ë¤8¥,R¥*¥@ª¥/ë¥A¦A]¦FŸ¦Fæ¦--§)[§4…§.º§Eé§</¨6l¨6£¨8Ú¨2©F©\©7t©7¬©'ä©0 ª7=ª$uª%šª:Àª-ûª$)«1N«$€«%¥«-Ë«9ù«*3¬)^¬Wˆ¬Wà¬M8­-†­,´­.á­%®C6®*z®¥®.»®Lê®7¯$G¯,l¯*™¯-į'ò¯(°*C°Dn°B³°Bö°B9±@|±0½±/î±8²>W²>–²1Õ²=³CE³.‰³-¸³5æ³"´'?´"g´$Š´:¯´ê´#µ'$µTLµT¡µJöµ,A¶*n¶9™¶)Ó¶&ý¶!$·&F· m·y·=”·"Ò·/õ·8%¸A^¸% ¸SƸ¹:¹FZ¹:¡¹=ܹº-6º.dº/“ºEú! »0+»%\»%‚»0¨»7Ù»+¼=¼M¼']¼1…¼·¼-Ó¼<½>½O½<n½[«½\¾d¾ ƒ¾.¾:¼¾+÷¾*#¿ˆC‰vÇ6?Ò)Ýl£Jl¤ã‹Kz­!2ôu©]·3¢³¼H”t¦ Šæì/‘4F¶ ye I «Ñ†»P,w˜ ŒN>Afo™•U^Q~ õ†9šºýð÷"å.Ö®pø :¢¿Óïþ$Gò¯:¸xü_¾Ãªú¥a–`’U„.c–¹f Ÿ=*î-û›;,6[j+‡ä>¨u=ŽSž©#cí¤yvYZbq(´s^… „™mÜ‘;dO®³~«*TŠkg4/CɈE_S&\ë2kpœè¦XB‹zÿMQ?ö²˜Žr 5½À µA‚Ëœ3hW¬{—<")°Ù5jš’}eo[ùF—W{X¡±1êâV“¹(•¬MJÁ&d“\@8G°žÏ…|D¶¡ƒÈ$²Í”#¯0·ÄihwL×9‚Z<gÕ!H8`ÛµV%Ð1¸qóÊnÎRŸxÌÚØbYŒ€R'ñÔ¥'E 7|±rÂinBtç-DaT£ÅºÞ}m¨ ­Pª‡N7á§K@§ƒL+ à%逛´‰O]IÆ0sß # %s block(s) # Rule(s) # gawk profile, created %s -C --copyright -E file --exec=file -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R file --command=file -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[file] --dump-variables[=file] -e 'program-text' --source='program-text' -f progfile --file=progfile -g --gen-pot -h --help -n --non-decimal-data -p[file] --profile[=file] -r --re-interval -t --lint-old -v var=val --assign=var=val # Function Call Stack: # Functions, listed alphabetically To report bugs, see node `Bugs' in `gawk.info', which is section `Reporting Problems and Bugs' in the printed version. %d is invalid as number of arguments for %s%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)%s blocks must have an action part%s third parameter is not a changeable object%s to "%s" failed (%s)%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk%s: `%s' argument to `-v' not in `var=value' form %s: array_ref to %s %s: close failed (%s)%s: empty (null) %s: empty (zero) %s: invalid option -- '%c' %s: is parameter %s: option '%c%s' doesn't allow an argument %s: option '--%s' doesn't allow an argument %s: option '--%s' requires an argument %s: option '-W %s' doesn't allow an argument %s: option '-W %s' is ambiguous %s: option '-W %s' requires an argument %s: option `-W %s' unrecognized, ignored %s: option requires an argument -- %c %s: option requires an argument -- '%c' %s: string literal as last arg of substitute has no effect%s: table_size = %d, array_size = %d %s: unrecognized option '%c%s' %s: unrecognized option '--%s' 'system' function not allowed in sandbox mode-Ft does not set FS to tab in POSIX awk-m option usage: `-m[fr] nnn'@include is a gawk extensionBINMODE value `%s' is invalid, treated as 3Copyright (C) 1989, 1991-%d Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Examples: gawk '{ sum += $1 }; END { print sum }' file gawk -F: '{ print $1 }' /etc/passwd IPv6 communication is not supportedInvalid back referenceInvalid character class nameInvalid collation characterInvalid content of \{\}Invalid multibyte data detected. There may be a mismatch between your data and your locale.Invalid preceding regular expressionInvalid range endInvalid regular expressionMemory exhaustedNF set to negative valueNo matchNo previous regular expressionOperation Not SupportedPOSIX does not allow `%s'POSIX does not allow `\x' escapesPOSIX does not allow operator `**'POSIX does not allow operator `**='POSIX options: GNU long options: (standard) Premature end of regular expressionRegular expression too bigShort options: GNU long options: (extensions) Sorry, don't know how to interpret `%s'SuccessTCP/IP communications are not supportedThis 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. Trailing backslashUnmatched ( or \(Unmatched ) or \)Unmatched [ or [^Unmatched \{Usage: %s [POSIX or GNU style options] -f progfile [--] file ... Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ... You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. [s]printf: format specifier does not have control letter[s]printf: value %g is out of range for `%%%c' format^ ran out for this one`%s' is a Bell Labs extension`%s' is a built-in function, it cannot be redefined`%s' is a gawk extension`%s' is invalid as a function name`%s' is not a legal variable name`%s' is not a variable name, looking for file `%s=%s'`%s' is not supported in old awk`--posix' overrides `--binary'`--posix' overrides `--traditional'`--posix'/`--traditional' overrides `--non-decimal-data'`-m[fr]' option irrelevant in gawk`BINMODE' is a gawk extension`FIELDWIDTHS' is a gawk extension`FPAT' is a gawk extension`IGNORECASE' is a gawk extension`L' is meaningless in awk formats; ignored`break' is not allowed outside a loop or switch`continue' is not allowed outside a loop`delete array' is a gawk extension`delete(array)' is a non-portable tawk extension`exit' cannot be called in the current context`extension' is a gawk extension`getline var' invalid inside `%s' rule`getline' invalid inside `%s' rule`goto' considered harmful! `h' is meaningless in awk formats; ignored`l' is meaningless in awk formats; ignored`length(array)' is a gawk extension`next' cannot be called from a `%s' rule`next' used in %s action`nextfile' cannot be called from a `%s' rule`nextfile' is a gawk extension`nextfile' used in %s action`return' used outside function context`|&' not supportedadump: argument not an arrayalready included source file `%s'and(%lf, %lf): fractional values will be truncatedand(%lf, %lf): negative values will give strange resultsand: received non-numeric first argumentand: received non-numeric second argumentasort: cannot use a subarray of first arg for second argasort: cannot use a subarray of second arg for first argasort: first argument not an arrayasort: second argument not an arrayasorti: cannot use a subarray of first arg for second argasorti: cannot use a subarray of second arg for first argasorti: first argument not an arrayasorti: second argument not an arrayassignment used in conditional contextatan2: received non-numeric first argumentatan2: received non-numeric second argumentattempt to access field %ldattempt to field reference from non-numeric valueattempt to field reference from null stringattempt to use a scalar value as arrayattempt to use array `%s' in a scalar contextattempt to use array `%s["%.*s"]' in a scalar contextattempt to use function `%s' as an arrayattempt to use scalar `%s' as an arrayattempt to use scalar `%s["%.*s"]' as an arrayattempt to use scalar parameter `%s' as an arraybackslash at end of stringbackslash not last character on linebad `%sFMT' specification `%s'buffer overflow in genflags2strcall of `length' without parentheses is not portablecan not use special variable `%s' for indirect function callcan't open pipe `%s' for input (%s)can't open pipe `%s' for output (%s)can't open source file `%s' for reading (%s)can't open two way pipe `%s' for input/output (%s)can't read sourcefile `%s' (%s)can't redirect from `%s' (%s)can't redirect to `%s' (%s)can't set binary mode on stderr (%s)can't set binary mode on stdin (%s)can't set binary mode on stdout (%s)can't use function name `%s' as variable or arraycannot create child process for `%s' (fork: %s)cannot open file `%s' for reading (%s)cannot open pipe `%s' (%s)cannot use function `%s' as variable namecannot use gawk builtin `%s' as variable nameclose of `%s' failed (%s).close of fd %d (`%s') failed (%s)close of master pty failed (%s)close of pipe failed (%s)close of redirection that was never openedclose of slave pty failed (%s)close of stdin in child failed (%s)close of stdout in child failed (%s)close: `%.*s' is not an open file, pipe or co-processclose: redirection `%s' not opened with `|&', second argument ignoredclose: second argument is a gawk extensionclose: second argument must be `to' or `from'cmd. line:co-process flush of pipe to `%s' failed (%s).command line argument `%s' is a directory: skippedcompl(%lf): fractional value will be truncatedcompl(%lf): negative value will give strange resultscompl: received non-numeric argumentcos: received non-numeric argumentcould not allocate more input memorycould not open `%s' for writing (%s)could not open `%s' for writing: %scould not open `%s', mode `%s'could not pre-open /dev/null for fd %ddata file `%s' is emptydcgettext: `%s' is not a valid locale categorydelete: index `%s' not in array `%s'division by zero attempteddivision by zero attempted in `%%'division by zero attempted in `%%='division by zero attempted in `/='duplicate `default' detected in switch bodyduplicate case values in switch body: %seach rule must have a pattern or an action partempty argument to `-e/--source' ignoredempty filename after @includeempty program text on command lineenvironment variable `POSIXLY_CORRECT' set: turning on `--posix'error reading input file `%s': %serror writing standard error (%s)error writing standard output (%s)error: escape sequence `\%c' treated as plain `%c'exp: argument %g is out of rangeexp: received non-numeric argumentexpression for `%s' redirection has null string valueexpression in `%s' redirection only has numeric valueextension: can't redefine function `%s'extension: can't use gawk built-in `%s' as function nameextension: function `%s' already definedextension: function name `%s' previously definedextension: illegal character `%c' in function name `%s'extension: missing function nameextensions are not allowed in sandbox modefailure status (%d) on file close of `%s' (%s)failure status (%d) on pipe close of `%s' (%s)fatal error: internal errorfatal error: internal error: segfaultfatal error: internal error: stack overflowfatal: fatal: `$' is not permitted in awk formatsfatal: `$' not permitted after period in formatfatal: `L' is not permitted in POSIX awk formatsfatal: `h' is not permitted in POSIX awk formatsfatal: `l' is not permitted in POSIX awk formatsfatal: arg count %ld greater than total number of supplied argumentsfatal: arg count with `$' must be > 0fatal: extension: cannot open `%s' (%s) fatal: extension: library `%s': cannot call function `%s' (%s) fatal: extension: library `%s': does not define `plugin_is_GPL_compatible' (%s) fatal: must use `count$' on all formats or nonefatal: no `$' supplied for positional field width or precisionfatal: not enough arguments to satisfy format stringfflush: `%s' is not an open file, pipe or co-processfflush: cannot flush: file `%s' opened for reading, not writingfflush: cannot flush: pipe `%s' opened for reading, not writingfield width and precision are ignored for `%%' specifierfield width is ignored for `%%' specifierfile flush of `%s' failed (%s).filename `%s' for `%s' redirection may be result of logical expressionfloating point exceptionfor loop: array `%s' changed size from %ld to %ld during loop executionfrom %sfunction `%s' called but never definedfunction `%s' called with more arguments than declaredfunction `%s' called with space between name and `(', or used as a variable or an arrayfunction `%s' defined but never called directlyfunction `%s' defined to take no more than %d argument(s)function `%s' not definedfunction `%s': argument #%d: attempt to use array as a scalarfunction `%s': argument #%d: attempt to use scalar as an arrayfunction `%s': can't use function name as parameter namefunction `%s': can't use special variable `%s' as a function parameterfunction `%s': missing argument #%dfunction `%s': parameter #%d, `%s', duplicates parameter #%dfunction `%s': parameter `%s' shadows global variablefunction called indirectly through `%s' does not existfunction name `%s' previously definedgawk is a pattern scanning and processing language. By default it reads standard input and writes standard output. gensub: third argument of 0 treated as 1hex escape \x%.*s of %d characters probably not interpreted the way you expectignoring unknown format specifier character `%c': no argument convertedindex: received non-string first argumentindex: received non-string second argumentindirect function calls are a gawk extensionint: received non-numeric argumentinternal error: %s with null vnameinvalid FIELDWIDTHS value, near `%s'invalid char '%c' in expressioninvalid subscript expressionlength: received array argumentlength: received non-string argumentlocal port %s invalid in `/inet'log: received negative argument %glog: received non-numeric argumentlshift(%lf, %lf): fractional values will be truncatedlshift(%lf, %lf): negative values will give strange resultslshift(%lf, %lf): too large shift value will give strange resultslshift: received non-numeric first argumentlshift: received non-numeric second argumentmake_builtin: negative argument count for function `%s'match: third argument is a gawk extensionmatch: third argument is not an arraymktime: at least one of the values is out of the default rangemktime: received non-string argumentmoving pipe to stdin in child failed (dup: %s)moving pipe to stdout in child failed (dup: %s)moving slave pty to stdin in child failed (dup: %s)moving slave pty to stdout in child failed (dup: %s)multicharacter value of `RS' is a gawk extensionmultistage two-way pipelines don't workmust supply a remote hostname to `/inet'must supply a remote port to `/inet'no (known) protocol supplied in special filename `%s'no explicit close of co-process `%s' providedno explicit close of file `%s' providedno explicit close of pipe `%s' providedno explicit close of socket `%s' providedno hex digits in `\x' escape sequenceno pre-opened fd %dno program text at all!non-redirected `getline' invalid inside `%s' rulenon-redirected `getline' undefined inside END actionnull string for `FS' is a gawk extensionold awk does not support multidimensional arraysold awk does not support multiple `BEGIN' or `END' rulesold awk does not support operator `**'old awk does not support operator `**='old awk does not support regexps as value of `FS'old awk does not support the `\%c' escape sequenceold awk does not support the keyword `in' except after `for'opcode %s not an operator or keywordoperator `^' is not supported in old awkoperator `^=' is not supported in old awkor(%lf, %lf): fractional values will be truncatedor(%lf, %lf): negative values will give strange resultsor: received non-numeric first argumentor: received non-numeric second argumentpatsplit: cannot use a subarray of fourth arg for second argpatsplit: cannot use a subarray of second arg for fourth argpatsplit: cannot use the same array for second and fourth argspatsplit: fourth argument is not an arraypatsplit: second argument is not an arraypatsplit: third argument must be non-nullpipe flush of `%s' failed (%s).plain `print' in BEGIN or END rule should probably be `print ""'precision is ignored for `%%' specifierprintf: no argumentsrange of the form `[%c-%c]' is locale dependentreached system limit for open files: starting to multiplex file descriptorsreason unknownredir2str: unknown redirection type %dredirection not allowed in sandbox modereference to uninitialized argument `%s'reference to uninitialized element `%s["%.*s"]'reference to uninitialized field `$%d'reference to uninitialized field `$%ld'reference to uninitialized variable `%s'regexp component `%.*s' should probably be `[%.*s]'regexp constant `/%s/' looks like a C comment, but is notregexp constant `//' looks like a C++ comment, but is notregexp constant for parameter #%d yields boolean valueregular expression on left of `~' or `!~' operatorregular expression on right of assignmentregular expression on right of comparisonremote host and port information (%s, %s) invalidrestoring stdin in parent process failed restoring stdout in parent process failed rshift(%lf, %lf): fractional values will be truncatedrshift(%lf, %lf): negative values will give strange resultsrshift(%lf, %lf): too large shift value will give strange resultsrshift: received non-numeric first argumentrshift: received non-numeric second argumentrunning %s setuid root may be a security problemsending profile to standard errorsending variable list to standard errorshadow_funcs() called twice!sin: received non-numeric argumentsort comparison function `%s' is not definedsource file `%s' is emptysource file does not end in newlinespecial file name `%s' is incompletesplit: cannot use a subarray of fourth arg for second argsplit: cannot use a subarray of second arg for fourth argsplit: cannot use the same array for second and fourth argssplit: fourth argument is a gawk extensionsplit: fourth argument is not an arraysplit: null string for third arg is a gawk extensionsplit: second argument is not an arraysqrt: called with negative argument %gsqrt: received non-numeric argumentsrand: received non-numeric argumentstandard outputstatement has no effectstrftime: format value in PROCINFO["strftime"] has numeric typestrftime: received empty format stringstrftime: received non-numeric second argumentstrftime: received non-string first argumentstrftime: second argument less than 0 or too big for time_tsubscript of array `%s' is null stringsubstr: length %g at start index %g exceeds length of first argument (%lu)substr: length %g is not >= 0substr: length %g is not >= 1substr: length %g too big for string indexing, truncating to %gsubstr: non-integer length %g will be truncatedsubstr: non-integer start index %g will be truncatedsubstr: source string is zero lengthsubstr: start index %g is invalid, using 1substr: start index %g is past end of stringsystem: received non-string argumenttawk regex modifier `/.../%c' doesn't work in gawkthere were shadowed variables.tolower: received non-string argumenttoo many arguments supplied for format stringtoo many pipes or input files opentoupper: received non-string argumentturning off `--lint' due to assignment to `LINT'unexpected newline or end of stringunknown nodetype %dunknown opcode %dunknown value for field spec: %d unnecessary mixing of `>' and `>>' for file `%.*s'unterminated regexpunterminated regexp at end of fileunterminated regexp ends with `\' at end of fileunterminated stringunwind_stack: unexpected type `%s'use of `\ #...' line continuation is not portableuse of dcgettext(_"...") is incorrect: remove leading underscoreuse of dcngettext(_"...") is incorrect: remove leading underscoreuse of non-array as arraywarning: xor(%lf, %lf): fractional values will be truncatedxor(%lf, %lf): negative values will give strange resultsxor: received non-numeric first argumentxor: received non-numeric second argumentProject-Id-Version: gawk 4.0.0h Report-Msgid-Bugs-To: arnold@skeeve.com POT-Creation-Date: 2012-03-28 22:03+0200 PO-Revision-Date: 2012-01-30 12:07+0100 Last-Translator: Göran Uddeborg Language-Team: Swedish Language: sv MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit # %s-block # Regel/regler # gawkprofil, skapad %s -C --copyright -E fil --exec=fil -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R file --command=file -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[fil] --dump-variables[=fil] -e 'programtext' --source='programtext' -f progfil --file=progfil -g --gen-pot -h --help -n --non-decimal-data -p[fil] --profile[=fil] -r --re-interval -t --lint-old -v var=värde --assign=var=värde # Funktionsanropsstack: # Funktioner, listade alfabetiskt För att rapportera fel, se noden "Bugs" i "gawk.info", vilket är avsnittet "Reporting Problems and Bugs" i den utskrivna versionen. Rapportera synpunkter på översättningen till . %d är ett ogiltigt antal argument för %s%s %s "%s": kunde inte hämta fb-flaggor: (fcntl F_GETFD: %s)%s %s "%s": kunde inte sätta stäng-vid-exec (fcntl F_SETFD: %s)%s-block måste ha en åtgärdsdel%s: tredje argumentet är inte ett ändringsbart objekt%s till "%s" misslyckades (%s)%s: %d: tawk-modifierare för reguljära uttryck "/.../%c" fungerar inte i gawk%s: Argumentet "%s" till "-v" är inte på formatet "var=värde" %s: vektorreferens till %s %s: misslyckades att stänga (%s)%s: tom (null) %s: tom (noll) %s: ogiltig flagga -- "%c" %s: är en parameter %s: flaggan "%c%s" tillåter inte något argument %s: flaggan "--%s" tillåter inte något argument %s: flaggan "%s" kräver ett argument %s: flaggan "-W %s" tillåter inte något argument %s: flaggan "-W %s" är tvetydig %s: flaggan "-W %s" kräver ett argument %s: flaggan "-W %s" okänd, ignorerad %s: flaggan kräver ett argument -- %c %s: flaggan kräver ett argument -- "%c" %s: bokstavlig sträng som sista argument till ersättning har ingen effekt%s: tabellstorlek = %d, vektorstorlek = %d %s: okänd flagga "%c%s" %s: okänd flagga "--%s" funktionen "system" är inte tillåten i sandlådeläge-Ft sätter inte FS till tab i POSIX-awk-m-flaggans användning: "-m[fr] nnn"@include är en gawk-utökningBINMODE-värde "%s" är ogiltigt, behandlas som 3Copyright © 1989, 1991-%d Free Software Foundation. Detta program är fri programvara. Du kan distribuera det och/eller modifiera det under villkoren i GNU General Public License, publicerad av Free Software Foundation, antingen version 3 eller (om du så vill) någon senare version. Exempel: gawk '{ sum += $1 }; END { print sum }' fil gawk -F: '{ print $1 }' /etc/passwd IPv6-kommunikation stöds inteOgiltig bakåtrerefensOgiltigt teckenklassnamnOgiltigt kollationeringsteckenOgiltigt innehåll i \{\}Ogiltig multibytedata upptäckt. Dina data och din lokal stämmer kanske inte överens.Ogiltigt föregående reguljärt uttryckOgiltigt omfångsslutOgiltigt reguljärt uttryckMinnet slutNF satt till ett negativt värdeMisslyckadesInget föregående reguljärt uttryckOperationen stöds intePOSIX tillåter inte "%s"POSIX tillåter inte "\x"-kontrollsekvenserPOSIX tillåter inte operatorn "**"POSIX tillåter inte operatorn "**="POSIX-flaggor: GNU långa flaggor: (standard) För tidigt slut på reguljärt uttryckReguljärt uttryck för stortKorta flaggor: GNU långa flaggor: (utökningar) Tyvärr, vet inte hur "%s" skall tolkasLyckadesTCP/IP-kommunikation stöds inteDetta program distribueras i hopp om att det ska vara användbart, men UTAN NÅGON SOM HELST GARANTI, även utan underförstådd garanti om SÄLJBARHET eller LÄMPLIGHET FÖR NÅGOT SPECIELLT ÄNDAMÅL. Se GNU General Public License för ytterligare information. Eftersläpande omvänt snedstreckObalanserad ( eller \(Obalanserad ) eller \)Obalanserad [ eller [^Obalanserad \{Användning: %s [POSIX- eller GNU-stilsflaggor] -f progfil [--] fil ... Användning: %s [POSIX- eller GNU-stilsflaggor] %cprogram%c fil ... Du bör ha fått en kopia av GNU General Public License tillsammans med detta program. Om inte, se http//www.gnu.org/liceences/. [s]printf: formatspecifieraren har ingen kommandobokstav[s]printf: värdet %g är utanför "%%%c"-formatets giltiga intervall^ tog slut här"%s" är en Bell Labs-utökning"%s" är en inbyggd funktion, den kan inte definieras om"%s" är en gawk-utökning"%s" är ogiltigt som ett funktionsnamn"%s" är inte ett giltigt variabelnamn"%s" är inte ett variabelnamn, letar efter filen "%s=%s""%s" stöds inte i gamla awk"--posix" åsidosätter "--binary""--posix" åsidosätter "--traditional""--posix"/"--traditional" åsidosätter "--non-decimal-data""-m[fr]"-flaggan är irrelevant i gawk"BINMODE" är en gawk-utökning"FIELDWIDTHS" är en gawk-utökning"FPAT" är en gawk-utökning"IGNORECASE" är en gawk-utökning"L" är meningslös i awk-format, ignorerad"break" är inte tillåtet utanför en slinga eller switch"continue" är inte tillåtet utanför en slinga"delete array" är en gawk-utökning"delete(array)" är en icke portabel tawk-utökning"exit" kan inte anropas i det aktuella sammanhanget"extension" är en gawk-utökning"getline var" är ogiltigt inuti "%s"-regel"getline är ogiltigt inuti "%s"-regel"goto" anses skadlig! "h" är meningslös i awk-format, ignorerad"l" är meningslös i awk-format, ignorerad"length(array)" är en gawk-utökning"next" kan inte anropas från en "%s"-regel"next" använt i %s-åtgärd"nextfile" kan inte anropas från en "%s"-regel"nextfile" är en gawk-utökning"nextfile" använt i %s-åtgärd"return" använd utanför funktion"|&" stöds inteadump: argumentet är inte en vektorinkluderade redan källfilen "%s"and(%lf, %lf): flyttalsvärden kommer trunkerasand(%lf, %lf): negativa värden kommer ge konstiga resultatand: fick ett ickenumeriskt första argumentand: fick ett ickenumeriskt andra argumentasort: det går inte att använda en delvektor av första argumentet som andra argumentasort: det går inte att använda en delvektor av andra argumentet som första argumentasort: första argumentet är inte en vektorasort: andra argumentet är inte en vektorasorti: det går inte att använda en delvektor av första argumentet som andra argumentasorti: det går inte att använda en delvektor av andra argumentet som första argumentasorti: första argumentet är inte en vektorasorti: andra argumentet är inte en vektortilldelning använt i jämförelsesammanhangatan2: fick ett ickenumeriskt första argumentatan2: fick ett ickenumeriskt andra argumentförsök att komma åt fält nummer %ldförsök att fältreferera från ickenumeriskt värdeförsök till fältreferens från en tom strängförsök att använda ett skalärt värde som vektorförsök att använda vektorn "%s" i skalärsammanhangförsök att använda vektorn "%s["%.*s"]" i skalärsammanhangförsök att använda funktionen "%s" som vektorförsök att använda skalären "%s" som en vektorförsök att använda skalären "%s["%.*s"]" som en vektorförsök att använda skalärparametern "%s" som en vektoromvänt snedstreck i slutet av strängensista tecknet på raden är inte ett omvänt snedstreckfelaktig "%sFMT"-specifikation "%s"buffertöverflöd i genflags2stranrop av "length" utan parenteser är inte portabeltdet går inte att använda specialvariabeln "%s" för indirekta fuktionsanropkan inte öppna röret "%s" för inmatning (%s)kan inte öppna röret "%s" för utmatning (%s)kan inte öppna källfilen "%s" för läsning (%s)kan inte öppna tvåvägsröret "%s" för in-/utmatning (%s)kan inte läsa källfilen "%s" (%s)kan inte dirigera om från "%s" (%s)kan inte dirigera om till "%s" (%s)kan inte sätta binärläge på standard fel (%s)kan inte sätta binärläge på standard in (%s)kan inte sätta binärläge på standard ut (%s)kan inte använda funktionsnamnet "%s" som variabel eller vektorkan inte skapa barnprocess för "%s" (fork: %s)kan inte öppna filen "%s" för läsning (%s)kan inte öppna röret "%s" (%s)kan inte använda funktionen "%s" som variabelnamnkan inte använda gawks inbyggda "%s" som ett funktionsnamnstängning av "%s" misslyckades (%s)stängning av fd %d ("%s") misslyckades (%s)stängning av huvudpty misslyckades (%s)stängning av röret misslyckades (%s)stängning av omdirigering som aldrig öppnadesstängning av slavpty misslyckades (%s)stängning av standard in i barnet misslyckades (%s)stängning av standard ut i barnet misslyckades (%s)close: "%.*s" är inte en öppen fil, rör eller koprocessclose: omdirigeringen "%s" öppnades inte med "|&", andra argumentet ignoreratclose: andra argumentet är en gawk-utökningclose: andra argumentet måste vara "to" eller "from"kommandorad:koprocesspolning av röret till "%s" misslyckades (%s)kommandoradsargumentet "%s" är en katalog: hoppas övercompl(%lf): flyttalsvärden kommer trunkerascompl(%lf): negativa värden kommer ge konstiga resultatcompl: fick ett ickenumeriskt argumentcos: fick ett ickenumeriskt argumentkunde inte allokera mer indataminnekunde inte öppna "%s" för skrivning (%s)kunde inte öppna "%s" för skrivning: %skunde inte öppna "%s", läge "%s"kunde inte föröppna /dev/null för fd %ddatafilen "%s" är tomdcgettext: "%s" är inte en giltig lokalkategoridelete: index "%s" finns inte i vektorn "%s"försökte dividera med nollförsökte dividera med noll i "%%"försökte dividera med noll i "%%="försökte dividera med noll i "/="flera "default" upptäcktes i switch-satsupprepade case-värden i switch-sats: %svarje regel måste ha ett mönster eller en åtgärdsdeltomt argument till "-e/--source" ignorerattomt filnamn efter @includetom programtext på kommandoradenmiljövariabeln "POSIXLY_CORRECT" satt: slår på "--posix"fel vid läsning av indatafilen "%s": %sfel vid skrivning till standard fel (%s)fel vid skrivning till standard ut (%s)fel: kontrollsekvensen "\%c" behandlad som bara "%c"exp: argumentet %g är inte inom tillåten gränsexp: fick ett ickenumeriskt argumentuttrycket för "%s"-omdirigering har en tom sträng som värdeuttrycket i "%s"-omdirigering har bara numeriskt värdeextension: det går inte att definiera om funktionen "%s"extension: kan inte använda gawks inbyggda "%s" som ett funktionsnamnextension: funktionen "%s" är redan definieradextension: funktionsnamnet "%s" är definierat sedan tidigareextension: ogiltigt tecken "%c" i funktionsnamnet "%s"extension: saknar funktionsnamnutökningar är inte tillåtna i sandlådelägefelstatus (%d) från filstängning av "%s" (%s)felstatus (%d) från rörstängning av "%s" (%s)ödesdigert fel: internt felödesdigert fel: internt fel: segmenteringsfelödesdigert fel: internt fel: stackspillödesdigert: ödesdigert: "$" tillåts inte i awk-formatödesdigert: "$" tillåts inte efter en punkt i formatetödesdigert: "L" tillåts inte i POSIX awk-formatödesdigert: "h" tillåts inte i POSIX awk-formatödesdigert: "l" tillåts inte i POSIX awk-formatödesdigert: argumentantalet %ld är större än antalet givna argumentödesdigert: argumentantalet med "$" måste vara > 0ödesdigert: extension: kan inte öppna "%s" (%s) ödesdigert: extension: bibliotek "%s": kan inte anropa funktionen "%s" (%s) ödesdigert: extension: biblioteket "%s": definierar inte "plugin_is_GPL_compatible" (%s) ödesdigert: måste använda "count$" på alla eller inga formatödesdigert: inget "$" bifogat för positionsangiven fältbredd eller precisionödesdigert: för få argument för formatsträngenfflush: "%s" är inte en öppen fil, rör eller koprocessfflush: kan inte spola: filen "%s" öppnad för läsning, inte skrivningfflush: kan inte spola: röret "%s" öppnat för läsning, inte skrivningfältbredd och precision ignoreras för "%%"-specificerarefältbredd ignoreras för "%%"-specificerarefilspolning av "%s" misslyckades (%s)filnamnet "%s" för "%s"-omdirigering kan vara resultatet av ett logiskt uttryckflyttalsundantagforslinga: vektorn "%s" ändrade storlek från %ld till %ld under slingexekveringfrån %sfunktionen "%s" anropad men aldrig definieradfunktionen "%s" anropad med fler argument än vad som deklareratsfunktionen "%s" anropad med blanktecken mellan namnet och "(", eller använd som variabel eller vektorfunktionen "%s" definierad men aldrig anropad direktfunktionen "%s" definierades för att ta maximalt %d argumentfunktionen "%s" är inte definieradfunktionen "%s": argument %d: försök att använda vektor som skalärfunktionen "%s": argument %d: försök att använda skalär som vektorfunktionen "%s": kan inte använda funktionsnamn som parameternamnfunktionen "%s": det går inte att använda specialvariabeln "%s" som en funktionsparameterfunktionen "%s": argument %d saknasfunktionen "%s": parameter %d, "%s", är samma som parameter %dfunktionen "%s": parametern "%s" överskuggar en global variabelfunktionen anropad indirekt genom "%s" finns intefunktionsnamnet "%s" är definierat sedan tidigaregawk är ett mönsterskannande och -bearbetande språk. Normalt läser det från standard in och skriver till standard ut. gensub: nollan i tredje argumentet behandlad som en ettahexkod \x%.*s med %d tecken tolkas förmodligen inte på det sätt du förväntar digignorerar okänt formatspecifikationstecken "%c": inget argument konverteratindex: första argumentet är inte en strängindex: andra argumentet är inte en strängindirekta funktionsanrop är en gawk-utökningint: fick ett ickenumeriskt argumentinternt fel: %s med null vnameogiltigt FIELDWITHS-värde i närheten av "%s"ogiltigt tecken "%c" i uttryckogiltig indexuttrycklength: fick ett vektorargumentlength: fick ett argument som inte är en stränglokal port %s ogiltig i "/inet"log: fick ett negativt argumentet %glog: fick ett ickenumeriskt argumentlshift(%lf, %lf): flyttalsvärden kommer trunkeraslshift(%lf, %lf): negativa värden kommer ge konstiga resultatlshift(%lf, %lf): för stora skiftvärden kommer ge konstiga resultatlshift: fick ett ickenumeriskt första argumentlshift: fick ett ickenumeriskt andra argumentmake_builtin: negativt argumentantal för funktionen "%s"match: tredje argumentet är en gawk-utökningmatch: tredje argumentet är inte en vektormktime: åtminstone ett av värdena är utanför standardintervalletmktime: fick ett argument som inte är en strängflyttande av rör till standard in i barnet misslyckades (dup: %s)flyttande av rör till standard ut i barnet misslyckades (dup: %s)flyttandet av slavpty till standard in i barnet misslyckades (dup: %s)flyttandet av slavpty till standard ut i barnet misslyckades (dup: %s)flerteckensvärdet av "RS" är en gawk-utökningflerstegs dubbelriktade rör fungerar intemåste tillhandahålla ett fjärrdatornamn till "/inet"måste tillhandahålla en fjärrport till "/inet"inget (känt) protokoll tillhandahållet i det speciella filnamnet "%s"ingen explicit stängning av koprocessen "%s" tillhandahålleningen explicit stängning av filen "%s" tillhandahålleningen explicit stängning av röret "%s" tillhandahålleningen explicit stängning av uttaget "%s" tillhandahålleninga hexadecimala siffror i "\x"-kontrollsekvenseringen föröppnad fd %dingen programtext alls!icke omdirigerad "getline" odefinierad inuti "%s"-regelicke omdirigerad "getline" odefinierad inuti END-åtgärdtom sträng som "FS" är en gawk-utökninggamla awk stöder inte flerdimensionella vektorergamla awk stöder inte flera "BEGIN"- eller "END"-reglergamla awk stöder inte operatorn "**"gamla awk stöder inte operatorn "**="gamla awk stöder inte reguljära uttryck som värden på "FS"gamla awk stöder inte kontrollsekvensen "\%c"gamla awk stöder inte operatorn "**"op-kod %s är inte en operator eller ett nyckelordoperatorn "^" stöds inte i gamla awkoperatorn "^=" stöds inte i gamla awkor(%lf, %lf): flyttalsvärden kommer trunkerasor(%lf, %lf): negativa värden kommer ge konstiga resultator: fick ett ickenumeriskt första argumentor: fick ett ickenumeriskt andra argumentpatsplit: det går inte att använda en delvektor av fjärde argumentet som andra argumentpatsplit: det går inte att använda en delvektor av andra argumentet som fjärde argumentpatsplit: det går inte att använda samma vektor som andra och fjärde argumentpatsplit: fjärde argumentet är inte en vektorpatsplit: andra argumentet är inte en vektorpatsplit: tredje argumentet får inte vara tomtrörspolning av "%s" misslyckades (%s)ensamt "print" i BEGIN eller END-regel bör troligen vara 'print ""'precision ignoreras för "%%"-specificerareprintf: inga argumentintervall på formen "[%c-%c]" är lokalberoendenådde systembegränsningen för öppna filer: börjar multiplexa fildeskriptorerokänd anledningredir2str: okänd omdirigeringstyp %domdirigering är inte tillåten i sandlådelägereferens till icke initierat argument "%s"referens till oinitierat element "%s["%.*s"]"referens till icke initierat fält "$%d"referens till icke initierat fält "$%ld"referens till icke initierad variabel "%s"komponenten "%.*s" i reguljäruttryck skall förmodligen vara "[%.*s]"regexp-konstanten "/%s/" ser ut som en C-kommentar men är inte detregexp-konstanten "//" ser ut som en C++-kommentar men är inte detkonstant reguljärt uttryck för parameter %d ger ett booleskt värdereguljärt uttryck på vänster sida om en "~"- eller "!~"-operatorreguljärt uttryck i högerledet av en tilldelningreguljärt uttryck i högerledet av en jämförelseogiltig information (%s, %s) för fjärrvärd och fjärrportåterställande av standard in i förälderprocessen misslyckades återställande av standard ut i förälderprocessen misslyckades rshift(%lf, %lf): flyttalsvärden kommer trunkerasrshift(%lf, %lf): negativa värden kommer ge konstiga resultatrshift(%lf, %lf): för stora skiftvärden kommer ge konstiga resultatrshift: fick ett ickenumeriskt första argumentrshift: fick ett ickenumeriskt andra argumentatt köra %s setuid root kan vara ett säkerhetsproblemskickar profilen till standard felskickar variabellista till standard felshadow_funcs() anropad två gånger!sin: fick ett ickenumeriskt argumentjämförelsefunktionen "%s" för sortering är inte definieradkällfilen "%s" är tomkällfilen slutar inte med en ny radspeciellt filnamn "%s" är ofullständigtsplit: det går inte att använda en delvektor av fjärde argumentet som andra argumentsplit: det går inte att använda en delvektor av andra argumentet som fjärde argumentsplit: det går inte att använda samma vektor som andra och fjärde argumentsplit: fjärde argumentet är en gawk-utökningsplit: fjärde argumentet är inte en vektorsplit: tom sträng som tredje argument är en gawk-utökningsplit: andra argumentet är inte en vektorsqrt: anropad med negativt argument %gsqrt: fick ickenumeriskt argumentsrand: fick ett ickenumeriskt argumentstandard utkommandot har ingen effektstrftime: formatvärde i PROCINFO["strftime"] har numerisk typstrftime: fick en tom formatsträngstrftime: fick ett ickenumeriskt andra argumentstrftime: fick ett första argument som inte är en strängstrftime: andra argimentet mindre än 0 eller för stort för time_tindex i vektorn "%s" är en tom strängsubstr: längden %g vid startindex %g överskrider det första argumentets längd (%lu)substr: längden %g är inte >= 0substr: längden %g är inte >= 1substr: längden %g är för stor för strängindexering, trunkeras till %gsubstr: längden %g som inte är ett heltal kommer trunkerassubstr: startindex %g som inte är ett heltal kommer trunkerassubstr: källsträngen är tomsubstr: startindex %g är ogiltigt, använder 1substr: startindex %g är bortom strängens slutsystem: fick ett argument som inte är en strängtawk-modifierare för reguljära uttryck "/.../%c" fungerar inte i gawkdet fanns överskuggade variabler.tolower: fick ett argument som inte är en strängför många argument för formatsträngenför många rör eller indatafiler öppnatoupper: fick ett argument som inte är en strängslår av "--lint" på grund av en tilldelning till "LINT"oväntat nyradstecken eller slut på strängenokänd nodtyp %dokänd op-kod %dokänt värde till fältspecifikation: %d onödig blandning av ">" och ">>" för filen "%.*s"oavslutat reguljärt uttryckoavslutat reguljärt uttryck i slutet av filenoavslutat reguljärt uttryck slutar med "\" i slutet av filenoavslutad strängunwind_stack: oväntad typ "%s"Användning av "\ #..." för radfortsättning är inte portabeltanvändandet av dcgettext(_"...") är felaktigt: ta bort det inledande understrykningstecknetanvändandet av dcngettext(_"...") är felaktigt: ta bort det inledande understrykningsteckneticke-vektor används som vektorvarning: xor(%lf, %lf): flyttalsvärden kommer trunkerasxor(%lf, %lf): negativa värden kommer ge konstiga resultatxor: fick ett ickenumeriskt första argumentxor: fick ett ickenumeriskt andra argumentgawk-4.0.1+dfsg.orig/po/en@quot.header0000644000175000017500000000226311504446322016554 0ustar schotschot# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # gawk-4.0.1+dfsg.orig/po/da.gmo0000644000175000017500000013747311734667243015107 0ustar schotschotÞ•ºì Q¼%% %%<%O%g%†%£%»%Í%Ü%÷%&&5&H&e&#z&+ž&Ê&é& ú&'"'?'T'f'…'% 'yÆ'+@(7l(<¤("á(-)2):I)3„)¸)Í)ã)õ)*#*,5*,b*'*-·* å*(+)/+&Y+(€+:©+%ä+ ,*,-J,'x, ,¾,+Û,(-]0.#Ž.².É.æ./[/$v/›/­/È/Ù/ò/û/020!L0"n0#‘0-µ0#ã01/"1'R1z1'‚1ëª1–2©2»2Í2 ß2Aì2A.3…p38ö35/4e4|43š4Î4"ç4! 55,5 b5ƒ5#¢58Æ5"ÿ5"6!@6b6 }6*ž6/É6(ù6""70E7.v7¥7&Å7"ì78*+8*V8#8(¥8Î8,ç8939&P9w9Š9!§92É98ü9(5:)^:8ˆ:8Á:"ú:#;9A;9{;#µ;$Ù;&þ;*%<+P<|<1˜<+Ê<&ö<-=5K=(=&ª=.Ñ=0>1>$L>q>>4°><å>#"?$F?,k?2˜?Ë?ë? @$%@#J@$n@1“@/Å@&õ@A)7A-aAA!ªAÌAìA*B1B#PB$tB5™BEÏB*C-@C nC-yC2§C.ÚC4 D$>D"cD$†D$«D#ÐDôD&E:E.RE$E¦E"ÁE#äE"F++F(WF/€F'°FØF"öF@G!ZG!|G"žGÁG+ÉG õG"H59H5oH'¥H8ÍH(I0/I7`I ˜I*¹I.äI.JBJ%^J+„J°J*¸J/ãJ0K0DK0uKD¦K%ëK(L?:LPzL/ËL>ûL4:M4oM?¤M?äM8$N)]N‡NF§NîNGOOO&WO6~OWµO/ P9=PwP=‘P>ÏP8QFGQ#ŽQ<²Q5ïQ6%R%\Rt‚R(÷RN SGoS)·S*áS, T"9T"\T$T¤TÄTáT$U &U"GU"jU5U;ÃUAÿU+AV,mV7šV)ÒV%üV>"W$aW.†W/µW3åW4X0NX'X(§X$ÐX5õX-+Y'YY'Y)©Y%ÓYùY Z1%Z4WZ(ŒZ0µZ8æZ&['F[1n[2 [<Ó[$\(5\)^\1ˆ\7º\'ò\(]<C]<€]>½])ü])&^)P^z^@š^'Û^_/_KH_”_&£_'Ê_(ò_/`&K`'r`(š`3Ã`9÷`91a6ka2¢a)Õa)ÿa1)b)[b*…b5°b;æbA"c+dc,c0½c!îc'd8d"Ud,xd¥d#¿d$ãd9e9Be;|e*¸e&ãe4 f&?f&ff#f$±fÖfæf?þf&>g.eg,”g;Ág&ýgJ$hohh?«h/ëh4i$Pi*ui, i$Íi2òi%j%Dj-jj"˜j%»j0áj#k6kJk!\k2~k±k"Åk0èkl"-l1Pl@‚lAÃlm m2)m8\m(•m)¾mªèm“o ¢o®oÎoáo÷op3pKp]plp†p—p¨pÄp×pôp! q++qWqtq …q“q­qÈqÝq"ïqr#,rÌPr)s=Gs=…s#Ãs2çst@7t7xt°tËtètøtu!u/3u/cu%“u0¹u!êu& v%3v$Yv%~vJ¤v-ïvw5w3Mw&w¨wÈw.æw(x]>y$œyÁyØyðyz_ z#€z¤z½zÖzêz { {3{Q{)j{#”{$¸{(Ý{#|*|*D|-o||&¦|òÍ|À}à}÷}~%~@4~<u~€²~838l¥´7Ó €"%€$H€5m€/£€"Ó€'ö€<$[€"ŸÂ!Þ,‚6-‚,d‚#‘‚5µ‚.ë‚ ƒ(;ƒ$dƒ‰ƒ,¥ƒ,Òƒ$ÿƒ($„M„,h„•„µ„ Ô„õ„ …!-…3O…=ƒ…)Á…(ë…I†I^†'¨†&ІJ÷†JB‡(‡'¶‡)Þ‡+ˆ*4ˆ#_ˆ9ƒˆ0½ˆ&îˆ0‰8F‰/‰+¯‰2Û‰6Š*EŠ2pŠ"£ŠÆŠ2ãŠ?‹3V‹3Š‹.¾‹9í‹"'Œ!JŒ!lŒ3ŽŒ2ÂŒ1õŒ<'0d)•#¿-ã6Ž!HŽ(jŽ&“Ž'ºŽ-âŽ%665m<£Mà*.1Y‹;š6Ö0 ‘:>‘$y‘"ž‘/Á‘'ñ‘&’#@’.d’“’4©’,Þ’ “#(“$L“#q“&•“$¼“5á“)”A”"]”9€”)º”)ä”'•6•-=•2k•"ž•;Á•4ý•,2–B_–0¢–6Ó–2 — =—/^—+Ž—4º—ï—$˜$,˜Q˜'Y˜4˜-¶˜-ä˜-™@@™-™*¯™GÚ™P"š<sšL°š+ýš;)›De›Jª›4õ›'*œ%RœLxœÅœQÜœ.+59ad›3žA4ž!vžI˜žIâž?,ŸNlŸ)»Ÿ>åŸ@$ 1e *— €Â +C¡Ro¡J¡) ¢(7¢,`¢"¢°¢"Ï¢ò¢£$£-B£p£ £"±£6Ô£@ ¤GL¤,”¤+Á¤6í¤+$¥'P¥9x¥-²¥Là¥I-¦Jw¦I¦, §29§)l§"–§5¹§4ï§-$¨3R¨.†¨1µ¨ç¨©5$©:Z©(•©?¾©Jþ©8Iª9‚ªE¼ª=«M@«/Ž«9¾«:ø«23¬<f¬(£¬'̬Lô¬LA­EŽ­*Ô­)ÿ­*)®,T®L®&ήõ®-¯Q<¯ ޝ'›¯.ï*ò¯1°'O°(w°* °0˰Cü°C@±@„±>ű-²12².d²<“²;в6 ³@C³G„³,̳+ù³4%´!Z´&|´£´"´=å´#µ':µ%bµIˆµIÒµB¶+_¶'‹¶:³¶&î¶$· :·$[· €·Œ·>¨·!ç·- ¸67¸@n¸$¯¸RÔ¸'¹G¹Cg¹<«¹@è¹)º,Fº6sº-ªº8غ».,»'[»-ƒ».±»8à»*¼D¼W¼h¼/ˆ¼¸¼0Ó¼@½E½W½8w½N°½Nÿ½N¾ k¾3v¾=ª¾)è¾(¿ˆC‰vÇ6?Ò)Ýl£Jl¤ã‹Kz­!2ôu©]·3¢³¼H”t¦ Šæì/‘4F¶ ye I «Ñ†»P,w˜ ŒN>Afo™•U^Q~ õ†9šºýð÷"å.Ö®pø :¢¿Óïþ$Gò¯:¸xü_¾Ãªú¥a–`’U„.c–¹f Ÿ=*î-û›;,6[j+‡ä>¨u=ŽSž©#cí¤yvYZbq(´s^… „™mÜ‘;dO®³~«*TŠkg4/CɈE_S&\ë2kpœè¦XB‹zÿMQ?ö²˜Žr 5½À µA‚Ëœ3hW¬{—<")°Ù5jš’}eo[ùF—W{X¡±1êâV“¹(•¬MJÁ&d“\@8G°žÏ…|D¶¡ƒÈ$²Í”#¯0·ÄihwL×9‚Z<gÕ!H8`ÛµV%Ð1¸qóÊnÎRŸxÌÚØbYŒ€R'ñÔ¥'E 7|±rÂinBtç-DaT£ÅºÞ}m¨ ­Pª‡N7á§K@§ƒL+ à%逛´‰O]IÆ0sß # %s block(s) # Rule(s) # gawk profile, created %s -C --copyright -E file --exec=file -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R file --command=file -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[file] --dump-variables[=file] -e 'program-text' --source='program-text' -f progfile --file=progfile -g --gen-pot -h --help -n --non-decimal-data -p[file] --profile[=file] -r --re-interval -t --lint-old -v var=val --assign=var=val # Function Call Stack: # Functions, listed alphabetically To report bugs, see node `Bugs' in `gawk.info', which is section `Reporting Problems and Bugs' in the printed version. %d is invalid as number of arguments for %s%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)%s blocks must have an action part%s third parameter is not a changeable object%s to "%s" failed (%s)%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk%s: `%s' argument to `-v' not in `var=value' form %s: array_ref to %s %s: close failed (%s)%s: empty (null) %s: empty (zero) %s: invalid option -- '%c' %s: is parameter %s: option '%c%s' doesn't allow an argument %s: option '--%s' doesn't allow an argument %s: option '--%s' requires an argument %s: option '-W %s' doesn't allow an argument %s: option '-W %s' is ambiguous %s: option '-W %s' requires an argument %s: option `-W %s' unrecognized, ignored %s: option requires an argument -- %c %s: option requires an argument -- '%c' %s: string literal as last arg of substitute has no effect%s: table_size = %d, array_size = %d %s: unrecognized option '%c%s' %s: unrecognized option '--%s' 'system' function not allowed in sandbox mode-Ft does not set FS to tab in POSIX awk-m option usage: `-m[fr] nnn'@include is a gawk extensionBINMODE value `%s' is invalid, treated as 3Copyright (C) 1989, 1991-%d Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Examples: gawk '{ sum += $1 }; END { print sum }' file gawk -F: '{ print $1 }' /etc/passwd IPv6 communication is not supportedInvalid back referenceInvalid character class nameInvalid collation characterInvalid content of \{\}Invalid multibyte data detected. There may be a mismatch between your data and your locale.Invalid preceding regular expressionInvalid range endInvalid regular expressionMemory exhaustedNF set to negative valueNo matchNo previous regular expressionOperation Not SupportedPOSIX does not allow `%s'POSIX does not allow `\x' escapesPOSIX does not allow operator `**'POSIX does not allow operator `**='POSIX options: GNU long options: (standard) Premature end of regular expressionRegular expression too bigShort options: GNU long options: (extensions) Sorry, don't know how to interpret `%s'SuccessTCP/IP communications are not supportedThis 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. Trailing backslashUnmatched ( or \(Unmatched ) or \)Unmatched [ or [^Unmatched \{Usage: %s [POSIX or GNU style options] -f progfile [--] file ... Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ... You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. [s]printf: format specifier does not have control letter[s]printf: value %g is out of range for `%%%c' format^ ran out for this one`%s' is a Bell Labs extension`%s' is a built-in function, it cannot be redefined`%s' is a gawk extension`%s' is invalid as a function name`%s' is not a legal variable name`%s' is not a variable name, looking for file `%s=%s'`%s' is not supported in old awk`--posix' overrides `--binary'`--posix' overrides `--traditional'`--posix'/`--traditional' overrides `--non-decimal-data'`-m[fr]' option irrelevant in gawk`BINMODE' is a gawk extension`FIELDWIDTHS' is a gawk extension`FPAT' is a gawk extension`IGNORECASE' is a gawk extension`L' is meaningless in awk formats; ignored`break' is not allowed outside a loop or switch`continue' is not allowed outside a loop`delete array' is a gawk extension`delete(array)' is a non-portable tawk extension`exit' cannot be called in the current context`extension' is a gawk extension`getline var' invalid inside `%s' rule`getline' invalid inside `%s' rule`goto' considered harmful! `h' is meaningless in awk formats; ignored`l' is meaningless in awk formats; ignored`length(array)' is a gawk extension`next' cannot be called from a `%s' rule`next' used in %s action`nextfile' cannot be called from a `%s' rule`nextfile' is a gawk extension`nextfile' used in %s action`return' used outside function context`|&' not supportedadump: argument not an arrayalready included source file `%s'and(%lf, %lf): fractional values will be truncatedand(%lf, %lf): negative values will give strange resultsand: received non-numeric first argumentand: received non-numeric second argumentasort: cannot use a subarray of first arg for second argasort: cannot use a subarray of second arg for first argasort: first argument not an arrayasort: second argument not an arrayasorti: cannot use a subarray of first arg for second argasorti: cannot use a subarray of second arg for first argasorti: first argument not an arrayasorti: second argument not an arrayassignment used in conditional contextatan2: received non-numeric first argumentatan2: received non-numeric second argumentattempt to access field %ldattempt to field reference from non-numeric valueattempt to field reference from null stringattempt to use a scalar value as arrayattempt to use array `%s' in a scalar contextattempt to use array `%s["%.*s"]' in a scalar contextattempt to use function `%s' as an arrayattempt to use scalar `%s' as an arrayattempt to use scalar `%s["%.*s"]' as an arrayattempt to use scalar parameter `%s' as an arraybackslash at end of stringbackslash not last character on linebad `%sFMT' specification `%s'buffer overflow in genflags2strcall of `length' without parentheses is not portablecan not use special variable `%s' for indirect function callcan't open pipe `%s' for input (%s)can't open pipe `%s' for output (%s)can't open source file `%s' for reading (%s)can't open two way pipe `%s' for input/output (%s)can't read sourcefile `%s' (%s)can't redirect from `%s' (%s)can't redirect to `%s' (%s)can't set binary mode on stderr (%s)can't set binary mode on stdin (%s)can't set binary mode on stdout (%s)can't use function name `%s' as variable or arraycannot create child process for `%s' (fork: %s)cannot open file `%s' for reading (%s)cannot open pipe `%s' (%s)cannot use function `%s' as variable namecannot use gawk builtin `%s' as variable nameclose of `%s' failed (%s).close of fd %d (`%s') failed (%s)close of master pty failed (%s)close of pipe failed (%s)close of redirection that was never openedclose of slave pty failed (%s)close of stdin in child failed (%s)close of stdout in child failed (%s)close: `%.*s' is not an open file, pipe or co-processclose: redirection `%s' not opened with `|&', second argument ignoredclose: second argument is a gawk extensionclose: second argument must be `to' or `from'cmd. line:co-process flush of pipe to `%s' failed (%s).command line argument `%s' is a directory: skippedcompl(%lf): fractional value will be truncatedcompl(%lf): negative value will give strange resultscompl: received non-numeric argumentcos: received non-numeric argumentcould not allocate more input memorycould not open `%s' for writing (%s)could not open `%s' for writing: %scould not open `%s', mode `%s'could not pre-open /dev/null for fd %ddata file `%s' is emptydcgettext: `%s' is not a valid locale categorydelete: index `%s' not in array `%s'division by zero attempteddivision by zero attempted in `%%'division by zero attempted in `%%='division by zero attempted in `/='duplicate `default' detected in switch bodyduplicate case values in switch body: %seach rule must have a pattern or an action partempty argument to `-e/--source' ignoredempty filename after @includeempty program text on command lineenvironment variable `POSIXLY_CORRECT' set: turning on `--posix'error reading input file `%s': %serror writing standard error (%s)error writing standard output (%s)error: escape sequence `\%c' treated as plain `%c'exp: argument %g is out of rangeexp: received non-numeric argumentexpression for `%s' redirection has null string valueexpression in `%s' redirection only has numeric valueextension: can't redefine function `%s'extension: can't use gawk built-in `%s' as function nameextension: function `%s' already definedextension: function name `%s' previously definedextension: illegal character `%c' in function name `%s'extension: missing function nameextensions are not allowed in sandbox modefailure status (%d) on file close of `%s' (%s)failure status (%d) on pipe close of `%s' (%s)fatal error: internal errorfatal error: internal error: segfaultfatal error: internal error: stack overflowfatal: fatal: `$' is not permitted in awk formatsfatal: `$' not permitted after period in formatfatal: `L' is not permitted in POSIX awk formatsfatal: `h' is not permitted in POSIX awk formatsfatal: `l' is not permitted in POSIX awk formatsfatal: arg count %ld greater than total number of supplied argumentsfatal: arg count with `$' must be > 0fatal: extension: cannot open `%s' (%s) fatal: extension: library `%s': cannot call function `%s' (%s) fatal: extension: library `%s': does not define `plugin_is_GPL_compatible' (%s) fatal: must use `count$' on all formats or nonefatal: no `$' supplied for positional field width or precisionfatal: not enough arguments to satisfy format stringfflush: `%s' is not an open file, pipe or co-processfflush: cannot flush: file `%s' opened for reading, not writingfflush: cannot flush: pipe `%s' opened for reading, not writingfield width and precision are ignored for `%%' specifierfield width is ignored for `%%' specifierfile flush of `%s' failed (%s).filename `%s' for `%s' redirection may be result of logical expressionfloating point exceptionfor loop: array `%s' changed size from %ld to %ld during loop executionfrom %sfunction `%s' called but never definedfunction `%s' called with more arguments than declaredfunction `%s' called with space between name and `(', or used as a variable or an arrayfunction `%s' defined but never called directlyfunction `%s' defined to take no more than %d argument(s)function `%s' not definedfunction `%s': argument #%d: attempt to use array as a scalarfunction `%s': argument #%d: attempt to use scalar as an arrayfunction `%s': can't use function name as parameter namefunction `%s': can't use special variable `%s' as a function parameterfunction `%s': missing argument #%dfunction `%s': parameter #%d, `%s', duplicates parameter #%dfunction `%s': parameter `%s' shadows global variablefunction called indirectly through `%s' does not existfunction name `%s' previously definedgawk is a pattern scanning and processing language. By default it reads standard input and writes standard output. gensub: third argument of 0 treated as 1hex escape \x%.*s of %d characters probably not interpreted the way you expectignoring unknown format specifier character `%c': no argument convertedindex: received non-string first argumentindex: received non-string second argumentindirect function calls are a gawk extensionint: received non-numeric argumentinternal error: %s with null vnameinvalid FIELDWIDTHS value, near `%s'invalid char '%c' in expressioninvalid subscript expressionlength: received array argumentlength: received non-string argumentlocal port %s invalid in `/inet'log: received negative argument %glog: received non-numeric argumentlshift(%lf, %lf): fractional values will be truncatedlshift(%lf, %lf): negative values will give strange resultslshift(%lf, %lf): too large shift value will give strange resultslshift: received non-numeric first argumentlshift: received non-numeric second argumentmake_builtin: negative argument count for function `%s'match: third argument is a gawk extensionmatch: third argument is not an arraymktime: at least one of the values is out of the default rangemktime: received non-string argumentmoving pipe to stdin in child failed (dup: %s)moving pipe to stdout in child failed (dup: %s)moving slave pty to stdin in child failed (dup: %s)moving slave pty to stdout in child failed (dup: %s)multicharacter value of `RS' is a gawk extensionmultistage two-way pipelines don't workmust supply a remote hostname to `/inet'must supply a remote port to `/inet'no (known) protocol supplied in special filename `%s'no explicit close of co-process `%s' providedno explicit close of file `%s' providedno explicit close of pipe `%s' providedno explicit close of socket `%s' providedno hex digits in `\x' escape sequenceno pre-opened fd %dno program text at all!non-redirected `getline' invalid inside `%s' rulenon-redirected `getline' undefined inside END actionnull string for `FS' is a gawk extensionold awk does not support multidimensional arraysold awk does not support multiple `BEGIN' or `END' rulesold awk does not support operator `**'old awk does not support operator `**='old awk does not support regexps as value of `FS'old awk does not support the `\%c' escape sequenceold awk does not support the keyword `in' except after `for'opcode %s not an operator or keywordoperator `^' is not supported in old awkoperator `^=' is not supported in old awkor(%lf, %lf): fractional values will be truncatedor(%lf, %lf): negative values will give strange resultsor: received non-numeric first argumentor: received non-numeric second argumentpatsplit: cannot use a subarray of fourth arg for second argpatsplit: cannot use a subarray of second arg for fourth argpatsplit: cannot use the same array for second and fourth argspatsplit: fourth argument is not an arraypatsplit: second argument is not an arraypatsplit: third argument must be non-nullpipe flush of `%s' failed (%s).plain `print' in BEGIN or END rule should probably be `print ""'precision is ignored for `%%' specifierprintf: no argumentsrange of the form `[%c-%c]' is locale dependentreached system limit for open files: starting to multiplex file descriptorsreason unknownredir2str: unknown redirection type %dredirection not allowed in sandbox modereference to uninitialized argument `%s'reference to uninitialized element `%s["%.*s"]'reference to uninitialized field `$%d'reference to uninitialized field `$%ld'reference to uninitialized variable `%s'regexp component `%.*s' should probably be `[%.*s]'regexp constant `/%s/' looks like a C comment, but is notregexp constant `//' looks like a C++ comment, but is notregexp constant for parameter #%d yields boolean valueregular expression on left of `~' or `!~' operatorregular expression on right of assignmentregular expression on right of comparisonremote host and port information (%s, %s) invalidrestoring stdin in parent process failed restoring stdout in parent process failed rshift(%lf, %lf): fractional values will be truncatedrshift(%lf, %lf): negative values will give strange resultsrshift(%lf, %lf): too large shift value will give strange resultsrshift: received non-numeric first argumentrshift: received non-numeric second argumentrunning %s setuid root may be a security problemsending profile to standard errorsending variable list to standard errorshadow_funcs() called twice!sin: received non-numeric argumentsort comparison function `%s' is not definedsource file `%s' is emptysource file does not end in newlinespecial file name `%s' is incompletesplit: cannot use a subarray of fourth arg for second argsplit: cannot use a subarray of second arg for fourth argsplit: cannot use the same array for second and fourth argssplit: fourth argument is a gawk extensionsplit: fourth argument is not an arraysplit: null string for third arg is a gawk extensionsplit: second argument is not an arraysqrt: called with negative argument %gsqrt: received non-numeric argumentsrand: received non-numeric argumentstandard outputstatement has no effectstrftime: format value in PROCINFO["strftime"] has numeric typestrftime: received empty format stringstrftime: received non-numeric second argumentstrftime: received non-string first argumentstrftime: second argument less than 0 or too big for time_tsubscript of array `%s' is null stringsubstr: length %g at start index %g exceeds length of first argument (%lu)substr: length %g is not >= 0substr: length %g is not >= 1substr: length %g too big for string indexing, truncating to %gsubstr: non-integer length %g will be truncatedsubstr: non-integer start index %g will be truncatedsubstr: source string is zero lengthsubstr: start index %g is invalid, using 1substr: start index %g is past end of stringsystem: received non-string argumenttawk regex modifier `/.../%c' doesn't work in gawkthere were shadowed variables.tolower: received non-string argumenttoo many arguments supplied for format stringtoo many pipes or input files opentoupper: received non-string argumentturning off `--lint' due to assignment to `LINT'unexpected newline or end of stringunknown nodetype %dunknown opcode %dunknown value for field spec: %d unnecessary mixing of `>' and `>>' for file `%.*s'unterminated regexpunterminated regexp at end of fileunterminated regexp ends with `\' at end of fileunterminated stringunwind_stack: unexpected type `%s'use of `\ #...' line continuation is not portableuse of dcgettext(_"...") is incorrect: remove leading underscoreuse of dcngettext(_"...") is incorrect: remove leading underscoreuse of non-array as arraywarning: xor(%lf, %lf): fractional values will be truncatedxor(%lf, %lf): negative values will give strange resultsxor: received non-numeric first argumentxor: received non-numeric second argumentProject-Id-Version: gawk 4.0.0h Report-Msgid-Bugs-To: arnold@skeeve.com POT-Creation-Date: 2012-03-28 22:03+0200 PO-Revision-Date: 2012-02-06 10:37+0100 Last-Translator: Keld Simonsen Language-Team: Danish Language: da MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Generator: Lokalize 1.0 Plural-Forms: nplurals=2; plural=(n != 1); # %s blokke # Regler # profil til gawk oprettet %s -C --copyright -E fil --exec=fil -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R file --command=fil -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[fil] --dump-variables[=fil] -e 'programtekst' --source='programtekst' -f progfil --file=progfil -g --gen-pot -h --help -n --non-decimal-data -p[fil] --profile[=fil] -r --re-interval -t --lint-old -v var=værdi --assign=var=værdi # Funktionskaldsstak: # Funktioner, listede alfabetisk For at rapportere fejl kan du se punktet 'Bugs' i 'gawk.info', som er sektionen 'Reporting Problems and Bugs' i den trykte version. Rapportér kommentarer til oversættelsen til . %d er et ugyldigt antal argumenter for %s%s %s '%s': kunne ikke få fat på fd flag: (fcntl F_GETFD: %s)%s %s '%s': kunne ikke sætte luk-ved-exec (fcntl F_SETFD: %s)%s-blokke skal have en handlingsdel%s: tredje argument er ikke et ændringsbart objekt%s til '%s' mislykkedes (%s)%s: %d: regex-ændringstegn '/.../%c' fra tawk virker ikke i gawk%s: '%s' argument til '-v' ikke på formen 'var=værdi' %s: arrayreference til %s %s: lukning mislykkedes (%s)%s: tom (null) %s: tom (nul) %s: ugyldigt flag - '%c' %s: er parameter %s: flaget '%c%s' tillader ikke noget argument %s: flaget '--%s' tillader ikke noget argument %s: flaget '--%s' kræver et argument %s: flaget '-W %s' tillader ikke noget argument %s: flaget '-W %s' er flertydigt %s: flaget '-W %s' kræver et argument %s: flaget '-W %s' ukendt, ignoreret %s: flaget kræver et argument -- %c %s: flaget kræver et argument - '%c' %s: bogstavelig streng som sidste argument til erstatning har ingen effekt%s: tabelstørrelse = %d, arraystørrelse = %d %s: ukendt flag '%c%s' %s: ukendt flag '--%s' 'system'-funktion ikke tilladt i sandkasse-tilstand-Ft sætter ikke FS til tab i POSIX-awkbrug af flaget -m: '-m[fr] nnn'@include er en gawk-udvidelseBINMODE værdi '%s' er ugyldig, behandles som 3Copyright © 1989, 1991-%d Free Software Foundation. Dette program er frit programmel. Du kan distribuere det og/eller ændre det under betingelserne i GNU General Public License, offentliggjort af Free Software Foundation, enten version 3 af licensen, eller (hvis du vil) enhver senere version. Eksempler: gawk '{ sum += $1 }; END { print sum }' fil gawk -F: '{ print $1 }' /etc/passwd IPv6-kommunikation understøttes ikkeUgyldig bagudreferenceUgyldigt tegnklassenavnUgyldigt sorteringstegnUgyldigt indhold i \{\}Ugyldigt multibyte data fundet. Måske er der uoverensstemmelse mellem dine data og dit locale.Ugyldigt foregående regulært udtrykUgyldig intervalslutningUgyldigt regulært udtrykHukommelsen opbrugtNF sat til en negativ værdiMislykkedesIntet foregående regulært udtrykOperationen understøttes ikkePOSIX tillader ikke '%s'POSIX tillader ikke '\x'-kontrolsekvenserPOSIX tillader ikke operatoren '**'POSIX tillader ikke operatoren '**='POSIX-flag: lange GNU-flag: (standard) For tidligt slut på regulært udtrykRegulært udtryk for stortPOSIX-flag: lange GNU-flag: (udvidelser) Véd desværre ikke hvordan '%s' skal fortolkesLykkedesTCP/IP-kommunikation understøttes ikkeDette program distribueres i håb om at det vil være nyttigt, men UDEN NOGEN SOM HELST GARANTI, også uden underforstået garanti om SALGBARHED eller EGNETHED FOR NOGET SPECIELT FORMÅL. Se GNU General Public License for yderligere information. Efterfølgende omvendt skråstregUbalanceret ( eller \(Ubalanceret ) eller \)Ubalanceret [ eller [^Ubalanceret \{Brug: %s [flag i POSIX- eller GNU-stil] -f progfil [--] fil ... Brug: %s [flag i POSIX- eller GNU-stil] %cprogram%c fil ... Du bør have fået en kopi af GNU General Public License sammen med dette program. Hvis ikke, så se http://www.gnu.org/licenses/. [s]printf: formatspecifikation har intet kommandobogstav[s]printf: værdi %g er uden for område for '%%%c'-format^ sluttede her'%s' er en Bell Labs-udvidelse'%s' er en indbygget funktion, den kan ikke omdefineres'%s' er en gawk-udvidelse'%s' er ugyldigt som funktionsnavn'%s' er ikke et gyldigt variabelnavn'%s' er ikke et variabelnavn, leder efter fil '%s=%s''%s' understøttes ikke i gamle versioner af awk'--posix' tilsidesætter '--binary''--posix' tilsidesætter '--traditional''--posix'/'--traditional' tilsidesætter '--non-decimal-data''-m[fr]'-flaget er irrelevant i gawk'BINMODE' er en gawk-udvidelse'FIELDWIDTHS' er en gawk-udvidelse'FPAT' er en gawk-udvidelse'IGNORECASE' er en gawk-udvidelse'L' er meningsløst i awk-formater, ignoreret'break' uden for en løkke eller switch er ikke tilladt'continue' uden for en løkke er ikke tilladt'delete array' er en gawk-udvidelse'delete array' er en ikke-portabel udvidelse fra tawk'exit' kan ikke kaldes i den aktuelle kontekst'extension' er en gawk-udvidelse'getline var' ugyldig inden i '%s' regel'getline' ugyldig inden i '%s' regel'goto' anses for skadelig! 'h' er meningsløst i awk-formater, ignoreret'l' er meningsløst i awk-formater, ignoreret'length(array)' er en gawk-udvidelse'next' kan ikke kaldes fra en '%s'-regel'next' brugt i %s-handling'nextfile' kan ikke kaldes fra en '%s'-regel'nextfile' er en gawk-udvidelse'nextfile' brugt i %s-handling'return' brugt uden for funktion'|&' understøttes ikkeadump: argument er ikke et arrayallerede inkluderet kildefil '%s'and(%lf, %lf): kommatalsværdier vil blive trunkeretand(%lf, %lf): negative værdier vil give mærkelige resultaterand: fik et ikke-numerisk første argumentand: fik et ikke-numerisk andet argumentasort: kan ikke bruge et underarray af første argument for andet argumentasort: kan ikke bruge et underarray af andet argument for første argumentasort: første argument er ikke et arrayasort: andet argument er ikke et arrayasorti: kan ikke bruge et underarray af første argument for andet argumentasorti: kan ikke bruge et underarray af andet argument for første argumentasorti: første argument er ikke et arrayasorti: andet argument er ikke et arraytildeling brugt i sammenligningsammenhængatan2: fik et ikke-numerisk første argumentatan2: fik et ikke-numerisk andet argumentforsøg på at få adgang til felt %ldforsøg på at referere til et felt fra ikke-numerisk værdiforsøg på at referere til et felt fra tom strengforsøg på at bruge en skalar som arrayforsøg på at bruge array '%s' i skalarsammenhængforsøg på at bruge array '%s["%.*s"]' i skalarsammenhængforsøg på at bruge funktionen '%s' som et arrayforsøg på at bruge skalar '%s' som et arrayforsøg på at bruge skalaren '%s["%.*s"]' som arrayforsøg på at bruge skalarparameteren '%s' som et arrayomvendt skråstreg i slutningen af strengensidste tegn på linjen er ikke en omvendt skråstregforkert '%sFMT'-specifikation '%s'bufferoverløb i genflags2strkald af 'length' uden parenteser er ikke portabeltkan ikke bruge specialvariabel '%s' til indirekte funktionskaldkan ikke åbne datakanalen '%s' for indtastning (%s)kan ikke åbne datakanalen '%s' for udskrivning (%s)kan ikke åbne kildefilen '%s' for læsning (%s)kan ikke åbne tovejsdatakanalen '%s' for ind-/uddata (%s)kan ikke læse kildefilen '%s' (%s)kan ikke omdirigere fra '%s' (%s)kan ikke omdirigere til '%s' (%s)kan ikke sætte binær tilstand på standard fejl (%s)kan ikke sætte binær tilstand på standard ind (%s)kan ikke sætte binær tilstand på standard ud (%s)kan ikke bruge funktionsnavnet '%s' som variabel eller arraykan ikke oprette barneproces for '%s' (fork: %s)kan ikke åbne filen '%s' for læsning (%s)kan ikke åbne datakanalen '%s' (%s)kan ikke bruge funktion '%s' som variabelnavnkan ikke bruge gawk's indbyggede '%s' som variabelnavnlukning af '%s' mislykkedes (%s).lukning af fd %d ('%s') mislykkedes (%s)lukning af master-pty mislykkedes (%s)lukning af datakanalen mislykkedes (%s)lukning af omdirigering som aldrig blev åbnetlukning af slave-pty mislykkedes (%s)lukning af standard ind i underproces mislykkedes (%s)lukning af standard ud i underproces mislykkedes (%s)close: '%.*s' er ikke en åben fil, datakanal eller ko-procesclose: omdirigeringen '%s' blev ikke åbnet med '|&', andet argument ignoreretclose: andet argument er en gawk-udvidelseclose: andet argument skal være 'to' eller 'from'kommandolinje:ko-procesrensning af datakanalen til '%s' mislykkedes (%s).kommandolinjeargument '%s' er et katalog, oversprungetcompl(%lf): kommatalsværdier vil blive trunkeretcompl(%lf): negative værdier vil give mærkelige resultatercompl: fik et ikke-numerisk argumentcos: fik et ikke-numerisk argumentkunne ikke allokere mere hukommelse til inddatakunne ikke åbne '%s' for skrivning (%s)kunne ikke åbne '%s' for skrivning: %skunne ikke åbne '%s', tilstand '%s'kunne ikke i forvejen åbne /dev/null for fd %ddatafilen '%s' er tomdcgettext: '%s' er ikke en gyldig lokalitetskategoridelete: indeks '%s' findes ikke i array '%s'forsøgte at dividere med nulforsøgte at dividere med nul i '%%'forsøgte at dividere med nul i '%%='forsøgte at dividere med nul i '/='dublet 'default' opdaget i switch-kropdublet case-værdier i switch-krop %shver regel skal have et mønster eller en handlingsdeltomt argument til '-e/--source' ignorerettomt filnavn efter @includetom programtekst på kommandolinjenmiljøvariablen 'POSIXLY_CORRECT' sat: aktiverer '--posix'fejl ved læsning af inddatafilen '%s': %sfejl ved skrivning til standard fejl (%s)fejl ved skrivning til standard ud (%s)fejl: kontrolsekvensen '\%c' behandlet som kun '%c'exp: argumentet %g er uden for det tilladte områdeexp: fik et ikke-numerisk argumentudtrykket for '%s'-omdirigering har en tom streng som værdiudtrykket i '%s'-omdirigering har kun numerisk værdiextension: kan ikke omdefinere funktion '%s'extension: kan ikke bruge gawk's indbyggede '%s' som funktionsnavnextension: funktionen '%s' er allerede defineretextension: funktionsnavnet '%s' er defineret tidligereextension: ugyldigt tegn '%c' i funktionsnavn '%s'extension: mangler funktionsnavnudvidelser er ikke tilladt i sandkasse-tilstandfejlstatus (%d) fra fillukning af '%s' (%s)fejlstatus (%d) fra lukning af datakanalen '%s' (%s)fatal fejl: intern fejlfatal fejl: intern fejl: segmentfejlfatal fejl: intern fejl: stakoverløbfatal: fatal: '$' tillades ikke i awk-formaterfatal: '$' tillades ikke efter et punktum i formatetfatal: 'L' tillades ikke i POSIX awk-formaterfatal: 'h' tillades ikke i POSIX awk-formaterfatal: 'l' tillades ikke i POSIX awk-formaterfatal: argumentantallet %ld er større end antal givne argumenterfatal: argumentantallet med '$' skal være > 0atalt: extension: kan ikke åbne '%s' (%s) fatalt: extension: bibliotek '%s': kan ikke kalde funktionen '%s' (%s) fatalt: extension: bibliotek '%s': definer ikke 'plugin_is_GPL_compatible' (%s) fatal: skal bruge 'count$' på alle formater eller ikke nogenfatal: intet '$' angivet for bredde eller præcision af positionsangivet feltfatal: for få argumenter til formatstrengenfflush: '%s' er ikke en åben fil, datakanal eller ko-procesfflush: kan ikke rense: filen '%s' åbnet for læsning, ikke skrivningfflush: kan ikke rense: datakanalen '%s' åbnet for læsning, ikke skrivningfeltbredde og præcision ignoreret for '%%'-angivelsefeltbredde ignoreret for '%%'-angivelsefilrensning af '%s' mislykkedes (%s).filnavnet '%s' for '%s'-omdirigering kan være resultatet af et logisk udtrykflydendetalsundtagelsefor-løkke: array '%s' ændrede størrelse fra %ld til %ld under udførelse af løkkenfra %sfunktionen '%s' kaldt, men aldrig defineretfunktionen '%s' kaldt med flere argumenter end deklareretfunktionen '%s' kaldt med blanktegn mellem navnet og '(', eller brugt som en variabel eller et arrayfunktionen '%s' defineret, men aldrig kaldt direktefunktionen '%s' defineret til at tage ikke mere end %d argumenterfunktionen '%s' er ikke defineretfunktion '%s': argument nummer %d: forsøg på at bruge array som en skalarfunktion '%s': argument nummer %d: forsøg på at bruge skalar som et arrayfunktionen '%s': kan ikke bruge funktionsnavn som parameternavnfunktionen '%s': kan ikke bruge specialvariabel '%s' som en funktionsparameterfunktion '%s': mangler argument nummer %dfunktionen '%s': parameter %d, '%s', er samme som parameter %dfunktionen '%s': parameteren '%s' overskygger en global variabelfunktion kaldt indirekte via '%s' eksisterer ikkefunktionsnavnet '%s' er allerede defineretgawk er et sprog til mønster-genkendelse og -behandling. Almindeligvis læser gawk fra standard ind og skriver til standard ud. gensub: 0 i tredje argument behandlet som 1den heksadecimale sekvens \x%.*s på %d tegn nok ikke forstået som du forventer detignorerer ukendt formatspecificeringstegn '%c': intet argument konverteretindeks: første argument er ikke en strengindeks: andet argument er ikke en strengindirekte funktionskald er en gawk-udvidelseint: fik et ikke-numerisk argumentintern fejl: %s med null vnameugyldig FIELDWIDTHS værdi, nær '%sugyldigt tegn '%c' i udtrykugyldigt indeksudtryklength: fik et array-argumentlength: fik et argument som ikke er en strenglokal port %s ugyldig i '/inet'log: fik et negativt argument %glog: fik et ikke-numerisk argumentlshift(%lf, %lf): kommatalsværdier vil blive trunkeretlshift(%lf, %lf): negative værdier vil give mærkelige resultaterlshift(%lf, %lf): for store skifteværdier vil give mærkelige resultaterlshift: fik et ikke-numerisk første argumentlshift: fik et ikke-numerisk andet argumentmake_builtin: negativt argumentantal for funktion '%s'match: tredje argument er en gawk-udvidelsematch: tredje argument er ikke et arraymktime: mindst én af værdierne er udenfor standardområdetmktime: fik et argument som ikke er en strengflytning af datakanalen til standard ind i underproces mislykkedes (dup: %s)flytning af datakanal til standard ud i underproces mislykkedes (dup: %s)flytning af slave-pty til standard ind i underproces mislykkedes (dup: %s)flytning af slave-pty til standard ud i underproces mislykkedes (dup: %s)'RS' som flertegnsværdi er en gawk-udvidelseflertrins dobbeltrettede datakanaler fungerer ikkefjernmaskinenavn til '/inet' skal angivesfjernport til '/inet' skal angivesingen (kendt) protokol opgivet i special-filnavn '%s'ingen eksplicit lukning af ko-processen '%s' angivetingen eksplicit lukning af filen '%s' angivetingen eksplicit lukning af datakanalen '%s' angivetingen eksplicit lukning af soklen '%s' angivetingen heksadecimale cifre i '\x'-kontrolsekvenseringen fd %d åbnet i forvejeningen programtekst overhovedet!ikke-omdirigeret 'getline' ugyldig inden i '%s'-regelikke-omdirigeret 'getline' udefineret inden i END-handlingtom streng som 'FS' er en gawk-udvidelsegamle versioner af awk understøtter ikke flerdimensionale arraygamle versioner af awk understøtter ikke flere 'BEGIN'- eller 'END'-reglergamle versioner af awk understøtter ikke operatoren '**'gamle versioner af awk understøtter ikke operatoren '**='gamle versioner af awk understøtter ikke regexp'er som værdi for 'FS'gamle versioner af awk understøtter ikke '\%c' undvigesekvensgamle versioner af awk understøtter ikke nøgleordet 'in' undtagen efter 'for'opkode %s er ikke en operator eller et nøgleordoperatoren '^' understøttes ikke i gamle versioner af awkoperatoren '^=' understøttes ikke i gamle versioner af awkor(%lf, %lf): kommatalsværdier vil blive trunkeretor(%lf, %lf): negative værdier vil give mærkelige resultateror: fik et ikke-numerisk første argumentor: fik et ikke-numerisk andet argumentpatsplit: kan ikke bruge et underarray af fjerde argument som andet argumentpatsplit: kan ikke bruge et underarray af andet argument som fjerde argumentpatsplit: kan ikke bruge det samme array som andet og fjerde argumentpatsplit: fjerde argument er ikke et arraypatsplit: andet argument er ikke et arraypatmatch: tredje argument er ikke et arraydatakanalsrensning af '%s' mislykkedes (%s).alenestående 'print' i BEGIN eller END-regel skulle muligvis være 'print ""'præcision ignoreret for '%%'-angivelseprintf: ingen argumenterområde på formen `[%c-%c]' er locale-afhængignåede systembegrænsningen for åbne filer: begynder at multiplekse fildeskriptorerukendt årsagredir2str: uykendt omdirigeringstype %domdirigering ikke tilladt i sandkasse-tilstandreference til ikke-initieret argument '%s'reference til ikke-initieret element '%s["%.*s"]'reference til ikke-initieret felt '$%d'reference til ikke-initieret felt '$%ld'reference til ikke-initieret variabel '%s'regexp-komponent `%.*s' skulle nok være `[%.*s]'regexp-konstanten '/%s/' ser ud som en C-kommentar, men er det ikkeregexp-konstanten '//' ser ud som en C++-kommentar, men er det ikkekonstant regulært udtryk for parameter %d giver en boolesk værdiregulært udtryk på venstre side af en '~'- eller '!~'-operatorregulært udtryk i højreleddet af en tildelingregulært udtryk i højreleddet af en sammenligningfjernvært og portinformation (%s, %s) ugyldigegenskabelse af standard ind i forælderprocessen mislykkedes genskabelse af standard ud i forælderprocessen mislykkedes rshift(%lf, %lf): kommatalsværdier vil blive trunkeretrshift(%lf, %lf): negative værdier vil give mærkelige resultaterrshift(%lf, %lf): for store skifteværdier vil give mærkelige resultaterrshift: fik et ikke-numerisk første argumentrshift: fik et ikke-numerisk andet argumentat køre %s setuid root kan være et sikkerhedsproblemsender profilen til standard fejlsender variabelliste til standard fejlshadow_funcs() kaldt to gange!sin: fik et ikke-numerisk argumentfunktionen for sorteringssammenligning '%s' er ikke defineretkildefilen '%s' er tomkildefilen slutter ikke med en ny linjespecial-filnavn '%s' er ufuldstændigtsplit: kan ikke bruge et underarray af fjerde argument som andet argumentsplit: kan ikke bruge et underarray af andet argument som fjerde argumentsplit: kan ikke bruge det samme array som andet og fjerde argumentsplit: fjerde argument er en gawk-udvidelsesplit: fjerde argument er ikke et arraysplit: tom streng som tredje argument er en gawk-udvidelsesplit: andet argument er ikke et arraysqrt: kaldt med negativt argument %gsqrt: fik ikke-numerisk argumentsrand: fik et ikke-numerisk argumentstandard udkommandoen har ingen effektstrftime: formatværdi i PROCINFO["strftime"] har numerisk typestrftime: fik en tom formatstrengstrftime: fik et ikke-numerisk andet argumentstrftime: fik et første argument som ikke er en strengstrftime: andet argument mindre end 0 eller for stort til time_tindeks i array '%s' er en tom strengsubstr: længden %g ved startindeks %g overskrider længden af første argument (%lu)substr: længden %g er ikke >= 0substr: længden %g er ikke >= 1substr: længden %g for stor til strengindeksering, trunkerer til %gsubstr: længden %g som ikke er et heltal vil blive trunkeretsubstr: startindeks %g som ikke er et heltal vil blive trunkeretsubstr: kildestrengen er tomsubstr: startindeks %g er ugyldigt, bruger 1substr: startindeks %g er forbi slutningen på strengensystem: fik et argument som ikke er en strengregex-ændringstegn '/.../%c' fra tawk virker ikke i gawkder var skyggede variable.tolower: fik et argument som ikke er en strengfor mange argumenter til formatstrengenfor mange datakanaler eller inddatafiler åbnetoupper: fik et argument som ikke er en strengdeaktiverer '--lint' på grund af en tildeling til 'LINT'uventet nylinjetegn eller strengafslutningukendt nodetype %dukendt opkode %dukendt værdi for felt-spec: %d unødig blanding af '>' og '>>' for filen '%.*s'uafsluttet regulært udtrykuafsluttet regulært udtryk i slutningen af filenuafsluttet regulært udtryk slutter med '\' i slutningen af filenuafsluttet strengunwind_stack: uventet type `%s'brug af '\ #...' for linjefortsættelse er ikke portabeltbrug af dcgettext(_"...") er forkert: fjern det indledende understregningstegnbrug af dcgettext(_"...") er forkert: fjern det indledende understregningstegnbrug af ikke-array som arrayadvarsel: xor(%lf, %lf): kommatalsværdier vil blive trunkeretxor(%lf, %lf): negative værdier vil give mærkelige resultaterxor: fik et ikke-numerisk første argumentxor: fik et ikke-numerisk andet argumentgawk-4.0.1+dfsg.orig/po/de.gmo0000644000175000017500000014627211734667243015110 0ustar schotschotÞ•ºì Q¼%% %%<%O%g%†%£%»%Í%Ü%÷%&&5&H&e&#z&+ž&Ê&é& ú&'"'?'T'f'…'% 'yÆ'+@(7l(<¤("á(-)2):I)3„)¸)Í)ã)õ)*#*,5*,b*'*-·* å*(+)/+&Y+(€+:©+%ä+ ,*,-J,'x, ,¾,+Û,(-]0.#Ž.².É.æ./[/$v/›/­/È/Ù/ò/û/020!L0"n0#‘0-µ0#ã01/"1'R1z1'‚1ëª1–2©2»2Í2 ß2Aì2A.3…p38ö35/4e4|43š4Î4"ç4! 55,5 b5ƒ5#¢58Æ5"ÿ5"6!@6b6 }6*ž6/É6(ù6""70E7.v7¥7&Å7"ì78*+8*V8#8(¥8Î8,ç8939&P9w9Š9!§92É98ü9(5:)^:8ˆ:8Á:"ú:#;9A;9{;#µ;$Ù;&þ;*%<+P<|<1˜<+Ê<&ö<-=5K=(=&ª=.Ñ=0>1>$L>q>>4°><å>#"?$F?,k?2˜?Ë?ë? @$%@#J@$n@1“@/Å@&õ@A)7A-aAA!ªAÌAìA*B1B#PB$tB5™BEÏB*C-@C nC-yC2§C.ÚC4 D$>D"cD$†D$«D#ÐDôD&E:E.RE$E¦E"ÁE#äE"F++F(WF/€F'°FØF"öF@G!ZG!|G"žGÁG+ÉG õG"H59H5oH'¥H8ÍH(I0/I7`I ˜I*¹I.äI.JBJ%^J+„J°J*¸J/ãJ0K0DK0uKD¦K%ëK(L?:LPzL/ËL>ûL4:M4oM?¤M?äM8$N)]N‡NF§NîNGOOO&WO6~OWµO/ P9=PwP=‘P>ÏP8QFGQ#ŽQ<²Q5ïQ6%R%\Rt‚R(÷RN SGoS)·S*áS, T"9T"\T$T¤TÄTáT$U &U"GU"jU5U;ÃUAÿU+AV,mV7šV)ÒV%üV>"W$aW.†W/µW3åW4X0NX'X(§X$ÐX5õX-+Y'YY'Y)©Y%ÓYùY Z1%Z4WZ(ŒZ0µZ8æZ&['F[1n[2 [<Ó[$\(5\)^\1ˆ\7º\'ò\(]<C]<€]>½])ü])&^)P^z^@š^'Û^_/_KH_”_&£_'Ê_(ò_/`&K`'r`(š`3Ã`9÷`91a6ka2¢a)Õa)ÿa1)b)[b*…b5°b;æbA"c+dc,c0½c!îc'd8d"Ud,xd¥d#¿d$ãd9e9Be;|e*¸e&ãe4 f&?f&ff#f$±fÖfæf?þf&>g.eg,”g;Ág&ýgJ$hohh?«h/ëh4i$Pi*ui, i$Íi2òi%j%Dj-jj"˜j%»j0áj#k6kJk!\k2~k±k"Åk0èkl"-l1Pl@‚lAÃlm m2)m8\m(•m)¾mpèmYoioxo”o§o0Áoòop'p9pHpepvp‡p£p¶pÓp&èp)q9qXq iqwq‘q±qÆq Øqùq-rDr$UsdzsLßs*,t<Wt”t^³tHu[uuu”u ¥u ³uÔu+ëu,v-Dv-rv( v0Év:úv)5w,_wDŒw+Ñw&ýw&$x:Kx'†x'®x&Öx:ýxE8y^~z+Ýz {(#{L{`{k|{/è{|1|#Q|%u| ›|&¨|%Ï|õ|"}'3}([}/„})´} Þ}5ÿ}G5~}~-„~$²~×"î €"2€U€Ao€@±€žò€6‘CÈ ‚)!‚EK‚ ‘‚*²‚'Ý‚Gƒ+Mƒ(yƒ-¢ƒEЃ/„%F„)l„"–„(¹„2â„P…:f…*¡…+Ì…:ø…'3†8[†4”†#Ɇ2í†2 ‡+S‡:‡$º‡@߇& ˆ(Gˆ3pˆ¤ˆ!È+åˆ-‰I?‰&‰‰'°‰e؉e>Š'¤Š(ÌŠfõŠf\‹(Ë)싌(3Œ)\Œ!†Œ2¨Œ+ÛŒ4E<M‚;Ð: ŽAGŽE‰Ž"ÏŽ;òŽ.N6n]¥AAE<‡UÄ4‘+O‘*{‘S¦‘Mú‘MH’B–’<Ù’;“,R“D“LÄ“/”DA”M†”,Ô”6•M8•4†•F»•A–\D–4¡–9Ö–—>—J^—*©—DÔ—(˜ B˜Bc˜3¦˜6Ú˜2™?D™„™5ž™7Ô™" š&/š'Vš&~š.¥š'Ôš@üš3=›q›'›U¸›-œ8<œ2uœ¨œ<±œ<îœ +ELM’<àYž4wž;¬žAèž *Ÿ1KŸ7}Ÿ6µŸìŸ:  0G x 0€ 7± 6é 6 ¡6W¡QŽ¡5à¡:¢YQ¢Y«¢H£FN£6•£<Ì£R ¤Q\¤B®¤0ñ¤0"¥hS¥¼¥UÑ¥'¦2.¦3a¦o•¦8§W>§#–§Qº§S ¨I`¨Xª¨'©?+©@k©>¬©'ë©§ª7»ª\óªdP«&µ«'Ü«5¬:¬"R¬+u¬,¡¬άé¬ ­1(­Z­u­0’­LíS®)d®*Ž®A¹®4û®)0¯GZ¯$¢¯UǯU°vs°vê°8a±.š±/ɱ+ù±B%²6h²/Ÿ².ϲ1þ²;0³+l³0˜³HɳJ´1]´8´DÈ´3 µ4AµIvµ8ÀµDùµ8>¶2w¶3ª¶,Þ¶H ·%T·&z·i¡·i ¸Wu¸+͸+ù¸2%¹/X¹Nˆ¹1×¹ ºJ!ºdlºѺ'äº/ »2<»:o»2ª»3Ý»5¼MG¼Y•¼Wï¼MG½9•½9Ͻ. ¾?8¾Jx¾Jþ0¿M?¿S¿)á¿* ÀD6À8{ÀE´À"úÀ ÁD>ÁƒÁ3¢Á'ÖÁfþÁfeÂTÌÂ4!Ã(VÃAÃ(ÁÃ!êÃ! Ä".ÄQÄaÄA}Ä$¿Ä,äÄ,ÅI>Å,ˆÅWµÅ Æ .ÆKOÆ6›Æ;ÒÆÇ6+Ç7bÇ$šÇV¿Ç%È%<È(bÈ(‹È%´È<ÚÈ5ÉMÉfÉ*|É>§É#æÉ0 ÊI;Ê…Ê%¡ÊJÇÊWËXjË&ÃË êË-ôËH"Ì&kÌ'’̈C‰vÇ6?Ò)Ýl£Jl¤ã‹Kz­!2ôu©]·3¢³¼H”t¦ Šæì/‘4F¶ ye I «Ñ†»P,w˜ ŒN>Afo™•U^Q~ õ†9šºýð÷"å.Ö®pø :¢¿Óïþ$Gò¯:¸xü_¾Ãªú¥a–`’U„.c–¹f Ÿ=*î-û›;,6[j+‡ä>¨u=ŽSž©#cí¤yvYZbq(´s^… „™mÜ‘;dO®³~«*TŠkg4/CɈE_S&\ë2kpœè¦XB‹zÿMQ?ö²˜Žr 5½À µA‚Ëœ3hW¬{—<")°Ù5jš’}eo[ùF—W{X¡±1êâV“¹(•¬MJÁ&d“\@8G°žÏ…|D¶¡ƒÈ$²Í”#¯0·ÄihwL×9‚Z<gÕ!H8`ÛµV%Ð1¸qóÊnÎRŸxÌÚØbYŒ€R'ñÔ¥'E 7|±rÂinBtç-DaT£ÅºÞ}m¨ ­Pª‡N7á§K@§ƒL+ à%逛´‰O]IÆ0sß # %s block(s) # Rule(s) # gawk profile, created %s -C --copyright -E file --exec=file -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R file --command=file -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[file] --dump-variables[=file] -e 'program-text' --source='program-text' -f progfile --file=progfile -g --gen-pot -h --help -n --non-decimal-data -p[file] --profile[=file] -r --re-interval -t --lint-old -v var=val --assign=var=val # Function Call Stack: # Functions, listed alphabetically To report bugs, see node `Bugs' in `gawk.info', which is section `Reporting Problems and Bugs' in the printed version. %d is invalid as number of arguments for %s%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)%s blocks must have an action part%s third parameter is not a changeable object%s to "%s" failed (%s)%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk%s: `%s' argument to `-v' not in `var=value' form %s: array_ref to %s %s: close failed (%s)%s: empty (null) %s: empty (zero) %s: invalid option -- '%c' %s: is parameter %s: option '%c%s' doesn't allow an argument %s: option '--%s' doesn't allow an argument %s: option '--%s' requires an argument %s: option '-W %s' doesn't allow an argument %s: option '-W %s' is ambiguous %s: option '-W %s' requires an argument %s: option `-W %s' unrecognized, ignored %s: option requires an argument -- %c %s: option requires an argument -- '%c' %s: string literal as last arg of substitute has no effect%s: table_size = %d, array_size = %d %s: unrecognized option '%c%s' %s: unrecognized option '--%s' 'system' function not allowed in sandbox mode-Ft does not set FS to tab in POSIX awk-m option usage: `-m[fr] nnn'@include is a gawk extensionBINMODE value `%s' is invalid, treated as 3Copyright (C) 1989, 1991-%d Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Examples: gawk '{ sum += $1 }; END { print sum }' file gawk -F: '{ print $1 }' /etc/passwd IPv6 communication is not supportedInvalid back referenceInvalid character class nameInvalid collation characterInvalid content of \{\}Invalid multibyte data detected. There may be a mismatch between your data and your locale.Invalid preceding regular expressionInvalid range endInvalid regular expressionMemory exhaustedNF set to negative valueNo matchNo previous regular expressionOperation Not SupportedPOSIX does not allow `%s'POSIX does not allow `\x' escapesPOSIX does not allow operator `**'POSIX does not allow operator `**='POSIX options: GNU long options: (standard) Premature end of regular expressionRegular expression too bigShort options: GNU long options: (extensions) Sorry, don't know how to interpret `%s'SuccessTCP/IP communications are not supportedThis 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. Trailing backslashUnmatched ( or \(Unmatched ) or \)Unmatched [ or [^Unmatched \{Usage: %s [POSIX or GNU style options] -f progfile [--] file ... Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ... You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. [s]printf: format specifier does not have control letter[s]printf: value %g is out of range for `%%%c' format^ ran out for this one`%s' is a Bell Labs extension`%s' is a built-in function, it cannot be redefined`%s' is a gawk extension`%s' is invalid as a function name`%s' is not a legal variable name`%s' is not a variable name, looking for file `%s=%s'`%s' is not supported in old awk`--posix' overrides `--binary'`--posix' overrides `--traditional'`--posix'/`--traditional' overrides `--non-decimal-data'`-m[fr]' option irrelevant in gawk`BINMODE' is a gawk extension`FIELDWIDTHS' is a gawk extension`FPAT' is a gawk extension`IGNORECASE' is a gawk extension`L' is meaningless in awk formats; ignored`break' is not allowed outside a loop or switch`continue' is not allowed outside a loop`delete array' is a gawk extension`delete(array)' is a non-portable tawk extension`exit' cannot be called in the current context`extension' is a gawk extension`getline var' invalid inside `%s' rule`getline' invalid inside `%s' rule`goto' considered harmful! `h' is meaningless in awk formats; ignored`l' is meaningless in awk formats; ignored`length(array)' is a gawk extension`next' cannot be called from a `%s' rule`next' used in %s action`nextfile' cannot be called from a `%s' rule`nextfile' is a gawk extension`nextfile' used in %s action`return' used outside function context`|&' not supportedadump: argument not an arrayalready included source file `%s'and(%lf, %lf): fractional values will be truncatedand(%lf, %lf): negative values will give strange resultsand: received non-numeric first argumentand: received non-numeric second argumentasort: cannot use a subarray of first arg for second argasort: cannot use a subarray of second arg for first argasort: first argument not an arrayasort: second argument not an arrayasorti: cannot use a subarray of first arg for second argasorti: cannot use a subarray of second arg for first argasorti: first argument not an arrayasorti: second argument not an arrayassignment used in conditional contextatan2: received non-numeric first argumentatan2: received non-numeric second argumentattempt to access field %ldattempt to field reference from non-numeric valueattempt to field reference from null stringattempt to use a scalar value as arrayattempt to use array `%s' in a scalar contextattempt to use array `%s["%.*s"]' in a scalar contextattempt to use function `%s' as an arrayattempt to use scalar `%s' as an arrayattempt to use scalar `%s["%.*s"]' as an arrayattempt to use scalar parameter `%s' as an arraybackslash at end of stringbackslash not last character on linebad `%sFMT' specification `%s'buffer overflow in genflags2strcall of `length' without parentheses is not portablecan not use special variable `%s' for indirect function callcan't open pipe `%s' for input (%s)can't open pipe `%s' for output (%s)can't open source file `%s' for reading (%s)can't open two way pipe `%s' for input/output (%s)can't read sourcefile `%s' (%s)can't redirect from `%s' (%s)can't redirect to `%s' (%s)can't set binary mode on stderr (%s)can't set binary mode on stdin (%s)can't set binary mode on stdout (%s)can't use function name `%s' as variable or arraycannot create child process for `%s' (fork: %s)cannot open file `%s' for reading (%s)cannot open pipe `%s' (%s)cannot use function `%s' as variable namecannot use gawk builtin `%s' as variable nameclose of `%s' failed (%s).close of fd %d (`%s') failed (%s)close of master pty failed (%s)close of pipe failed (%s)close of redirection that was never openedclose of slave pty failed (%s)close of stdin in child failed (%s)close of stdout in child failed (%s)close: `%.*s' is not an open file, pipe or co-processclose: redirection `%s' not opened with `|&', second argument ignoredclose: second argument is a gawk extensionclose: second argument must be `to' or `from'cmd. line:co-process flush of pipe to `%s' failed (%s).command line argument `%s' is a directory: skippedcompl(%lf): fractional value will be truncatedcompl(%lf): negative value will give strange resultscompl: received non-numeric argumentcos: received non-numeric argumentcould not allocate more input memorycould not open `%s' for writing (%s)could not open `%s' for writing: %scould not open `%s', mode `%s'could not pre-open /dev/null for fd %ddata file `%s' is emptydcgettext: `%s' is not a valid locale categorydelete: index `%s' not in array `%s'division by zero attempteddivision by zero attempted in `%%'division by zero attempted in `%%='division by zero attempted in `/='duplicate `default' detected in switch bodyduplicate case values in switch body: %seach rule must have a pattern or an action partempty argument to `-e/--source' ignoredempty filename after @includeempty program text on command lineenvironment variable `POSIXLY_CORRECT' set: turning on `--posix'error reading input file `%s': %serror writing standard error (%s)error writing standard output (%s)error: escape sequence `\%c' treated as plain `%c'exp: argument %g is out of rangeexp: received non-numeric argumentexpression for `%s' redirection has null string valueexpression in `%s' redirection only has numeric valueextension: can't redefine function `%s'extension: can't use gawk built-in `%s' as function nameextension: function `%s' already definedextension: function name `%s' previously definedextension: illegal character `%c' in function name `%s'extension: missing function nameextensions are not allowed in sandbox modefailure status (%d) on file close of `%s' (%s)failure status (%d) on pipe close of `%s' (%s)fatal error: internal errorfatal error: internal error: segfaultfatal error: internal error: stack overflowfatal: fatal: `$' is not permitted in awk formatsfatal: `$' not permitted after period in formatfatal: `L' is not permitted in POSIX awk formatsfatal: `h' is not permitted in POSIX awk formatsfatal: `l' is not permitted in POSIX awk formatsfatal: arg count %ld greater than total number of supplied argumentsfatal: arg count with `$' must be > 0fatal: extension: cannot open `%s' (%s) fatal: extension: library `%s': cannot call function `%s' (%s) fatal: extension: library `%s': does not define `plugin_is_GPL_compatible' (%s) fatal: must use `count$' on all formats or nonefatal: no `$' supplied for positional field width or precisionfatal: not enough arguments to satisfy format stringfflush: `%s' is not an open file, pipe or co-processfflush: cannot flush: file `%s' opened for reading, not writingfflush: cannot flush: pipe `%s' opened for reading, not writingfield width and precision are ignored for `%%' specifierfield width is ignored for `%%' specifierfile flush of `%s' failed (%s).filename `%s' for `%s' redirection may be result of logical expressionfloating point exceptionfor loop: array `%s' changed size from %ld to %ld during loop executionfrom %sfunction `%s' called but never definedfunction `%s' called with more arguments than declaredfunction `%s' called with space between name and `(', or used as a variable or an arrayfunction `%s' defined but never called directlyfunction `%s' defined to take no more than %d argument(s)function `%s' not definedfunction `%s': argument #%d: attempt to use array as a scalarfunction `%s': argument #%d: attempt to use scalar as an arrayfunction `%s': can't use function name as parameter namefunction `%s': can't use special variable `%s' as a function parameterfunction `%s': missing argument #%dfunction `%s': parameter #%d, `%s', duplicates parameter #%dfunction `%s': parameter `%s' shadows global variablefunction called indirectly through `%s' does not existfunction name `%s' previously definedgawk is a pattern scanning and processing language. By default it reads standard input and writes standard output. gensub: third argument of 0 treated as 1hex escape \x%.*s of %d characters probably not interpreted the way you expectignoring unknown format specifier character `%c': no argument convertedindex: received non-string first argumentindex: received non-string second argumentindirect function calls are a gawk extensionint: received non-numeric argumentinternal error: %s with null vnameinvalid FIELDWIDTHS value, near `%s'invalid char '%c' in expressioninvalid subscript expressionlength: received array argumentlength: received non-string argumentlocal port %s invalid in `/inet'log: received negative argument %glog: received non-numeric argumentlshift(%lf, %lf): fractional values will be truncatedlshift(%lf, %lf): negative values will give strange resultslshift(%lf, %lf): too large shift value will give strange resultslshift: received non-numeric first argumentlshift: received non-numeric second argumentmake_builtin: negative argument count for function `%s'match: third argument is a gawk extensionmatch: third argument is not an arraymktime: at least one of the values is out of the default rangemktime: received non-string argumentmoving pipe to stdin in child failed (dup: %s)moving pipe to stdout in child failed (dup: %s)moving slave pty to stdin in child failed (dup: %s)moving slave pty to stdout in child failed (dup: %s)multicharacter value of `RS' is a gawk extensionmultistage two-way pipelines don't workmust supply a remote hostname to `/inet'must supply a remote port to `/inet'no (known) protocol supplied in special filename `%s'no explicit close of co-process `%s' providedno explicit close of file `%s' providedno explicit close of pipe `%s' providedno explicit close of socket `%s' providedno hex digits in `\x' escape sequenceno pre-opened fd %dno program text at all!non-redirected `getline' invalid inside `%s' rulenon-redirected `getline' undefined inside END actionnull string for `FS' is a gawk extensionold awk does not support multidimensional arraysold awk does not support multiple `BEGIN' or `END' rulesold awk does not support operator `**'old awk does not support operator `**='old awk does not support regexps as value of `FS'old awk does not support the `\%c' escape sequenceold awk does not support the keyword `in' except after `for'opcode %s not an operator or keywordoperator `^' is not supported in old awkoperator `^=' is not supported in old awkor(%lf, %lf): fractional values will be truncatedor(%lf, %lf): negative values will give strange resultsor: received non-numeric first argumentor: received non-numeric second argumentpatsplit: cannot use a subarray of fourth arg for second argpatsplit: cannot use a subarray of second arg for fourth argpatsplit: cannot use the same array for second and fourth argspatsplit: fourth argument is not an arraypatsplit: second argument is not an arraypatsplit: third argument must be non-nullpipe flush of `%s' failed (%s).plain `print' in BEGIN or END rule should probably be `print ""'precision is ignored for `%%' specifierprintf: no argumentsrange of the form `[%c-%c]' is locale dependentreached system limit for open files: starting to multiplex file descriptorsreason unknownredir2str: unknown redirection type %dredirection not allowed in sandbox modereference to uninitialized argument `%s'reference to uninitialized element `%s["%.*s"]'reference to uninitialized field `$%d'reference to uninitialized field `$%ld'reference to uninitialized variable `%s'regexp component `%.*s' should probably be `[%.*s]'regexp constant `/%s/' looks like a C comment, but is notregexp constant `//' looks like a C++ comment, but is notregexp constant for parameter #%d yields boolean valueregular expression on left of `~' or `!~' operatorregular expression on right of assignmentregular expression on right of comparisonremote host and port information (%s, %s) invalidrestoring stdin in parent process failed restoring stdout in parent process failed rshift(%lf, %lf): fractional values will be truncatedrshift(%lf, %lf): negative values will give strange resultsrshift(%lf, %lf): too large shift value will give strange resultsrshift: received non-numeric first argumentrshift: received non-numeric second argumentrunning %s setuid root may be a security problemsending profile to standard errorsending variable list to standard errorshadow_funcs() called twice!sin: received non-numeric argumentsort comparison function `%s' is not definedsource file `%s' is emptysource file does not end in newlinespecial file name `%s' is incompletesplit: cannot use a subarray of fourth arg for second argsplit: cannot use a subarray of second arg for fourth argsplit: cannot use the same array for second and fourth argssplit: fourth argument is a gawk extensionsplit: fourth argument is not an arraysplit: null string for third arg is a gawk extensionsplit: second argument is not an arraysqrt: called with negative argument %gsqrt: received non-numeric argumentsrand: received non-numeric argumentstandard outputstatement has no effectstrftime: format value in PROCINFO["strftime"] has numeric typestrftime: received empty format stringstrftime: received non-numeric second argumentstrftime: received non-string first argumentstrftime: second argument less than 0 or too big for time_tsubscript of array `%s' is null stringsubstr: length %g at start index %g exceeds length of first argument (%lu)substr: length %g is not >= 0substr: length %g is not >= 1substr: length %g too big for string indexing, truncating to %gsubstr: non-integer length %g will be truncatedsubstr: non-integer start index %g will be truncatedsubstr: source string is zero lengthsubstr: start index %g is invalid, using 1substr: start index %g is past end of stringsystem: received non-string argumenttawk regex modifier `/.../%c' doesn't work in gawkthere were shadowed variables.tolower: received non-string argumenttoo many arguments supplied for format stringtoo many pipes or input files opentoupper: received non-string argumentturning off `--lint' due to assignment to `LINT'unexpected newline or end of stringunknown nodetype %dunknown opcode %dunknown value for field spec: %d unnecessary mixing of `>' and `>>' for file `%.*s'unterminated regexpunterminated regexp at end of fileunterminated regexp ends with `\' at end of fileunterminated stringunwind_stack: unexpected type `%s'use of `\ #...' line continuation is not portableuse of dcgettext(_"...") is incorrect: remove leading underscoreuse of dcngettext(_"...") is incorrect: remove leading underscoreuse of non-array as arraywarning: xor(%lf, %lf): fractional values will be truncatedxor(%lf, %lf): negative values will give strange resultsxor: received non-numeric first argumentxor: received non-numeric second argumentProject-Id-Version: gawk 4.0.0h Report-Msgid-Bugs-To: arnold@skeeve.com POT-Creation-Date: 2012-03-28 22:03+0200 PO-Revision-Date: 2012-01-30 16:21+0100 Last-Translator: Philipp Thomas Language-Team: German Language: de MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit # %s Blöcke # Regeln(s) # gawk-Profil, erzeugt %s -C --copyright -E Datei --exec=Datei -F Feldtrenner --field-separator=Feldtrenner -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R Datei --command=Datei -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d [Datei] --dump-variables[=Datei] -e 'Programmtext' --source=Programmtext -f PROGRAMM --file=PROGRAMM -g --gen-pot -h --help -n --non-decimal-data -p [Datei] --profile[=Datei] -r --re-interval -t --lint-old -v var=Wert --assign=var=Wert # Funktions-Aufruf-Stack # Funktionen in alphabetischer Reihenfolge Zum Berichten von Fehlern sehen Sie bitte den Punkt »Bugs« in »gawk.info«, den Sie als Kapitel »Reporting Problems and Bugs« in der gedruckten Version finden. Fehler in der Übersetzuung senden Sie bitte als E-Mail an an translation-team-de@lists.sourceforge.net Unzulässige Argumentzahl %d für %s%s %s »%s«: Die Kennungen des Dateideskriptors konnten nicht abgefragt werden: (fcntl F_GETFD: %s)%s %s »%s«: close-on-exec konnte nicht gesetzt werden: (fcntl F_SETFD: %s)%s-Blöcke müssen einen Aktionsteil habenDer dritte Parameter von %s ist ein unveränderliches Objekt%s to "%s" fehlgeschlagen (%s)%s: %d: der tawk-Modifizierer für reguläre Ausdrücke »/.../%c« funktioniert nicht in gawk%s: Argument »%s« von »-v« ist nicht in der Form »Variable=Wert« %s: Feld-Referenz auf %s %s: close ist gescheitert (%s)%s: leer (Null) %s: leer (0) %s: Ungültige Option -- »%c« %s: ist ein Parameter %s: Die Option »%c%s« hat keine Argument %s: Die Option »--%s« hat keine Argumente %s: Die Option »%s« erfordert ein Argument %s: Die Option »-W %s« hat keine Argumente %s: Die Option »-W %s« ist mehrdeutig %s: Die Option »-W %s« erfordert ein Argument %s: Die Option »-W %s« ist unbekannt und wird ignoriert %s: Die Option %c erfordert ein Argument %s Die Option »%c« erfordert ein Argument %s: Ein String als letztes Argument von substitute hat keinen Effekt%s: Tabellengröße = %d, Feldgröße = %d %s: Die Option »%c%s« ist unbekannt %s: Die Option »--%s« ist unbekannt Die Funktion »system« ist im Sandbox-Modus nicht erlaubt-Ft setzt FS im POSIX-awk nicht auf TabAnwendung der Option -m: »-m[fr] nnn«»@include« ist eine gawk-ErweiterungBINMODE Wert »%s« ist ungültig und wird als 3 behandeltCopyright © 1989, 1991-%d Free Software Foundation. Dieses Programm ist Freie Software. Sie können es unter den Bedingungen der von der Free Software Foundation veröffentlichten GNU General Public License weitergeben und/oder ändern. Es gilt Version 2 dieser Lizenz oder (nach Ihrer Wahl) irgendeine spätere Version. Beispiele: gawk '{ sum += $1 }; END { print sum }' file gawk -F: '{ print $1 }' /etc/passwd IPv6-Verbindungen werden nicht unterstütztUngültige Rück-ReferenzUngültiger Name für eine ZeichenklasseUngültiges ZeichenUngültiger Inhalt von \{\}Es wurden unbekannte Multibyte-Daten gefunden. Ihre Daten entsprechen neventuell nicht der gesetzten LocaleVorangehender regulärer Ausdruck ist ungültigUngültiges BereichsendeUngültiger Regulärer AusdruckKein freier Speicher mehr vorhandenNF wird ein negativer Wert zugewiesenKein TrefferKein vorangehender regulärer AusdruckDie Operation wird nicht unterstütztPOSIX erlaubt »%s« nichtPOSIX erlaubt keine »\x«-EscapesPOSIX erlaubt den Operator »**« nichtPOSIX erlaubt den Operator »**=« nichtPOSIX-Optionen lange GNU-Optionen: (standard) Vorzeitiges Ende des regulären AusdrucksRegulärer Ausdruck ist zu großPOSIX-Optionen GNU-Optionen (lang): (Erweiterungen) Entschuldigung, aber es ist unbekannt, wie »%s« zu interpretieren istErfolgTCP/IP-Verbindungen werden nicht unterstütztDieses Programm wird weitergegeben in der Hoffnung, dass es nützlich ist, aber OHNE JEDE GEWÄHRLEISTUNG; nicht einmal mit der impliziten Gewähr- leistung einer HANDELBARKEIT oder der EIGNUNG FÜR EINEN BESTIMMTEN ZWECK. Sehen Sie bitte die GNU General Public License für weitere Details. Angehängter Backslash( oder \( werden nicht geschlossen) oder \) werden nicht geöffnet[ oder [^ werden nicht geschlossen\{ wird nicht geschlossenAufruf: %s [POSIX- oder GNU-Optionen] -f PROGRAMM [--] Datei ... Aufruf: %s [POSIX- oder GNU-Optionen] -- %cPROGRAMM%c Datei ... Sie sollten eine Kopie der GNU General Publice License zusammen mit diesem Programm erhalten haben. Wenn nicht, lesen Sie bitte http://www.gnu.org/licenses/. [s]printf: Format-Spezifikation hat keinen Controlcode[s]printf: Wert %g ist außerhalb des Bereichs für Format »%%%c«^ hierfür fehlte es»%s« ist eine Erweiterung der Bell Labs»%s« ist eine eingebaute Funktion und kann nicht umdefiniert werden»%s« ist eine gawk-Erweiterung»%s« ist ein unzulässiger Funktionsname»%s« ist kein gültiger Variablenname»%s« ist kein Variablenname, es wird nach der Datei »%s=%s« gesucht»%s« wird im alten awk nicht unterstützt»--posix« hat Vorrang vor »--binary«»--posix« hat Vorrang vor »--traditional«»--posix« /»--traditional« hat Vorrang vor »--non-decimal-data«Die Option »-m[fr]« ist in gawk bedeutungslos»BINMODE« ist eine gawk-Erweiterung»FIELDWIDTHS« ist eine gawk-Erweiterung»FPAT« ist eine gawk-Erweiterung»IGNORECASE« ist eine gawk-Erweiterung»L« ist in awk-Formaten bedeutungslos, ignoriert»break« ist außerhalb einer Schleife oder eines Switch-Blocks nicht zulässig»continue« ist außerhalb einer Schleife nicht zulässig»delete array« ist eine gawk-Erweiterung»delete(array)« ist eine gawk-Erweiterung»exit« kann im aktuellen Kontext nicht aufgerufen werden»extension« ist eine gawk-Erweiterung»getline var« ist ungültig innerhalb der »%s«-Regel»getline« ist ungültig innerhalb der »%s«-Regel»goto« gilt als schlechter Stil! »h« ist in awk-Formaten bedeutungslos, ignoriert»l« ist in awk-Formaten bedeutungslos, ignoriert»length(array)« ist eine gawk-Erweiterung»next« kann nicht in einer »%s«-Regel verwendet werden»next« wird in %s-Aktion verwendet»nextfile« kann nicht aus einer »«%s-Regel aufgerufen werden»nextfile« ist eine gawk-Erweiterung»nextfile« wird in %s-Aktion verwendet»return« wird außerhalb einer Funktion verwendet»|&« wird nicht unterstütztadump: Das Argument ist kein FeldQuelldatei »%s« wurde bereits eingebundenand(%lf, %lf): Dezimalteil wird abgeschnittenand(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führenand: das erste Argument ist keine Zahland: das zweite Argument ist keine Zahlasort: ein untergeordnetes Feld des ersten Arguments kann nicht als zweites Argument verwendet werdenasort: ein untergeordnetes Feld des zweiten Arguments kann nicht als erstes Argument verwendet werdenasort: Das erste Argument ist kein Feldasort: Das zweite Argument ist kein Feldasorti: ein untergeordnetes Feld des ersten Arguments kann nicht als zweites Argument verwendet werdenasorti: ein untergeordnetes Feld des zweiten Arguments kann nicht als erstes Argument verwendet werdenasorti: Das erste Argument ist kein Feldasorti: Das zweite Argument ist kein FeldZuweisung in einer Bedingungatan2: das erste Argument ist keine Zahlatan2: das zweite Argument ist keine ZahlVersuch des Zugriffs auf Feld %ldNicht numerischer Wert für Feldreferenz verwendetReferenz auf ein Feld von einem Null-StringEs wird versucht, einen Skalar als Feld zu verwendenEs wird versucht, das Feld »%s« in einem Skalarkontext zu verwendenEs wird versucht, das Feld »%s["%.*s"]« in einem Skalarkontext zu verwendenEs wird versucht, die Funktion »%s« als Feld zu verwendenEs wird versucht, den Skalar »%s« als Array zu verwendenEs wird versucht, den Skalar »%s["%.*s"]« als Feld zu verwendenEs wird versucht, den skalaren Parameter »%s« als Feld zu verwendenBackslash am Ende der Zeichenkettedas letzte Zeichen auf der Zeile ist kein Backslash (»\«)Falsche »%sFMT«-Angabe »%s«Pufferüberlauf in genflags2strAufruf von »length« ohne Klammern ist nicht portabeldie besondere Variable »%s« kann nicht für den indirekten Funktionsaufruf verwendet werdenDie Pipe »%s« kann nicht für die Eingabe geöffnet werden (%s)Die Pipe »%s« kann nicht für die Ausgabe geöffnet werden (%s)Quelldatei »%s« kann nicht zum Lesen geöffnet werden (%s)Die bidirektionale Pipe »%s« kann nicht für die Ein-/Ausgabe geöffnet werden (%s)Die Quelldatei »%s« kann nicht gelesen werden (%s)Von »%s« kann nicht umgelenkt werden (%s)Zu »%s« kann nicht umgelenkt werden (%s)Das Setzen des Binärermodus für die Standardfehlerausgabe ist nicht möglich (%s)Das Setzen des Binärermodus für die Standardeingabe ist nicht möglich (%s)Das Setzen des Binärermodus für die Standardausgabe ist nicht möglich (%s)Funktion »%s« kann nicht als Variable oder Feld verwendet werdenKindprozess für »%s« kann nicht erzeugt werden (fork: %s)Die Datei »%s« kann nicht zum Lesen geöffnet werden (%s)Pipe »%s« kann nicht geöffnet werden (%s)Funktion »%s« kann nicht als Name einer Variablen verwendet werdendie eingebaute Funktion »%s« kann nicht als Variablenname verwendet werdenDas Schließen von »%s« ist gescheitert (%s).Das Schließen des Dateideskriptors %d (»%s«) ist gescheitert (%s)Das Schließen der übergeordneten Terminal-Gerätedatei ist gescheitert (%s)Das Schließen der Pipe ist gescheitert (%s)»close« für eine Umlenkung, die nie geöffnet wurdeDas Schließen der untergeordneten Terminal-Gerätedatei ist gescheitert (%s)Schließen von stdin im Kindprozess gescheitert (%s)Das Schließen der Standardausgabe im Kindprozess ist gescheitert (%s)close: »%.*s« ist weder offene Datei, noch Pipe oder Ko-Prozessclose: Umlenkung »%s« wurde nicht mit »[&« geöffnet, das zweite Argument wird ignoriertclose: Das zweite Argument ist eine gawk-Erweiterungclose: Das zweite Argument muss »to« oder »from« seinKommandozeile:Ko-Prozess: Das Leeren der Pipe zu »%s« ist gescheitert (%s)das Kommandozeilen-Argument »%s« ist ein Verzeichnis: wird übersprungencompl(%lf): Dezimalteil wird abgeschnittencompl(%lf): Negativer Wert wird zu merkwürdigen Ergebnissen führencompl: das erste Argument ist keine Zahlcos: das Argument ist keine ZahlEs konnte kein weiterer Speicher für die Eingabe beschafft werden»%s« kann nicht zum Schreiben geöffne werden(%s)»%s« konnte nicht zum Schreiben geöffnet werden: %s»%s« konnte nicht geöffnet werden, Modus »%s«/dev/null konnte nicht für Dateideskriptor %d geöffnet werdenDie Datei »%s« ist leerdcgettext: »%s« ist keine gültige Locale-Kategoriedelete: Index »%s« ist in Feld »%s« nicht vorhandenDivision durch Null wurde versuchtDivision durch Null versucht in »%%«Division durch Null versucht in »%%=«Division durch Null versucht in »/=«doppeltes »default« im Switch-Block gefundendoppelte Case-Werte im Switch-Block: %sJede Regel muss entweder ein Muster oder einen Aktionsteil habenDas leere Argument für »--source« wird ignoriertleerer Dateiname nach @includeKein Programmtext auf der KommandozeileDie Umgebungsvariable »POSIXLY_CORRECT« ist gesetzt: »--posix« wird eingeschaltetFehler beim Lesen der Eingabedatei »%s«: %sFehler beim Schreiben auf die Standardfehlerausgabe (%s)Fehler beim Schreiben auf die Standardausgabe (%s)Fehler: Fluchtsequenz »\%c« wird wie ein normales »%c« behandeltexp: das Argument %g liegt außerhalb des gültigen Bereichsexp: das Argument ist keine ZahlDer Ausdruck für eine Umlenkung mittels »%s« ist ein leerer StringDer Ausdruck in einer Umlenkung mittels »%s« hat nur einen numerischen WertErweiterung: Funktion »%s« kann nicht neu definiert werdenErweiterung: die eingebaute Funktion »%s« kann nicht als Funktionsname verwendet werdenErweiterung: Funktion »%s« wurde bereits definiertErweiterung: Funktion »%s« wurde bereits vorher definiertErweiterung: unzulässiges Zeichen »%c« in Funktionsname »%s«Erweiterung: Funktionsname fehltErweiterungen sind im Sandbox-Modus nicht erlaubtFehlerstatus (%d) beim Schließen der Datei »%s« (%s)Fehlerstatus (%d) beim Schließen der Pipe »%s« (%s)Fataler Fehler: interner FehlerFataler Fehler: interner Fehler: SpeicherbegrenzungsfehlerFataler Fehler: interner Fehler: StapelüberlaufFatal: Fatal: »$« ist in awk-Formaten nicht zulässigFatal: »$« nach Punkt in Formatangabe nicht zulässigFatal: »L« ist in POSIX-awk-Formaten nicht zulässigFatal: »h« ist in POSIX-awk-Formaten nicht zulässigFatal: »l« ist in POSIX-awk-Formaten nicht zulässigFatal: Argumentenanzahl %ld ist größer als die Gesamtzahl angegebener ArgumenteFatal: die Anzahl der Argumen bei »$« muss > 0 seinFatal: extension: »%s« kann nicht geöffnet werden (%s) Fatal: Erweiterung: Bibliothek »%s«: Funktion »%s« kann nicht aufgerufen werden (%s) Fatal: Erweiterung: Bibliothek »%s«: definiert »plugin_is_GPL_compatible« nicht (%s) Fatal: »count$« muss auf alle Formate angewandt werden oder auf keinesFatal: »$« fehlt in positionsabhängiger Feldbreite oder GenauigkeitFatal: Nicht genügend Argumente für die Formatangabefflush: »%s« ist keine geöffnete Datei, Pipe oder Prozessfflush: Leeren der Puffer nicht möglich, Datei »%s« ist nur zum Lesen geöffnetfflush: Leeren der Puffer nicht möglich, Pipe »%s« ist nur zum Lesen geöffnetFeldbreite und Genauigkeit werden für die »%%«-Angabe ignoriertFeldbreite wird für die »%%«-Angabe ignoriertDas Leeren der Datei »%s« ist gescheitert (%s)Der Dateiname »%s« für eine Umlenkung mittels »%s« kann das Ergebnis eines logischen Ausdrucks seinFließkomma-Ausnahmefor-Schleife: Feld »%s« ändert seine Größe von %ld innerhalb der Schleife zu %ldvon %sAufgerufene Funktion »%s« ist nirgends definiertFunktion »%s« mit zu vielen Argumenten aufgerufenFunktion »%s« wird mit Leerzeichen zwischen Name und »(« aufgerufen, oder als Variable oder Feld verwendetFunktion »%s« wurde definiert aber nirgends aufgerufenFunktion »%s« wird als Funktion definiert, die nie mehr als %d Argument(e) akzeptiertFunktion »%s« ist nicht definiertFunktion »%s«: Argument #%d: Es wird versucht, ein Feld als Skalar zu verwendenFunktion »%s«: Argument #%d: Es wird versucht, einen Skalar als Feld zu verwendenFunktion »%s«: Funktionsnamen können nicht als Parameternamen benutzenFunktion »%s«: die spezielle Variable »%s« kann nicht als Parameter verwendet werdenFunktion »%s«: fehlendes Argument #%dFunktion »%s«: Parameter #%d, »%s« wiederholt Parameter #%dFunktion »%s«: Parameter »%s« verdeckt eine globale Variabledie durch »%s« indirekt aufgerufene Funktion existiert nichtFunktion »%s« wurde bereits definiertgawk ist eine Sprache zur Suche nach und dem Verarbeiten von Mustern. Normalerweise ließt das Programm von der Standardeingabe und gibt auf der Standardausgabe aus. gensub: 0 als drittes Argument wird als 1 interpretiertDie Hex-Sequenz \x%.*s aus %d Zeichen wird wahrscheinlich nicht wie gewünscht interpretiertdas unbekannte Zeichen »%c« in der Formatspezifikation wird ignoriert: keine Argumente umgewandeltindex: Erstes Argument ist kein Stringindex: Zweites Argument ist kein stringindirekte Funktionsaufrufe sind eine gawk-ErweiterungArgument ist keine ZahlInterner Fehler: %s mit null vnameungültiger FIELDWIDTHS-Wert nah bei »%s«Ungültiges Zeichen »%c« in einem AusdruckUngültiger Index-Ausdrucklength: Argument ist ein Feldlength: Argument ist kein StringDer lokale Port »%s« ist ungültig in »/inet«log: Negatives Argument %glog: Argument ist keine Zahllshift(%lf, %lf): Dezimalteil wird abgeschnittenlshift(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führenlshift(%lf, %lf): Zu große Shift-Werte werden zu merkwürdigen Ergebnissen führenlshift: das erste Argument ist keine Zahllshift: das zweite Argument ist keine Zahlmake_builtin: negative Anzahl von Argumenten für Funktion »%s«match: Das dritte Argument ist eine gawk-Erweiterungmatch: das dritte Argument ist kein Arraymktime: mindestens einer der Werte ist außerhalb des normalen Bereichsmktime: Das Argument ist kein StringDas Verschieben der Pipe zur Standardeingabe im Kindprozess ist gescheitert (dup: %s)Das Verschieben der Pipe zur Standardausgabe im Kindprozess ist gescheitert (dup: %s)Das Verschieben der untergeordneten Terminal-Gerätedatei zur Standardeingabe im Kindprozess ist gescheitert (dup: %s)Das Verschieben der untergeordneten Terminal-Gerätedatei zur Standardausgabe im Kindprozess ist gescheitert (dup: %s)Multicharacter-Wert von »RS« ist eine gawk-Erweiterungmehrstufige Zweiwege-Pipes funktionieren nichtSie müssen in /inet einen Rechnernamen angebenSie müssen in »/inet« einen Port angebenEs wurde kein (bekanntes) Protokoll im Dateinamen »%s« angegebenDas explizite Schließen des Ko-Prozesses »%s« fehltDas explizite Schließen der Datei »%s« fehltDas explizite Schließen der Pipe »%s« fehltDas explizite Schließen des Sockets »%s« fehltIn der »\x«-Fluchtsequenz sind keine hexadezimalen ZahlenKein bereits geöffneter Dateideskriptor %dEs wurde überhaupt kein Programmtext angegeben!Nicht umgelenktes »getline« ist innerhalb der »%s«-Aktion unzuässigNicht-umgelenktes »getline« ist innerhalb der END-Aktion nicht definiertNull-String für »FS« ist eine gawk-ErweiterungDas alte awk unterstützt keine mehrdimensionalen FelderDas alte awk erlaubt keine mehrfachen »BEGIN«- oder »END«-RegelnDas alte awk unterstützt den Operator »**« nichtDas alte awk unterstützt den Operator »**=« nichtDas alte awk unterstützt keine regulären Ausdrücke als Wert von »FS«Das alte awk unterstützt die Fluchsequenz »\%c« nichtDas alte awk unterstützt das Schlüsselwort »in« nur nach »for«Opcode %s ist weder ein Operator noch ein SchlüsselwortDas alte awk unterstützt den Operator »^« nichtDas alte awk unterstützt den Operator »^=« nichtor(%lf, %lf): Dezimalteil wird abgeschnittenor(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führenor: das erste Argument ist keine Zahlor: das zweite Argument ist keine Zahlpatsplit: Ein untergeordnetes Feld des vierten Arguments kann nicht als zweites Argument verwendet werdenpatsplit: Ein untergeordnetes Feld des zweiten Arguments kann nicht als viertes Argument verwendet werdenpatsplit: als zweites und viertes Argument kann nicht das gleiche Feld verwendet werdenpatsplit: Das vierte Argument ist kein Feldpatsplit: Das zweite Argument ist kein Feldpatsplit: Das dritte Argument darf nicht Null seinDas Leeren der Pipe »%s« ist gescheitert (%s)Einfaches »print« in BEGIN- oder END-Regel soll vermutlich »print ""« seinGenauigkeit wird für die »%%«-Angabe ignoriertprintf: Keine ArgumenteEin Bereich in der Form »[%c-%c]« ist abhängig von der gesetzten LocaleDie Systemgrenze offener Dateien ist erreicht, daher werden nun Dateideskriptoren mehrfach verwendetUnbekannte Ursacheredir2str: unbekannter Umlenkungstyp %dUmlenkungen sind im Sandbox-Modus nicht erlaubtReferenz auf nicht initialisiertes Argument »%s«Bezug auf ein nicht initialisiertes Element »%s["%.*s"]«Referenz auf das nicht initialisierte Feld »$%d«Referenz auf das nicht initialisierte Feld »$%ld«Referenz auf die nicht initialisierte Variable »%s«Regulärer-Ausdruck-Komponente »%.*s« sollte wahrscheinlich »[%.*s]« seinDie Regulärer-Ausdruck-Konstante »/%s/« sieht wie ein C-Kommentar aus, ist aber keinerDie Regulärer-Ausdruck-Konstante »//« sieht wie ein C-Kommentar aus, ist aber keinerRegulärer-Ausdruck-Konstante für Parameter #%d ergibt einen logischen WertRegulärer Ausdruck links vom »~«- oder »!~«-OperatorRegulärer Ausdruck auf der rechten Seite einer ZuweisungRegulärer Ausdruck rechts von einem VergleichDie Angaben zu entferntem Host und Port (%s, %s) sind ungültigDas Wiederherstellen der Standardeingabe im Elternprozess ist gescheitert Das Wiederherstellen der Standardausgabe im Elternprozess ist gescheitert rshift(%lf, %lf): Dezimalteil wird abgeschnittenrshift (%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führenrshift(%lf, %lf): Zu große Shift-Werte werden zu merkwürdigen Ergebnissen führenrshift: das erste Argument ist keine Zahlrshift: das zweite Argument ist keine Zahl%s als setuid root auszuführen kann zu Sicherheitsproblemen führenDas Profil wird auf der Standardfehlerausgabe ausgegebenDie Liste der Variablen wird auf der Standardfehlerausgabe ausgegebenshadow_funcs() zweimal aufgerufen!sin: das Argument ist keine ZahlDie Vergleichsfunktion »%s« für das Sortieren ist nicht definiertDie Quelldatei »%s« ist leerDie Quelldatei hört nicht mit einem Zeilenende aufDer Dateiname »%s« ist unvollständigsplit: Ein untergeordnetes Feld des vierten Arguments kann nicht als zweites Argument verwendet werdensplit: Ein untergeordnetes Feld des zweiten Arguments kann nicht als viertes Argument verwendet werdensplit: als zweites und viertes Argument kann nicht das gleiche Feld verwendet werdensplit: das vierte Argument ist eine gawk-Erweiterungsplit: das vierte Argument ist kein Feldsplit: Null-String als drittes Argument ist eine gawk-Erweiterungsplit: das zweite Argument ist kein Feldsqrt: das Argument %g ist negativsqrt: das Argument ist keine Zahlsrand: das Argument ist keine ZahlStandardausgabeAnweisung hat keinen Effektstrftime: Formatwert in PROCINFO["strftime"] ist numerischen Typsstrftime: Der Format-String ist leerstrftime: Das zweite Argument ist keine Zahlstrftime: Das erste Argument ist kein Stringstrftime: das zweite Argument ist kleiner als 0 oder zu groß für time_tDer Index von Feld »%s« ist ein Nullstringsubstr: Länge %g am Start-Wert %g überschreitet die Länge des ersten Arguments (%lu)substr: Länge %g ist nicht >= 0substr: Länge %g ist nicht >= 1substr: Länge %g ist zu groß für Stringindizierung, wird auf %g gekürztsubstr: Nicht ganzzahlige Länge %g wird abgeschnittensubstr: Nicht ganzzahliger Start-Wert %g wird abgeschnittensubstr: Quellstring ist leersubstr: Start-Index %g ist ungültig, 1 wird verwendetsubstr: Start-Wert %g liegt hinter dem Ende des Stringssystem: Das Argument ist kein StringDer tawk-Modifizierer für reguläre Ausdrücke »/.../%c« funktioniert nicht in gawkes sind verdeckte Variablen vorhandentolower: das Argument ist kein StringZu viele Argumente für den FormatstringZu viele Pipes oder Eingabedateien offentoupper: das Argument ist kein String»--lint« wird abgeschaltet, da an »LINT« zugewiesen wirdUnerwarteter Zeilenumbruch oder Ende der ZeichenketteUnbekannter Knotentyp %dUnbekannter Opcode %dunbekannter Wert für eine Feldangabe: %d Unnötige Kombination von »>« und »>>« für Datei »%.*s«Nicht beendeter regulärer AusdruckNicht beendeter regulärer Ausdruck am DateiendeNicht beendeter regulärer Ausdruck (hört mit '\' auf) am Ende der DateiNicht beendete Zeichenketteunwind_stack: unerwarteter Typ »%s«Die Verwendung von »\#...« zur Fortsetzung von Zeilen ist nicht portabelFehlerhafte Verwendung von dcgettext(_"..."): Entfernen Sie den führenden UnterstrichFehlerhafte Verwendung von dcngettext(_"..."): Entfernen Sie den führenden UnterstrichVerwendung eines Nicht-Feldes als FeldWarnung: xor(%lf, %lf): Dezimalteil wird abgeschnittenxor(%lf, %lf: Negative Werte werden zu merkwürdigen Ergebnissen führenxor: das erste Argument ist keine Zahlxor: das zweite Argument ist keine Zahlgawk-4.0.1+dfsg.orig/po/fr.po0000644000175000017500000017571111734667243014763 0ustar schotschot# Messages français pour gawk. # This file is distributed under the same license as the gawk package. # 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, 2011. # 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-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: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: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:257 #, c-format msgid "attempt to use scalar `%s' as an array" msgstr "tentative d'utiliser le scalaire « %s » comme tableau" #: 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 "tentative d'utilisation du tableau « %s » dans un contexte scalaire" #: array.c:513 #, c-format msgid "reference to uninitialized element `%s[\"%.*s\"]'" msgstr "référence à un élément non initialisé « %s[\"%.*s\"] »" #: array.c:519 #, c-format msgid "subscript of array `%s' is null string" msgstr "l'indice du tableau « %s » est une chaîne vide" #: 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: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:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s : vide (vide)\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 : est un paramètre\n" #: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s : array_ref à %s\n" #: 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: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: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: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: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: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: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:828 #, c-format msgid "`next' used in %s action" msgstr "« next » est utilisé dans l'action %s" #: awkgram.y:836 msgid "`nextfile' is a gawk extension" msgstr "« nextfile » est une extension gawk" #: 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:925 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "dans BEGIN ou END, un « print » seul devrait sans doute être un « print " "\"\" »" #: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "« delete array » est une extension gawk" #: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "« delete(array) » est une extension non portable de tawk" #: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "impossible d'utiliser des tubes bidirectionnels en série" #: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "expression rationnelle à droite d'une affectation" #: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "expression rationnelle à gauche d'un opérateur « ~ » ou « !~ »" #: 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:1275 msgid "regular expression on right of comparison" msgstr "expression rationnelle à droite d'une comparaison" #: 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 "dans une action END, un « getline » non redirigé n'est pas défini" #: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" msgstr "l'ancien awk ne dispose pas des tableaux multidimensionnels" #: 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:1580 msgid "indirect function calls are a gawk extension" msgstr "les appels indirects de fonctions sont une extension gawk" #: 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:1671 msgid "invalid subscript expression" msgstr "expression indice non valide" #: 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: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: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:2620 #, c-format msgid "source file `%s' is empty" msgstr "le fichier source « %s » est vide" #: 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: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: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: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:2935 msgid "unterminated regexp" msgstr "expression rationnelle non refermée" #: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "expression rationnelle non refermée en fin de fichier" #: 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: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:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX n'autorise pas l'opérateur « **= »" #: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "l'ancien awk ne dispose pas de l'opérateur « **= »" #: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX n'autorise pas l'opérateur « ** »" #: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "l'ancien awk ne dispose pas de l'opérateur « ** »" #: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "l'ancien awk ne dispose pas de l'opérateur « ^= »" #: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "l'ancien awk ne dispose pas de l'opérateur « ^ »" #: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "chaîne non refermée" #: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "caractère non valide « %c » dans l'expression" #: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "« %s » est une extension gawk" #: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "« %s » est une extension Bell Labs" #: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX n'autorise pas « %s »" #: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "l'ancien awk ne dispose pas de « %s »" #: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "« goto est jugé dangereux ! » (Edsger W. Dijkstra)\n" #: 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: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: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: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 gawk" #: 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:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "utilisation incorrecte de dcngettext(_\"...\") : enlevez le souligné de tête" #: 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" #: 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:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "impossible d'ouvrir « %s » en écriture (%s)" #: 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:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s : échec de la fermeture (%s)" #: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadows_funcs() a été appelé deux fois !" #: awkgram.y:4176 msgid "there were shadowed variables." msgstr "il y avait des variables masquées." #: 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: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:4226 #, c-format msgid "function name `%s' previously defined" msgstr "nom de fonction « %s » déjà défini" #: 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:4403 #, c-format msgid "function `%s' defined but never called directly" msgstr "fonction « %s » définie mais jamais appelée directement" #: awkgram.y:4435 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "le paramètre #%d, une expr. rationnelle constante, fournit un booléen" #: awkgram.y:4544 #, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" "fonction « %s » appelée avec un espace entre son nom\n" "et « ( », ou utilisée comme variable ou tableau" #: awkgram.y:4791 eval.c:2056 msgid "division by zero attempted" msgstr "tentative de division par zéro" #: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "tentative de division par zéro dans « %% »" #: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "échec de %s vers « %s » (%s)" #: builtin.c:121 msgid "standard output" msgstr "sortie standard" #: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "exp : l'argument n'est pas numérique" #: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" msgstr "exp : l'argument %g est hors limite" #: 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: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" #: 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, ni un co-processus" #: builtin.c:333 msgid "index: received non-string first argument" msgstr "index : le premier argument n'est pas une chaîne" #: builtin.c:335 msgid "index: received non-string second argument" msgstr "index : le second argument n'est pas une chaîne" #: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int : l'argument n'est pas numérique" #: builtin.c:493 msgid "length: received array argument" msgstr "length : l'argument reçu est un tableau" #: builtin.c:496 msgid "`length(array)' is a gawk extension" msgstr "« length(tableau) » est une extension gawk" #: builtin.c:504 msgid "length: received non-string argument" msgstr "length : l'argument n'est pas une chaîne" #: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log : l'argument n'est pas numérique" #: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log : l'argument est négatif %g" #: builtin.c:694 builtin.c:699 msgid "fatal: must use `count$' on all formats or none" msgstr "" "fatal : « numéro$ » doit être utilisé pour toutes les formats ou pour aucun" #: builtin.c:762 #, c-format msgid "field width is ignored for `%%' specifier" msgstr "taille du champ de la spécification « %% » ignorée" #: builtin.c:764 #, c-format msgid "precision is ignored for `%%' specifier" msgstr "précision de la spécification « %% » ignorée" #: 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" #: builtin.c:817 msgid "fatal: `$' is not permitted in awk formats" msgstr "fatal : « $ » n'est pas autorisé dans les formats awk" #: builtin.c:826 msgid "fatal: arg count with `$' must be > 0" msgstr "fatal : le numéro d'argument de « $ » doit être > 0" #: builtin.c:830 #, c-format 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:834 msgid "fatal: `$' not permitted after period in format" msgstr "fatal : dans un format, « $ » ne doit pas suivre un point" #: 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:921 msgid "`l' is meaningless in awk formats; ignored" msgstr "« l » n'a aucun sens dans un format awk ; ignoré" #: 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:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "« L » n'a aucun sens dans un format awk ; ignoré" #: 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:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "« h » n'a aucun sens dans un format awk ; ignoré" #: 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:1272 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" 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 format inconnu « %c » ignoré : aucun argument converti" #: 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:1339 msgid "^ ran out for this one" msgstr "^ à court pour celui-ci" #: builtin.c:1346 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf : spécification de format sans lettre de contrôle" #: builtin.c:1349 msgid "too many arguments supplied for format string" msgstr "trop d'arguments pour la chaîne de formatage" #: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf : aucun argument" #: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt : l'argument n'est pas numérique" #: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt : appelé avec un argument négatif %g" #: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr : la longueur %g n'est pas >= 1" #: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr : la longueur %g n'est pas >= 0" #: 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: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: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: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: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)" # 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:1696 msgid "strftime: received empty format string" msgstr "strftime : la chaîne de formatage est vide" #: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime : l'argument n'est pas une chaîne" #: 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: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: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:2028 msgid "tolower: received non-string argument" msgstr "tolower : l'argument n'est pas une chaîne" #: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper : l'argument n'est pas une chaîne" #: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2 : le premier argument n'est pas numérique" #: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2 : le second argument n'est pas numérique" #: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin : l'argument n'est pas numérique" #: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos : l'argument n'est pas numérique" #: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand : l'argument n'est pas numérique" #: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match : le 3e argument n'est pas un tableau" #: 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:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift : le premier argument n'est pas numérique" #: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift : le second argument reçu n'est pas numérique" #: 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: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: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:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift : le premier argument n'est pas numérique" #: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift : le second argument reçu n'est pas numérique" #: 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: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: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:2850 msgid "and: received non-numeric first argument" msgstr "and : le premier argument n'est pas numérique" #: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and : le second argument reçu n'est pas numérique" #: 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: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:2885 msgid "or: received non-numeric first argument" msgstr "or : le premier argument n'est pas numérique" #: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or : le second argument reçu n'est pas numérique" #: 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: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:2923 msgid "xor: received non-numeric first argument" msgstr "xor : le premier argument n'est pas numérique" #: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor : le second argument reçu n'est pas numérique" #: 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: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:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl : l'argument n'est pas numérique" #: 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:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf) : les valeurs non entières seront tronquées" #: 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:412 #, c-format msgid "unknown nodetype %d" msgstr "type de nÅ“ud %d inconnu" #: 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:698 #, c-format 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:754 msgid "`BINMODE' is a gawk extension" msgstr "« BINMODE » est une extension gawk" #: eval.c:812 #, 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" #: eval.c:902 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "spécification de « %sFMT » erronée « %s »" #: 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: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: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: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:1179 msgid "attempt to field reference from null string" msgstr "tentative de référence à un champ via une chaîne nulle" #: eval.c:1185 #, c-format msgid "attempt to access field %ld" msgstr "tentative d'accès au champ %ld" #: 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:1437 #, c-format msgid "unwind_stack: unexpected type `%s'" msgstr "unwind_stack: type « %s » inattendu" #: eval.c:1532 msgid "division by zero attempted in `/='" msgstr "tentative de division par zéro dans « /= »" #: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "tentative de division par zéro dans « %%= »" #: eval.c:1876 eval.c:2122 #, c-format 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:1907 msgid "assignment used in conditional context" msgstr "affectation utilisée dans un contexte conditionnel" #: eval.c:1911 msgid "statement has no effect" msgstr "la déclaration est sans effet" #: eval.c:2343 #, 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" #: 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:2470 #, c-format msgid "function `%s' not defined" msgstr "fonction « %s » non définie" #: eval.c:2511 #, c-format msgid "non-redirected `getline' invalid inside `%s' rule" msgstr "un « getline » non redirigé n'est pas valable dans une règle « %s »" #: 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: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:2661 msgid "`exit' cannot be called in the current context" msgstr "« exit » ne peut pas être appelé dans ce contexte" #: eval.c:2700 #, c-format msgid "`next' cannot be called from a `%s' rule" msgstr "« next » ne peut pas être appelé depuis une règle « %s »" #: eval.c:2766 #, c-format msgid "Sorry, don't know how to interpret `%s'" msgstr "Désolé, je ne sais pas comment interpréter « %s »" #: ext.c:54 msgid "extensions are not allowed in sandbox mode" msgstr "les extensions sont interdites en isolement (mode sandbox)" #: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" msgstr "« extension » est une extension gawk" #: ext.c:75 #, c-format msgid "fatal: extension: cannot open `%s' (%s)\n" msgstr "fatal : extension : impossible d'ouvrir « %s » (%s)\n" #: ext.c:84 #, c-format msgid "" "fatal: extension: library `%s': does not define " "`plugin_is_GPL_compatible' (%s)\n" msgstr "" "fatal : extension : la bibliothèque « %s »ne définit pas " "« plugin_is_GPL_compatible » (%s)\n" #: 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: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:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "extension : impossible de redéfinir la fonction « %s »" #: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "extension : fonction « %s » est déjà définie" #: 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:156 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin : la fonction « %s » a un nombre négatif d'arguments" #: 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:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "fonction « %s » : argument #%d manquant" #: 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: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:296 msgid "Operation Not Supported" msgstr "Opération non disponible" #: field.c:328 msgid "NF set to negative value" msgstr "une valeur négative a été assignée à NF" #: 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 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: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: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:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "valeur de FIELDWIDTHS non valide, près de « %s »" #: 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: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 »" #: 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: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: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: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:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s : option non reconnue « --%s »\n" #: 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:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s : option non valide -- « %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 : l'option requiert un argument -- « %c »\n" #: 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: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: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: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:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "échec de la fermeture du fd %d (« %s ») : %s" #: io.c:578 msgid "redirection not allowed in sandbox mode" msgstr "les redirections sont interdites en isolement (mode sandbox)" #: 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: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: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: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:719 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "impossible d'ouvrir le tube « %s » en sortie (%s)" #: 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: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:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "impossible de rediriger depuis « %s » (%s)" #: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "impossible de rediriger vers « %s » (%s)" #: 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:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "échec de la fermeture de « %s » (%s)" #: io.c:912 msgid "too many pipes or input files open" msgstr "trop de fichiers d'entrées ou de tubes ouverts" #: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close : le second argument doit être « to » ou « from »" #: 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:956 msgid "close of redirection that was never opened" msgstr "fermeture d'une redirection qui n'a jamais été ouverte" #: 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é" #: 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: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:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "aucune fermeture explicite du connecteur « %s » fournie" #: 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:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "aucune fermeture explicite du tube « %s » fournie" #: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "aucune fermeture explicite du fichier « %s » fournie" #: 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: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:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "échec du vidage du tube « %s » (%s)." #: 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:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "échec du vidage vers le fichier « %s » (%s)" #: 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: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: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:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "nom de fichier spécial « %s » incomplet" #: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "un nom d'hôte distant doit être fourni à « /inet »" #: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "un port distant doit être fourni à « /inet »" #: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "les communications TCP/IP ne sont pas disponibles" #: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "impossible d'ouvrir « %s », mode « %s »" #: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "échec de la fermeture du pty maître (%s)" #: 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: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)" #: 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: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)" #: 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: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: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: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:1893 msgid "restoring stdin in parent process failed\n" msgstr "échec de la restauration du stdin dans le processus parent\n" #: 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:1973 msgid "`|&' not supported" msgstr "« |& » non disponible" #: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "impossible d'ouvrir le tube « %s » (%s)" #: 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:2520 #, c-format msgid "data file `%s' is empty" msgstr "le fichier de données « %s » est vide" #: 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:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "" "l'utilisation d'un « RS » de plusieurs caractères est une extension gawk" #: io.c:3232 msgid "IPv6 communication is not supported" msgstr "les communications IPv6 ne sont pas disponibles" #: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "l'option « -m[fr] » n'est pas pertinente en gawk" #: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "utilisation de l'option « -m » : « -m[fr] nnn »" #: 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:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s : l'option requiert un argument -- %c\n" #: 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:542 msgid "`--posix' overrides `--traditional'" msgstr "« --posix » prend le pas sur « --traditional »" #: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" "« --posix » et « --traditional » prennent le pas sur « --non-decimal-data »" #: 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: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:616 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "impossible d'activer le mode binaire sur stdout (%s)" #: 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:657 msgid "no program text at all!" msgstr "aucun programme !" #: 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: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:741 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "Options POSIX :\t\tOptions longues GNU : (standard)\n" #: 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: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=valeur\t\t--assign=var=valeur\n" #: main.c:745 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-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-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'programme'\t\t--source='programme'\n" #: main.c:751 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E fichier\t\t--exec=fichier\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\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: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" "Pour signaler une anomalie, consultez la section « Bugs » du fichier\n" "« gawk.info », qui est dans la section « Reporting Problems and Bugs »\n" "de la version imprimée.\n" "Pour signaler une erreur de traduction, envoyez un message à la liste\n" ".\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 est un langage de recherche et de traitement des motifs.\n" "Par défaut, il lit l'entrée standard et écrit sur la sortie standard.\n" "\n" #: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" "Exemples :\n" "\tgawk '{ somme += $1 }; END { print somme }' fichier\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 © 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" "Foundation ; soit selon la version 3 de cette licence, soit selon une\n" "version ultérieure de votre choix.\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 "" "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" "\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 "" "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: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: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" "\n" msgstr "" "%s : « %s » l'argument de « -v » ne respecte pas la forme « var=valeur »\n" "\n" #: 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: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: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:1269 msgid "fatal error: internal error" msgstr "fatal : erreur interne" #: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "fatal : erreur interne : erreur de segmentation" #: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "fatal : erreur interne : débordement de la pile" #: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "aucun descripteur fd %d pré-ouvert" #: 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" #: msg.c:63 #, c-format msgid "cmd. line:" msgstr "ligne de commande:" #: msg.c:107 msgid "error: " msgstr "erreur : " #: node.c:406 msgid "backslash at end of string" msgstr "barre oblique inverse à la fin de la chaîne" #: 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:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX n'autorise pas les séquences d'échappement « \\x »" #: 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:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " "expect" msgstr "" "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:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "séquence d'échappement « \\%c » traitée comme un simple « %c »" #: 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)." #: posix/gawkmisc.c:176 #, c-format 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)" #: posix/gawkmisc.c:188 #, c-format 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:83 #, c-format msgid "could not open `%s' for writing: %s" msgstr "impossible d'ouvrir « %s » en écriture : %s" #: profile.c:85 msgid "sending profile to standard error" msgstr "envoi du profil vers la sortie d'erreur standard" #: profile.c:203 #, c-format msgid "" "\t# %s block(s)\n" "\n" msgstr "" "\t# Bloc(s) %s\n" "\n" #: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" "\t# Règle(s)\n" "\n" #: profile.c:279 #, c-format msgid "internal error: %s with null vname" msgstr "erreur interne : %s avec un vname nul" #: 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" "\t# Functions, listed alphabetically\n" msgstr "" "\n" "\t# Fonctions, par ordre alphabétique\n" #: profile.c:1370 #, c-format msgid "redir2str: unknown redirection type %d" msgstr "redir2str : type de redirection %d inconnu" #: re.c:573 #, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "les plages « [%c-%c] » sont dépendantes des paramètres régionaux" #: 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:134 msgid "No match" msgstr "Aucune concordance" #: regcomp.c:137 msgid "Invalid regular expression" msgstr "Expression rationnelle non valide" #: regcomp.c:140 msgid "Invalid collation character" msgstr "Caractère d'interclassement non valide" #: regcomp.c:143 msgid "Invalid character class name" msgstr "Nom de classe de caractères non valide" #: regcomp.c:146 msgid "Trailing backslash" msgstr "Barre oblique inverse finale" #: regcomp.c:149 msgid "Invalid back reference" msgstr "Référence arrière non valide" #: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "[ ou [^ sans correspondance" #: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "( ou \\( sans correspondance" #: regcomp.c:158 msgid "Unmatched \\{" msgstr "\\{ sans correspondance" #: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Contenu de \\{\\} non valide" #: regcomp.c:164 msgid "Invalid range end" msgstr "Borne finale non valide" #: regcomp.c:167 msgid "Memory exhausted" msgstr "Mémoire épuisée" #: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Expression rationnelle précédente non valide" #: regcomp.c:173 msgid "Premature end of regular expression" msgstr "Fin prématurée de l'expression rationnelle" #: regcomp.c:176 msgid "Regular expression too big" msgstr "Expression rationnelle trop grande" #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") ou \\) sans correspondance" #: regcomp.c:700 msgid "No previous regular expression" msgstr "Aucune expression rationnelle précédente" #~ 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" gawk-4.0.1+dfsg.orig/po/pl.gmo0000644000175000017500000014500011734667243015117 0ustar schotschotÞ•ºì Q¼%% %%<%O%g%†%£%»%Í%Ü%÷%&&5&H&e&#z&+ž&Ê&é& ú&'"'?'T'f'…'% 'yÆ'+@(7l(<¤("á(-)2):I)3„)¸)Í)ã)õ)*#*,5*,b*'*-·* å*(+)/+&Y+(€+:©+%ä+ ,*,-J,'x, ,¾,+Û,(-]0.#Ž.².É.æ./[/$v/›/­/È/Ù/ò/û/020!L0"n0#‘0-µ0#ã01/"1'R1z1'‚1ëª1–2©2»2Í2 ß2Aì2A.3…p38ö35/4e4|43š4Î4"ç4! 55,5 b5ƒ5#¢58Æ5"ÿ5"6!@6b6 }6*ž6/É6(ù6""70E7.v7¥7&Å7"ì78*+8*V8#8(¥8Î8,ç8939&P9w9Š9!§92É98ü9(5:)^:8ˆ:8Á:"ú:#;9A;9{;#µ;$Ù;&þ;*%<+P<|<1˜<+Ê<&ö<-=5K=(=&ª=.Ñ=0>1>$L>q>>4°><å>#"?$F?,k?2˜?Ë?ë? @$%@#J@$n@1“@/Å@&õ@A)7A-aAA!ªAÌAìA*B1B#PB$tB5™BEÏB*C-@C nC-yC2§C.ÚC4 D$>D"cD$†D$«D#ÐDôD&E:E.RE$E¦E"ÁE#äE"F++F(WF/€F'°FØF"öF@G!ZG!|G"žGÁG+ÉG õG"H59H5oH'¥H8ÍH(I0/I7`I ˜I*¹I.äI.JBJ%^J+„J°J*¸J/ãJ0K0DK0uKD¦K%ëK(L?:LPzL/ËL>ûL4:M4oM?¤M?äM8$N)]N‡NF§NîNGOOO&WO6~OWµO/ P9=PwP=‘P>ÏP8QFGQ#ŽQ<²Q5ïQ6%R%\Rt‚R(÷RN SGoS)·S*áS, T"9T"\T$T¤TÄTáT$U &U"GU"jU5U;ÃUAÿU+AV,mV7šV)ÒV%üV>"W$aW.†W/µW3åW4X0NX'X(§X$ÐX5õX-+Y'YY'Y)©Y%ÓYùY Z1%Z4WZ(ŒZ0µZ8æZ&['F[1n[2 [<Ó[$\(5\)^\1ˆ\7º\'ò\(]<C]<€]>½])ü])&^)P^z^@š^'Û^_/_KH_”_&£_'Ê_(ò_/`&K`'r`(š`3Ã`9÷`91a6ka2¢a)Õa)ÿa1)b)[b*…b5°b;æbA"c+dc,c0½c!îc'd8d"Ud,xd¥d#¿d$ãd9e9Be;|e*¸e&ãe4 f&?f&ff#f$±fÖfæf?þf&>g.eg,”g;Ág&ýgJ$hohh?«h/ëh4i$Pi*ui, i$Íi2òi%j%Dj-jj"˜j%»j0áj#k6kJk!\k2~k±k"Åk0èkl"-l1Pl@‚lAÃlm m2)m8\m(•m)¾m×èmÀoÐo&àopp2pQpnp†p˜p§pÂpÓpäpqq0q#Eq/iq™q¶q ÇqÕqïq r!r13rer…r•¥r5;s<qsB®s4ñs-&t"TtLwtNÄtu'(uPubutuu-¥u-Óu"v.$v'Sv#{v.Ÿv$Îv#óvSw%kw‘w¬w8Çw1x2x Qx@rx@³xaôy#Vz"zz z¾zÞznþz2m{ {#¾{â{!ö{|()|R|n|-ˆ|"¶|#Ù|,ý|**}$U}3z}*®}Ù}%à}+~2Jf‚žI´AþÊ@€= ?I ‰!•L·‚!!‚(C‚5l‚$¢‚.Ç‚3ö‚@*ƒ kƒ!Œƒ%®ƒÔƒ$óƒ1„?J„4Š„(¿„8è„<!…#^…3‚…/¶…æ…1†17†)i†B“†Ö†Fï†"6‡Y‡'v‡ž‡!¶‡+؇4ˆ89ˆ9rˆ6¬ˆOãˆO3‰*ƒ‰'®‰PÖ‰P'Š+xŠ(¤Š+ÍŠ;ùŠ85‹n‹:Š‹'Å‹/í‹1Œ9OŒ(‰Œ(²Œ0ÛŒ2 ?-^Œ$«4ÐMŽ3SŽ3‡Ž>»ŽLúŽ2G$z%ŸCÅA AK>:Ì0‘%8‘2^‘<‘‘)Α0ø‘4)’*^’=‰’3Ç’Nû’NJ“G™“Rá“-4”2b”•”M¥”8ó”1,•5^•2”•0Ç•5ø•(.–'W–$–1¤–Ö–<ò–+/—[—"w—#š—"¾—*á—+ ˜D8˜:}˜¸˜%Ö˜Oü˜(L™@u™2¶™é™7ò™%*š,PšB}š?Àš4›I5›4›@´›<õ›&2œ3Yœ4œ5œ"øœ68R‹,œ1É2û2.ž2ažQ”ž)æž4ŸMEŸT“Ÿ>èŸ<' Ud Fº N¡OP¡A ¡7â¡1¢TL¢¡¢R»¢£D£`Y£º£R:¤G¤&Õ¤?ü¤?<¥B|¥O¿¥#¦63¦8j¦6£¦3Ú¦‰§-˜§qƧT8¨?¨<ͨ4 ©0?©&p©5—©%Í©#ó©0ª7Hª(€ª!©ª0˪7üª;4«Lp«<½«9ú«94¬.n¬:¬Dج7­]U­]³­f®fx®3ß®8¯4L¯3¯<µ¯2ò¯#%°$I°&n°3•°ɰã°Où°NI±1˜±-ʱ<ø±$5²%Z²?€².À²Kï²3;³,o³-œ³3ʳ7þ³86´5o´Q¥´Q÷´PIµ,šµ*ǵ.òµ2!¶VT¶/«¶Û¶4ô¶c)··)·6Ç·.þ·5-¸*c¸+ޏ,º¸=ç¸M%¹Ms¹FÁ¹<º2Eº2xºA«ºIíºI7»7»;¹»Lõ»<B¼9¼N¹¼8½@A½$‚½0§½@ؽ ¾;:¾,v¾N£¾Nò¾MA¿/¿)¿¿Gé¿'1À'YÀ1À2³ÀæÀ!ûÀIÁ0gÁ;˜ÁBÔÁ@Â,XÂX…Â#ÞÂ#ÃH&ÃMoÃU½Ã3ÄEGÄ;Ä7ÉÄDÅFÅ8eÅ:žÅ6ÙÅ8Æ4IÆ8~Æ·ÆÏÆ-âÆ2Ç#CÇ3gÇX›ÇôÇ% È63ÈBjÈC­È ñÈÉ4!É8VÉ9É6ÉɈC‰vÇ6?Ò)Ýl£Jl¤ã‹Kz­!2ôu©]·3¢³¼H”t¦ Šæì/‘4F¶ ye I «Ñ†»P,w˜ ŒN>Afo™•U^Q~ õ†9šºýð÷"å.Ö®pø :¢¿Óïþ$Gò¯:¸xü_¾Ãªú¥a–`’U„.c–¹f Ÿ=*î-û›;,6[j+‡ä>¨u=ŽSž©#cí¤yvYZbq(´s^… „™mÜ‘;dO®³~«*TŠkg4/CɈE_S&\ë2kpœè¦XB‹zÿMQ?ö²˜Žr 5½À µA‚Ëœ3hW¬{—<")°Ù5jš’}eo[ùF—W{X¡±1êâV“¹(•¬MJÁ&d“\@8G°žÏ…|D¶¡ƒÈ$²Í”#¯0·ÄihwL×9‚Z<gÕ!H8`ÛµV%Ð1¸qóÊnÎRŸxÌÚØbYŒ€R'ñÔ¥'E 7|±rÂinBtç-DaT£ÅºÞ}m¨ ­Pª‡N7á§K@§ƒL+ à%逛´‰O]IÆ0sß # %s block(s) # Rule(s) # gawk profile, created %s -C --copyright -E file --exec=file -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R file --command=file -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[file] --dump-variables[=file] -e 'program-text' --source='program-text' -f progfile --file=progfile -g --gen-pot -h --help -n --non-decimal-data -p[file] --profile[=file] -r --re-interval -t --lint-old -v var=val --assign=var=val # Function Call Stack: # Functions, listed alphabetically To report bugs, see node `Bugs' in `gawk.info', which is section `Reporting Problems and Bugs' in the printed version. %d is invalid as number of arguments for %s%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)%s blocks must have an action part%s third parameter is not a changeable object%s to "%s" failed (%s)%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk%s: `%s' argument to `-v' not in `var=value' form %s: array_ref to %s %s: close failed (%s)%s: empty (null) %s: empty (zero) %s: invalid option -- '%c' %s: is parameter %s: option '%c%s' doesn't allow an argument %s: option '--%s' doesn't allow an argument %s: option '--%s' requires an argument %s: option '-W %s' doesn't allow an argument %s: option '-W %s' is ambiguous %s: option '-W %s' requires an argument %s: option `-W %s' unrecognized, ignored %s: option requires an argument -- %c %s: option requires an argument -- '%c' %s: string literal as last arg of substitute has no effect%s: table_size = %d, array_size = %d %s: unrecognized option '%c%s' %s: unrecognized option '--%s' 'system' function not allowed in sandbox mode-Ft does not set FS to tab in POSIX awk-m option usage: `-m[fr] nnn'@include is a gawk extensionBINMODE value `%s' is invalid, treated as 3Copyright (C) 1989, 1991-%d Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Examples: gawk '{ sum += $1 }; END { print sum }' file gawk -F: '{ print $1 }' /etc/passwd IPv6 communication is not supportedInvalid back referenceInvalid character class nameInvalid collation characterInvalid content of \{\}Invalid multibyte data detected. There may be a mismatch between your data and your locale.Invalid preceding regular expressionInvalid range endInvalid regular expressionMemory exhaustedNF set to negative valueNo matchNo previous regular expressionOperation Not SupportedPOSIX does not allow `%s'POSIX does not allow `\x' escapesPOSIX does not allow operator `**'POSIX does not allow operator `**='POSIX options: GNU long options: (standard) Premature end of regular expressionRegular expression too bigShort options: GNU long options: (extensions) Sorry, don't know how to interpret `%s'SuccessTCP/IP communications are not supportedThis 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. Trailing backslashUnmatched ( or \(Unmatched ) or \)Unmatched [ or [^Unmatched \{Usage: %s [POSIX or GNU style options] -f progfile [--] file ... Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ... You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. [s]printf: format specifier does not have control letter[s]printf: value %g is out of range for `%%%c' format^ ran out for this one`%s' is a Bell Labs extension`%s' is a built-in function, it cannot be redefined`%s' is a gawk extension`%s' is invalid as a function name`%s' is not a legal variable name`%s' is not a variable name, looking for file `%s=%s'`%s' is not supported in old awk`--posix' overrides `--binary'`--posix' overrides `--traditional'`--posix'/`--traditional' overrides `--non-decimal-data'`-m[fr]' option irrelevant in gawk`BINMODE' is a gawk extension`FIELDWIDTHS' is a gawk extension`FPAT' is a gawk extension`IGNORECASE' is a gawk extension`L' is meaningless in awk formats; ignored`break' is not allowed outside a loop or switch`continue' is not allowed outside a loop`delete array' is a gawk extension`delete(array)' is a non-portable tawk extension`exit' cannot be called in the current context`extension' is a gawk extension`getline var' invalid inside `%s' rule`getline' invalid inside `%s' rule`goto' considered harmful! `h' is meaningless in awk formats; ignored`l' is meaningless in awk formats; ignored`length(array)' is a gawk extension`next' cannot be called from a `%s' rule`next' used in %s action`nextfile' cannot be called from a `%s' rule`nextfile' is a gawk extension`nextfile' used in %s action`return' used outside function context`|&' not supportedadump: argument not an arrayalready included source file `%s'and(%lf, %lf): fractional values will be truncatedand(%lf, %lf): negative values will give strange resultsand: received non-numeric first argumentand: received non-numeric second argumentasort: cannot use a subarray of first arg for second argasort: cannot use a subarray of second arg for first argasort: first argument not an arrayasort: second argument not an arrayasorti: cannot use a subarray of first arg for second argasorti: cannot use a subarray of second arg for first argasorti: first argument not an arrayasorti: second argument not an arrayassignment used in conditional contextatan2: received non-numeric first argumentatan2: received non-numeric second argumentattempt to access field %ldattempt to field reference from non-numeric valueattempt to field reference from null stringattempt to use a scalar value as arrayattempt to use array `%s' in a scalar contextattempt to use array `%s["%.*s"]' in a scalar contextattempt to use function `%s' as an arrayattempt to use scalar `%s' as an arrayattempt to use scalar `%s["%.*s"]' as an arrayattempt to use scalar parameter `%s' as an arraybackslash at end of stringbackslash not last character on linebad `%sFMT' specification `%s'buffer overflow in genflags2strcall of `length' without parentheses is not portablecan not use special variable `%s' for indirect function callcan't open pipe `%s' for input (%s)can't open pipe `%s' for output (%s)can't open source file `%s' for reading (%s)can't open two way pipe `%s' for input/output (%s)can't read sourcefile `%s' (%s)can't redirect from `%s' (%s)can't redirect to `%s' (%s)can't set binary mode on stderr (%s)can't set binary mode on stdin (%s)can't set binary mode on stdout (%s)can't use function name `%s' as variable or arraycannot create child process for `%s' (fork: %s)cannot open file `%s' for reading (%s)cannot open pipe `%s' (%s)cannot use function `%s' as variable namecannot use gawk builtin `%s' as variable nameclose of `%s' failed (%s).close of fd %d (`%s') failed (%s)close of master pty failed (%s)close of pipe failed (%s)close of redirection that was never openedclose of slave pty failed (%s)close of stdin in child failed (%s)close of stdout in child failed (%s)close: `%.*s' is not an open file, pipe or co-processclose: redirection `%s' not opened with `|&', second argument ignoredclose: second argument is a gawk extensionclose: second argument must be `to' or `from'cmd. line:co-process flush of pipe to `%s' failed (%s).command line argument `%s' is a directory: skippedcompl(%lf): fractional value will be truncatedcompl(%lf): negative value will give strange resultscompl: received non-numeric argumentcos: received non-numeric argumentcould not allocate more input memorycould not open `%s' for writing (%s)could not open `%s' for writing: %scould not open `%s', mode `%s'could not pre-open /dev/null for fd %ddata file `%s' is emptydcgettext: `%s' is not a valid locale categorydelete: index `%s' not in array `%s'division by zero attempteddivision by zero attempted in `%%'division by zero attempted in `%%='division by zero attempted in `/='duplicate `default' detected in switch bodyduplicate case values in switch body: %seach rule must have a pattern or an action partempty argument to `-e/--source' ignoredempty filename after @includeempty program text on command lineenvironment variable `POSIXLY_CORRECT' set: turning on `--posix'error reading input file `%s': %serror writing standard error (%s)error writing standard output (%s)error: escape sequence `\%c' treated as plain `%c'exp: argument %g is out of rangeexp: received non-numeric argumentexpression for `%s' redirection has null string valueexpression in `%s' redirection only has numeric valueextension: can't redefine function `%s'extension: can't use gawk built-in `%s' as function nameextension: function `%s' already definedextension: function name `%s' previously definedextension: illegal character `%c' in function name `%s'extension: missing function nameextensions are not allowed in sandbox modefailure status (%d) on file close of `%s' (%s)failure status (%d) on pipe close of `%s' (%s)fatal error: internal errorfatal error: internal error: segfaultfatal error: internal error: stack overflowfatal: fatal: `$' is not permitted in awk formatsfatal: `$' not permitted after period in formatfatal: `L' is not permitted in POSIX awk formatsfatal: `h' is not permitted in POSIX awk formatsfatal: `l' is not permitted in POSIX awk formatsfatal: arg count %ld greater than total number of supplied argumentsfatal: arg count with `$' must be > 0fatal: extension: cannot open `%s' (%s) fatal: extension: library `%s': cannot call function `%s' (%s) fatal: extension: library `%s': does not define `plugin_is_GPL_compatible' (%s) fatal: must use `count$' on all formats or nonefatal: no `$' supplied for positional field width or precisionfatal: not enough arguments to satisfy format stringfflush: `%s' is not an open file, pipe or co-processfflush: cannot flush: file `%s' opened for reading, not writingfflush: cannot flush: pipe `%s' opened for reading, not writingfield width and precision are ignored for `%%' specifierfield width is ignored for `%%' specifierfile flush of `%s' failed (%s).filename `%s' for `%s' redirection may be result of logical expressionfloating point exceptionfor loop: array `%s' changed size from %ld to %ld during loop executionfrom %sfunction `%s' called but never definedfunction `%s' called with more arguments than declaredfunction `%s' called with space between name and `(', or used as a variable or an arrayfunction `%s' defined but never called directlyfunction `%s' defined to take no more than %d argument(s)function `%s' not definedfunction `%s': argument #%d: attempt to use array as a scalarfunction `%s': argument #%d: attempt to use scalar as an arrayfunction `%s': can't use function name as parameter namefunction `%s': can't use special variable `%s' as a function parameterfunction `%s': missing argument #%dfunction `%s': parameter #%d, `%s', duplicates parameter #%dfunction `%s': parameter `%s' shadows global variablefunction called indirectly through `%s' does not existfunction name `%s' previously definedgawk is a pattern scanning and processing language. By default it reads standard input and writes standard output. gensub: third argument of 0 treated as 1hex escape \x%.*s of %d characters probably not interpreted the way you expectignoring unknown format specifier character `%c': no argument convertedindex: received non-string first argumentindex: received non-string second argumentindirect function calls are a gawk extensionint: received non-numeric argumentinternal error: %s with null vnameinvalid FIELDWIDTHS value, near `%s'invalid char '%c' in expressioninvalid subscript expressionlength: received array argumentlength: received non-string argumentlocal port %s invalid in `/inet'log: received negative argument %glog: received non-numeric argumentlshift(%lf, %lf): fractional values will be truncatedlshift(%lf, %lf): negative values will give strange resultslshift(%lf, %lf): too large shift value will give strange resultslshift: received non-numeric first argumentlshift: received non-numeric second argumentmake_builtin: negative argument count for function `%s'match: third argument is a gawk extensionmatch: third argument is not an arraymktime: at least one of the values is out of the default rangemktime: received non-string argumentmoving pipe to stdin in child failed (dup: %s)moving pipe to stdout in child failed (dup: %s)moving slave pty to stdin in child failed (dup: %s)moving slave pty to stdout in child failed (dup: %s)multicharacter value of `RS' is a gawk extensionmultistage two-way pipelines don't workmust supply a remote hostname to `/inet'must supply a remote port to `/inet'no (known) protocol supplied in special filename `%s'no explicit close of co-process `%s' providedno explicit close of file `%s' providedno explicit close of pipe `%s' providedno explicit close of socket `%s' providedno hex digits in `\x' escape sequenceno pre-opened fd %dno program text at all!non-redirected `getline' invalid inside `%s' rulenon-redirected `getline' undefined inside END actionnull string for `FS' is a gawk extensionold awk does not support multidimensional arraysold awk does not support multiple `BEGIN' or `END' rulesold awk does not support operator `**'old awk does not support operator `**='old awk does not support regexps as value of `FS'old awk does not support the `\%c' escape sequenceold awk does not support the keyword `in' except after `for'opcode %s not an operator or keywordoperator `^' is not supported in old awkoperator `^=' is not supported in old awkor(%lf, %lf): fractional values will be truncatedor(%lf, %lf): negative values will give strange resultsor: received non-numeric first argumentor: received non-numeric second argumentpatsplit: cannot use a subarray of fourth arg for second argpatsplit: cannot use a subarray of second arg for fourth argpatsplit: cannot use the same array for second and fourth argspatsplit: fourth argument is not an arraypatsplit: second argument is not an arraypatsplit: third argument must be non-nullpipe flush of `%s' failed (%s).plain `print' in BEGIN or END rule should probably be `print ""'precision is ignored for `%%' specifierprintf: no argumentsrange of the form `[%c-%c]' is locale dependentreached system limit for open files: starting to multiplex file descriptorsreason unknownredir2str: unknown redirection type %dredirection not allowed in sandbox modereference to uninitialized argument `%s'reference to uninitialized element `%s["%.*s"]'reference to uninitialized field `$%d'reference to uninitialized field `$%ld'reference to uninitialized variable `%s'regexp component `%.*s' should probably be `[%.*s]'regexp constant `/%s/' looks like a C comment, but is notregexp constant `//' looks like a C++ comment, but is notregexp constant for parameter #%d yields boolean valueregular expression on left of `~' or `!~' operatorregular expression on right of assignmentregular expression on right of comparisonremote host and port information (%s, %s) invalidrestoring stdin in parent process failed restoring stdout in parent process failed rshift(%lf, %lf): fractional values will be truncatedrshift(%lf, %lf): negative values will give strange resultsrshift(%lf, %lf): too large shift value will give strange resultsrshift: received non-numeric first argumentrshift: received non-numeric second argumentrunning %s setuid root may be a security problemsending profile to standard errorsending variable list to standard errorshadow_funcs() called twice!sin: received non-numeric argumentsort comparison function `%s' is not definedsource file `%s' is emptysource file does not end in newlinespecial file name `%s' is incompletesplit: cannot use a subarray of fourth arg for second argsplit: cannot use a subarray of second arg for fourth argsplit: cannot use the same array for second and fourth argssplit: fourth argument is a gawk extensionsplit: fourth argument is not an arraysplit: null string for third arg is a gawk extensionsplit: second argument is not an arraysqrt: called with negative argument %gsqrt: received non-numeric argumentsrand: received non-numeric argumentstandard outputstatement has no effectstrftime: format value in PROCINFO["strftime"] has numeric typestrftime: received empty format stringstrftime: received non-numeric second argumentstrftime: received non-string first argumentstrftime: second argument less than 0 or too big for time_tsubscript of array `%s' is null stringsubstr: length %g at start index %g exceeds length of first argument (%lu)substr: length %g is not >= 0substr: length %g is not >= 1substr: length %g too big for string indexing, truncating to %gsubstr: non-integer length %g will be truncatedsubstr: non-integer start index %g will be truncatedsubstr: source string is zero lengthsubstr: start index %g is invalid, using 1substr: start index %g is past end of stringsystem: received non-string argumenttawk regex modifier `/.../%c' doesn't work in gawkthere were shadowed variables.tolower: received non-string argumenttoo many arguments supplied for format stringtoo many pipes or input files opentoupper: received non-string argumentturning off `--lint' due to assignment to `LINT'unexpected newline or end of stringunknown nodetype %dunknown opcode %dunknown value for field spec: %d unnecessary mixing of `>' and `>>' for file `%.*s'unterminated regexpunterminated regexp at end of fileunterminated regexp ends with `\' at end of fileunterminated stringunwind_stack: unexpected type `%s'use of `\ #...' line continuation is not portableuse of dcgettext(_"...") is incorrect: remove leading underscoreuse of dcngettext(_"...") is incorrect: remove leading underscoreuse of non-array as arraywarning: xor(%lf, %lf): fractional values will be truncatedxor(%lf, %lf): negative values will give strange resultsxor: received non-numeric first argumentxor: received non-numeric second argumentProject-Id-Version: gawk 4.0.0h Report-Msgid-Bugs-To: arnold@skeeve.com POT-Creation-Date: 2012-03-28 22:03+0200 PO-Revision-Date: 2012-02-04 19:17+0100 Last-Translator: Wojciech Polak Language-Team: Polish Language: pl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); # %s blok(i) # ReguÅ‚a(i) # profil programu gawk, utworzony %s -C --copyright -E plik --exec=plik -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R plik --command=plik -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[plik] --dump-variables[=plik] -e 'tekst-programu' --source='tekst-programu' -f program --file=program -g --gen-pot -h --help -n --non-decimal-data -p[plik] --profile[=plik] -r --re-interval -t --lint-old -v zmienna=wartość --assign=zmienna=wartość # Stos WywoÅ‚awczy Funkcji: # Funkcje, spis alfabetyczny Aby zgÅ‚osić błąd, prosimy zobaczyć wÄ™zeÅ‚ `Bugs' w `gawk.info' lub rozdziaÅ‚ p.t. `Reporting Problems and Bugs' w wydrukowanej dokumentacji. %d jest nieprawidÅ‚owe jako liczba argumentów dla %s%s %s `%s': nie można uzyskać flag fd: (fcntl F_GETFD: %s)%s %s `%s': nie można ustawić close-on-exec: (fcntl F_SETFD: %s)%s bloków musi posiadać część dotyczÄ…cÄ… akcji%s trzeci parametr nie jest zmiennym obiektem%s do "%s" nie powiódÅ‚ siÄ™ (%s)%s: %d: modyfikator wyrażenia regularnego `/.../%c' tawk nie dziaÅ‚a w gawk%s: argument `%s' dla `-v' nie jest zgodny ze skÅ‚adniÄ… `zmienna=wartość' %s: array_ref do %s %s: zamkniÄ™cie nie powiodÅ‚o siÄ™ (%s)%s: pusty (null) %s: pusty (zero) %s: błędna opcja -- '%c' %s: jest parametrem %s: opcja '%c%s' nie może mieć argumentów %s: opcja '--%s' nie może mieć argumentów %s: opcja '--%s' wymaga argumentu %s: opcja '-W %s' nie może mieć argumentów %s: opcja '-W %s' jest niejednoznaczna %s: opcja '-W %s' wymaga argumentu %s: opcja `-W %s' nierozpoznana i zignorowana %s: opcja musi mieć argument -- %c %s: opcja wymaga argumentu -- '%c' %s: literaÅ‚ Å‚aÅ„cuchowy jako ostatni argument podstawienia nie ma żadnego efektu%s: table_size = %d, array_size = %d %s: nieznana opcja '%c%s' %s: nieznana opcja '--%s' funkcja 'system' nie jest dozwolona w trybie piaskownicy-Ft nie ustawia FS na znak tabulatora w POSIX awkużycie opcji -m: `-m[fr] nnn'@include jest rozszerzeniem gawkwartość BINMODE `%s' jest nieprawidÅ‚owa, przyjÄ™to jÄ… jako 3Copyright (C) 1989, 1991-%d Free Software Foundation. Ten program jest wolnym oprogramowaniem; możesz go rozprowadzać dalej i/lub modyfikować na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez FundacjÄ™ Wolnego Oprogramowania - wedÅ‚ug wersji 3-ciej tej Licencji lub którejÅ› z późniejszych wersji. PrzykÅ‚ady: gawk '{ suma += $1 }; END { print suma }' plik gawk -F: '{ print $1 }' /etc/passwd Komunikacja IPv6 nie jest wspieranaNieprawidÅ‚owe odwoÅ‚anie wsteczneNieprawidÅ‚owa nazwa klasy znakuNieprawidÅ‚owy znak porównaniaNieprawidÅ‚owa zawartość \{\}Wykryto nieprawidÅ‚owe dane. Możliwe jest niedopasowanie pomiÄ™dzy Twoimi danymi a ustawieniami regionalnymi.NieprawidÅ‚owe poprzedzajÄ…ce wyrażenie regularneNieprawidÅ‚owy koniec zakresuNieprawidÅ‚owe wyrażenie regularnePamięć wyczerpanaNF ustawiony na wartość ujemnÄ…Brak dopasowaniaBrak poprzedniego wyrażenia regularnegoOperacja nie jest wspieranaPOSIX nie zezwala na `%s'POSIX nie zezwala na sekwencjÄ™ ucieczki `\x'POSIX nie zezwala na operator `**'POSIX nie zezwala na operator `**='Opcje POSIX: DÅ‚ugie opcje GNU (standard): Przedwczesny koniec wyrażenia regularnegoWyrażenie regularne jest zbyt dużeKrótkie opcje: DÅ‚ugie opcje GNU: (rozszerzenia) Niestety nie wiem jak zinterpretować `%s'SukcesKomunikacja TCP/IP nie jest wspieranaTen program rozpowszechniany jest z nadziejÄ…, iż bÄ™dzie on użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyÅ›lnej gwarancji PRZYDATNOÅšCI HANDLOWEJ albo PRZYDATNOÅšCI DO OKREÅšLONYCH ZASTOSOWAŃ. W celu uzyskania bliższych informacji przeczytaj PowszechnÄ… LicencjÄ™ PublicznÄ… GNU. KoÅ„cowy znak backslashNiedopasowany znak ( lub \(Niedopasowany znak ) lub \)Niedopasowany znak [ lub [^Niedopasowany znak \{Użycie: %s [styl opcji POSIX lub GNU] -f plik_z_programem [--] plik ... Użycie: %s [styl opcji POSIX lub GNU] [--] %cprogram%c plik ... Z pewnoÅ›ciÄ… wraz z niniejszym programem otrzymaÅ‚eÅ› też egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeÅ›li zaÅ› nie - odwiedź stronÄ™ http://www.gnu.org/licenses/. [s]printf: specyfikator formatu nie posiada kontrolnej litery[s]printf: wartość %g jest poza zasiÄ™giem dla formatu `%%%c'zabrakÅ‚o ^`%s' jest rozszerzeniem Bell Labs`%s' jest funkcjÄ… wbudowanÄ…, wiÄ™c nie może zostać ponownie zdefiniowana`%s' jest rozszerzeniem gawknieprawidÅ‚owa nazwa funkcji `%s'`%s' nie jest dozwolonÄ… nazwÄ… zmiennej`%s' nie jest nazwÄ… zmiennej, szukanie pliku `%s=%s'`%s' nie jest wspierany w starym awkopcja `--posix' zostanie użyta nad `--binary'opcja `--posix' zostanie użyta nad `--traditional'`--posix'/`--traditional' użyte nad opcjÄ… `--non-decimal-data'nieistotna opcja `-m[fr]' w gawk`BINMODE' jest rozszerzeniem gawk`FIELDWIDTHS' jest rozszerzeniem gawk`FPAT' jest rozszerzeniem gawk`IGNORECASE' jest rozszerzeniem gawk`L' jest bezsensowny w formatach awk; zignorowanyinstrukcja `break' poza pÄ™tlÄ… lub switch'em jest niedozwolonainstrukcja `continue' poza pÄ™tlÄ… jest niedozwolona`delete tablica' jest rozszerzeniem gawk`delete(tablica)' jest nieprzenoÅ›nym rozszerzeniem tawkinstrukcja `exit' nie może być wywoÅ‚ana w tym kontekÅ›cie`extension' jest rozszerzeniem gawknieprawidÅ‚owy `getline var' wewnÄ…trz reguÅ‚y `%s'nieprawidÅ‚owy `getline' wewnÄ…trz reguÅ‚y `%s'`goto' uważane za szkodliwe! `h' jest bezsensowny w formatach awk; zignorowany`l' jest bezsensowny w formatach awk; zignorowany`length(tablica)' jest rozszerzeniem gawkinstrukcja `next' nie może być wywoÅ‚ana z wnÄ™trza reguÅ‚y `%s'`next' użyty w akcji %sinstrukcja `nextfile' nie może być wywoÅ‚ana z wnÄ™trza reguÅ‚y `%s'`nextfile' jest rozszerzeniem gawk`nextfile' użyty w akcji %s`return' użyty poza kontekstem funkcji`|&' nie jest wspieranyadump: argument nie jest tablicÄ…plik źródÅ‚owy `%s' jest już załączonyand(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™teand(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wynikiand: otrzymano pierwszy argument, który nie jest liczbÄ…and: otrzymano drugi argument, który nie jest liczbÄ…asort: nie można użyć podtablicy pierwszego argumentu dla drugiego argumentuasort: nie można użyć podtablicy drugiego argumentu dla pierwszego argumentuasort: pierwszy argument nie jest tablicÄ…asort: drugi argument nie jest tablicÄ…asorti: nie można użyć podtablicy pierwszego argumentu dla drugiego argumentuasorti: nie można użyć podtablicy drugiego argumentu dla pierwszego argumentuasorti: pierwszy argument nie jest tablicÄ…asorti: drugi argument nie jest tablicÄ…przypisanie użyte w kontekÅ›cie warunkowymatan2: otrzymano pierwszy argument, który nie jest liczbÄ…atan2: otrzymano drugi argument, który nie jest liczbÄ…próba dostÄ™pu do pola %ldpróba odwoÅ‚ania do pola poprzez nienumerycznÄ… wartośćpróba odwoÅ‚ania z zerowego Å‚aÅ„cuchapróba użycia wartoÅ›ci skalarnej jako tablicypróba użycia tablicy `%s' w kontekÅ›cie skalarupróba użycia tablicy `%s["%.*s"]' w kontekÅ›cie skalarupróba użycia funkcji `%s' jako tablicypróba użycia skalaru `%s' jako tablicypróba użycia skalaru `%s["%.*s"]' jako tablicypróba użycia parametru `%s' skalaru jako tablicybackslash na koÅ„cu Å‚aÅ„cuchabackslash nie jest ostatnim znakiem w wierszuzÅ‚a specyfikacja `%sFMT' `%s'przepeÅ‚nienie bufora w genflags2strwywoÅ‚anie `length' bez nawiasów jest nieprzenoÅ›nenie można użyć specjalnej zmiennej `%s' do poÅ›redniego wywoÅ‚ania funkcjinie można otworzyć potoku `%s' jako wejÅ›cia (%s)nie można otworzyć potoku `%s' jako wyjÅ›cia (%s)nie można otworzyć pliku źródÅ‚owego `%s' do czytania (%s)nie można otworzyć dwukierunkowego potoku `%s' jako wejÅ›cia/wyjÅ›cia (%s)nie można otworzyć pliku źródÅ‚owego `%s' (%s)nie można przekierować z `%s' (%s)nie można przekierować do `%s' (%s)nie można ustawić trybu binarnego na wyjÅ›ciu diagnostycznym (%s)nie można ustawić trybu binarnego na standardowym wejÅ›ciu (%s)nie można ustawić trybu binarnego na standardowym wyjÅ›ciu (%s)nie można użyć nazwy funkcji `%s' jako zmiennej lub tablicynie można utworzyć procesu potomnego dla `%s' (fork: %s)nie można otworzyć pliku `%s' do czytania (%s)nie można otworzyć potoku `%s' (%s)nie można użyć funkcji `%s' jako nazwy zmiennejnie można użyć wbudowanej w gawk `%s' jako nazwy zmiennejzamkniÄ™cie `%s' nie powiodÅ‚o siÄ™ (%s).zamkniÄ™cie fd %d (`%s') nie powiodÅ‚o siÄ™ (%s)zamkniÄ™cie nadrzÄ™dnego pty nie powiodÅ‚o siÄ™ (%s)zamkniÄ™cie potoku nie powiodÅ‚o siÄ™ (%s)zamkniÄ™cie przekierowania, które nigdy nie zostaÅ‚o otwartezamkniÄ™cie podlegÅ‚ego pty nie powiodÅ‚o siÄ™ (%s)zamkniÄ™cie standardowego wejÅ›cia w procesie potomnym nie powiodÅ‚o siÄ™ (%s)zamkniÄ™cie standardowego wyjÅ›cia w procesie potomnym nie powiodÅ‚o siÄ™ (%s)close: `%.*s' nie jest ani otwartym plikiem, ani potokiem, ani procesemclose: przekierowanie `%s' nie zostaÅ‚o otwarte z `|&', drugi argument zignorowanyclose: drugi argument jest rozszerzeniem gawkclose: drugim argumentem musi być `to' lub `from'linia poleceÅ„:opróżnienie potoku do `%s' przez proces pomocniczy nie powiodÅ‚o siÄ™ (%s).argument linii poleceÅ„ `%s' jest katalogiem: pominiÄ™tocompl(%lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™tecompl(%lf): ujemne wartoÅ›ci spowodujÄ… dziwne wynikicompl: otrzymano argument, który nie jest liczbÄ…cos: otrzymano argument, który nie jest liczbÄ…nie można zarezerwować wiÄ™cej pamiÄ™ci wejÅ›ciowejnie można otworzyć `%s' do zapisu (%s)nie można otworzyć `%s' do zapisu: %snie można otworzyć `%s', tryb `%s'nie można otworzyć zawczasu /dev/null dla fd %dplik danych `%s' jest pustydcgettext: `%s' nie jest prawidÅ‚owÄ… kategoriÄ… lokalizacjidelete: indeks `%s' nie jest w tablicy `%s'próba dzielenia przez zeropróba dzielenia przez zero w `%%'próba dzielenia przez zero w `%%='próba dzielenia przez zero w `/='wykryto powielony `default' w ciele switchpowielone wartoÅ›ci case w ciele switch: %skażda reguÅ‚a musi posiadać wzorzec lub część dotyczÄ…cÄ… akcjipusty argument dla opcji `-e/--source' zostaÅ‚ zignorowanypusta nazwa pliku po @includepusty tekst programu w linii poleceÅ„zmienna Å›rodowiskowa `POSIXLY_CORRECT' ustawiona: `--posix' zostaÅ‚ włączonybłąd podczas czytania z pliku `%s': %sbłąd podczas zapisu na standardowe wyjÅ›cie diagnostyczne (%s)błąd podczas zapisu na standardowe wyjÅ›cie (%s)błąd: sekwencja ucieczki `\%c' potraktowana jako zwykÅ‚e `%c'exp: argument %g jest poza zasiÄ™giemexp: otrzymano argument nie bÄ™dÄ…cy liczbÄ…wyrażenie dla przekierowania `%s' ma zerowÄ… wartość Å‚aÅ„cuchawyrażenie w przekierowaniu `%s' ma tylko wartość numerycznÄ…rozszerzenie: nie można zredefiniować funkcji `%s'rozszerzenie: nie można użyć wbudowanej w gawk `%s' jako nazwy funkcjirozserzenie: funkcja `%s' zostaÅ‚a już zdefiniowanarozserzenie: nazwa funkcji `%s' zostaÅ‚a zdefiniowana wczeÅ›niejrozszerzenie: nieprawidÅ‚owy znak `%c' w nazwie funkcji `%s'rozszerzenie: brakujÄ…ca nazwa funkcjirozszerzenia nie sÄ… dozwolone w trybie piaskownicystatus awarii (%d) podczas zamykania pliku `%s' (%s)status awarii (%d) podczas zamykania potoku `%s' (%s)fatalny błąd: wewnÄ™trzny błądfatalny błąd: wewnÄ™trzny błąd: błąd segmentacjifatalny błąd: wewnÄ™trzny błąd: przepeÅ‚nienie stosufatalny błąd: fatal: `$' jest niedozwolony w formatach awkfatal: `$' jest niedozwolony po kropce w formaciefatal: `L' jest niedozwolony w formatach POSIX awkfatal: `h' jest niedozwolony w formatach POSIX awkfatal: `l' jest niedozwolony w formatach POSIX awkfatal: argument count %ld wiÄ™kszy niż caÅ‚kowita suma argumentów dostarczonychfatal: argument count z `$' musi być > 0fatal: rozszerzenie: nie można otworzyć `%s' (%s) fatal: rozszerzenie: biblioteka `%s': nie można wywoÅ‚ać funkcji `%s' (%s) fatal: rozszerzenie: biblioteka `%s': nie definiuje `plugin_is_GPL_compatible' (%s) fatal: należy użyć `count$' we wszystkich formatach lub nicfatal: brak `$' dla pozycyjnej szerokoÅ›ci pola lub precyzjifatal: brak wystarczajÄ…cej liczby argumentów, aby zaspokoić Å‚aÅ„cuch formatujÄ…cyfflush: `%s' nie jest ani otwartym plikiem, ani potokiem, ani procesemfflush: nie można opróżnić: plik `%s' otwarty do czytania, a nie do zapisufflush: nie można opróżnić: potok `%s' otwarty do czytania, a nie do zapisuszerokość pola i precyzja sÄ… ignorowane dla specyfikatora `%%'szerokość pola jest ignorowana dla specyfikatora `%%'opróżnienie pliku `%s' nie powiodÅ‚o siÄ™ (%s).nazwa pliku `%s' dla przekierowania `%s' może być rezultatem logicznego wyrażeniawyjÄ…tek zmiennopozycyjnypÄ™tla for: tablica `%s' zmieniÅ‚a rozmiar z %ld do %ld podczas wykonywania pÄ™tliod %sfunkcja `%s' zostaÅ‚a wywoÅ‚ana, ale nigdy nie zostaÅ‚a zdefiniowanafunkcja `%s' zostaÅ‚a wywoÅ‚ana z wiÄ™kszÄ… iloÅ›ciÄ… argumentów niż zostaÅ‚o to zadeklarowanefunkcja `%s' zostaÅ‚a wywoÅ‚ana z biaÅ‚ymi znakami pomiÄ™dzy jej nazwÄ… a znakiem `(', lub użyta jako zmienna lub jako tablicafunkcja `%s' zostaÅ‚a zdefiniowana, ale nigdy nie zostaÅ‚a wywoÅ‚ana bezpoÅ›redniofunkcja `%s' zdefiniowana aby pobrać nie wiÄ™cej niż %d argument(ów)funkcja `%s' nie zostaÅ‚a zdefiniowanafunkcja `%s': argument #%d: próba użycia tablicy jako skalarufunkcja `%s': argument #%d: próba użycia skalaru jako tablicyfunkcja `%s': nie można użyć nazwy funkcji jako nazwy parametrufunkcja `%s': nie można użyć specjalnej zmiennej `%s' jako parametru funkcjifunkcja `%s': brakuje #%d argumentufunkcja `%s': parametr #%d, `%s', powiela parametr #%dfunkcja `%s': parametr `%s' zasÅ‚ania globalnÄ… zmiennÄ…poÅ›rednio wywoÅ‚ana funkcja poprzez `%s' nie istniejenazwa funkcji `%s' zostaÅ‚a zdefiniowana poprzedniogawk jest jÄ™zykiem skanowania i przetwarzania wzorców. Program domyÅ›lnie czyta standardowe wejÅ›cie i zapisuje standardowe wyjÅ›cie. gensub: trzeci argument 0 potraktowany jako 1szesnastkowa sekwencja ucieczki \x%.*s %d znaków prawdopodobnie nie zostaÅ‚a zinterpretowana jak tego oczekujeszpominiÄ™cie nieznanego formatu specyfikatora znaku `%c': nie skonwertowano argumentuindex: otrzymano pierwszy argument, który nie jest Å‚aÅ„cuchemindex: otrzymano drugi argument, który nie jest Å‚aÅ„cuchempoÅ›rednie wywoÅ‚ania funkcji sÄ… rozszerzeniem gawkint: otrzymano argument, który nie jest liczbÄ…wewnÄ™trzny błąd: %s z zerowym vnamenieprawidÅ‚owa wartość FIELDWIDTHS, w pobliżu `%s'nieprawidÅ‚owy znak '%c' w wyrażeniunieprawidÅ‚owe wyrażenie indeksowelength: otrzymano argument, który jest tablicÄ…length: otrzymano argument, który nie jest Å‚aÅ„cuchemnieprawidÅ‚owy lokalny port %s w `/inet'log: otrzymano ujemny argument %glog: otrzymano argument, który nie jest liczbÄ…lshift(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™telshift(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wynikilshift(%lf, %lf): zbyt duża wartość przesuniÄ™cia spowoduje dziwne wynikilshift: otrzymano pierwszy argument, który nie jest liczbÄ…lshift: otrzymano drugi argument, który nie jest liczbÄ…make_builtin: ujemny licznik argumentów dla funkcji `%s'match: trzeci argument jest rozszerzeniem gawkmatch: otrzymano trzeci argument, który nie jest tablicÄ…mktime: przynajmniej jedna z wartoÅ›ci jest poza domyÅ›lnym zakresemmktime: otrzymano argument, który nie jest Å‚aÅ„cuchemprzesuniÄ™cie potoku na standardowe wejÅ›cie w procesie potomnym nie powiodÅ‚o siÄ™ (dup: %s)przesuniÄ™cie potoku na standardowe wyjÅ›cie w procesie potomnym nie powiodÅ‚o siÄ™ (dup: %s)przesuniÄ™cie podlegÅ‚ego pty na standardowe wejÅ›cie w procesie potomnym nie powiodÅ‚o siÄ™ (dup: %s)przesuniÄ™cie podlegÅ‚ego pty na standardowe wyjÅ›cie w procesie potomnym nie powiodÅ‚o siÄ™ (dup: %s)wieloznakowa wartość `RS' jest rozszerzeniem gawkwieloetapowe dwukierunkowe linie potokowe nie dziaÅ‚ajÄ…należy dostarczyć nazwÄ™ zdalnego hosta do `/inet'należy dostarczyć numer zdalnego portu do `/inet'nie dostarczono (znanego) protokoÅ‚u w specjalnym pliku `%s'brak jawnego zamkniÄ™cia procesu pomocniczego `%s'brak jawnego zamkniÄ™cia pliku `%s'brak jawnego zamkniÄ™cia potoku `%s'brak jawnego zamkniÄ™cia gniazdka `%s'brak liczb szesnastkowych w sekwencji ucieczki `\x'brak już otwartego fd %dbrak tekstu programu!komenda `getline' bez przekierowania jest nieprawidÅ‚owa wewnÄ…trz reguÅ‚y `%s'komenda `getline' bez przekierowania nie jest zdefiniowana wewnÄ…trz akcji ENDzerowy Å‚aÅ„cuch dla `FS' jest rozszerzeniem gawkstary awk nie wspiera wielowymiarowych tablicstary awk nie wspiera wielokrotnych reguÅ‚ `BEGIN' lub `END'stary awk nie wspiera operatora `**'stary awk nie wspiera operatora `**='stary awk nie wspiera wyrażeÅ„ regularnych jako wartoÅ›ci `FS'stary awk nie wspiera sekwencji ucieczki `\%c'stary awk nie wspiera sÅ‚owa kluczowego `in', z wyjÄ…tkiem po sÅ‚owie `for'opcode %s nie jest operatorem ani sÅ‚owem kluczowymoperator `^' nie jest wspierany w starym awkoperator `^=' nie jest wspierany w starym awkor(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™teor(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wynikior: otrzymano pierwszy argument, który nie jest liczbÄ…or: otrzymano drugi argument, który nie jest liczbÄ…patsplit: nie można użyć podtablicy czwartego argumentu dla drugiego argumentupatsplit: nie można użyć podtablicy drugiego argumentu dla czwartego argumentupatsplit: nie można użyć tej samej tablicy dla drugiego i czwartego argumentupatsplit: czwarty argument nie jest tablicÄ…patsplit: drugi argument nie jest tablicÄ…patsplit: trzeci argument nie może być pustyopróżnienie potoku `%s' nie powiodÅ‚o siÄ™ (%s).zwykÅ‚y `print' w reguÅ‚ach BEGIN lub END powinien prawdopodobnie być jako `print ""'precyzja jest ignorowana dla specyfikatora `%%'printf: brak argumentówzasiÄ™g formy `[%c-%c]' jest zależny od lokalizacjiosiÄ…gniÄ™to systemowy limit otwartych plików: rozpoczÄ™cie multipleksowania deskryptorów plikównieznany powódredir2str: nieznany typ przekierowania %dprzekierowanie nie jest dozwolone w trybie piaskownicyodwoÅ‚anie do niezainicjowanego argumentu `%s'odwoÅ‚anie do niezainicjowanego elementu `%s["%.*s"]'odwoÅ‚anie do niezainicjowanego pola `$%d'odwoÅ‚anie do niezainicjowanego pola `$%ld'odwoÅ‚anie do niezainicjowanej zmiennej `%s'komponent regexp `%.*s' powinien być prawdopodobnie `[%.*s]'staÅ‚e wyrażenie regularne `/%s/' wyglÄ…da jak komentarz C, ale nim nie jeststaÅ‚e wyrażenie regularne `//' wyglÄ…da jak komentarz C++, ale nim nie jeststaÅ‚e wyrażenie regularne dla parametru #%d daje wartość logicznÄ…wyrażenie regularne po lewej stronie operatora `~' lub `!~'wyrażanie regularne po prawej stronie przypisaniawyrażenie regularne po prawej stronie porównaniainformacje o zdalnym hoÅ›cie i porcie sÄ… nieprawidÅ‚owe (%s, %s)odzyskanie standardowego wejÅ›cia w procesie potomnym nie powiodÅ‚o siÄ™ odzyskanie standardowego wyjÅ›cia w procesie potomnym nie powiodÅ‚o siÄ™ rshift(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™tershift(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wynikirshift(%lf, %lf): zbyt duża wartość przesuniÄ™cia spowoduje dziwne wynikirshift: otrzymano pierwszy argument, który nie jest liczbÄ…rshift: otrzymano drugi argument, który nie jest liczbÄ…uruchamianie %s setuid root może być problemem pod wzglÄ™dem bezpieczeÅ„stwawysyÅ‚anie profilu na standardowe wyjÅ›cie diagnostycznewysyÅ‚anie listy zmiennych na standardowe wyjÅ›cie diagnostyczneshadow_funcs() wywoÅ‚ana podwójnie!sin: otrzymano argument, który nie jest liczbÄ…funkcja porównujÄ…ca w sortowaniu `%s' nie zostaÅ‚a zdefiniownaplik źródÅ‚owy `%s' jest pustyplik źródÅ‚owy nie posiada na koÅ„cu znaku nowego wierszaspecjalna nazwa pliku `%s' jest niekompletnasplit: nie można użyć podtablicy czwartego argumentu dla drugiego argumentusplit: nie można użyć podtablicy drugiego argumentu dla czwartego argumentusplit: nie można użyć tej samej tablicy dla drugiego i czwartego argumentusplit: czwarty argument jest rozszerzeniem gawksplit: czwarty argument nie jest tablicÄ…split: zerowy Å‚aÅ„cuch dla trzeciego argumentu jest rozszerzeniem gawksplit: drugi argument nie jest tablicÄ…sqrt: wywoÅ‚ana z ujemnym argumentem %gsqrt: otrzymano argument, który nie jest liczbÄ…srand: otrzymano argument, który nie jest liczbÄ…standardowe wyjÅ›cieinstrukcja nie ma żadnego efektustrftime: wartość formatu w PROCINFO["strftime"] posiada typ numerycznystrftime: otrzymano pusty Å‚aÅ„cuch formatujÄ…cystrftime: otrzymano drugi argument, który nie jest liczbÄ…strftime: otrzymano pierwszy argument, który nie jest Å‚aÅ„cuchemstrftime: drugi argument mniejszy od 0 lub zbyt duży dla time_tindeks tablicy `%s' jest zerowym Å‚aÅ„cuchemsubstr: dÅ‚ugość %g zaczynajÄ…c od %g przekracza dÅ‚ugość pierwszego argumentu (%lu)substr: dÅ‚ugość %g nie jest >= 0substr: dÅ‚ugość %g nie jest >= 1substr: dÅ‚ugość %g zbyt duża dla indeksu Å‚aÅ„cucha, obcinanie do %gsubstr: dÅ‚ugość %g, która nie jest liczbÄ… caÅ‚kowitÄ…, zostanie obciÄ™tasubstr: poczÄ…tkowy indeks %g, który nie jest liczbÄ… caÅ‚kowitÄ…, zostanie obciÄ™tysubstr: Å‚aÅ„cuch źródÅ‚owy ma zerowÄ… dÅ‚ugośćsubstr: poczÄ…tkowy indeks %g jest nieprawidÅ‚owy, nastÄ…pi użycie 1substr: poczÄ…tkowy indeks %g leży poza koÅ„cem Å‚aÅ„cuchasystem: otrzymano argument, który nie jest Å‚aÅ„cuchemmodyfikator wyrażenia regularnego `/.../%c' tawk nie dziaÅ‚a w gawkwystÄ…piÅ‚y przykryte zmienne.tolower: otrzymano argument, który nie jest Å‚aÅ„cuchemzbyt dużo podanych argumentów w Å‚aÅ„cuchu formatujÄ…cymzbyt dużo otwartych potoków lub plików wejÅ›ciowychtoupper: otrzymano argument, który nie jest Å‚aÅ„cuchemwyłączenie `--lint' z powodu przypisania do `LINT'niespodziewany znak nowego wiersza lub koÅ„ca Å‚aÅ„cuchanieznany typ wÄ™zÅ‚a %dnieznany opcode %dnieznana wartość dla specyfikacji pola: %d niepotrzebne mieszanie `>' i `>>' dla pliku `%.*s'niezakoÅ„czone wyrażenie regularneniezakoÅ„czone wyrażenie regularne na koÅ„cu plikuniezakoÅ„czone prawidÅ‚owo wyrażenie regularne koÅ„czy siÄ™ znakiem `\' na koÅ„cu plikuniezakoÅ„czony Å‚aÅ„cuchunwind_stack: niespodziewany typ `%s'użycie `\ #...' kontynuacji linii nie jest przenoÅ›nenieprawidÅ‚owe użycie dcgettext(_"..."): usuÅ„ znak podkreÅ›lenianieprawidÅ‚owe użycie dcngettext(_"..."): usuÅ„ znak podkreÅ›leniaużycie nie-tablicy jako tablicyostrzeżenie: xor(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™texor(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wynikixor: otrzymano pierwszy argument, który nie jest liczbÄ…xor: otrzymano drugi argument, który nie jest liczbÄ…gawk-4.0.1+dfsg.orig/po/ChangeLog.00000644000175000017500000000677411573745035015723 0ustar schotschotWed 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. gawk-4.0.1+dfsg.orig/po/README0000644000175000017500000000074711557315036014661 0ustar schotschotSun 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 gawk-4.0.1+dfsg.orig/po/nl.gmo0000644000175000017500000014057311734667243015127 0ustar schotschotÞ•ºì Q¼%% %%<%O%g%†%£%»%Í%Ü%÷%&&5&H&e&#z&+ž&Ê&é& ú&'"'?'T'f'…'% 'yÆ'+@(7l(<¤("á(-)2):I)3„)¸)Í)ã)õ)*#*,5*,b*'*-·* å*(+)/+&Y+(€+:©+%ä+ ,*,-J,'x, ,¾,+Û,(-]0.#Ž.².É.æ./[/$v/›/­/È/Ù/ò/û/020!L0"n0#‘0-µ0#ã01/"1'R1z1'‚1ëª1–2©2»2Í2 ß2Aì2A.3…p38ö35/4e4|43š4Î4"ç4! 55,5 b5ƒ5#¢58Æ5"ÿ5"6!@6b6 }6*ž6/É6(ù6""70E7.v7¥7&Å7"ì78*+8*V8#8(¥8Î8,ç8939&P9w9Š9!§92É98ü9(5:)^:8ˆ:8Á:"ú:#;9A;9{;#µ;$Ù;&þ;*%<+P<|<1˜<+Ê<&ö<-=5K=(=&ª=.Ñ=0>1>$L>q>>4°><å>#"?$F?,k?2˜?Ë?ë? @$%@#J@$n@1“@/Å@&õ@A)7A-aAA!ªAÌAìA*B1B#PB$tB5™BEÏB*C-@C nC-yC2§C.ÚC4 D$>D"cD$†D$«D#ÐDôD&E:E.RE$E¦E"ÁE#äE"F++F(WF/€F'°FØF"öF@G!ZG!|G"žGÁG+ÉG õG"H59H5oH'¥H8ÍH(I0/I7`I ˜I*¹I.äI.JBJ%^J+„J°J*¸J/ãJ0K0DK0uKD¦K%ëK(L?:LPzL/ËL>ûL4:M4oM?¤M?äM8$N)]N‡NF§NîNGOOO&WO6~OWµO/ P9=PwP=‘P>ÏP8QFGQ#ŽQ<²Q5ïQ6%R%\Rt‚R(÷RN SGoS)·S*áS, T"9T"\T$T¤TÄTáT$U &U"GU"jU5U;ÃUAÿU+AV,mV7šV)ÒV%üV>"W$aW.†W/µW3åW4X0NX'X(§X$ÐX5õX-+Y'YY'Y)©Y%ÓYùY Z1%Z4WZ(ŒZ0µZ8æZ&['F[1n[2 [<Ó[$\(5\)^\1ˆ\7º\'ò\(]<C]<€]>½])ü])&^)P^z^@š^'Û^_/_KH_”_&£_'Ê_(ò_/`&K`'r`(š`3Ã`9÷`91a6ka2¢a)Õa)ÿa1)b)[b*…b5°b;æbA"c+dc,c0½c!îc'd8d"Ud,xd¥d#¿d$ãd9e9Be;|e*¸e&ãe4 f&?f&ff#f$±fÖfæf?þf&>g.eg,”g;Ág&ýgJ$hohh?«h/ëh4i$Pi*ui, i$Íi2òi%j%Dj-jj"˜j%»j0áj#k6kJk!\k2~k±k"Åk0èkl"-l1Pl@‚lAÃlm m2)m8\m(•m)¾m­èm–o ¨o¶oÖoéo>pEpdp|pŽp p¾pÏpàpýpq.q)Cq/mq-qËq Üqêq"r'r>ƒ,}ƒ&ªƒ<у8„#G„/k„+›„'Ç„-ï„-…'K…4s…!¨…8Ê…"†%&†-L†z†–†$´†2Ù†6 ‡"C‡"f‡X‰‡Xâ‡$;ˆ$`ˆY…ˆY߈%9‰%_‰5…‰$»‰$à‰Š6!Š)XŠ(‚Š1«Š9ÝŠ%‹%=‹-c‹0‘‹%‹/è‹!Œ :Œ9[ŒH•Œ*ÞŒ+ 15@g$¨Í í:Ž5IŽ6Ž:¶Ž3ñŽ-%S1r<¤ á83;o(г7Ó8 ‘6D‘O{‘.Ë‘/ú‘*’;9’5u’/«’3Û’“-“,I“)v“( “"É“4ì“!”7:”%r”˜”¨”À”Ù”&ñ”.•7G•-•­•$Í•Eò•-8–4f–0›–Ì–/Ó–.—2—>N—=—/Ë—Eû—*A˜5l˜2¢˜"Õ˜3ø˜<,™9i™£™.Á™+ð™š,%š7Rš2Šš2½š2ðšE#›3i›2›OЛZ œE{œCÁœ056UlRÂDž6Zž*‘žW¼žŸN3Ÿ‚Ÿ;‰Ÿ=ÅŸj Bn K± !ý @¡@`¡>¡¡Mà¡%.¢;T¢;¢4Ì¢*£†,£2³£bæ£II¤%“¤%¹¤4ߤ¥+0¥-\¥ Š¥«¥Å¥ã¥&¦*¦G¦5c¦9™¦@Ó¦%§%:§:`§-›§#ɧBí§0¨IP¨Jš¨Nå¨O4©4„©-¹©'ç©$ª?4ª6tª4«ª1àª3«'F«)n«˜«:¶«?ñ«01¬,b¬;¬%ˬ&ñ¬B­,[­<ˆ­,Å­$ò­%®1=®5o®!¥®!Ç®[é®[E¯[¡¯'ý¯'%°+M°'y°E¡°7ç°±Q7±L‰±Ö±'å±- ²0;²7l²-¤².Ò²2³H4³?}³=½³:û³26´)i´+“´/¿´4ï´5$µ5Zµ9µ@ʵ% ¶%1¶EW¶&¶.Ķ%ó¶·55·k·5„·(º·Xã·X<¸X•¸.î¸$¹=B¹$€¹¥¹ùà¹þ¹º:*ºeº'„º(¬ºFÕº#»Y@»š»¹»IØ»1"¼5T¼#м3®¼:â¼½4=½ r½ “½$´½)Ù½ ¾9$¾)^¾ˆ¾ž¾+²¾0Þ¾ ¿20¿Bc¿¦¿$º¿<ß¿=À>ZÀ"™À¼À2ËÀ6þÀ"5Á"XÁˆC‰vÇ6?Ò)Ýl£Jl¤ã‹Kz­!2ôu©]·3¢³¼H”t¦ Šæì/‘4F¶ ye I «Ñ†»P,w˜ ŒN>Afo™•U^Q~ õ†9šºýð÷"å.Ö®pø :¢¿Óïþ$Gò¯:¸xü_¾Ãªú¥a–`’U„.c–¹f Ÿ=*î-û›;,6[j+‡ä>¨u=ŽSž©#cí¤yvYZbq(´s^… „™mÜ‘;dO®³~«*TŠkg4/CɈE_S&\ë2kpœè¦XB‹zÿMQ?ö²˜Žr 5½À µA‚Ëœ3hW¬{—<")°Ù5jš’}eo[ùF—W{X¡±1êâV“¹(•¬MJÁ&d“\@8G°žÏ…|D¶¡ƒÈ$²Í”#¯0·ÄihwL×9‚Z<gÕ!H8`ÛµV%Ð1¸qóÊnÎRŸxÌÚØbYŒ€R'ñÔ¥'E 7|±rÂinBtç-DaT£ÅºÞ}m¨ ­Pª‡N7á§K@§ƒL+ à%逛´‰O]IÆ0sß # %s block(s) # Rule(s) # gawk profile, created %s -C --copyright -E file --exec=file -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R file --command=file -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[file] --dump-variables[=file] -e 'program-text' --source='program-text' -f progfile --file=progfile -g --gen-pot -h --help -n --non-decimal-data -p[file] --profile[=file] -r --re-interval -t --lint-old -v var=val --assign=var=val # Function Call Stack: # Functions, listed alphabetically To report bugs, see node `Bugs' in `gawk.info', which is section `Reporting Problems and Bugs' in the printed version. %d is invalid as number of arguments for %s%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)%s blocks must have an action part%s third parameter is not a changeable object%s to "%s" failed (%s)%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk%s: `%s' argument to `-v' not in `var=value' form %s: array_ref to %s %s: close failed (%s)%s: empty (null) %s: empty (zero) %s: invalid option -- '%c' %s: is parameter %s: option '%c%s' doesn't allow an argument %s: option '--%s' doesn't allow an argument %s: option '--%s' requires an argument %s: option '-W %s' doesn't allow an argument %s: option '-W %s' is ambiguous %s: option '-W %s' requires an argument %s: option `-W %s' unrecognized, ignored %s: option requires an argument -- %c %s: option requires an argument -- '%c' %s: string literal as last arg of substitute has no effect%s: table_size = %d, array_size = %d %s: unrecognized option '%c%s' %s: unrecognized option '--%s' 'system' function not allowed in sandbox mode-Ft does not set FS to tab in POSIX awk-m option usage: `-m[fr] nnn'@include is a gawk extensionBINMODE value `%s' is invalid, treated as 3Copyright (C) 1989, 1991-%d Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Examples: gawk '{ sum += $1 }; END { print sum }' file gawk -F: '{ print $1 }' /etc/passwd IPv6 communication is not supportedInvalid back referenceInvalid character class nameInvalid collation characterInvalid content of \{\}Invalid multibyte data detected. There may be a mismatch between your data and your locale.Invalid preceding regular expressionInvalid range endInvalid regular expressionMemory exhaustedNF set to negative valueNo matchNo previous regular expressionOperation Not SupportedPOSIX does not allow `%s'POSIX does not allow `\x' escapesPOSIX does not allow operator `**'POSIX does not allow operator `**='POSIX options: GNU long options: (standard) Premature end of regular expressionRegular expression too bigShort options: GNU long options: (extensions) Sorry, don't know how to interpret `%s'SuccessTCP/IP communications are not supportedThis 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. Trailing backslashUnmatched ( or \(Unmatched ) or \)Unmatched [ or [^Unmatched \{Usage: %s [POSIX or GNU style options] -f progfile [--] file ... Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ... You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. [s]printf: format specifier does not have control letter[s]printf: value %g is out of range for `%%%c' format^ ran out for this one`%s' is a Bell Labs extension`%s' is a built-in function, it cannot be redefined`%s' is a gawk extension`%s' is invalid as a function name`%s' is not a legal variable name`%s' is not a variable name, looking for file `%s=%s'`%s' is not supported in old awk`--posix' overrides `--binary'`--posix' overrides `--traditional'`--posix'/`--traditional' overrides `--non-decimal-data'`-m[fr]' option irrelevant in gawk`BINMODE' is a gawk extension`FIELDWIDTHS' is a gawk extension`FPAT' is a gawk extension`IGNORECASE' is a gawk extension`L' is meaningless in awk formats; ignored`break' is not allowed outside a loop or switch`continue' is not allowed outside a loop`delete array' is a gawk extension`delete(array)' is a non-portable tawk extension`exit' cannot be called in the current context`extension' is a gawk extension`getline var' invalid inside `%s' rule`getline' invalid inside `%s' rule`goto' considered harmful! `h' is meaningless in awk formats; ignored`l' is meaningless in awk formats; ignored`length(array)' is a gawk extension`next' cannot be called from a `%s' rule`next' used in %s action`nextfile' cannot be called from a `%s' rule`nextfile' is a gawk extension`nextfile' used in %s action`return' used outside function context`|&' not supportedadump: argument not an arrayalready included source file `%s'and(%lf, %lf): fractional values will be truncatedand(%lf, %lf): negative values will give strange resultsand: received non-numeric first argumentand: received non-numeric second argumentasort: cannot use a subarray of first arg for second argasort: cannot use a subarray of second arg for first argasort: first argument not an arrayasort: second argument not an arrayasorti: cannot use a subarray of first arg for second argasorti: cannot use a subarray of second arg for first argasorti: first argument not an arrayasorti: second argument not an arrayassignment used in conditional contextatan2: received non-numeric first argumentatan2: received non-numeric second argumentattempt to access field %ldattempt to field reference from non-numeric valueattempt to field reference from null stringattempt to use a scalar value as arrayattempt to use array `%s' in a scalar contextattempt to use array `%s["%.*s"]' in a scalar contextattempt to use function `%s' as an arrayattempt to use scalar `%s' as an arrayattempt to use scalar `%s["%.*s"]' as an arrayattempt to use scalar parameter `%s' as an arraybackslash at end of stringbackslash not last character on linebad `%sFMT' specification `%s'buffer overflow in genflags2strcall of `length' without parentheses is not portablecan not use special variable `%s' for indirect function callcan't open pipe `%s' for input (%s)can't open pipe `%s' for output (%s)can't open source file `%s' for reading (%s)can't open two way pipe `%s' for input/output (%s)can't read sourcefile `%s' (%s)can't redirect from `%s' (%s)can't redirect to `%s' (%s)can't set binary mode on stderr (%s)can't set binary mode on stdin (%s)can't set binary mode on stdout (%s)can't use function name `%s' as variable or arraycannot create child process for `%s' (fork: %s)cannot open file `%s' for reading (%s)cannot open pipe `%s' (%s)cannot use function `%s' as variable namecannot use gawk builtin `%s' as variable nameclose of `%s' failed (%s).close of fd %d (`%s') failed (%s)close of master pty failed (%s)close of pipe failed (%s)close of redirection that was never openedclose of slave pty failed (%s)close of stdin in child failed (%s)close of stdout in child failed (%s)close: `%.*s' is not an open file, pipe or co-processclose: redirection `%s' not opened with `|&', second argument ignoredclose: second argument is a gawk extensionclose: second argument must be `to' or `from'cmd. line:co-process flush of pipe to `%s' failed (%s).command line argument `%s' is a directory: skippedcompl(%lf): fractional value will be truncatedcompl(%lf): negative value will give strange resultscompl: received non-numeric argumentcos: received non-numeric argumentcould not allocate more input memorycould not open `%s' for writing (%s)could not open `%s' for writing: %scould not open `%s', mode `%s'could not pre-open /dev/null for fd %ddata file `%s' is emptydcgettext: `%s' is not a valid locale categorydelete: index `%s' not in array `%s'division by zero attempteddivision by zero attempted in `%%'division by zero attempted in `%%='division by zero attempted in `/='duplicate `default' detected in switch bodyduplicate case values in switch body: %seach rule must have a pattern or an action partempty argument to `-e/--source' ignoredempty filename after @includeempty program text on command lineenvironment variable `POSIXLY_CORRECT' set: turning on `--posix'error reading input file `%s': %serror writing standard error (%s)error writing standard output (%s)error: escape sequence `\%c' treated as plain `%c'exp: argument %g is out of rangeexp: received non-numeric argumentexpression for `%s' redirection has null string valueexpression in `%s' redirection only has numeric valueextension: can't redefine function `%s'extension: can't use gawk built-in `%s' as function nameextension: function `%s' already definedextension: function name `%s' previously definedextension: illegal character `%c' in function name `%s'extension: missing function nameextensions are not allowed in sandbox modefailure status (%d) on file close of `%s' (%s)failure status (%d) on pipe close of `%s' (%s)fatal error: internal errorfatal error: internal error: segfaultfatal error: internal error: stack overflowfatal: fatal: `$' is not permitted in awk formatsfatal: `$' not permitted after period in formatfatal: `L' is not permitted in POSIX awk formatsfatal: `h' is not permitted in POSIX awk formatsfatal: `l' is not permitted in POSIX awk formatsfatal: arg count %ld greater than total number of supplied argumentsfatal: arg count with `$' must be > 0fatal: extension: cannot open `%s' (%s) fatal: extension: library `%s': cannot call function `%s' (%s) fatal: extension: library `%s': does not define `plugin_is_GPL_compatible' (%s) fatal: must use `count$' on all formats or nonefatal: no `$' supplied for positional field width or precisionfatal: not enough arguments to satisfy format stringfflush: `%s' is not an open file, pipe or co-processfflush: cannot flush: file `%s' opened for reading, not writingfflush: cannot flush: pipe `%s' opened for reading, not writingfield width and precision are ignored for `%%' specifierfield width is ignored for `%%' specifierfile flush of `%s' failed (%s).filename `%s' for `%s' redirection may be result of logical expressionfloating point exceptionfor loop: array `%s' changed size from %ld to %ld during loop executionfrom %sfunction `%s' called but never definedfunction `%s' called with more arguments than declaredfunction `%s' called with space between name and `(', or used as a variable or an arrayfunction `%s' defined but never called directlyfunction `%s' defined to take no more than %d argument(s)function `%s' not definedfunction `%s': argument #%d: attempt to use array as a scalarfunction `%s': argument #%d: attempt to use scalar as an arrayfunction `%s': can't use function name as parameter namefunction `%s': can't use special variable `%s' as a function parameterfunction `%s': missing argument #%dfunction `%s': parameter #%d, `%s', duplicates parameter #%dfunction `%s': parameter `%s' shadows global variablefunction called indirectly through `%s' does not existfunction name `%s' previously definedgawk is a pattern scanning and processing language. By default it reads standard input and writes standard output. gensub: third argument of 0 treated as 1hex escape \x%.*s of %d characters probably not interpreted the way you expectignoring unknown format specifier character `%c': no argument convertedindex: received non-string first argumentindex: received non-string second argumentindirect function calls are a gawk extensionint: received non-numeric argumentinternal error: %s with null vnameinvalid FIELDWIDTHS value, near `%s'invalid char '%c' in expressioninvalid subscript expressionlength: received array argumentlength: received non-string argumentlocal port %s invalid in `/inet'log: received negative argument %glog: received non-numeric argumentlshift(%lf, %lf): fractional values will be truncatedlshift(%lf, %lf): negative values will give strange resultslshift(%lf, %lf): too large shift value will give strange resultslshift: received non-numeric first argumentlshift: received non-numeric second argumentmake_builtin: negative argument count for function `%s'match: third argument is a gawk extensionmatch: third argument is not an arraymktime: at least one of the values is out of the default rangemktime: received non-string argumentmoving pipe to stdin in child failed (dup: %s)moving pipe to stdout in child failed (dup: %s)moving slave pty to stdin in child failed (dup: %s)moving slave pty to stdout in child failed (dup: %s)multicharacter value of `RS' is a gawk extensionmultistage two-way pipelines don't workmust supply a remote hostname to `/inet'must supply a remote port to `/inet'no (known) protocol supplied in special filename `%s'no explicit close of co-process `%s' providedno explicit close of file `%s' providedno explicit close of pipe `%s' providedno explicit close of socket `%s' providedno hex digits in `\x' escape sequenceno pre-opened fd %dno program text at all!non-redirected `getline' invalid inside `%s' rulenon-redirected `getline' undefined inside END actionnull string for `FS' is a gawk extensionold awk does not support multidimensional arraysold awk does not support multiple `BEGIN' or `END' rulesold awk does not support operator `**'old awk does not support operator `**='old awk does not support regexps as value of `FS'old awk does not support the `\%c' escape sequenceold awk does not support the keyword `in' except after `for'opcode %s not an operator or keywordoperator `^' is not supported in old awkoperator `^=' is not supported in old awkor(%lf, %lf): fractional values will be truncatedor(%lf, %lf): negative values will give strange resultsor: received non-numeric first argumentor: received non-numeric second argumentpatsplit: cannot use a subarray of fourth arg for second argpatsplit: cannot use a subarray of second arg for fourth argpatsplit: cannot use the same array for second and fourth argspatsplit: fourth argument is not an arraypatsplit: second argument is not an arraypatsplit: third argument must be non-nullpipe flush of `%s' failed (%s).plain `print' in BEGIN or END rule should probably be `print ""'precision is ignored for `%%' specifierprintf: no argumentsrange of the form `[%c-%c]' is locale dependentreached system limit for open files: starting to multiplex file descriptorsreason unknownredir2str: unknown redirection type %dredirection not allowed in sandbox modereference to uninitialized argument `%s'reference to uninitialized element `%s["%.*s"]'reference to uninitialized field `$%d'reference to uninitialized field `$%ld'reference to uninitialized variable `%s'regexp component `%.*s' should probably be `[%.*s]'regexp constant `/%s/' looks like a C comment, but is notregexp constant `//' looks like a C++ comment, but is notregexp constant for parameter #%d yields boolean valueregular expression on left of `~' or `!~' operatorregular expression on right of assignmentregular expression on right of comparisonremote host and port information (%s, %s) invalidrestoring stdin in parent process failed restoring stdout in parent process failed rshift(%lf, %lf): fractional values will be truncatedrshift(%lf, %lf): negative values will give strange resultsrshift(%lf, %lf): too large shift value will give strange resultsrshift: received non-numeric first argumentrshift: received non-numeric second argumentrunning %s setuid root may be a security problemsending profile to standard errorsending variable list to standard errorshadow_funcs() called twice!sin: received non-numeric argumentsort comparison function `%s' is not definedsource file `%s' is emptysource file does not end in newlinespecial file name `%s' is incompletesplit: cannot use a subarray of fourth arg for second argsplit: cannot use a subarray of second arg for fourth argsplit: cannot use the same array for second and fourth argssplit: fourth argument is a gawk extensionsplit: fourth argument is not an arraysplit: null string for third arg is a gawk extensionsplit: second argument is not an arraysqrt: called with negative argument %gsqrt: received non-numeric argumentsrand: received non-numeric argumentstandard outputstatement has no effectstrftime: format value in PROCINFO["strftime"] has numeric typestrftime: received empty format stringstrftime: received non-numeric second argumentstrftime: received non-string first argumentstrftime: second argument less than 0 or too big for time_tsubscript of array `%s' is null stringsubstr: length %g at start index %g exceeds length of first argument (%lu)substr: length %g is not >= 0substr: length %g is not >= 1substr: length %g too big for string indexing, truncating to %gsubstr: non-integer length %g will be truncatedsubstr: non-integer start index %g will be truncatedsubstr: source string is zero lengthsubstr: start index %g is invalid, using 1substr: start index %g is past end of stringsystem: received non-string argumenttawk regex modifier `/.../%c' doesn't work in gawkthere were shadowed variables.tolower: received non-string argumenttoo many arguments supplied for format stringtoo many pipes or input files opentoupper: received non-string argumentturning off `--lint' due to assignment to `LINT'unexpected newline or end of stringunknown nodetype %dunknown opcode %dunknown value for field spec: %d unnecessary mixing of `>' and `>>' for file `%.*s'unterminated regexpunterminated regexp at end of fileunterminated regexp ends with `\' at end of fileunterminated stringunwind_stack: unexpected type `%s'use of `\ #...' line continuation is not portableuse of dcgettext(_"...") is incorrect: remove leading underscoreuse of dcngettext(_"...") is incorrect: remove leading underscoreuse of non-array as arraywarning: xor(%lf, %lf): fractional values will be truncatedxor(%lf, %lf): negative values will give strange resultsxor: received non-numeric first argumentxor: received non-numeric second argumentProject-Id-Version: gawk 4.0.0h Report-Msgid-Bugs-To: arnold@skeeve.com POT-Creation-Date: 2012-03-28 22:03+0200 PO-Revision-Date: 2012-01-30 20:40+0100 Last-Translator: Benno Schulenberg Language-Team: Dutch Language: nl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Lokalize 1.0 Plural-Forms: nplurals=2; plural=(n != 1); # %s-blok(ken) # Regel(s) # gawk-profiel, gemaakt op %s -C --copyright -E bestand --exec=bestand -F veldscheidingsteken --field-separator=veldscheidingsteken -L [fataal] --lint[=fataal] -N --use-lc-numeric -O --optimize -P --posix -R bestand --command=bestand -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[bestand] --dump-variables[=bestand] -e 'programmatekst' --source='programmatekst' -f programmabestand --file=programmabestand -g --gen-pot -h --help -n --non-decimal-data -p[bestand] --profile[=bestand] -r --re-interval -t --lint-old -v var=waarde --assign=var=waarde # Functieaanroepen-stack: # Functies, alfabetisch geordend Voor het rapporteren van programmagebreken, zie 'info gawk bugs' of de sectie 'Reporting Problems and Bugs' in de gedrukte versie. Meld fouten in de vertaling aan . %d is een ongeldig aantal argumenten voor %s%s %s '%s': kan bestandsdescriptorvlaggen niet verkrijgen: (fcntl F_GETFD: %s)%s %s '%s': kan 'close-on-exec' niet activeren: (fcntl F_SETFD: %s)%s-blokken horen een actiedeel te hebben%s: derde parameter is geen veranderbaar object%s naar "%s" is mislukt (%s)%s: %d: regexp-optie '/.../%c' van 'tawk' werkt niet in gawk%s: argument '%s' van '-v' is niet van de vorm 'var=waarde' %s: array-verwijzing naar %s %s: sluiten is mislukt (%s)%s: leeg (nil) %s: leeg (nul) %s: ongeldige optie -- '%c' %s: is een parameter %s: optie '%c%s' staat geen argument toe %s: optie '--%s' staat geen argument toe %s: optie '--%s' vereist een argument %s: optie '-W %s' staat geen argument toe %s: optie '-W %s' is niet eenduidig %s: optie '-W %s' vereist een argument %s: optie '-W %s' is onbekend; genegeerd %s: optie vereist een argument -- %c %s: optie vereist een argument -- '%c' %s: een stringwaarde als laatste vervangingsargument heeft geen effect%s: tabelgrootte = %d, arraygrootte = %d %s: onbekende optie '%c%s' %s: onbekende optie '--%s' 'system'-functie is niet toegestaan in sandbox-modus-Ft maakt van FS geen tab in POSIX-awkgebruikswijze van optie -m: '-m[fr] nnn''@include' is een gawk-uitbreidingBINMODE-waarde '%s' is ongeldig, wordt behandeld als 3Copyright (C) 1989, 1991-%d Free Software Foundation. Dit programma is vrije software; u mag het verder verspreiden en/of wijzigen onder de voorwaarden van de GNU General Public License zoals uitgegeven door de Free Software Foundation, naar keuze ofwel onder versie 3 of onder een nieuwere versie van die licentie. Voorbeelden: gawk '{ som += $1 }; END { print som }' bestand gawk -F: '{ print $1 }' /etc/passwd IPv6-communicatie wordt niet ondersteundOngeldige terugverwijzingOngeldige tekenklassenaamOngeldig samengesteld tekenOngeldige inhoud van \{\}Ongeldige multibyte-gegevens gevonden. Uw gegevens passen vermoedelijk niet bij uw taalregio.Ongeldige voorafgaande reguliere expressieOngeldig bereikeindeOngeldige reguliere expressieOnvoldoende geheugen beschikbaarNF is op een negatieve waarde gezetGeen overeenkomstenGeen eerdere reguliere expressieActie wordt niet ondersteundPOSIX staat '%s' niet toePOSIX staat stuurcode '\x' niet toePOSIX staat operator '**' niet toePOSIX staat operator '**=' niet toe POSIX-opties: Equivalente GNU-opties: (standaard) Voortijdig einde van reguliere expressieReguliere expressie is te groot Korte opties: Equivalente GNU-opties: (uitbreidingen) Kan '%s' niet interpreterenGeluktTCP/IP-communicatie wordt niet ondersteundDit programma wordt uitgegeven in de hoop dat het nuttig is, maar ZONDER ENIGE GARANTIE; zelfs zonder de impliciete garantie van VERKOOPBAARHEID of GESCHIKTHEID VOOR EEN BEPAALD DOEL. Zie de GNU General Public License voor meer details. Backslash aan het eindOngepaarde ( of \(Ongepaarde ) of \)Ongepaarde [ of [^Ongepaarde \{Gebruik: %s [opties] -f programmabestand [--] bestand... of: %s [opties] [--] %cprogrammatekst%c bestand... Bij dit programma hoort u een kopie van de GNU General Public License ontvangen te hebben; is dit niet het geval, dan kunt u deze licentie ook vinden op http://www.gnu.org/licenses/. [s]printf: opmaakaanduiding mist een stuurletter[s]printf: waarde %g ligt buiten toegestaan bereik voor opmaak '%%%c'niet genoeg ^ voor deze'%s' is een uitbreiding door Bell Labs'%s' is een ingebouwde functie en is niet te herdefiniëren'%s' is een gawk-uitbreiding'%s' is ongeldig als functienaam'%s' is geen geldige variabelenaam'%s' is geen variabelenaam; zoekend naar bestand '%s=%s'oude 'awk' kent '%s' niet'--posix' overstijgt '--binary''--posix' overstijgt '--traditional''--posix'/'--traditional' overstijgen '--non-decimal-data'optie '-m[fr]' is irrelevant in gawk'BINMODE' is een gawk-uitbreiding'FIELDWIDTHS' is een gawk-uitbreiding'FPAT' is een gawk-uitbreiding'IGNORECASE' is een gawk-uitbreiding'L' is betekenisloos in awk-opmaak; genegeerd'break' buiten een lus of 'switch'-opdracht is niet toegestaan'continue' buiten een lus is niet toegestaan'delete array' is een gawk-uitbreiding'delete(array)' is een niet-overdraagbare 'tawk'-uitbreiding'exit' kan niet aangeroepen worden in de huidige context'extension' is een gawk-uitbreiding'getline var' is ongeldig binnen een '%s'-regel'getline' is ongeldig binnen een '%s'-regel'goto' wordt als schadelijk beschouwd! 'h' is betekenisloos in awk-opmaak; genegeerd'l' is betekenisloos in awk-opmaak; genegeerd'length(array)' is een gawk-uitbreiding'next' kan niet aangeroepen worden in een '%s'-regel'next' wordt gebruikt in %s-actie'nextfile' kan niet aangeroepen worden in een '%s'-regel'nextfile' is een gawk-uitbreiding'nextfile' wordt gebruikt in %s-actie'return' wordt gebruikt buiten functiecontext'|&' wordt niet ondersteundadump: argument is geen arraybronbestand '%s' is reeds ingeslotenand(%lf, %lf): cijfers na de komma worden afgekaptand(%lf, %lf): negatieve waarden geven rare resultatenand: eerste argument is geen getaland: tweede argument is geen getalasort: een subarray van het eerste argument kan niet als tweede argument gebruikt wordenasort: een subarray van het tweede argument kan niet als eerste argument gebruikt wordenasort: eerste argument is geen arrayasort: tweede argument is geen arrayasorti: een subarray van het eerste argument kan niet als tweede argument gebruikt wordenasorti: een subarray van het tweede argument kan niet als eerste argument gebruikt wordenasorti: eerste argument is geen arrayasorti: tweede argument is geen arraytoewijzing wordt gebruikt in een conditionele contextatan2: eerste argument is geen getalatan2: tweede argument is geen getaltoegangspoging tot veld %ldveldverwijzingspoging via een waarde die geen getal isveldverwijzingspoging via een lege stringscalaire waarde wordt gebruikt als arrayarray '%s' wordt gebruikt in een scalaire contextarray '%s["%.*s"]' wordt gebruikt in een scalaire contextfunctie '%s' wordt gebruikt als arrayscalair '%s' wordt gebruikt als arrayscalair '%s["%.*s"]' wordt gebruikt als arrayscalaire parameter '%s' wordt gebruikt als arraybackslash aan het einde van de stringbackslash is niet het laatste teken op de regelonjuiste opgave van '%sFMT': '%s'bufferoverloop in genflags2str()aanroep van 'length' zonder haakjes is niet overdraagbaarkan speciale variabele '%s' niet voor indirecte functieaanroep gebruikenkan pijp '%s' niet openen voor invoer (%s)kan pijp '%s' niet openen voor uitvoer (%s)kan bronbestand '%s' niet openen om te lezen (%s)kan tweerichtings-pijp '%s' niet openen voor in- en uitvoer (%s)kan bronbestand '%s' niet lezen (%s)kan niet omleiden van '%s' (%s)kan niet omleiden naar '%s' (%s)kan standaardfoutuitvoer niet in binaire modus zetten (%s)kan standaardinvoer niet in binaire modus zetten (%s)kan standaarduitvoer niet in binaire modus zetten (%s)kan functienaam '%s' niet als variabele of array gebruikenkan voor '%s' geen dochterproces starten (fork: %s)kan bestand '%s' niet openen om te lezen (%s)kan pijp '%s' niet openen (%s)kan functie '%s' niet als variabelenaam gebruikenkan in gawk ingebouwde '%s' niet als variabelenaam gebruikensluiten van '%s' is mislukt (%s)sluiten van bestandsdescriptor %d ('%s') is mislukt (%s)kan meester-pty van dochterproces niet sluiten (%s)kan pijp niet sluiten (%s)sluiten van een nooit-geopende omleidingkan slaaf-pty niet sluiten (%s)kan standaardinvoer van dochterproces niet sluiten (%s)kan standaarduitvoer van dochterproces niet sluiten (%s)close: '%.*s' is geen open bestand, pijp, of co-procesclose: omleiding '%s' is niet geopend met '|&'; tweede argument wordt genegeerdclose: tweede argument is een gawk-uitbreidingclose: tweede argument moet 'to' of 'from' zijncommandoregel:leegmaken door co-proces van pijp naar '%s' is mislukt (%s)opdrachtregelargument '%s' is een map -- overgeslagencompl(%lf): cijfers na de komma worden afgekaptcompl(%lf): negatieve waarden geven rare resultatencompl: argument is geen getalcos: argument is geen getalkan geen extra invoergeheugen meer toewijzenkan '%s' niet openen om te schrijven (%s)kan '%s' niet openen om te schrijven: %skan '%s' niet openen -- modus '%s'kan /dev/null niet openen voor bestandsdescriptor %ddatabestand '%s' is leegdcgettext: '%s' is geen geldige taalregio-deelcategoriedelete: index '%s' niet in array '%s'deling door nuldeling door nul in '%%'deling door nul in '%%='deling door nul in '/='dubbele 'default' in 'switch'-opdrachtdubbele 'case'-waarde in 'switch'-opdracht: %selke regel hoort een patroon of een actiedeel te hebbenargument van '-e/--source' is leeg; genegeerdlege bestandsnaam na '@include'lege programmatekst op commandoregelomgevingsvariabele 'POSIXLY_CORRECT' is gezet: '--posix' ingeschakeldfout tijdens lezen van invoerbestand '%s': %sfout tijdens schrijven van standaardfoutuitvoer (%s)fout tijdens schrijven van standaarduitvoer (%s)fout: stuurcodereeks '\%c' behandeld als normale '%c'exp: argument %g ligt buiten toegestane bereikexp: argument is geen getalexpressie voor omleiding '%s' heeft een lege string als waardeexpressie in omleiding '%s' heeft alleen een getal als waardeextension: kan functie '%s' niet herdefiniërenextension: kan in gawk ingebouwde '%s' niet als functienaam gebruikenextension: functie '%s' is al gedefinieerdextension: functienaam '%s' is al eerder gedefinieerdextension: ongeldig teken '%c' in functienaam '%s'extension: ontbrekende functienaamuitbreidingen zijn niet toegestaan in sandbox-modusafsluitwaarde %d bij mislukte sluiting van bestand '%s' (%s)afsluitwaarde %d bij mislukte sluiting van pijp '%s' (%s)fatale fout: **interne fout**fatale fout: **interne fout**: segmentatiefoutfatale fout: **interne fout**: stack is volfataal: fataal: '$' is niet toegestaan in awk-opmaakfataal: '$' is niet toegestaan na een punt in de opmaakfataal: 'L' is niet toegestaan in POSIX awk-opmaakfataal: 'h' is niet toegestaan in POSIX awk-opmaakfataal: 'l' is niet toegestaan in POSIX awk-opmaakfataal: argumentental %ld is groter dan het gegeven aantal argumentenfataal: het aantal argumenten met '$' moet > 0 zijnfatale fout: extension: kan '%s' niet openen (%s) fatale fout: extension: bibliotheek '%s': kan functie '%s' niet aanroepen (%s) fatale fout: extension: bibliotheek '%s': definieert 'plugin_is_GPL_compatible' niet (%s) fataal: 'count$' hoort in alle opmaken gebruikt te worden, of in geenfataal: geen '$' opgegeven bij positionele veldbreedte of -precisiefataal: niet genoeg argumenten voor opmaakstringfflush: '%s' is geen open bestand, pijp, of co-procesfflush: kan bestand niet leegmaken: '%s' is geopend om te lezen, niet om te schrijvenfflush: kan pijp niet leegmaken: '%s' is geopend om te lezen, niet om te schrijvenveldbreedte en -precisie worden genegeerd voor opmaakaanduiding '%%'veldbreedte wordt genegeerd voor opmaakaanduiding '%%'leegmaken van bestand '%s' is mislukt (%s)bestandsnaam '%s' voor omleiding '%s' kan het resultaat zijn van een logische expressiedrijvendekomma-berekeningsfoutfor: array '%s' veranderde van grootte %ld naar %ld tijdens uitvoer van de lusvan %sfunctie '%s' wordt aangeroepen maar is nergens gedefinieerdfunctie '%s' aangeroepen met meer argumenten dan gedeclareerdfunctie '%s' wordt aangeroepen met een spatie tussen naam en '(', of wordt gebruikt als variabele of arrayfunctie '%s' is gedefinieerd maar wordt nergens direct aangeroepenfunctie '%s' is gedefinieerd om niet meer dan %d argument(en) te accepterenfunctie '%s' is niet gedefinieerdfunctie '%s': argument #%d: een array wordt gebruikt als scalairfunctie '%s': argument #%d: een scalair wordt gebruikt als arrayfunctie '%s': kan functienaam niet als parameternaam gebruikenfunctie '%s': kan speciale variabele '%s' niet als functieparameter gebruikenfunctie '%s': ontbrekend argument #%dfunctie '%s': parameter #%d, '%s', dupliceert parameter #%dfunctie '%s': parameter '%s' schaduwt een globale variabeleindirect (via '%s') aangeroepen functie bestaat nietfunctienaam '%s' is al eerder gedefinieerd'gawk' is een patroonherkennings- en bewerkingsprogramma. Standaard leest het van standaardinvoer en schrijft naar standaarduitvoer. gensub: derde argument is 0; wordt beschouwd als 1hexadecimale stuurcode \x%.*s van %d tekens wordt waarschijnlijk niet afgehandeld zoals u verwachtonbekend opmaakteken '%c' wordt genegeerd: geen argument is geconverteerdindex: eerste argument is geen stringindex: tweede argument is geen stringindirecte functieaanroepen zijn een gawk-uitbreidingint: argument is geen getal**interne fout**: %s heeft een lege 'vname'ongeldige waarde voor FIELDWIDTHS, nabij '%s'ongeldig teken '%c' in expressieongeldige index-expressielength: argument is een arraylength: argument is geen stringlokale poort %s is ongeldig in '/inet'log: argument %g is negatieflog: argument is geen getallshift(%lf, %lf): cijfers na de komma worden afgekaptlshift(%lf, %lf): negatieve waarden geven rare resultatenlshift(%lf, %lf): te grote opschuifwaarden geven rare resultatenlshift: eerste argument is geen getallshift: tweede argument is geen getalmake_builtin: negatief aantal argumenten voor functie '%s'match: derde argument is een gawk-uitbreidingmatch: derde argument is geen arraymktime: minstens één van waarden valt buiten het standaardbereikmktime: argument is geen stringkan pijp niet overzetten naar standaardinvoer van dochterproces (dup: %s)kan pijp niet overzetten naar standaarduitvoer van dochterproces (dup: %s)kan slaaf-pty niet overzetten naar standaardinvoer van dochterproces (dup: %s)kan slaaf-pty niet overzetten naar standaarduitvoer van dochterproces (dup: %s)een 'RS' van meerdere tekens is een gawk-uitbreidingmeerfase-tweerichtings-pijplijnen werken niet'/inet' heeft een gindse hostnaam nodig'/inet' heeft een gindse poort nodiggeen (bekend) protocol aangegeven in speciale bestandsnaam '%s'geen expliciete sluiting van co-proces '%s' aangegevengeen expliciete sluiting van bestand '%s' aangegevengeen expliciete sluiting van pijp '%s' aangegevengeen expliciete sluiting van socket '%s' aangegevengeen hex cijfers in stuurcodereeks '\x'geen reeds-geopende bestandsdescriptor %dhelemaal geen programmatekst!niet-omgeleide 'getline' is ongeldig binnen een '%s'-regelniet-omgeleide 'getline' is ongedefinieerd binnen een END-actieeen lege string als 'FS' is een gawk-uitbreidingoude 'awk' kent geen meerdimensionale arraysoude 'awk' staat meerdere 'BEGIN'- en 'END'-regels niet toeoude 'awk' kent de operator '**' nietoude 'awk' kent de operator '**=' nietoude 'awk' staat geen reguliere expressies toe als waarde van 'FS'oude 'awk' kent de stuurcodereeks '\%c' nietoude 'awk' kent het sleutelwoord 'in' niet, behalve na 'for'opcode %s is geen operator noch sleutelwoordoude 'awk' kent de operator '^' nietoude 'awk' kent de operator '^=' nietor(%lf, %lf): cijfers na de komma worden afgekaptor(%lf, %lf): negatieve waarden geven rare resultatenor: eerste argument is geen getalor: tweede argument is geen getalpatsplit: een subarray van het vierde argument kan niet als tweede argument gebruikt wordenpatsplit: een subarray van het tweede argument kan niet als vierde argument gebruikt wordenpatsplit: hetzelfde array kan niet zowel als tweede als als vierde argument gebruikt wordenpatsplit: vierde argument is geen arraypatsplit: tweede argument is geen arraypatsplit: derde argument moet niet-nil zijnleegmaken van pijp '%s' is mislukt (%s)kale 'print' in BEGIN- of END-regel moet vermoedelijk 'print ""' zijnveldprecisie wordt genegeerd voor opmaakaanduiding '%%'printf: geen argumentende betekenis van een bereik van de vorm '[%c-%c]' is afhankelijk van de taalregiosysteemgrens voor aantal open bestanden is bereikt: begonnen met multiplexenreden onbekendredir2str(): onbekend omleidingstype %domleiding is niet toegestaan in sandbox-modusverwijzing naar ongeïnitialiseerd argument '%s'verwijzing naar ongeïnitialiseerd element '%s["%.*s"]'verwijzing naar ongeïnitialiseerd veld '$%d'verwijzing naar ongeïnitialiseerd veld '$%ld'verwijzing naar ongeïnitialiseerde variabele '%s'component '%.*s' van reguliere expressie moet vermoedelijk '[%.*s]' zijnregexp-constante '/%s/' lijkt op C-commentaar, maar is het nietregexp-constante '//' lijkt op C-commentaar, maar is het nietregexp-constante als parameter #%d levert booleanwaarde opreguliere expressie links van operator '~' of '!~'reguliere expressie rechts van toewijzingreguliere expressie rechts van vergelijkinghost- en poortinformatie (%s, %s) zijn ongeldigkan standaardinvoer van ouderproces niet herstellen kan standaarduitvoer van ouderproces niet herstellen rshift(%lf, %lf): cijfers na de komma worden afgekaptrshift(%lf, %lf): negatieve waarden geven rare resultatenrshift(%lf, %lf): te grote opschuifwaarden geven rare resultatenrshift: eerste argument is geen getalrshift: tweede argument is geen getalhet uitvoeren van %s als 'setuid root' kan een veiligheidsrisico zijnprofiel gaat naar standaardfoutuitvoervariabelenlijst gaat naar standaardfoutuitvoershadow_funcs() twee keer aangeroepen!sin: argument is geen getalsorteervergelijkingsfunctie '%s' is niet gedefinieerdbronbestand '%s' is leegbronbestand eindigt niet met een regeleindeteken (LF)speciale bestandsnaam '%s' is onvolledigsplit: een subarray van het vierde argument kan niet als tweede argument gebruikt wordensplit: een subarray van het tweede argument kan niet als vierde argument gebruikt wordensplit: hetzelfde array kan niet zowel als tweede als als vierde argument gebruikt wordensplit: vierde argument is een gawk-uitbreidingsplit: vierde argument is geen arraysplit: lege string als derde argument is een gawk-uitbreidingsplit: tweede argument is geen arraysqrt: argument %g is negatiefsqrt: argument is geen getalsrand: argument is geen getalstandaarduitvoeropdracht heeft geen effectstrftime: opmaakwaarde in PROCINFO["strftime"] is numeriekstrftime: opmaakstring is leegstrftime: tweede argument is geen getalstrftime: eerste argument is geen stringstrftime: tweede argument is kleiner dan nul of te groot voor 'time_t'index van array '%s' is lege stringsubstr: lengte %g bij startindex %g is groter dan de lengte van het eerste argument (%lu)substr: lengte %g is niet >= 0substr: lengte %g is niet >= 1substr: lengte %g is te groot voor stringindexering; wordt verkort tot %gsubstr: lengte %g is geen integer; wordt afgekaptsubstr: startindex %g is geen integer; wordt afgekaptsubstr: bronstring heeft lengte nulsubstr: startindex %g is ongeldig; 1 wordt gebruiktsubstr: startindex %g ligt voorbij het einde van de stringsystem: argument is geen stringregexp-optie '/.../%c' van 'tawk' werkt niet in gawker waren geschaduwde variabelen.tolower: argument is geen stringte veel argumenten voor opmaakstringte veel pijpen of invoerbestanden geopendtoupper: argument is geen string'--lint' wordt uitgeschakeld wegens toewijzing aan 'LINT'onverwacht regeleinde of einde van stringonbekend knooptype %donbekende opcode %donbekende waarde voor veldspecificatie: %d onnodige mix van '>' en '>>' voor bestand '%.*s'onafgesloten reguliere expressieonafgesloten reguliere expressie aan bestandseindeonafgesloten reguliere expressie eindigt met '\' aan bestandseindeonafgesloten stringunwind_stack(): onverwacht type '%s'gebruik van regelvoortzetting '\ #...' is niet overdraagbaardcgettext(_"...") is onjuist: verwijder het liggende streepjedcngettext(_"...") is onjuist: verwijder het liggende streepjenon-array wordt gebruikt als arraywaarschuwing: xor(%lf, %lf): cijfers na de komma worden afgekaptxor(%lf, %lf): negatieve waarden geven rare resultatenxor: eerste argument is geen getalxor: tweede argument is geen getalgawk-4.0.1+dfsg.orig/po/remove-potcdate.sin0000644000175000017500000000066011504446322017577 0ustar schotschot# Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } gawk-4.0.1+dfsg.orig/po/fr.gmo0000644000175000017500000015044011734667243015117 0ustar schotschotÞ•ºì Q¼%% %%<%O%g%†%£%»%Í%Ü%÷%&&5&H&e&#z&+ž&Ê&é& ú&'"'?'T'f'…'% 'yÆ'+@(7l(<¤("á(-)2):I)3„)¸)Í)ã)õ)*#*,5*,b*'*-·* å*(+)/+&Y+(€+:©+%ä+ ,*,-J,'x, ,¾,+Û,(-]0.#Ž.².É.æ./[/$v/›/­/È/Ù/ò/û/020!L0"n0#‘0-µ0#ã01/"1'R1z1'‚1ëª1–2©2»2Í2 ß2Aì2A.3…p38ö35/4e4|43š4Î4"ç4! 55,5 b5ƒ5#¢58Æ5"ÿ5"6!@6b6 }6*ž6/É6(ù6""70E7.v7¥7&Å7"ì78*+8*V8#8(¥8Î8,ç8939&P9w9Š9!§92É98ü9(5:)^:8ˆ:8Á:"ú:#;9A;9{;#µ;$Ù;&þ;*%<+P<|<1˜<+Ê<&ö<-=5K=(=&ª=.Ñ=0>1>$L>q>>4°><å>#"?$F?,k?2˜?Ë?ë? @$%@#J@$n@1“@/Å@&õ@A)7A-aAA!ªAÌAìA*B1B#PB$tB5™BEÏB*C-@C nC-yC2§C.ÚC4 D$>D"cD$†D$«D#ÐDôD&E:E.RE$E¦E"ÁE#äE"F++F(WF/€F'°FØF"öF@G!ZG!|G"žGÁG+ÉG õG"H59H5oH'¥H8ÍH(I0/I7`I ˜I*¹I.äI.JBJ%^J+„J°J*¸J/ãJ0K0DK0uKD¦K%ëK(L?:LPzL/ËL>ûL4:M4oM?¤M?äM8$N)]N‡NF§NîNGOOO&WO6~OWµO/ P9=PwP=‘P>ÏP8QFGQ#ŽQ<²Q5ïQ6%R%\Rt‚R(÷RN SGoS)·S*áS, T"9T"\T$T¤TÄTáT$U &U"GU"jU5U;ÃUAÿU+AV,mV7šV)ÒV%üV>"W$aW.†W/µW3åW4X0NX'X(§X$ÐX5õX-+Y'YY'Y)©Y%ÓYùY Z1%Z4WZ(ŒZ0µZ8æZ&['F[1n[2 [<Ó[$\(5\)^\1ˆ\7º\'ò\(]<C]<€]>½])ü])&^)P^z^@š^'Û^_/_KH_”_&£_'Ê_(ò_/`&K`'r`(š`3Ã`9÷`91a6ka2¢a)Õa)ÿa1)b)[b*…b5°b;æbA"c+dc,c0½c!îc'd8d"Ud,xd¥d#¿d$ãd9e9Be;|e*¸e&ãe4 f&?f&ff#f$±fÖfæf?þf&>g.eg,”g;Ág&ýgJ$hohh?«h/ëh4i$Pi*ui, i$Íi2òi%j%Dj-jj"˜j%»j0áj#k6kJk!\k2~k±k"Åk0èkl"-l1Pl@‚lAÃlm m2)m8\m(•m)¾m¤èmoo¬oÈoÛoøop4pLp^p mpŽpŸp°pÌpßpüp)q&;q&bq‰q šq¨q"Âqåqúq$ r%1r'Wrr/šsRÊsNt,lt4™t!ÎtfðtWWu¯u!Æuèuv&vû‚>:ƒyƒ&’ƒB¹ƒ!üƒ.„.M„K|„)È„1ò„6$…W[…4³…&è…*†#:†)^†6ˆ†@¿†C‡+D‡<p‡7­‡(å‡@ˆ<Oˆ9Œˆ6ƈ6ýˆ.4‰Cc‰*§‰GÒ‰'Š.BŠ;qŠ­Š(ÇŠ5ðŠ:&‹Ka‹/­‹4Ý‹AŒATŒ-–Œ-ÄŒBòŒB5.x.§3Ö1 Ž0<ŽmŽBŽ:ÐŽ. G:O‚9Ò9 AFDˆ-ÍDû3@‘'t‘>œ‘YÛ‘65’5l’@¢’Nã’42“.g“,–“4Ó3ø“4,”Fa”C¨”9ì”+&•;R•@Ž•)Ï•2ù•*,–#W–8{–*´–3ß–7—OK—a›—.ý—A,˜n˜B˜KĘ9™HJ™(“™&¼™/ã™0š1Dš/vš=¦š*äšH›>X›—›/·›0ç›/œFHœ4œ<Äœ7*93d[˜@ô65ž7lž ¤žH¯ž$øž&ŸCDŸHˆŸ<ÑŸ\ 4k 9  QÚ %,¡:R¡C¡@Ñ¡¢1*¢2\¢ ¢;™¢>Õ¢8£8M£8†£L¿£: ¤:G¤c‚¤gæ¤SN¥T¢¥F÷¥O>¦Uަ[ä¦G@§8ˆ§0Á§jò§,]¨GЍÒ¨0ب= ©nG©=¶©Jô© ?ªU`ªZ¶ªP«mb«,ЫRý«JP¬>›¬)Ú¬ˆ­;­wÉ­JA®2Œ®1¿®9ñ®&+¯&R¯5y¯2¯¯â¯)ÿ¯*)°4T°!‰°&«°?Ò°N±Ma±2¯±7â±G².b²,‘²J¾²* ³G4³H|³QųR´Mj´9¸´9ò´2,µS_µ=³µ8ñµ5*¶;`¶Gœ¶#ä¶·M·Gi·@±·;ò·E.¸6t¸7«¸Lã¸F0¹Dw¹<¼¹5ù¹6/º;fºJ¢º.íº4»OQ»O¡»Jñ»/<¼/l¼/œ¼)̼Uö¼3L½€½G™½má½O¾+_¾<‹¾5Ⱦ>þ¾3=¿4q¿7¦¿\Þ¿J;ÀJ†ÀGÑÀHÁ2bÁ2•ÁMÈÁ<Â=SÂ?‘ÂNÑÂM Ã2nÃ7¡ÃLÙÃ0&Ä@WÄ,˜Ä&ÅÄ?ìÄ%,Å>RÅ,‘ÅL¾ÅL ÆGXÆ. Æ,ÏÆHüÆ,EÇ,rÇ'ŸÇ(ÇÇðÇÈNÈ,nÈ3›È4ÏÈ<É3AÉNuÉ'ÄÉ'ìÉ9Ê@NÊDÊ1ÔÊAËCHË*ŒËZ·Ë#Ì+6Ì-bÌ/Ì+ÀÌLìÌ/9ÍiÍ‚Í3ÍPÑÍ$"Î6GÎQ~ÎÐÎ'æÎKÏLZÏM§Ï*õÏ Ð<2ÐKoÐ/»Ð4ëЈC‰vÇ6?Ò)Ýl£Jl¤ã‹Kz­!2ôu©]·3¢³¼H”t¦ Šæì/‘4F¶ ye I «Ñ†»P,w˜ ŒN>Afo™•U^Q~ õ†9šºýð÷"å.Ö®pø :¢¿Óïþ$Gò¯:¸xü_¾Ãªú¥a–`’U„.c–¹f Ÿ=*î-û›;,6[j+‡ä>¨u=ŽSž©#cí¤yvYZbq(´s^… „™mÜ‘;dO®³~«*TŠkg4/CɈE_S&\ë2kpœè¦XB‹zÿMQ?ö²˜Žr 5½À µA‚Ëœ3hW¬{—<")°Ù5jš’}eo[ùF—W{X¡±1êâV“¹(•¬MJÁ&d“\@8G°žÏ…|D¶¡ƒÈ$²Í”#¯0·ÄihwL×9‚Z<gÕ!H8`ÛµV%Ð1¸qóÊnÎRŸxÌÚØbYŒ€R'ñÔ¥'E 7|±rÂinBtç-DaT£ÅºÞ}m¨ ­Pª‡N7á§K@§ƒL+ à%逛´‰O]IÆ0sß # %s block(s) # Rule(s) # gawk profile, created %s -C --copyright -E file --exec=file -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R file --command=file -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[file] --dump-variables[=file] -e 'program-text' --source='program-text' -f progfile --file=progfile -g --gen-pot -h --help -n --non-decimal-data -p[file] --profile[=file] -r --re-interval -t --lint-old -v var=val --assign=var=val # Function Call Stack: # Functions, listed alphabetically To report bugs, see node `Bugs' in `gawk.info', which is section `Reporting Problems and Bugs' in the printed version. %d is invalid as number of arguments for %s%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)%s blocks must have an action part%s third parameter is not a changeable object%s to "%s" failed (%s)%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk%s: `%s' argument to `-v' not in `var=value' form %s: array_ref to %s %s: close failed (%s)%s: empty (null) %s: empty (zero) %s: invalid option -- '%c' %s: is parameter %s: option '%c%s' doesn't allow an argument %s: option '--%s' doesn't allow an argument %s: option '--%s' requires an argument %s: option '-W %s' doesn't allow an argument %s: option '-W %s' is ambiguous %s: option '-W %s' requires an argument %s: option `-W %s' unrecognized, ignored %s: option requires an argument -- %c %s: option requires an argument -- '%c' %s: string literal as last arg of substitute has no effect%s: table_size = %d, array_size = %d %s: unrecognized option '%c%s' %s: unrecognized option '--%s' 'system' function not allowed in sandbox mode-Ft does not set FS to tab in POSIX awk-m option usage: `-m[fr] nnn'@include is a gawk extensionBINMODE value `%s' is invalid, treated as 3Copyright (C) 1989, 1991-%d Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Examples: gawk '{ sum += $1 }; END { print sum }' file gawk -F: '{ print $1 }' /etc/passwd IPv6 communication is not supportedInvalid back referenceInvalid character class nameInvalid collation characterInvalid content of \{\}Invalid multibyte data detected. There may be a mismatch between your data and your locale.Invalid preceding regular expressionInvalid range endInvalid regular expressionMemory exhaustedNF set to negative valueNo matchNo previous regular expressionOperation Not SupportedPOSIX does not allow `%s'POSIX does not allow `\x' escapesPOSIX does not allow operator `**'POSIX does not allow operator `**='POSIX options: GNU long options: (standard) Premature end of regular expressionRegular expression too bigShort options: GNU long options: (extensions) Sorry, don't know how to interpret `%s'SuccessTCP/IP communications are not supportedThis 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. Trailing backslashUnmatched ( or \(Unmatched ) or \)Unmatched [ or [^Unmatched \{Usage: %s [POSIX or GNU style options] -f progfile [--] file ... Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ... You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. [s]printf: format specifier does not have control letter[s]printf: value %g is out of range for `%%%c' format^ ran out for this one`%s' is a Bell Labs extension`%s' is a built-in function, it cannot be redefined`%s' is a gawk extension`%s' is invalid as a function name`%s' is not a legal variable name`%s' is not a variable name, looking for file `%s=%s'`%s' is not supported in old awk`--posix' overrides `--binary'`--posix' overrides `--traditional'`--posix'/`--traditional' overrides `--non-decimal-data'`-m[fr]' option irrelevant in gawk`BINMODE' is a gawk extension`FIELDWIDTHS' is a gawk extension`FPAT' is a gawk extension`IGNORECASE' is a gawk extension`L' is meaningless in awk formats; ignored`break' is not allowed outside a loop or switch`continue' is not allowed outside a loop`delete array' is a gawk extension`delete(array)' is a non-portable tawk extension`exit' cannot be called in the current context`extension' is a gawk extension`getline var' invalid inside `%s' rule`getline' invalid inside `%s' rule`goto' considered harmful! `h' is meaningless in awk formats; ignored`l' is meaningless in awk formats; ignored`length(array)' is a gawk extension`next' cannot be called from a `%s' rule`next' used in %s action`nextfile' cannot be called from a `%s' rule`nextfile' is a gawk extension`nextfile' used in %s action`return' used outside function context`|&' not supportedadump: argument not an arrayalready included source file `%s'and(%lf, %lf): fractional values will be truncatedand(%lf, %lf): negative values will give strange resultsand: received non-numeric first argumentand: received non-numeric second argumentasort: cannot use a subarray of first arg for second argasort: cannot use a subarray of second arg for first argasort: first argument not an arrayasort: second argument not an arrayasorti: cannot use a subarray of first arg for second argasorti: cannot use a subarray of second arg for first argasorti: first argument not an arrayasorti: second argument not an arrayassignment used in conditional contextatan2: received non-numeric first argumentatan2: received non-numeric second argumentattempt to access field %ldattempt to field reference from non-numeric valueattempt to field reference from null stringattempt to use a scalar value as arrayattempt to use array `%s' in a scalar contextattempt to use array `%s["%.*s"]' in a scalar contextattempt to use function `%s' as an arrayattempt to use scalar `%s' as an arrayattempt to use scalar `%s["%.*s"]' as an arrayattempt to use scalar parameter `%s' as an arraybackslash at end of stringbackslash not last character on linebad `%sFMT' specification `%s'buffer overflow in genflags2strcall of `length' without parentheses is not portablecan not use special variable `%s' for indirect function callcan't open pipe `%s' for input (%s)can't open pipe `%s' for output (%s)can't open source file `%s' for reading (%s)can't open two way pipe `%s' for input/output (%s)can't read sourcefile `%s' (%s)can't redirect from `%s' (%s)can't redirect to `%s' (%s)can't set binary mode on stderr (%s)can't set binary mode on stdin (%s)can't set binary mode on stdout (%s)can't use function name `%s' as variable or arraycannot create child process for `%s' (fork: %s)cannot open file `%s' for reading (%s)cannot open pipe `%s' (%s)cannot use function `%s' as variable namecannot use gawk builtin `%s' as variable nameclose of `%s' failed (%s).close of fd %d (`%s') failed (%s)close of master pty failed (%s)close of pipe failed (%s)close of redirection that was never openedclose of slave pty failed (%s)close of stdin in child failed (%s)close of stdout in child failed (%s)close: `%.*s' is not an open file, pipe or co-processclose: redirection `%s' not opened with `|&', second argument ignoredclose: second argument is a gawk extensionclose: second argument must be `to' or `from'cmd. line:co-process flush of pipe to `%s' failed (%s).command line argument `%s' is a directory: skippedcompl(%lf): fractional value will be truncatedcompl(%lf): negative value will give strange resultscompl: received non-numeric argumentcos: received non-numeric argumentcould not allocate more input memorycould not open `%s' for writing (%s)could not open `%s' for writing: %scould not open `%s', mode `%s'could not pre-open /dev/null for fd %ddata file `%s' is emptydcgettext: `%s' is not a valid locale categorydelete: index `%s' not in array `%s'division by zero attempteddivision by zero attempted in `%%'division by zero attempted in `%%='division by zero attempted in `/='duplicate `default' detected in switch bodyduplicate case values in switch body: %seach rule must have a pattern or an action partempty argument to `-e/--source' ignoredempty filename after @includeempty program text on command lineenvironment variable `POSIXLY_CORRECT' set: turning on `--posix'error reading input file `%s': %serror writing standard error (%s)error writing standard output (%s)error: escape sequence `\%c' treated as plain `%c'exp: argument %g is out of rangeexp: received non-numeric argumentexpression for `%s' redirection has null string valueexpression in `%s' redirection only has numeric valueextension: can't redefine function `%s'extension: can't use gawk built-in `%s' as function nameextension: function `%s' already definedextension: function name `%s' previously definedextension: illegal character `%c' in function name `%s'extension: missing function nameextensions are not allowed in sandbox modefailure status (%d) on file close of `%s' (%s)failure status (%d) on pipe close of `%s' (%s)fatal error: internal errorfatal error: internal error: segfaultfatal error: internal error: stack overflowfatal: fatal: `$' is not permitted in awk formatsfatal: `$' not permitted after period in formatfatal: `L' is not permitted in POSIX awk formatsfatal: `h' is not permitted in POSIX awk formatsfatal: `l' is not permitted in POSIX awk formatsfatal: arg count %ld greater than total number of supplied argumentsfatal: arg count with `$' must be > 0fatal: extension: cannot open `%s' (%s) fatal: extension: library `%s': cannot call function `%s' (%s) fatal: extension: library `%s': does not define `plugin_is_GPL_compatible' (%s) fatal: must use `count$' on all formats or nonefatal: no `$' supplied for positional field width or precisionfatal: not enough arguments to satisfy format stringfflush: `%s' is not an open file, pipe or co-processfflush: cannot flush: file `%s' opened for reading, not writingfflush: cannot flush: pipe `%s' opened for reading, not writingfield width and precision are ignored for `%%' specifierfield width is ignored for `%%' specifierfile flush of `%s' failed (%s).filename `%s' for `%s' redirection may be result of logical expressionfloating point exceptionfor loop: array `%s' changed size from %ld to %ld during loop executionfrom %sfunction `%s' called but never definedfunction `%s' called with more arguments than declaredfunction `%s' called with space between name and `(', or used as a variable or an arrayfunction `%s' defined but never called directlyfunction `%s' defined to take no more than %d argument(s)function `%s' not definedfunction `%s': argument #%d: attempt to use array as a scalarfunction `%s': argument #%d: attempt to use scalar as an arrayfunction `%s': can't use function name as parameter namefunction `%s': can't use special variable `%s' as a function parameterfunction `%s': missing argument #%dfunction `%s': parameter #%d, `%s', duplicates parameter #%dfunction `%s': parameter `%s' shadows global variablefunction called indirectly through `%s' does not existfunction name `%s' previously definedgawk is a pattern scanning and processing language. By default it reads standard input and writes standard output. gensub: third argument of 0 treated as 1hex escape \x%.*s of %d characters probably not interpreted the way you expectignoring unknown format specifier character `%c': no argument convertedindex: received non-string first argumentindex: received non-string second argumentindirect function calls are a gawk extensionint: received non-numeric argumentinternal error: %s with null vnameinvalid FIELDWIDTHS value, near `%s'invalid char '%c' in expressioninvalid subscript expressionlength: received array argumentlength: received non-string argumentlocal port %s invalid in `/inet'log: received negative argument %glog: received non-numeric argumentlshift(%lf, %lf): fractional values will be truncatedlshift(%lf, %lf): negative values will give strange resultslshift(%lf, %lf): too large shift value will give strange resultslshift: received non-numeric first argumentlshift: received non-numeric second argumentmake_builtin: negative argument count for function `%s'match: third argument is a gawk extensionmatch: third argument is not an arraymktime: at least one of the values is out of the default rangemktime: received non-string argumentmoving pipe to stdin in child failed (dup: %s)moving pipe to stdout in child failed (dup: %s)moving slave pty to stdin in child failed (dup: %s)moving slave pty to stdout in child failed (dup: %s)multicharacter value of `RS' is a gawk extensionmultistage two-way pipelines don't workmust supply a remote hostname to `/inet'must supply a remote port to `/inet'no (known) protocol supplied in special filename `%s'no explicit close of co-process `%s' providedno explicit close of file `%s' providedno explicit close of pipe `%s' providedno explicit close of socket `%s' providedno hex digits in `\x' escape sequenceno pre-opened fd %dno program text at all!non-redirected `getline' invalid inside `%s' rulenon-redirected `getline' undefined inside END actionnull string for `FS' is a gawk extensionold awk does not support multidimensional arraysold awk does not support multiple `BEGIN' or `END' rulesold awk does not support operator `**'old awk does not support operator `**='old awk does not support regexps as value of `FS'old awk does not support the `\%c' escape sequenceold awk does not support the keyword `in' except after `for'opcode %s not an operator or keywordoperator `^' is not supported in old awkoperator `^=' is not supported in old awkor(%lf, %lf): fractional values will be truncatedor(%lf, %lf): negative values will give strange resultsor: received non-numeric first argumentor: received non-numeric second argumentpatsplit: cannot use a subarray of fourth arg for second argpatsplit: cannot use a subarray of second arg for fourth argpatsplit: cannot use the same array for second and fourth argspatsplit: fourth argument is not an arraypatsplit: second argument is not an arraypatsplit: third argument must be non-nullpipe flush of `%s' failed (%s).plain `print' in BEGIN or END rule should probably be `print ""'precision is ignored for `%%' specifierprintf: no argumentsrange of the form `[%c-%c]' is locale dependentreached system limit for open files: starting to multiplex file descriptorsreason unknownredir2str: unknown redirection type %dredirection not allowed in sandbox modereference to uninitialized argument `%s'reference to uninitialized element `%s["%.*s"]'reference to uninitialized field `$%d'reference to uninitialized field `$%ld'reference to uninitialized variable `%s'regexp component `%.*s' should probably be `[%.*s]'regexp constant `/%s/' looks like a C comment, but is notregexp constant `//' looks like a C++ comment, but is notregexp constant for parameter #%d yields boolean valueregular expression on left of `~' or `!~' operatorregular expression on right of assignmentregular expression on right of comparisonremote host and port information (%s, %s) invalidrestoring stdin in parent process failed restoring stdout in parent process failed rshift(%lf, %lf): fractional values will be truncatedrshift(%lf, %lf): negative values will give strange resultsrshift(%lf, %lf): too large shift value will give strange resultsrshift: received non-numeric first argumentrshift: received non-numeric second argumentrunning %s setuid root may be a security problemsending profile to standard errorsending variable list to standard errorshadow_funcs() called twice!sin: received non-numeric argumentsort comparison function `%s' is not definedsource file `%s' is emptysource file does not end in newlinespecial file name `%s' is incompletesplit: cannot use a subarray of fourth arg for second argsplit: cannot use a subarray of second arg for fourth argsplit: cannot use the same array for second and fourth argssplit: fourth argument is a gawk extensionsplit: fourth argument is not an arraysplit: null string for third arg is a gawk extensionsplit: second argument is not an arraysqrt: called with negative argument %gsqrt: received non-numeric argumentsrand: received non-numeric argumentstandard outputstatement has no effectstrftime: format value in PROCINFO["strftime"] has numeric typestrftime: received empty format stringstrftime: received non-numeric second argumentstrftime: received non-string first argumentstrftime: second argument less than 0 or too big for time_tsubscript of array `%s' is null stringsubstr: length %g at start index %g exceeds length of first argument (%lu)substr: length %g is not >= 0substr: length %g is not >= 1substr: length %g too big for string indexing, truncating to %gsubstr: non-integer length %g will be truncatedsubstr: non-integer start index %g will be truncatedsubstr: source string is zero lengthsubstr: start index %g is invalid, using 1substr: start index %g is past end of stringsystem: received non-string argumenttawk regex modifier `/.../%c' doesn't work in gawkthere were shadowed variables.tolower: received non-string argumenttoo many arguments supplied for format stringtoo many pipes or input files opentoupper: received non-string argumentturning off `--lint' due to assignment to `LINT'unexpected newline or end of stringunknown nodetype %dunknown opcode %dunknown value for field spec: %d unnecessary mixing of `>' and `>>' for file `%.*s'unterminated regexpunterminated regexp at end of fileunterminated regexp ends with `\' at end of fileunterminated stringunwind_stack: unexpected type `%s'use of `\ #...' line continuation is not portableuse of dcgettext(_"...") is incorrect: remove leading underscoreuse of dcngettext(_"...") is incorrect: remove leading underscoreuse of non-array as arraywarning: xor(%lf, %lf): fractional values will be truncatedxor(%lf, %lf): negative values will give strange resultsxor: received non-numeric first argumentxor: received non-numeric second argumentProject-Id-Version: gawk 4.0.0h Report-Msgid-Bugs-To: arnold@skeeve.com POT-Creation-Date: 2012-03-28 22:03+0200 PO-Revision-Date: 2012-01-30 23:52+0100 Last-Translator: Jean-Philippe Guérard Language-Team: French Language: fr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); # Bloc(s) %s # Règle(s) # profile gawk, créé %s -C --copyright -E fichier --exec=fichier -F fs --field-separator=fs -L [fatal] --lint[=fatal] -N --use-lc-numeric -O --optimize -P --posix -R fichier --command=fichier -S --sandbox -V --version -W nostalgia --nostalgia -Y --parsedebug -b --characters-as-bytes -c --traditional -d[fichier] --dump-variables[=fichier] -e 'programme' --source='programme' -f fichier_prog --file=fichier_prog -g --gen-pot -h --help -n --non-decimal-data -p[fichier] --profile[=fichier] -r --re-interval -t --lint-old -v var=valeur --assign=var=valeur # Pile des appels de fonctions : # Fonctions, par ordre alphabétique Pour signaler une anomalie, consultez la section « Bugs » du fichier « gawk.info », qui est dans la section « Reporting Problems and Bugs » de la version imprimée. Pour signaler une erreur de traduction, envoyez un message à la liste . %d n'est pas un nombre d'arguments valide de %s%s %s « %s » : impossible d'obtenir les drapeaux du fd : (fcntl F_GETFD: %s)%s %s « %s »: impossible de positionner close-on-exec: (fcntl F_SETFD: %s)les blocs %s doivent avoir une partie actionle 3e paramètre de %s n'est pas un objet modifiableéchec de %s vers « %s » (%s)%s : %d : le modificateur d'expressions rationnelles « /.../%c » de tawk ne marche pas dans gawk%s : « %s » l'argument de « -v » ne respecte pas la forme « var=valeur » %s : array_ref à %s %s : échec de la fermeture (%s)%s : vide (non défini) %s : vide (vide) %s : option non valide -- « %c » %s : est un paramètre %s : l'option « %c%s » n'accepte pas d'argument %s : l'option « --%s » n'accepte pas d'argument %s : l'option « --%s » nécessite un argument %s : l'option « -W %s » n'accepte pas d'argument %s : l'option « -W %s » est ambiguë %s : l'option « -W %s » nécessite un argument %s : option « -W %s » non reconnue, ignorée %s : l'option requiert un argument -- %c %s : l'option requiert un argument -- « %c » %s : une chaîne littérale en dernier argument d'une substitution est sans effet%s : table_size = %d, array_size = %d %s : option non reconnue « %c%s » %s : option non reconnue « --%s » La fonction « system » est interdite en isolement (mode sandbox)-Ft ne définit pas le FS comme étant une tabulation en awk POSIXutilisation de l'option « -m » : « -m[fr] nnn »@include est une extension gawkla valeur « %s » de BINMODE n'est pas valide, 3 utilisé à la placeCopyright © 1998, 1991-%d Free Software Foundation. Ce programme est un logiciel libre ; vous pouvez le redistribuer et le modifier selon les termes de la licence publique générale GNU (GNU General Public License), telle que publiée par la Free Software Foundation ; soit selon la version 3 de cette licence, soit selon une version ultérieure de votre choix. Exemples : gawk '{ somme += $1 }; END { print somme }' fichier gawk -F: '{ print $1 }' /etc/passwd les communications IPv6 ne sont pas disponiblesRéférence arrière non valideNom de classe de caractères non valideCaractère d'interclassement non valideContenu de \{\} non valideDonnées multioctets non valables détectées. Possible incohérence entre données et paramètres régionaux (locale).Expression rationnelle précédente non valideBorne finale non valideExpression rationnelle non valideMémoire épuiséeune valeur négative a été assignée à NFAucune concordanceAucune expression rationnelle précédenteOpération non disponiblePOSIX n'autorise pas « %s »POSIX n'autorise pas les séquences d'échappement « \x »POSIX n'autorise pas l'opérateur « ** »POSIX n'autorise pas l'opérateur « **= »Options POSIX : Options longues GNU : (standard) Fin prématurée de l'expression rationnelleExpression rationnelle trop grandeOptions POSIX : Options longues GNU : (extensions) Désolé, je ne sais pas comment interpréter « %s »Succèsles communications TCP/IP ne sont pas disponiblesCe logiciel est distribué en espérant qu'il sera utile, mais SANS AUCUNE GARANTIE, y compris les garanties implicites D'ADAPTATION À UN BUT SPÉCIFIQUE et de COMMERCIALISATION. Pour plus d'informations à ce sujet, consultez le texte de la licence publique générale GNU (GNU General Public License). Barre oblique inverse finale( ou \( sans correspondance) ou \) sans correspondance[ ou [^ sans correspondance\{ sans correspondanceUtilisation : %s [options GNU ou POSIX] -f fichier_prog [--] fichier ... Utilisation : %s [options GNU ou POSIX] [--] %cprogramme%c fichier ... Vous devriez avoir reçu copie de la licence publique générale GNU (GNU General Public License) avec ce programme. Sinon, consultez http://www.gnu.org/licenses/. [s]printf : spécification de format sans lettre de contrôle[s]printf : valeur %g hors limite pour le format « %%%c »^ à court pour celui-ci« %s » est une extension Bell Labs« %s » est une fonction interne, elle ne peut être redéfinie« %s » est une extension gawk« %s » n'est pas un nom de fonction valide« %s » n'est pas un nom de variable valide« %s » n'est pas un nom de variable, recherche du fichier « %s=%s »l'ancien awk ne dispose pas de « %s »« --posix » prend le pas sur « --binary »« --posix » prend le pas sur « --traditional »« --posix » et « --traditional » prennent le pas sur « --non-decimal-data »l'option « -m[fr] » n'est pas pertinente en gawk« BINMODE » est une extension gawk« FIELDWIDTHS » est une extension gawk« FPAT » est une extension gawk« IGNORECASE » est une extension gawk« L » n'a aucun sens dans un format awk ; ignoré« break » est interdit en dehors d'une boucle ou d'un switch« continue » est interdit en dehors d'une boucle ou d'un switch« delete array » est une extension gawk« delete(array) » est une extension non portable de tawk« exit » ne peut pas être appelé dans ce contexte« extension » est une extension gawk« getline var » n'est pas valable dans une règle « %s »« getline » n'est pas valable dans une règle « %s »« goto est jugé dangereux ! » (Edsger W. Dijkstra) « h » n'a aucun sens dans un format awk ; ignoré« l » n'a aucun sens dans un format awk ; ignoré« length(tableau) » est une extension gawk« next » ne peut pas être appelé depuis une règle « %s »« next » est utilisé dans l'action %s« nextfile » ne peut pas être appelé depuis une règle « %s »« nextfile » est une extension gawk« nextfile » est utilisé dans l'action %s« return » est utilisé hors du contexte d'une fonction« |& » non disponibleadump : l'argument n'est pas un tableaule fichier source « %s » a déjà été intégréand(%lf, %lf): les valeurs non entières seront tronquéesand(%lf, %lf) : les valeurs négatives donneront des résultats inattendusand : le premier argument n'est pas numériqueand : le second argument reçu n'est pas numériqueasort : le 2nd argument ne doit pas être un sous-tableau du 1erasort : le 1er argument ne doit pas être un sous-tableau du 2ndasort : le 1er argument n'est pas un tableauasort : le 2nd argument n'est pas un tableauasorti : le 2nd argument ne doit pas être un sous-tableau du 1erasorti : le 1er argument ne doit pas être un sous-tableau du 2ndasorti : le 1er argument n'est pas un tableauasorti : le 2nd argument n'est pas un tableauaffectation utilisée dans un contexte conditionnelatan2 : le premier argument n'est pas numériqueatan2 : le second argument n'est pas numériquetentative d'accès au champ %ldtentative de référence à un champ via une valeur non numériquetentative de référence à un champ via une chaîne nulletentative d'utiliser un scalaire comme tableautentative d'utilisation du tableau « %s » dans un contexte scalairetentative d'utilisation du tableau « %s["%.*s"] » dans un contexte scalairetentative d'utiliser la fonction « %s » comme tableautentative d'utiliser le scalaire « %s » comme tableautentative d'utiliser le scalaire « %s["%.*s"] » comme tableautentative d'utiliser le paramètre scalaire « %s » comme tableaubarre oblique inverse à la fin de la chaînela barre oblique inverse n'est pas le dernier caractère de la lignespécification de « %sFMT » erronée « %s »débordement de tampon dans genflag2strl'appel de « length » sans parenthèses n'est pas portableimpossible d'utiliser la variable spéciale « %s » pour un appel indirect de fonctionimpossible d'ouvrir le tube « %s » en entrée (%s)impossible d'ouvrir le tube « %s » en sortie (%s)impossible d'ouvrir le fichier source « %s » en lecture (%s)impossible d'ouvrir un tube bidirectionnel « %s » en entrées-sorties (%s)impossible de lire le fichier source « %s » (%s)impossible de rediriger depuis « %s » (%s)impossible de rediriger vers « %s » (%s)impossible d'activer le mode binaire sur stderr (%s)impossible d'activer le mode binaire sur stdin (%s)impossible d'activer le mode binaire sur stdout (%s)impossible d'utiliser la fonction « %s » comme variable ou tableauimpossible de créer le processus fils pour « %s » (fork : %s)impossible d'ouvrir le fichier « %s » en lecture (%s)impossible d'ouvrir le tube « %s » (%s)impossible d'utiliser la fonction « %s » comme variableimpossible d'utiliser le mot clef gawk « %s » comme variableéchec de la fermeture de « %s » (%s)échec de la fermeture du fd %d (« %s ») : %séchec de la fermeture du pty maître (%s)échec de la fermeture du tube (%s)fermeture d'une redirection qui n'a jamais été ouverteéchec de la fermeture du pty esclave (%s)échec de fermeture du stdin du processus fils (%s)échec de la fermeture de stdout du processus fils (%s)close : « %.*s » n'est ni un fichier ouvert, ni un tube ou un co-processusclose : la redirection « %s » n'a pas été ouverte avec « |& », second argument ignoréclose : le 2e argument est une extension gawkclose : le second argument doit être « to » ou « from »ligne de commande:échec du vidage du tube vers « %s » par le co-processus (%s).L'argument « %s » de la ligne de commande est un répertoire : ignorécompl(%lf) : les valeurs non entières seront tronquéescompl(%lf) : les valeurs négatives donneront des résultats inattenduscompl : l'argument n'est pas numériquecos : l'argument n'est pas numériqueimpossible d'allouer plus de mémoire d'entréeimpossible d'ouvrir « %s » en écriture (%s)impossible d'ouvrir « %s » en écriture : %simpossible d'ouvrir « %s », mode « %s »impossible de pré-ouvrir /dev/null pour le descripteud fd %dle fichier de données « %s » est videdcgettext : « %s » n'est pas dans un catégorie valide de la localedelete : l'indice « %s » est absent du tableau « %s »tentative de division par zérotentative de division par zéro dans « %% »tentative de division par zéro dans « %%= »tentative de division par zéro dans « /= »plusieurs « default » ont été détectés dans le corps du switchle corps du switch comporte des cas répétés : %schaque règle doit avoir au moins une partie motif ou actionargument vide de l'option « -e / --source » ignoréLe nom de fichier après @include est videle programme indiqué en ligne de commande est videvariable d'environnement « POSIXLY__CORRECT » définie : activation de « --posix »erreur lors de la lecture du fichier en entrée « %s » : %serreur lors de l'écriture vers l'erreur standard (%s)erreur lors de l'écriture vers la sortie standard (%s)erreur : séquence d'échappement « \%c » traitée comme un simple « %c »exp : l'argument %g est hors limiteexp : l'argument n'est pas numériquel'expression dans la redirection « %s » donne une chaîne nullel'expression dans la redirection « %s » n'a qu'une valeur numériqueextension : impossible de redéfinir la fonction « %s »extension : impossible d'utiliser la fonction interne gawk « %s » comme nom de fonctionextension : fonction « %s » est déjà définieextension : nom de la fonction « %s » déjà définiextension : caractère illégal « %c » dans le nom de la fonction « %s »extension : nom de fonction manquantles extensions sont interdites en isolement (mode sandbox)résultat d'échec (%d) sur la fermeture du fichier « %s » (%s)résultat d'échec (%d) sur la fermeture du tube « %s » (%s)fatal : erreur internefatal : erreur interne : erreur de segmentationfatal : erreur interne : débordement de la pilefatal : fatal : « $ » n'est pas autorisé dans les formats awkfatal : dans un format, « $ » ne doit pas suivre un pointfatal : « L » est interdit dans un format awk POSIXfatal : « h » est interdit dans un format awk POSIXfatal : « l » est interdit dans un format awk POSIXfatal : le numéro d'argument %ld est > au nombre total d'arguments fournisfatal : le numéro d'argument de « $ » doit être > 0fatal : extension : impossible d'ouvrir « %s » (%s) fatal : extension : bibliothèque « %s » : impossible d'appeler la fonction « %s » (%s) fatal : extension : la bibliothèque « %s »ne définit pas « plugin_is_GPL_compatible » (%s) fatal : « numéro$ » doit être utilisé pour toutes les formats ou pour aucunfatal : aucun « $ » fourni pour la taille ou la précision du champ positionnéfatal : pas assez d'arguments pour satisfaire la chaîne de formatagefflush : « %s » n'est ni un fichier ouvert, ni un tube, ni un co-processusfflush : vidage impossible : fichier « %s » ouvert en lecture, pas en écriturefflush : vidage impossible : le tube « %s » est ouvert en lecture et non en écrituretaille du champ et précision de la spécification « %% » ignoréestaille du champ de la spécification « %% » ignoréeéchec du vidage vers le fichier « %s » (%s)le fichier « %s » de la redirection « %s » pourrait être le résultat d'une expression booléenneexception du traitement en virgule flottanteboucle for : la taille du tableau « %s » est passée de %ld à %ldde %sfonction « %s » appelée sans être définiela fonction « %s » a été appelée avec trop d'argumentsfonction « %s » appelée avec un espace entre son nom et « ( », ou utilisée comme variable ou tableaufonction « %s » définie mais jamais appelée directementfonction « %s » définie comme ayant au maximum« %d » argument(s)fonction « %s » non définiefonction « %s » : argument #%d : tentative d'utiliser un tableau comme scalairefonction « %s » : argument #%d : tentative d'utilisation d'un scalaire comme tableaufonction « %s » : impossible d'utiliser un nom de fonction comme paramètrefonction « %s » : impossible d'utiliser la variable spéciale « %s » comme paramètre d'une fonctionfonction « %s » : argument #%d manquantfonction « %s » : paramètre #%d, « %s » est un doublon du paramètre #%dfonction « %s » : le paramètre « %s » masque la variable globalela fonction indirectement appelée via « %s » n'existe pasnom de fonction « %s » déjà définigawk est un langage de recherche et de traitement des motifs. Par défaut, il lit l'entrée standard et écrit sur la sortie standard. gensub : le 3e argument vaut 0, il sera traité comme un 1la séquence d'échappement hexa. \x%.*s de %d caractères ne sera probablement pas interprétée comme vous l'imaginezcaractère de format inconnu « %c » ignoré : aucun argument convertiindex : le premier argument n'est pas une chaîneindex : le second argument n'est pas une chaîneles appels indirects de fonctions sont une extension gawkint : l'argument n'est pas numériqueerreur interne : %s avec un vname nulvaleur de FIELDWIDTHS non valide, près de « %s »caractère non valide « %c » dans l'expressionexpression indice non validelength : l'argument reçu est un tableaulength : l'argument n'est pas une chaînele port local %s n'est pas valide dans « /inet »log : l'argument est négatif %glog : l'argument n'est pas numériquelshift(%lf, %lf) : les valeurs non entières seront tronquéeslshift(%lf, %lf) : les valeurs négatives donneront des résultats inattenduslshift(%lf, %lf) : un décalage trop grand donnera des résultats inattenduslshift : le premier argument n'est pas numériquelshift : le second argument reçu n'est pas numériquemake_builtin : la fonction « %s » a un nombre négatif d'argumentsmatch : le 3e argument est une extension gawkmatch : le 3e argument n'est pas un tableaumktime : au moins l'une des valeurs est en dehors de la plage par défautmktime : l'argument n'est pas une chaîneéchec de déplacement du tube vers stdin du processus fils (dup : %s)échec du déplacement du tube vers stdout du processus fils (dup : %s)échec du déplacement du pty esclave vers le stdin du processus fils (dup : %s)échec du déplacement du pty esclave vers le stdout du processus fils (dup : %s)l'utilisation d'un « RS » de plusieurs caractères est une extension gawkimpossible d'utiliser des tubes bidirectionnels en sérieun nom d'hôte distant doit être fourni à « /inet »un port distant doit être fourni à « /inet »aucun protocole (connu) n'a été fourni dans le nom de fichier spécial « %s »aucune fermeture explicite du co-processus « %s » fournieaucune fermeture explicite du fichier « %s » fournieaucune fermeture explicite du tube « %s » fournieaucune fermeture explicite du connecteur « %s » fournieaucun chiffre hexadécimal dans la séquence d'échappement « \x » aucun descripteur fd %d pré-ouvertaucun programme !un « getline » non redirigé n'est pas valable dans une règle « %s »dans une action END, un « getline » non redirigé n'est pas définiutiliser une chaîne vide pour « FS » est une extension gawkl'ancien awk ne dispose pas des tableaux multidimensionnelsl'ancien awk ne permet pas les « BEGIN » ou « END » multiplesl'ancien awk ne dispose pas de l'opérateur « ** »l'ancien awk ne dispose pas de l'opérateur « **= »l'ancien awk n'accepte pas les expr. rationnelles comme valeur de « FS »l'ancien awk ne dispose pas de la séquence d'échappement « \%c »l'ancien awk n'autorise le mot-clef « in » qu'après « for »le code opération %s n'est pas un opérateur ou un mot-clefl'ancien awk ne dispose pas de l'opérateur « ^ »l'ancien awk ne dispose pas de l'opérateur « ^= »or(%lf, %lf) : les valeurs non entières seront tronquéesor(%lf, %lf) : les valeurs négatives donneront des résultats inattendusor : le premier argument n'est pas numériqueor : le second argument reçu n'est pas numériquepatsplit : impossible d'utiliser un sous-tableau du 4e argument en 2e argumentpatsplit : impossible d'utiliser un sous-tableau du 2e argument en 4e argumentpatsplit : impossible d'utiliser le même tableau comme 2e et 4e argumentpatsplit : le 4e argument n'est pas un tableaupatsplit : le 2e argument n'est pas un tableaupatsplit : le 3e argument n'est pas un tableauéchec du vidage du tube « %s » (%s).dans BEGIN ou END, un « print » seul devrait sans doute être un « print "" »précision de la spécification « %% » ignoréeprintf : aucun argumentles plages « [%c-%c] » sont dépendantes des paramètres régionauxlimite système du nombre de fichiers ouverts atteinte : début du multiplexage des descripteurs de fichiersraison inconnueredir2str : type de redirection %d inconnules redirections sont interdites en isolement (mode sandbox)référence à un argument non initialisé « %s »référence à un élément non initialisé « %s["%.*s"] »référence à un champ non initialisé « $%d »référence à un champ non initialisé « $%ld »référence à une variable non initialisée « %s »le composant d'expression rationnelle « %.*s » devrait probablement être « [%.*s] »l'expression rationnelle constante « /%s/ » n'est pas un commentaire Cl'expression rationnelle constante « // » n'est pas un commentaire C++le paramètre #%d, une expr. rationnelle constante, fournit un booléenexpression rationnelle à gauche d'un opérateur « ~ » ou « !~ »expression rationnelle à droite d'une affectationexpression rationnelle à droite d'une comparaisonles informations sur l'hôte et le port distants (%s, %s) ne sont pas valideséchec de la restauration du stdin dans le processus parent échec de la restauration du stdout dans le processus parent rshift(%lf, %lf) : les valeurs non entières seront tronquéesrshift(%lf, %lf) : les valeurs négatives donneront des résultats inattendusrshift(%lf, %lf) : un décalage trop grand donnera des résultats inattendusrshift : le premier argument n'est pas numériquershift : le second argument reçu n'est pas numériquel'exécution de %s en mode setuid root peut être un problème de sécuritéenvoi du profil vers la sortie d'erreur standardenvoi de la liste des variables vers la sortie d'erreur standardshadows_funcs() a été appelé deux fois !sin : l'argument n'est pas numériquela fonction de comparaison « %s » du tri n'est pas définiele fichier source « %s » est videle fichier source ne se termine pas par un passage à la lignenom de fichier spécial « %s » incompletsplit : impossible d'utiliser un sous-tableau du 4e argument en 2e argumentsplit : impossible d'utiliser un sous-tableau du 2e argument en 4e argumentsplit : impossible d'utiliser le même tableau comme 2e et 4e argumentsplit : le 4e argument est une extension gawksplit : le 4e argument n'est pas un tableausplit : utiliser une chaîne vide en 3e argument est une extension gawksplit : le 2e argument n'est pas un tableausqrt : appelé avec un argument négatif %gsqrt : l'argument n'est pas numériquesrand : l'argument n'est pas numériquesortie standardla déclaration est sans effetstrftime : la valeur de formatage PROCINFO["strftime"] est de type numériquestrftime : la chaîne de formatage est videstrftime : le second argument n'est pas numériquestrftim : le premier argument n'est pas une chaînestrftime: second argument négatif ou trop grand pour time_tl'indice du tableau « %s » est une chaîne videsubstr : la longueur %g à partir de %g dépasse la fin du 1er argument (%lu)substr : la longueur %g n'est pas >= 0substr : la longueur %g n'est pas >= 1substr : la longueur %g est trop grande, tronquée à %gsubstr : la longueur %g n'est pas entière, elle sera tronquéesubstr : l'index de début %g n'est pas un entier, il sera tronquésubstr : la chaîne source est de longueur nullesubstr : l'index de début %g n'est pas valide, utilisation de 1substr : l'index de début %g est au-delà de la fin de la chaînesystem : l'argument n'est pas une chaînele modificateur d'expressions rationnelles « /.../%c » de tawk ne marche pas dans gawkil y avait des variables masquées.tolower : l'argument n'est pas une chaînetrop d'arguments pour la chaîne de formatagetrop de fichiers d'entrées ou de tubes ouvertstoupper : l'argument n'est pas une chaînedésactivation de « --lint » en raison d'une affectation à « LINT »fin de chaîne ou passage à la ligne inattendutype de nÅ“ud %d inconnucode opération %d inconnuvaleur inconnue pour la définition de champ : %d mélange non nécessaire de « > » et « >> » pour le fichier « %.*s »expression rationnelle non referméeexpression rationnelle non refermée en fin de fichierexpression rationnelle non refermée terminée par un « \ » en fin de fichierchaîne non referméeunwind_stack: type « %s » inattendul'utilisation de « \ #... » pour prolonger une ligne n'est pas portableutilisation incorrecte de dcgettext(_"...") : enlevez le souligné de têteutilisation incorrecte de dcngettext(_"...") : enlevez le souligné de têteutilisation d'un non tableau comme tableauavertissement : xor(%lf, %lf) : les valeurs non entières seront tronquéesxor(%lf, %lf) : les valeurs négatives donneront des résultats inattendusxor : le premier argument n'est pas numériquexor : le second argument reçu n'est pas numériquegawk-4.0.1+dfsg.orig/po/it.po0000644000175000017500000016410711734667243014765 0ustar schotschot# Italian messages for GNU Awk # Copyright (C) 2002-2011 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" "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: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:254 #, 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 #, 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 #, 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 #, 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 #, 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: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: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: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: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:432 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 #, 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 #, 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:828 #, c-format msgid "`next' used in %s action" msgstr "`next' usato in 'azione' %s" #: awkgram.y:836 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' è un'estensione gawk" #: 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: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:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "`delete array' è un'estensione gawk" #: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(array)' è un'estensione tawk non-portabile" #: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "'pipeline' multistadio bidirezionali non funzionano" #: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "espressione regolare usata per assegnare un valore" #: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "espressione regolare prima di operatore `~' o `!~'" #: 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:1275 msgid "regular expression on right of comparison" msgstr "espressione regolare a destra in un confronto" #: 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:1421 msgid "old awk does not support multidimensional arrays" msgstr "il vecchio awk non supporta vettori multidimensionali" #: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "chiamata a `length' senza parentesi non portabile" #: awkgram.y:1580 msgid "indirect function calls are a gawk extension" msgstr "chiamate a funzione indirette sono un'estensione gawk" #: 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:1671 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 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: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: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:2620 #, c-format msgid "source file `%s' is empty" msgstr "file sorgente `%s' vuoto" #: awkgram.y:2797 msgid "source file does not end in newline" msgstr "file sorgente non termina con carattere 'a capo'" #: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" msgstr "espressione regolare non completata termina con `\\' a fine file" #: 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: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:2935 msgid "unterminated regexp" msgstr "espressione regolare non completata" #: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "espressione regolare non completata a fine file" #: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "uso di `\\ #...' continuazione linea non portabile" #: awkgram.y:3014 msgid "backslash not last character on line" msgstr "'\\' non è l'ultimo carattere della linea" #: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX non permette l'operatore `**='" #: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "il vecchio awk non supporta l'operatore `**='" #: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX non permette l'operatore `**'" #: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "il vecchio awk non supporta l'operatore `**'" #: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "l'operatore `^=' non è supportato nel vecchio awk" #: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "l'operatore `^' non è supportato nel vecchio awk" #: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "stringa non terminata" #: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "carattere '%c' non valido in un'espressione" #: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' è un'estensione gawk" #: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' è un'estensione Bell Labs" #: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX non permette `%s'" #: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' non è supportato nel vecchio awk" #: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "`goto' considerato pericoloso!\n" #: 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: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:3659 #, 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 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:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "uso scorretto di dcgettext(_\"...\"): togliere il carattere '_' iniziale" #: awkgram.y:3819 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 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funzione `%s': parametro `%s' nasconde variabile globale" #: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "non riesco ad aprire `%s' in scrittura (%s)" #: awkgram.y:4112 #, fuzzy msgid "sending variable list to standard error" msgstr "mando profilo a 'standard error'" #: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s: 'close' fallita (%s)" #: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() chiamata due volte!" #: awkgram.y:4176 msgid "there were shadowed variables." msgstr "c'erano variabili nascoste." #: 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: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:4226 #, c-format msgid "function name `%s' previously defined" msgstr "funzione di nome `%s' definita in precedenza" #: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" msgstr "funzione `%s' chiamata ma mai definita" #: awkgram.y:4403 #, c-format msgid "function `%s' defined but never called directly" msgstr "funzione `%s' definita ma mai chiamata direttamente" #: 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:4544 #, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" "funzione `%s' chiamata con spazio tra il nome e `(',\n" "o usata come variabile o vettore" #: awkgram.y:4791 eval.c:2056 msgid "division by zero attempted" msgstr "tentativo di dividere per zero" #: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "tentativo di dividere per zero in `%%'" #: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s a \"%s\" fallita (%s)" #: builtin.c:121 msgid "standard output" msgstr "standard output" #: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "exp: argomento non numerico" #: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argomento %g non accettabile" #: 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: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: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:333 msgid "index: received non-string first argument" msgstr "index: il primo argomento non è una stringa" #: builtin.c:335 msgid "index: received non-string second argument" msgstr "index: il secondo argomento non è una stringa" #: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int: argomento non numerico" #: 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:504 msgid "length: received non-string argument" msgstr "length: l'argomento non è una stringa" #: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log: argomento non numerico" #: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log: argomento negativo %g" #: builtin.c:694 builtin.c:699 msgid "fatal: must use `count$' on all formats or none" msgstr "" #: builtin.c:762 #, c-format msgid "field width is ignored for `%%' specifier" msgstr "" #: builtin.c:764 #, c-format msgid "precision is ignored for `%%' specifier" msgstr "" #: builtin.c:766 #, c-format msgid "field width and precision are ignored for `%%' specifier" msgstr "" #: builtin.c:817 #, fuzzy msgid "fatal: `$' is not permitted in awk formats" msgstr "l'operatore `^' non è supportato nel vecchio awk" #: builtin.c:826 msgid "fatal: arg count with `$' must be > 0" msgstr "" #: builtin.c:830 #, c-format msgid "fatal: arg count %ld greater than total number of supplied arguments" msgstr "" #: builtin.c:834 msgid "fatal: `$' not permitted after period in format" msgstr "" #: builtin.c:850 msgid "fatal: no `$' supplied for positional field width or precision" msgstr "" #: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" msgstr "" #: builtin.c:925 msgid "fatal: `l' is not permitted in POSIX awk formats" msgstr "" #: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "" #: builtin.c:942 msgid "fatal: `L' is not permitted in POSIX awk formats" msgstr "" #: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "" #: builtin.c:959 msgid "fatal: `h' is not permitted in POSIX awk formats" msgstr "" #: builtin.c:1272 #, 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:1337 msgid "fatal: not enough arguments to satisfy format string" msgstr "" #: builtin.c:1339 msgid "^ ran out for this one" msgstr "" #: builtin.c:1346 msgid "[s]printf: format specifier does not have control letter" msgstr "" #: builtin.c:1349 msgid "too many arguments supplied for format string" msgstr "" #: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: manca argomento" #: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt: argomento non numerico" #: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: chiamata con argomento negativo %g" #: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: lunghezza %g non >= 1" #: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: lunghezza %g non >= 0" #: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: lunghezza non intera %g: sarà troncata" #: 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: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: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:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" "substr: lunghezza %g all'indice di partenza %g supera la lunghezza del primo " "argomento (%lu)" #: builtin.c: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:1696 msgid "strftime: received empty format string" msgstr "strftime: 'format' è una stringa nulla" #: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime: l'argomento non è una stringa" #: builtin.c:1779 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 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: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:2028 msgid "tolower: received non-string argument" msgstr "tolower: l'argomento non è una stringa" #: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper: l'argomento non è una stringa" #: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2: il primo argomento non è numerico" #: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2: il secondo argomento non è numerico" #: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin: l'argomento non è numerico" #: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos: l'argomento non è numerico" #: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand: l'argomento non è numerico" #: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match: il terzo argomento non è un vettore" #: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: il terzo argomento è 0, trattato come 1" #: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift: il primo argomento non è numerico" #: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift: il secondo argomento non è numerico" #: 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:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): valori con decimali verranno troncati" #: 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:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift: il primo argomento non è numerico" #: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift: il secondo argomento non è numerico" #: 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:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): valori con decimali verranno troncati" #: 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:2850 msgid "and: received non-numeric first argument" msgstr "and: il primo argomento non è numerico" #: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and: il secondo argomento non è numerico" #: 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:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): valori con decimali verranno troncati" #: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "or: il primo argomento non è numerico" #: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or: il secondo argomento non è numerico" #: 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:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): valori con decimali verranno troncati" #: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "xor: il primo argomento non è numerico" #: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor: il secondo argomento non è numerico" #: 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:2933 #, 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 msgid "compl: received non-numeric argument" msgstr "compl: l'argomento non è numerico" #: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): valore negativo darà risultati strani" #: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): valore con decimali verrà troncato" #: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' non è una categoria 'locale' valida" #: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "tipo nodo sconosciuto %d" #: eval.c:423 eval.c:437 #, c-format msgid "unknown opcode %d" msgstr "codice operativo sconosciuto %d" #: eval.c:434 #, c-format 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:698 #, c-format msgid "" "\n" "\t# Function Call Stack:\n" "\n" msgstr "" "\n" "\t# 'Stack' (Pila) Chiamate Funzione:\n" "\n" #: eval.c:725 msgid "`IGNORECASE' is a gawk extension" msgstr "`IGNORECASE' è un'estensione gawk" #: 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: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:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "riferimento ad argomento non inizializzato `%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:1179 msgid "attempt to field reference from null string" msgstr "tentativo di riferimento a un campo da una stringa nulla" #: eval.c:1185 #, c-format msgid "attempt to access field %ld" msgstr "tentativo di accedere al campo %ld" #: 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:1437 #, c-format msgid "unwind_stack: unexpected type `%s'" msgstr "unwind_stack: tipo non previsto `%s'" #: eval.c:1532 msgid "division by zero attempted in `/='" msgstr "divisione per zero tentata in `/='" #: eval.c:1539 #, 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 msgid "extensions are not allowed in sandbox mode" msgstr "le estensioni non sono permesse in modo 'sandbox'" #: ext.c:60 ext.c:65 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:84 #, c-format 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 "" "fatale: estensione: libreria `%s': non riesco a chiamare funzione `%s' (%s)\n" #: ext.c:127 msgid "extension: missing function name" msgstr "estensione: manca nome di funzione" #: 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:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "estensione: non riesco a ridefinire funzione `%s'" #: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "estensione: funzione `%s' già definita" #: 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:156 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: contatore argomenti negativo per la funzione `%s'" #: 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 argomenti(o)" #: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "funzione `%s': manca argomento #%d" #: 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: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:296 msgid "Operation Not Supported" msgstr "Operazione Non Supportata" #: field.c:328 msgid "NF set to negative value" msgstr "NF impostato a un valore negativo" #: 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: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: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:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "valore di FIELDWIDTHS non valido, vicino a `%s'" #: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "la stringa nulla usata come `FS' è un'estensione gawk" #: 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'" #: 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: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: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: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:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: opzione sconosciuta '--%s'\n" #: getopt.c:808 getopt.c:811 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: opzione sconosciuta '%c%s'\n" #: getopt.c:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: opzione non valida -- '%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: l'opzione richiede un argomento -- '%c'\n" #: 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: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: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: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:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "chiusura di fd %d (`%s') fallita (%s)" #: io.c:578 msgid "redirection not allowed in sandbox mode" msgstr "re-direzione non permessa in modo 'sandbox'" #: 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: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: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 " "espressione logica" #: 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:719 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "non posso aprire 'pipe' `%s' in scrittura (%s)" #: 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: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:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "non posso re-dirigere da `%s' (%s)" #: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "non posso re-dirigere a `%s' (%s)" #: 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:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "chiusura di `%s' fallita (%s)." #: io.c:912 msgid "too many pipes or input files open" msgstr "troppe 'pipe' o file di input aperti" #: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close: il secondo argomento deve essere `a' o `da'" #: 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:956 msgid "close of redirection that was never opened" msgstr "chiusura di una re-direzione mai aperta" #: 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: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: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:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "nessuna chiusura esplicita richiesta per 'socket' `%s'" #: 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:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "nessuna chiusura esplicita richiesta per 'pipe' `%s'" #: io.c:1101 #, 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 #, c-format msgid "error writing standard output (%s)" msgstr "errore scrivendo 'standard output' (%s)" #: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "errore scrivendo 'standard error' (%s)" #: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "scaricamento di 'pipe' `%s' fallita (%s)." #: 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:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "scaricamento di file `%s' fallita (%s)." #: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "porta locale %s invalida in `/inet'" #: 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:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "nessuno protocollo (noto) specificato nel filename speciale `%s'" #: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "nome-file speciale `%s' incompleto" #: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "va fornito nome di 'host' remoto a `/inet'" #: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "va fornita porta remota a `/inet'" #: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "comunicazioni TCP/IP non supportate" #: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "non riesco ad aprire `%s', modo `%s'" #: io.c:1747 #, 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 #, c-format msgid "close of stdout in child failed (%s)" msgstr "fallita chiusura di 'stdout' nel processo-figlio (%s)" #: 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: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: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:1759 io.c:1780 #, 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 #, 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 #, 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 msgid "restoring stdout in parent process failed\n" msgstr "fallito ripristino di 'stdout' nel processo-padre\n" #: io.c:1893 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 #, c-format msgid "close of pipe failed (%s)" msgstr "fallita chiusura di 'pipe' (%s)" #: io.c:1973 msgid "`|&' not supported" msgstr "`|&' non supportato" #: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "non riesco ad aprire 'pipe' `%s' (%s)" #: 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:2520 #, c-format msgid "data file `%s' is empty" msgstr "file dati `%s' vuoto" #: 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:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "valore multicarattere per `RS' è un'estensione gawk" #: io.c:3232 msgid "IPv6 communication is not supported" msgstr "comunicazioni IPv6 non supportate" #: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "`-m[fr]' opzione irrilevante per gawk" #: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "-m uso opzione: `-m[fr] nnn'" #: 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:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: l'opzione richiede un argomento -- %c\n" #: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "variable d'ambiente `POSIXLY_CORRECT' impostata: attivo `--posix'" #: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "`--posix' annulla `--traditional'" #: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' annulla `--non-decimal-data'" #: 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: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:616 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "non posso impostare modalità binaria su 'stdout'(%s)" #: 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:657 msgid "no program text at all!" msgstr "manca del tutto il testo del programma!" #: 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 file-prog. [--] file ...\n" #: 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:741 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "Opzioni POSIX:\t\topzioni lunghe GNU: (standard)\n" #: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f fileprog\t\t--file=file-prog.\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=valore\t\t--assign=var=valore\n" #: main.c:745 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-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-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-E file\t\t\t--exec=file\n" msgstr "\t-E file\t\t\t--exec=file\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\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: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" "Per segnalare problemi, vedi nodo `Bugs' in `gawk.info', oppure la\n" "sezione `Reporting Problems and Bugs' nella versione a stampa.\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 è un linguaggio per scandire e processare espressioni.\n" "Senza parametri, legge da 'standard input' e scrive su 'standard output'.\n" "\n" #: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" "Esempi:\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 "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" "Questo software è libero; lo puoi distribuire e/o modificare\n" "alle condizioni stabilite nella 'GNU General Public License' pubblicata\n" "dalla Free Software Foundation; fai riferimento alla versione 3 della\n" "Licenza, o (a tua scelta) a una qualsiasi versione successiva.\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 "" "Questo programma è distribuito con la speranza che sia utile,\n" "ma SENZA ALCUNA GARANZIA; senza neppure la garanzia implicita\n" "di COMMERCIABILITÀ o IDONEITÀ AD UN PARTICOLARE SCOPO.\n" "Vedi la 'GNU General Public License' per ulteriori dettagli.\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 "" "Dovresti aver ricevuto una copia della GNU General Public License\n" "assieme a questo programma; se non è così, vedi http://www.gnu.org/" "licenses/.\n" #: 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: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" "\n" msgstr "" "%s: `%s' argomento di `-v' non in forma `var=valore'\n" "\n" #: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' non è un nome di variabile ammesso" #: 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: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:1269 msgid "fatal error: internal error" msgstr "errore fatale: errore interno" #: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "errore fatale: errore interno: segfault" #: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "errore fatale: errore interno: stack overflow" #: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "manca 'fd' pre-aperta %d" #: main.c:1353 #, 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 #, c-format msgid "cmd. line:" msgstr "linea com.:" #: msg.c:107 msgid "error: " msgstr "errore: " #: node.c:406 msgid "backslash at end of string" msgstr "'\\' a fine stringa" #: 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:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX non permette escape `\\x'" #: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "niente cifre esadecimali nella sequenza di escape `\\x'" #: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " "expect" msgstr "" "sequenza di escape esadec.\\x%.*s di %d caratteri probabilmente non " "interpretata nel modo previsto" #: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "sequenza di escape `\\%c' considerata come semplice `%c'" #: 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." #: posix/gawkmisc.c:176 #, c-format 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)" #: posix/gawkmisc.c:188 #, c-format 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:83 #, c-format msgid "could not open `%s' for writing: %s" msgstr "non riesco ad aprire `%s' in scrittura: %s" #: profile.c:85 msgid "sending profile to standard error" msgstr "mando profilo a 'standard error'" #: profile.c:203 #, c-format msgid "" "\t# %s block(s)\n" "\n" msgstr "" "\t# blocco(hi) %s\n" "\n" #: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" "\t# Regola(e)\n" "\n" #: profile.c:279 #, c-format msgid "internal error: %s with null vname" msgstr "errore interno: %s con 'vname' nullo" #: 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" "\t# Functions, listed alphabetically\n" msgstr "" "\n" "\t# Funzioni, listate in ordine alfabetico\n" #: profile.c:1370 #, c-format msgid "redir2str: unknown redirection type %d" msgstr "redir2str: tipo di re-direzione non noto %d" #: 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 "regexp component `%.*s' should probably be `[%.*s]'" msgstr "" "componente di espressione `%.*s' dovrebbe probabilmente essere `[%.*s]'" #: regcomp.c:131 msgid "Success" msgstr "Successo" #: regcomp.c:134 msgid "No match" msgstr "Nessuna corrispondenza" #: regcomp.c:137 msgid "Invalid regular expression" msgstr "Espressione regolare invalida" #: regcomp.c:140 msgid "Invalid collation character" msgstr "Carattere di ordinamento non valido" #: regcomp.c:143 msgid "Invalid character class name" msgstr "Nome di 'classe di caratteri' non valido" #: regcomp.c:146 msgid "Trailing backslash" msgstr "'\\' finale" #: regcomp.c:149 msgid "Invalid back reference" msgstr "Riferimento indietro non valido" #: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "[ o [^ non chiusa" #: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "( o \\( non chiusa" #: regcomp.c:158 msgid "Unmatched \\{" msgstr "\\{ non chiusa" #: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Contenuto di \\{\\} non valido" #: regcomp.c:164 msgid "Invalid range end" msgstr "Fine di intervallo non valido" #: regcomp.c:167 msgid "Memory exhausted" msgstr "Memoria esaurita" #: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Espressione regolare precedente invalida" #: regcomp.c:173 msgid "Premature end of regular expression" msgstr "Fine di espressione regolare inaspettata" #: regcomp.c:176 msgid "Regular expression too big" msgstr "Espressione regolare troppo complessa" #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") o \\) non aperta" #: 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" gawk-4.0.1+dfsg.orig/po/ja.po0000644000175000017500000020144411734667243014737 0ustar schotschot# Japanese messages for gawk. # 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 4.0.0\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\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=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: 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' ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" #: array.c:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "スカラー仮引数 `%s' ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" #: array.c:257 #, c-format msgid "attempt to use scalar `%s' as an array" msgstr "スカラー `%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 "スカラーコンテキストã§é…列 `%s' を使用ã™ã‚‹è©¦ã¿ã§ã™" #: array.c:513 #, 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' ã®æ·»å­—㌠NULL 文字列ã§ã™" #: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: é…列 `%2$s' 内ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `%1$s' ãŒã‚りã¾ã›ã‚“" #: 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" #: array.c:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: 空 (zero)\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: 仮引数ã§ã™\n" #: array.c:958 #, c-format msgid "%s: array_ref to %s\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:249 #, c-format msgid "%s blocks must have an action part" msgstr "%s ブロックã«ã¯ã‚¢ã‚¯ã‚·ãƒ§ãƒ³éƒ¨ãŒå¿…é ˆã§ã™" #: awkgram.y:252 msgid "each rule must have a pattern or an action part" msgstr "å„ルールã«ã¯ãƒ‘ターンã¾ãŸã¯ã‚¢ã‚¯ã‚·ãƒ§ãƒ³éƒ¨ãŒå¿…é ˆã§ã™ã€‚" #: awkgram.y:323 awkgram.y:334 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "å¤ã„ awk ã¯è¤‡æ•°ã® `BEGIN' ã¾ãŸã¯ `END' ルールをサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" #: awkgram.y:371 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "`%s' ã¯çµ„è¾¼ã¿é–¢æ•°ã§ã™ã€‚å†å®šç¾©ã§ãã¾ã›ã‚“" #: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "æ­£è¦è¡¨ç¾å®šæ•° `//' 㯠C++コメントã«ä¼¼ã¦ã„ã¾ã™ãŒã€é•ã„ã¾ã™ã€‚" #: awkgram.y:436 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" 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:809 msgid "`break' is not allowed outside a loop or switch" msgstr "`break' ã¯ãƒ«ãƒ¼ãƒ—ã¾ãŸã¯ switch ã®å¤–ã§ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" #: awkgram.y:818 msgid "`continue' is not allowed outside a loop" msgstr "`continue' ã¯ãƒ«ãƒ¼ãƒ—ã®å¤–ã§ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" #: awkgram.y:828 #, c-format msgid "`next' used in %s action" msgstr "%s アクション内㧠`next' ãŒä½¿ç”¨ã•れã¾ã—ãŸ" #: awkgram.y:836 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' 㯠gawk æ‹¡å¼µã§ã™" #: 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' ãŒé–¢æ•°å®šç¾©æ–‡ã®å¤–ã§ä½¿ã‚れã¾ã—ãŸ" #: awkgram.y:925 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "BEGIN ã¾ãŸã¯ END ルール内ã®å¼•æ•°ã®ç„¡ã„ `print' 㯠`print \"\"' ã ã¨æ€ã‚れã¾ã™" #: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "`delete array' 㯠gawk æ‹¡å¼µã§ã™" #: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(array)' ã¯ç§»æ¤æ€§ã®ç„¡ã„ tawk æ‹¡å¼µã§ã™" #: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "多段階ã§åŒæ–¹å‘パイプを利用ã—ãŸå¼ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“" #: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "æ­£è¦è¡¨ç¾ãŒä»£å…¥å¼ã®å³è¾ºã«ä½¿ç”¨ã•れã¦ã„ã¾ã™" #: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "`~' ã‚„ `!~' 演算å­ã®å·¦è¾ºã«æ­£è¦è¡¨ç¾ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™" #: awkgram.y:1265 awkgram.y:1419 msgid "old awk does not support the keyword `in' except after `for'" msgstr "å¤ã„ awk ã§ã¯ `in' 予約語㯠`for' ã®å¾Œã‚’除ãサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" #: awkgram.y:1275 msgid "regular expression on right of comparison" msgstr "比較å¼ã®å³è¾ºã«æ­£è¦è¡¨ç¾ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚" #: 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 アクションã§ã¯æœªå®šç¾©ã§ã™ã€‚" #: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" msgstr "å¤ã„ awk ã¯å¤šæ¬¡å…ƒé…列をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" #: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "å°æ‹¬å¼§ãŒç„¡ã„ `length' ã¯ç§»æ¤æ€§ãŒã‚りã¾ã›ã‚“" #: awkgram.y:1580 msgid "indirect function calls are a gawk extension" msgstr "間接関数呼ã³å‡ºã—㯠gawk æ‹¡å¼µã§ã™" #: awkgram.y:1593 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "特別ãªå¤‰æ•° `%s' ã¯é–“接関数呼ã³å‡ºã—用ã«ã¯ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" #: awkgram.y:1671 msgid "invalid subscript expression" msgstr "添字ã®å¼ãŒç„¡åйã§ã™" #: awkgram.y:1711 msgid "use of non-array as array" msgstr "é…列ã§ãªã„ã‚‚ã®ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã—ã¦ã„ã¾ã™" #: awkgram.y:1975 awkgram.y:1995 msg.c:98 msgid "warning: " msgstr "警告: " #: 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)" #: 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 "ソースファイル `%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)" #: awkgram.y:2620 #, c-format msgid "source file `%s' is empty" msgstr "ソースファイル `%s' ã¯ç©ºã§ã™" #: awkgram.y:2797 msgid "source file does not end in newline" msgstr "ã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ”¹è¡Œã§çµ‚ã£ã¦ã„ã¾ã›ã‚“" #: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" msgstr "終端ã•れã¦ã„ãªã„æ­£è¦è¡¨ç¾ãŒãƒ•ァイル最後㮠`\\' ã§çµ‚ã£ã¦ã„ã¾ã™ã€‚" #: awkgram.y:2924 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "%s: %d: tawk ã®æ­£è¦è¡¨ç¾ä¿®é£¾å­ `/.../%c' 㯠gawk ã§ä½¿ç”¨ã§ãã¾ã›ã‚“" #: awkgram.y:2928 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "tawk ã®æ­£è¦è¡¨ç¾ä¿®é£¾å­ `/.../%c' 㯠gawk ã§ä½¿ç”¨ã§ãã¾ã›ã‚“" #: awkgram.y:2935 msgid "unterminated regexp" msgstr "æ­£è¦è¡¨ç¾ãŒçµ‚端ã•れã¦ã„ã¾ã›ã‚“" #: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "ファイルã®ä¸­ã§æ­£è¦è¡¨ç¾ãŒçµ‚端ã•れã¦ã„ã¾ã›ã‚“" #: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "`\\ #...' å½¢å¼ã®è¡Œç¶™ç¶šã¯ç§»æ¤æ€§ãŒã‚りã¾ã›ã‚“" #: awkgram.y:3014 msgid "backslash not last character on line" msgstr "ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ãŒè¡Œæœ€å¾Œã®æ–‡å­—ã«ãªã£ã¦ã„ã¾ã›ã‚“。" #: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX ã§ã¯æ¼”ç®—å­ `**=' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" #: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "å¤ã„ awk ã¯æ¼”ç®—å­ `**=' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" #: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX ã§ã¯æ¼”ç®—å­ `**' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" #: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "å¤ã„ awk ã¯æ¼”ç®—å­ `**' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" #: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "å¤ã„ awk ã¯æ¼”ç®—å­ `^=' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" #: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "å¤ã„ awk ã¯æ¼”ç®—å­ `^' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" #: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "文字列ãŒçµ‚端ã•れã¦ã„ã¾ã›ã‚“" #: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "å¼å†…ã«ç„¡åŠ¹ãªæ–‡å­— '%c' ãŒã‚りã¾ã™" #: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' 㯠gawk æ‹¡å¼µã§ã™" #: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' ã¯ãƒ™ãƒ«ç ”究所ã«ã‚ˆã‚‹æ‹¡å¼µã§ã™" #: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX ã§ã¯ `%s' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" #: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "å¤ã„ awk 㯠`%s' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" #: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "`goto' ã¯æœ‰å®³ã ã¨è¦‹ãªã•れã¦ã„ã¾ã™!\n" #: awkgram.y:3619 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d 㯠%s 用ã®å¼•æ•°ã®æ•°ã¨ã—ã¦ã¯ç„¡åйã§ã™" #: awkgram.y:3654 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "%s: æ–‡å­—åˆ—ãƒªãƒ†ãƒ©ãƒ«ã‚’ç½®ãæ›ãˆæœ€å¾Œã®å¼•æ•°ã«ä½¿ç”¨ã™ã‚‹ã¨åŠ¹æžœãŒã‚りã¾ã›ã‚“" #: awkgram.y:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s 第三仮引数ã¯å¯å¤‰ã‚ªãƒ–ジェクトã§ã¯ã‚りã¾ã›ã‚“" #: awkgram.y:3732 awkgram.y:3735 msgid "match: third argument is a gawk extension" msgstr "match: 第三引数㯠gawk æ‹¡å¼µã§ã™" #: awkgram.y:3789 awkgram.y:3792 msgid "close: second argument is a gawk extension" msgstr "close: 第二引数㯠gawk æ‹¡å¼µã§ã™" #: awkgram.y:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "dcgettext(_\"...\")ã®ä½¿ç”¨æ³•ãŒé–“é•ã£ã¦ã„ã¾ã™: 先頭ã®ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢(_)を削除ã—" "ã¦ãã ã•ã„" #: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "dcngettext(_\"...\")ã®ä½¿ç”¨æ³•ãŒé–“é•ã£ã¦ã„ã¾ã™: 先頭ã®ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢(_)を削除ã—" "ã¦ãã ã•ã„" #: awkgram.y:3911 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "関数 `%s': 仮引数 #%d, `%s' ãŒä»®å¼•æ•° #%d ã¨é‡è¤‡ã—ã¦ã„ã¾ã™" #: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "関数 `%s': 仮引数 `%s' ãŒå¤§åŸŸå¤‰æ•°ã‚’覆ã„éš ã—ã¦ã„ã¾ã™" #: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "`%s' を書込ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ã§ã—㟠(%s)" #: awkgram.y:4112 msgid "sending variable list to standard error" msgstr "変数リストを標準エラーã«é€ã£ã¦ã„ã¾ã™" #: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s: é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)" #: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() を二回呼ã³å‡ºã—ã¦ã„ã¾ã™!" #: awkgram.y:4176 msgid "there were shadowed variables." msgstr "覆ã„éš ã•れãŸå¤‰æ•°ãŒã‚りã¾ã—ãŸ" #: awkgram.y:4206 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "関数 `%s': 関数åを仮引数åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" #: awkgram.y:4210 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "関数 `%s': 特別ãªå¤‰æ•° `%s' ã¯é–¢æ•°ã®ä»®å¼•æ•°ã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" #: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" msgstr "関数å `%s' ã¯å‰ã«å®šç¾©ã•れã¦ã„ã¾ã™" #: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" msgstr "未定義ã®é–¢æ•° `%s' を呼ã³å‡ºã—ã¾ã—ãŸ" #: awkgram.y:4403 #, c-format msgid "function `%s' defined but never called directly" msgstr "関数 `%s' ã¯å®šç¾©ã•れã¦ã„ã¾ã™ãŒã€ä¸€åº¦ã‚‚直接呼ã³å‡ºã•れã¦ã„ã¾ã›ã‚“" #: awkgram.y:4435 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "仮引数 #%d ç”¨ã®æ­£è¦è¡¨ç¾å®šæ•°ã¯çœŸå½å€¤ã‚’出力ã—ã¾ã™" #: 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" "ã¾ãŸã¯ã€å¤‰æ•°ã‹é…列ã¨ã—ã¦ä½¿ã‚れã¦ã„ã¾ã™ã€‚" #: awkgram.y:4791 eval.c:2056 msgid "division by zero attempted" msgstr "ゼロã«ã‚ˆã‚‹é™¤ç®—ãŒè©¦ã¿ã‚‰ã‚Œã¾ã—ãŸ" #: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "`%%' 内ã§ã‚¼ãƒ­ã«ã‚ˆã‚‹é™¤ç®—ãŒè©¦ã¿ã‚‰ã‚Œã¾ã—ãŸ" #: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s ã‹ã‚‰ \"%s\" ã¸å‡ºåŠ›ã§ãã¾ã›ã‚“ (%s)。" #: builtin.c:121 msgid "standard output" msgstr "標準出力" #: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "exp: å¼•æ•°ãŒæ•°å€¤ã§ã¯ã‚りã¾ã›ã‚“" #: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: 引数 %g ãŒç¯„囲外ã§ã™" #: builtin.c:200 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: flush ã§ãã¾ã›ã‚“: パイプ `%s' ã¯èª­ã¿è¾¼ã¿ç”¨ã«é–‹ã‹ã‚Œã¦ã„ã¾ã™ã€‚書ãè¾¼ã¿" "用ã§ã¯ã‚りã¾ã›ã‚“" #: builtin.c:203 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: flush ã§ãã¾ã›ã‚“: ファイル `%s' ã¯èª­ã¿è¾¼ã¿ç”¨ã«é–‹ã‹ã‚Œã¦ã„ã¾ã™ã€‚書ãè¾¼" "ã¿ç”¨ã§ã¯ã‚りã¾ã›ã‚“" #: builtin.c:215 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: `%s' ãŒé–‹ã‹ã‚ŒãŸãƒ•ァイルã€ãƒ‘イプã€ãƒ—ロセス共有ã§ã¯ã‚りã¾ã›ã‚“" #: builtin.c:333 msgid "index: received non-string first argument" msgstr "index: 文字列ã§ã¯ç„¡ã„第一引数をå—ã‘å–りã¾ã—ãŸ" #: builtin.c:335 msgid "index: received non-string second argument" msgstr "index: 文字列ã§ã¯ç„¡ã„第二引数をå—ã‘å–りã¾ã—ãŸ" #: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int: 数値ã§ã¯ç„¡ã„引数をå—ã‘å–りã¾ã—ãŸ" #: builtin.c:493 msgid "length: received array argument" msgstr "length: é…列引数をå—ã‘å–りã¾ã—ãŸ" #: builtin.c:496 msgid "`length(array)' is a gawk extension" msgstr "`length(array)' 㯠gawk æ‹¡å¼µã§ã™" #: builtin.c:504 msgid "length: received non-string argument" msgstr "length: 文字列ã§ã¯ç„¡ã„引数をå—ã‘å–りã¾ã—ãŸ" #: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log: 数値ã§ã¯ç„¡ã„引数をå—ã‘å–りã¾ã—ãŸ" #: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log: è² ã®å¼•æ•° %g ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:694 builtin.c:699 msgid "fatal: must use `count$' on all formats or none" msgstr "" "致命的: `count$’ ã¯å…¨ã¦ã®æ›¸å¼ä½¿ç”¨ã™ã‚‹ã€ã¾ãŸã¯å…¨ã¦ã«ä½¿ç”¨ã—ãªã„ã®ã„ãšã‚Œã‹ã§ãªã‘" "れã°ã„ã‘ã¾ã›ã‚“" #: builtin.c:762 #, c-format msgid "field width is ignored for `%%' specifier" msgstr "`%%' 指定用ã®ãƒ•ィールド幅ã¯ç„¡è¦–ã•れã¾ã™" #: builtin.c:764 #, c-format msgid "precision is ignored for `%%' specifier" msgstr "`%%' 指定用ã®ãƒ•ィールド幅ã¯ç„¡è¦–ã•れã¾ã™" #: builtin.c:766 #, c-format msgid "field width and precision are ignored for `%%' specifier" msgstr "`%%' 指定用ã®ãƒ•ィールド幅ãŠã‚ˆã³ç²¾åº¦ã¯ç„¡è¦–ã•れã¾ã™" #: builtin.c:817 msgid "fatal: `$' is not permitted in awk formats" msgstr "致命的: `$' 㯠awk å½¢å¼å†…ã§ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" #: builtin.c:826 msgid "fatal: arg count with `$' must be > 0" msgstr "致命的: `$' ã§æŒ‡å®šã™ã‚‹å¼•æ•°ã®ç•ªå·ã¯æ­£ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“" #: builtin.c:830 #, c-format msgid "fatal: arg count %ld greater than total number of supplied arguments" msgstr "致命的: 引数ã®ç•ªå· %ld ã¯å¼•æ•°ã¨ã—ã¦ä¸Žãˆã‚‰ã‚ŒãŸæ•°ã‚ˆã‚Šå¤§ãã„ã§ã™" #: builtin.c:834 msgid "fatal: `$' not permitted after period in format" msgstr "致命的: `$' ã¯æ›¸å¼æŒ‡å®šå†…ã®ãƒ”リオド `.' ã®å¾Œã«ä½¿ç”¨ã§ãã¾ã›ã‚“" #: builtin.c:850 msgid "fatal: no `$' supplied for positional field width or precision" msgstr "致命的: フィールド幅ã€ã¾ãŸã¯ç²¾åº¦ã®æŒ‡å®šå­ã« `$' ãŒä¸Žãˆã‚‰ã‚Œã¦ã„ã¾ã›ã‚“" #: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" msgstr "awk ã®æ›¸å¼æŒ‡å®šã§ã¯ `l' ã¯ç„¡æ„味ã§ã™ã€‚無視ã—ã¾ã™" #: builtin.c:925 msgid "fatal: `l' is not permitted in POSIX awk formats" msgstr "致命的: POSIX awk 書å¼å†…ã§ã¯ `l' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" #: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "awk ã®æ›¸å¼æŒ‡å®šã§ã¯ `L' ã¯ç„¡æ„味ã§ã™ã€‚無視ã—ã¾ã™ã€‚" #: builtin.c:942 msgid "fatal: `L' is not permitted in POSIX awk formats" msgstr "致命的: POSIX awk 書å¼å†…ã§ã¯ `L' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" #: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "awk ã®æ›¸å¼æŒ‡å®šã§ã¯ `h' ã¯ç„¡æ„味ã§ã™ã€‚無視ã—ã¾ã™ã€‚" #: builtin.c:959 msgid "fatal: `h' is not permitted in POSIX awk formats" msgstr "致命的: POSIX awk 書å¼å†…ã§ã¯ `h' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" #: builtin.c:1272 #, 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:1337 msgid "fatal: not enough arguments to satisfy format string" msgstr "致命的: æ›¸å¼æ–‡å­—列を満ãŸã™ååˆ†ãªæ•°ã®å¼•æ•°ãŒã‚りã¾ã›ã‚“" #: builtin.c:1339 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:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: 引数ãŒã‚りã¾ã›ã‚“" #: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt: 数値ã§ã¯ç„¡ã„引数をå—ã‘å–りã¾ã—ãŸ" #: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" #: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: é•·ã• %g ㌠1 以上ã§ã¯ã‚りã¾ã›ã‚“" #: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: é•·ã• %g ㌠0 以上ã§ã¯ã‚りã¾ã›ã‚“" #: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: 文字数 %g ã®å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã¾ã™ã€‚" #: builtin.c:1517 #, c-format msgid "substr: length %g too big for string indexing, truncating to %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:1559 msgid "substr: source string is zero length" msgstr "substr: 文字列ã®é•·ã•ãŒã‚¼ãƒ­ã§ã™ã€‚" #: builtin.c:1575 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: 開始インデックス %g ãŒæ–‡å­—列終端ã®å¾Œã«ã‚りã¾ã™" #: 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)" #: 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:1690 msgid "strftime: received non-string first argument" msgstr "strftime: éžæ–‡å­—列ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:1696 msgid "strftime: received empty format string" msgstr "strftime: ç©ºã®æ›¸å¼æ–‡å­—列をå—ã‘å–りã¾ã—ãŸ" #: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime: éžæ–‡å­—列引数をå—ã‘å–りã¾ã—ãŸ" #: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" msgstr "mktime: 一ã¤ä»¥ä¸Šã®å€¤ãŒãƒ‡ãƒ•ォルトã®ç¯„囲を超ãˆã¦ã„ã¾ã™" #: builtin.c:1814 msgid "'system' function not allowed in sandbox mode" msgstr "サンドボックスモードã§ã¯ 'system' 関数ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" #: builtin.c:1819 msgid "system: received non-string argument" 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:1941 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "åˆæœŸåŒ–ã•れã¦ã„ãªã„フィールド `$%d' ã¸ã®å‚ç…§ã§ã™" #: builtin.c:2028 msgid "tolower: received non-string argument" msgstr "tolower: éžæ–‡å­—列引数をå—ã‘å–りã¾ã—ãŸ" #: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper: éžæ–‡å­—列引数をå—ã‘å–りã¾ã—ãŸ" #: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match: 第三引数ãŒé…列ã§ã¯ã‚りã¾ã›ã‚“" #: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: 第三引数㌠0 ã§ã™ã€‚1 を代ã‚りã«ä½¿ç”¨ã—ã¾ã™" #: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2784 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" #: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" #: builtin.c:2788 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "lshift(%lf, %lf): シフト値ãŒå¤§ãéŽãŽã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" #: builtin.c:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2821 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" #: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" #: builtin.c:2825 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "rshift(%lf, %lf): シフト値ãŒå¤§ãéŽãŽã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" #: builtin.c:2850 msgid "and: received non-numeric first argument" msgstr "and: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2858 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" #: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" #: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "or: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2893 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" #: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" #: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "xor: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2931 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" #: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" #: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" #: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" #: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' ã¯ç„¡åйãªãƒ­ã‚±ãƒ¼ãƒ«åŒºåˆ†ã§ã™" #: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "䏿˜ŽãªãƒŽãƒ¼ãƒ‰åž‹ %d ã§ã™" #: eval.c:423 eval.c:437 #, c-format msgid "unknown opcode %d" msgstr "䏿˜Žãªã‚ªãƒšã‚³ãƒ¼ãƒ‰ %d ã§ã™" #: eval.c:434 #, c-format msgid "opcode %s not an operator or keyword" msgstr "オペコード %s ã¯æ¼”ç®—å­ã¾ãŸã¯äºˆç´„語ã§ã¯ã‚りã¾ã›ã‚“" #: eval.c:488 msgid "buffer overflow in genflags2str" msgstr "genflags2str 内ã§ãƒãƒƒãƒ•ァオーãƒãƒ¼ãƒ•ローãŒç™ºç”Ÿã—ã¾ã—ãŸ" #: eval.c:698 #, c-format msgid "" "\n" "\t# Function Call Stack:\n" "\n" msgstr "" "\n" "\t# 呼出関数スタック:\n" "\n" #: eval.c:725 msgid "`IGNORECASE' is a gawk extension" msgstr "`IGNORECASE' 㯠gawk æ‹¡å¼µã§ã™" #: eval.c:754 msgid "`BINMODE' is a gawk extension" msgstr "`BINMODE' 㯠gawk æ‹¡å¼µã§ã™" #: eval.c:812 #, c-format msgid "BINMODE value `%s' is invalid, treated as 3" msgstr "BINMODE 値 `%s' ã¯ç„¡åйã§ã™ã€‚代ã‚り㫠3 を使用ã—ã¾ã™" #: eval.c:902 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "誤ã£ãŸ `%sFMT' 指定 `%s' ã§ã™" #: eval.c:980 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "`LINT' ã¸ã®ä»£å…¥ã«å¾“ã„ `--lint' を無効ã«ã—ã¾ã™" #: eval.c:1127 eval.c:1777 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "関数å `%s' ã¯å¤‰æ•°ã¾ãŸã¯é…列ã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" #: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "åˆæœŸåŒ–ã•れã¦ã„ãªã„引数 `%s' ã¸ã®å‚ç…§ã§ã™" #: eval.c:1177 msgid "attempt to field reference from non-numeric value" msgstr "éžæ•°å€¤ã‚’使用ã—ãŸãƒ•イールドå‚ç…§ã®è©¦ã¿ã§ã™" #: eval.c:1179 msgid "attempt to field reference from null string" msgstr "NULL 文字列を使用ã—ã¦ãƒ•ィールドã®å‚照を試ã¿ã¦ã„ã¾ã™" #: eval.c:1185 #, c-format msgid "attempt to access field %ld" msgstr "フィールド %ld ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã®è©¦ã¿ã§ã™" #: eval.c:1194 #, c-format msgid "reference to uninitialized field `$%ld'" msgstr "åˆæœŸåŒ–ã•れã¦ã„ãªã„フィールド `$%ld' ã¸ã®å‚ç…§ã§ã™" #: eval.c:1256 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "宣言ã•れã¦ã„る数より多ã„引数を使ã£ã¦é–¢æ•° `%s' を呼ã³å‡ºã—ã¾ã—ãŸ" #: 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 "`/=' 内ã§ã‚¼ãƒ­ã«ã‚ˆã‚‹é™¤ç®—ãŒè¡Œã‚れã¾ã—ãŸ" #: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "`%%=' 内ã§ã‚¼ãƒ­ã«ã‚ˆã‚‹é™¤ç®—ãŒè¡Œã‚れã¾ã—ãŸ" #: eval.c:1876 eval.c:2122 #, c-format msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" msgstr "スカラーコンテキスト内ã§é…列 `%s[\"%.*s\"]' ã®ä½¿ç”¨ã®è©¦ã¿ã§ã™" #: eval.c:1907 msgid "assignment used in conditional context" msgstr "æ¡ä»¶ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆå†…ã§ä»£å…¥ãŒä½¿ç”¨ã•れã¾ã—ãŸ" #: eval.c:1911 msgid "statement has no effect" msgstr "æ–‡ã«åŠ¹æžœãŒã‚りã¾ã›ã‚“" #: eval.c:2343 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "for ループ: ループ実行中ã«é…列 `%s' ã®ã‚µã‚¤ã‚ºãŒ %ld ã‹ã‚‰ %ld ã¸å¤‰æ›´ã•れã¾ã—ãŸ" #: eval.c:2458 #, c-format msgid "function called indirectly through `%s' does not exist" msgstr "`%s' を通ã—ã¦é–“接的ã«å‘¼ã³å‡ºã•れãŸé–¢æ•°ãŒå­˜åœ¨ã—ã¾ã›ã‚“" #: eval.c:2470 #, c-format msgid "function `%s' not defined" msgstr "関数 `%s' ã¯å®šç¾©ã•れã¦ã„ã¾ã›ã‚“" #: eval.c:2511 #, c-format msgid "non-redirected `getline' invalid inside `%s' rule" msgstr "`%s' ルールã®å†…å´ã§ã¯ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã•れã¦ã„ãªã„ `getline' ã¯ç„¡åйã§ã™" #: eval.c:2600 #, c-format msgid "error reading input file `%s': %s" msgstr "入力ファイル `%s' を読ã¿è¾¼ã¿ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ: %s" #: eval.c:2614 #, c-format msgid "`nextfile' cannot be called from a `%s' rule" msgstr "`nextfile' 㯠`%s' ルールã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“" #: eval.c:2661 #, fuzzy msgid "`exit' cannot be called in the current context" msgstr "`next' 㯠`%s' ã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“" #: eval.c:2700 #, c-format msgid "`next' cannot be called from a `%s' rule" msgstr "`next' 㯠`%s' ã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“" #: eval.c:2766 #, c-format msgid "Sorry, don't know how to interpret `%s'" msgstr "申ã—訳ã‚りã¾ã›ã‚“㌠`%s' ã‚’ã©ã®ã‚ˆã†ã«è§£é‡ˆã™ã‚‹ã‹åˆ†ã‹ã‚Šã¾ã›ã‚“" #: ext.c:54 msgid "extensions are not allowed in sandbox mode" msgstr "サンドボックスモード内ã§ã¯æ‹¡å¼µã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" #: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" msgstr "`extension' 㯠gawk æ‹¡å¼µã§ã™" #: ext.c:75 #, c-format msgid "fatal: extension: cannot open `%s' (%s)\n" msgstr "致命的: extension: `%s' ã‚’é–‹ãã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ (%s)\n" #: ext.c:84 #, c-format 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:93 #, c-format msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" msgstr "" "致命的: extension: ライブラリ `%s': 関数 `%s' を呼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ " "(%s)\n" #: ext.c:127 msgid "extension: missing function name" msgstr "extension: 関数åãŒã‚りã¾ã›ã‚“" #: ext.c:132 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "extension: 関数å `%2$s' ã®ä¸­ã§ä¸æ­£ãªæ–‡å­— `%1$c' ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™" #: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "extension: 関数 `%s' ã‚’å†å®šç¾©ã§ãã¾ã›ã‚“" #: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "extension: 関数 `%s' ã¯æ—¢ã«å®šç¾©ã•れã¦ã„ã¾ã™" #: 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: gawk ã«çµ„ã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ `%s' ã¯é–¢æ•°åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" #: ext.c:156 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: 関数 `%s' ã®å¼•æ•°ã®æ•°ãŒè² ã§ã™" #: ext.c:259 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "関数 `%s' ã«ä½¿ãˆã‚‹å¼•æ•°ã®æ•°ã¯ `%d' 以下ã¨å®šç¾©ã•れã¦ã„ã¾ã™" #: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "関数 `%s': 引数 #%d ãŒã‚りã¾ã›ã‚“" #: ext.c:279 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "関数 `%s': 引数 #%d: スカラーをé…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" #: ext.c:283 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "関数 `%s': 引数 #%d: é…列をスカラーã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" #: ext.c:296 msgid "Operation Not Supported" msgstr "ã“ã®æ“作ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“" #: field.c:328 msgid "NF set to negative value" 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:969 msgid "split: second argument is not an array" 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:1010 msgid "split: null string for third arg is a gawk extension" 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: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 æ‹¡å¼µã§ã™" #: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "`%s' 付近㮠FIELDWIDTHS 値ãŒç„¡åйã§ã™" #: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "`FS' ã« NULL 文字列を使用ã™ã‚‹ã®ã¯ gawk æ‹¡å¼µã§ã™" #: field.c:1250 msgid "old awk does not support regexps as value of `FS'" msgstr "å¤ã„ awk 㯠`FS' ã®å€¤ã¨ã—ã¦æ­£è¦è¡¨ç¾ã‚’サãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" #: field.c:1369 msgid "`FPAT' is a gawk extension" msgstr "`FPAT' 㯠gawk æ‹¡å¼µã§ã™" #: 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" #: getopt.c:692 getopt.c:697 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: オプション '%c%s' ã¯å¼•æ•°ã‚’å–ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“\n" #: getopt.c:740 getopt.c:759 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: オプション '--%s' ã«ã¯å¼•æ•°ãŒå¿…è¦ã§ã™\n" #: getopt.c:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: オプション '--%s' ã‚’èªè­˜ã§ãã¾ã›ã‚“\n" #: getopt.c:808 getopt.c:811 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: オプション '%c%s' ã‚’èªè­˜ã§ãã¾ã›ã‚“\n" #: getopt.c:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: 無効ãªã‚ªãƒ—ション -- '%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: オプションã«ã¯å¼•æ•°ãŒå¿…è¦ã§ã™ -- '%c'\n" #: getopt.c:989 getopt.c:1005 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: オプション '-W %s' ã¯æ›–昧ã§ã™\n" #: getopt.c:1029 getopt.c:1047 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: オプション '-W %s' ã¯å¼•æ•°ã‚’å–ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“\n" #: getopt.c:1068 getopt.c:1086 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: オプション '-W %s' ã«ã¯å¼•æ•°ãŒå¿…è¦ã§ã™\n" #: io.c:280 #, c-format msgid "command line argument `%s' is a directory: skipped" msgstr "コマンドライン引数 `%s' ã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§ã™: スキップã•れã¾ã—ãŸ" #: io.c:283 io.c:385 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "ファイル `%s' を読ã¿è¾¼ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ (%s)" #: io.c:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "fd %d (`%s') ã‚’é–‰ã˜ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ (%s)" #: io.c:578 msgid "redirection not allowed in sandbox mode" msgstr "サンドボックスモード内ã§ã¯ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" #: io.c:612 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "`%s' リダイレクトã®å‘½ä»¤å¼ã«æ•°å€¤ã—ã‹è¨˜è¿°ã•れã¦ã„ã¾ã›ã‚“。" #: io.c:618 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "`%s' リダイレクトã®å‘½ä»¤å¼ãŒç©ºåˆ—ã§ã™ã€‚" #: io.c:623 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "`%2$s' リダイレクトã«è«–ç†æ¼”ç®—ã®çµæžœã¨æ€ã‚れるファイルå `%1$s' ãŒä½¿ã‚れã¦ã„ã¾" "ã™ã€‚" #: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "ファイル `%.*s' ã§å¿…è¦ä»¥ä¸Šã« `>' 㨠`>>' を組åˆã›ã¦ã„ã¾ã™ã€‚" #: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "出力用ã«ãƒ‘イプ `%s' ã‚’é–‹ã‘ã¾ã›ã‚“ (%s)" #: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "入力用ã«ãƒ‘イプ `%s' ã‚’é–‹ã‘ã¾ã›ã‚“ (%s)" #: io.c:752 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "入出力用ã®åŒæ–¹å‘パイプ `%s' ãŒé–‹ã‘ã¾ã›ã‚“ (%s)" #: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "`%s' ã‹ã‚‰ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã§ãã¾ã›ã‚“ (%s)" #: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "`%s' ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã§ãã¾ã›ã‚“ (%s)" #: io.c:888 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "é–‹ã„ã¦ã„ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ãŒã‚·ã‚¹ãƒ†ãƒ åˆ¶é™ã«é”ã—ã¾ã—ãŸã€‚ファイル記述å­ã‚’多é‡åŒ–ã—ã¾" "ã™ã€‚" #: io.c:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "`%s' ã‚’é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)" #: io.c:912 msgid "too many pipes or input files open" msgstr "é–‹ã„ã¦ã„るパイプã¾ãŸã¯å…¥åŠ›ãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ãŒå¤šéŽãŽã¾ã™ã€‚" #: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close: 第二引数㯠`to' ã¾ãŸã¯ `from' ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“" #: io.c:951 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: `%.*s' ã¯é–‹ã„ã¦ã„るファイルã€ãƒ‘イプã€ãƒ—ロセス共有ã§ã¯ã‚りã¾ã›ã‚“" #: io.c:956 msgid "close of redirection that was never opened" msgstr "é–‹ã„ã¦ãªã„リダイレクトを閉ã˜ã‚ˆã†ã¨ã—ã¦ã„ã¾ã™" #: io.c:1053 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: リダイレクト `%s' 㯠`|&' を使用ã—ã¦é–‹ã‹ã‚Œã¦ã„ã¾ã›ã‚“。第二引数ã¯ç„¡è¦–ã•" "れã¾ã—ãŸ" #: io.c:1069 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "パイプ `%2$s' ã‚’é–‰ã˜ãŸã¨ãã®çŠ¶æ…‹ã‚³ãƒ¼ãƒ‰ãŒå¤±æ•— (%1$d) ã§ã—㟠(%3$s)。" #: io.c:1072 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "ファイル `%2$s' ã‚’é–‰ã˜ãŸã¨ãã®çŠ¶æ…‹ã‚³ãƒ¼ãƒ‰ãŒå¤±æ•— (%1$d) ã§ã—㟠(%3$s)。" #: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "ソケット `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。" #: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "並行プロセス `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。" #: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "パイプ `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。" #: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "ファイル `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。" #: io.c:1129 io.c:1184 main.c:794 main.c:831 #, c-format msgid "error writing standard output (%s)" msgstr "標準出力ã¸ã®æ›¸è¾¼ã¿ã‚¨ãƒ©ãƒ¼ (%s)" #: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "標準エラーã¸ã®æ›¸è¾¼ã¿ã‚¨ãƒ©ãƒ¼ (%s)" #: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "パイプ `%s' をフラッシュã§ãã¾ã›ã‚“ (%s)。" #: io.c:1144 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "`%s' ã¸æŽ¥ç¶šã™ã‚‹ãƒ‘イプを並行プロセスã‹ã‚‰ãƒ•ラッシュã§ãã¾ã›ã‚“ (%s)。" #: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "ファイル `%s' をフラッシュã§ãã¾ã›ã‚“ (%s)。" #: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "`/inet' 内ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒãƒ¼ãƒˆ %s ãŒç„¡åйã§ã™" #: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "リモートã®ãƒ›ã‚¹ãƒˆãŠã‚ˆã³ãƒãƒ¼ãƒˆæƒ…å ± (%s, %s) ãŒç„¡åйã§ã™" #: io.c:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" "スペシャルファイルå `%s' ã«ï¼ˆèªè­˜ã§ãã‚‹ï¼‰ãƒ—ãƒ­ãƒˆã‚³ãƒ«ãŒæŒ‡å®šã•れã¦ã„ã¾ã›ã‚“" #: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "スペシャルファイルå `%s' ã¯ä¸å®Œå…¨ã§ã™" #: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "`/inet' ã«ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ›ã‚¹ãƒˆåを与ãˆãªã‘れã°ã„ã‘ã¾ã›ã‚“" #: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "`/inet' ã«ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒãƒ¼ãƒˆç•ªå·ã‚’与ãˆãªã‘れã°ã„ã‘ã¾ã›ã‚“" #: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "TCP/IP 通信ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“" #: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "`%s' をモード `%s' ã§é–‹ã‘ã¾ã›ã‚“" #: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "マスター pty ã‚’é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)" #: io.c:1749 io.c:1917 io.c:2074 #, c-format msgid "close of stdout in child failed (%s)" msgstr "å­ãƒ—ãƒ­ã‚»ã‚¹ãŒæ¨™æº–出力を閉ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)" #: io.c:1752 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "å­ãƒ—ロセスãŒã‚¹ãƒ¬ãƒ¼ãƒ– pty を標準出力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。" #: io.c:1754 io.c:1922 #, c-format msgid "close of stdin in child failed (%s)" msgstr "å­ãƒ—ãƒ­ã‚»ã‚¹ãŒæ¨™æº–入力を閉ã˜ã‚‰ã‚Œã¾ã›ã‚“ (%s)。" #: io.c:1757 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "å­ãƒ—ロセスãŒã‚¹ãƒ¬ãƒ¼ãƒ– pty を標準入力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。" #: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" msgstr "スレーブ pty ã‚’é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%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 "å­ãƒ—ロセスãŒãƒ‘イプを標準出力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。" #: io.c:1865 io.c:1925 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "å­ãƒ—ロセスãŒãƒ‘イプを標準入力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。" #: io.c:1885 io.c:2067 msgid "restoring stdout in parent process failed\n" msgstr "è¦ªãƒ—ãƒ­ã‚»ã‚¹ãŒæ¨™æº–出力を復旧ã§ãã¾ã›ã‚“。\n" #: io.c:1893 msgid "restoring stdin in parent process failed\n" msgstr "è¦ªãƒ—ãƒ­ã‚»ã‚¹ãŒæ¨™æº–入力を復旧ã§ãã¾ã›ã‚“。\n" #: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" msgstr "パイプを閉ã˜ã‚‰ã‚Œã¾ã›ã‚“ (%s)。" #: io.c:1973 msgid "`|&' not supported" msgstr "`|&' ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。" #: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "パイプ `%s' ãŒé–‹ã‘ã¾ã›ã‚“ (%s)。" #: io.c:2087 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "`%s' 用ã®å­ãƒ—ロセスを実行ã§ãã¾ã›ã‚“ (fork: %s)。" #: io.c:2520 #, c-format msgid "data file `%s' is empty" msgstr "データファイル `%s' ã¯ç©ºã§ã™ã€‚" #: io.c:2561 io.c:2569 msgid "could not allocate more input memory" msgstr "入力用メモリーをã“れ以上確ä¿ã§ãã¾ã›ã‚“。" #: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "è¤‡æ•°ã®æ–‡å­—ã‚’ `RS' ã«ä½¿ç”¨ã™ã‚‹ã®ã¯ gawk ç‰¹æœ‰ã®æ‹¡å¼µã§ã™ã€‚" #: io.c:3232 msgid "IPv6 communication is not supported" msgstr "IPv6 通信ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“" #: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "gawk ã§ã¯ã‚ªãƒ—ション `-m[fr]' ã«åŠ¹æžœã¯ã‚りã¾ã›ã‚“。" #: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "-m オプションã®ä½¿ç”¨æ³•: `-m[fr] 数値'" #: 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:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: 引数ãŒå¿…è¦ãªã‚ªãƒ—ション -- %c\n" #: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "環境変数 `POSIXLY_CORRECT' ãŒæŒ‡å®šã•れã¦ã„ã¾ã™ã€‚オプション `--posix' を有効ã«" "ã—ã¾ã™" #: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "オプション `--posix' 㯠`--traditional' を無効ã«ã—ã¾ã™ã€‚" #: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" "オプション `--posix'/`--traditional' 㯠`--non-decimal-data' を無効ã«ã—ã¾ã™ã€‚" #: main.c:557 #, c-format msgid "running %s setuid root may be a security problem" msgstr "" "setuid root ã§ %s を実行ã™ã‚‹ã¨ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¸Šã®å•題ãŒç™ºç”Ÿã™ã‚‹å ´åˆãŒã‚りã¾" "ã™ã€‚" #: main.c:562 msgid "`--posix' overrides `--binary'" msgstr "`--posix' 㯠`--binary' を上書ãã—ã¾ã™" #: main.c:613 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "標準入力をãƒã‚¤ãƒŠãƒªãƒ¢ãƒ¼ãƒ‰ã«è¨­å®šã§ãã¾ã›ã‚“ (%s)" #: main.c:616 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "標準出力をãƒã‚¤ãƒŠãƒªãƒ¢ãƒ¼ãƒ‰ã«è¨­å®šã§ãã¾ã›ã‚“ (%s)" #: main.c:618 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "標準エラーをãƒã‚¤ãƒŠãƒªãƒ¢ãƒ¼ãƒ‰ã«è¨­å®šã§ãã¾ã›ã‚“ (%s)" #: main.c:657 msgid "no program text at all!" msgstr "プログラム文ãŒå…¨ãã‚りã¾ã›ã‚“!" #: main.c:734 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "使用法: %s [POSIX ã¾ãŸã¯ GNU å½¢å¼ã®ã‚ªãƒ—ション] -f progfile [--] file ...\n" #: main.c:736 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" "使用法: %s [POSIX ã¾ãŸã¯ GNU å½¢å¼ã®ã‚ªãƒ—ション] [--] %cprogram%c file ...\n" #: main.c:741 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "POSIX オプション:\t\tGNU é•·ã„å½¢å¼ã®ã‚ªãƒ—ション: (標準)\n" #: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f progfile\t\t--file=progfile\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=val\t\t--assign=var=val\n" #: main.c:745 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-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-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=file\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\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: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" "ãƒã‚°ã‚’報告ã™ã‚‹ã«ã¯ã€`gawk.info(英文)' ã® `Bugs' ノードを\n" "å‚ç…§ã—ã¦ãã ã•ã„。 å°åˆ·ã•れãŸãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã§å¯¾å¿œã™ã‚‹ã‚»ã‚¯ã‚·ãƒ§ãƒ³\n" "ã¯ã€`Reporting Problems and Bugs' ã§ã™ã€‚\n" "\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 ã¯ã€ãƒ‘ターンを検索をã—ã¦ã€ãれを処ç†ã™ã‚‹è¨€èªžã§ã™ã€‚\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 "" "使用例:\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 "" "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: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 "" "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: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 "" "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:856 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "POSIX awk ã§ã¯ -Ft 㯠FS をタブã«è¨­å®šã—ã¾ã›ã‚“" #: 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" "\n" #: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' ã¯ä¸æ­£ãªå¤‰æ•°åã§ã™" #: main.c:1200 #, c-format msgid "`%s' is not a variable name, looking for file `%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:1262 msgid "floating point exception" msgstr "æµ®å‹•å°æ•°ç‚¹ä¾‹å¤–" #: main.c:1269 msgid "fatal error: internal error" msgstr "致命的エラー: 内部エラー" #: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "致命的エラー: 内部エラー: セグメンテーションé•å" #: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "致命的エラー: 内部エラー: スタックオーãƒãƒ¼ãƒ•ロー" #: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "fd %d ãŒäº‹å‰ã«é–‹ã„ã¦ã„ã¾ã›ã‚“。" #: main.c:1353 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "事å‰ã« fd %d 用㫠/dev/null ã‚’é–‹ã‘ã¾ã›ã‚“。" #: msg.c:63 #, c-format msgid "cmd. line:" msgstr "コマンドライン:" #: msg.c:107 msgid "error: " msgstr "エラー: " #: node.c:406 msgid "backslash at end of string" msgstr "文字列ã®çµ‚りã«ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ãŒä½¿ã‚れã¦ã„ã¾ã™ã€‚" #: node.c:517 #, c-format msgid "old awk does not support the `\\%c' escape sequence" msgstr "å¤ã„ awk 㯠`\\%c' エスケープシーケンスをサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" #: node.c:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX ã§ã¯ `\\x' エスケープã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" #: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "`\\x' エスケープシーケンスã«å六進数ãŒã‚りã¾ã›ã‚“" #: 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:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "エスケープシーケンス `\\%c' 㯠`%c' ã¨åŒç­‰ã«æ‰±ã‚れã¾ã™" #: node.c:750 msgid "" "Invalid multibyte data detected. There may be a mismatch between your data " "and your locale." msgstr "" "無効ãªãƒžãƒ«ãƒãƒã‚¤ãƒˆãƒ‡ãƒ¼ã‚¿ãŒæ¤œå‡ºã•れã¾ã—ãŸã€‚データã¨ãƒ­ã‚±ãƒ¼ãƒ«ãŒä¸€è‡´ã—ã¦ã„ãªã„よ" "ã†ã§ã™ã€‚" #: posix/gawkmisc.c:176 #, c-format msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "%s %s `%s': 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': close-on-exec を設定ã§ãã¾ã›ã‚“: (fcntl F_SETFD: %s)" #: profile.c:83 #, c-format msgid "could not open `%s' for writing: %s" msgstr "`%s' を書込ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ã§ã—ãŸ: %s" #: profile.c:85 msgid "sending profile to standard error" msgstr "プロファイルを標準エラーã«é€ã£ã¦ã„ã¾ã™" #: profile.c:203 #, c-format msgid "" "\t# %s block(s)\n" "\n" msgstr "" "\t# %s ブロック\n" "\n" #: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" "\t# ルール\n" "\n" #: profile.c:279 #, c-format 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:1331 #, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" msgstr "" "\n" "\t# 関数一覧(アルファベット順)\n" #: profile.c:1370 #, c-format msgid "redir2str: unknown redirection type %d" msgstr "redir2str: 䏿˜Žãªãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆåž‹ %d ã§ã™" #: re.c:573 #, fuzzy, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "`[%c-%c]' å½¢å¼ã®ç¯„囲ã¯ãƒ­ã‚±ãƒ¼ãƒ«ä¾å­˜ã§ã™" #: re.c:600 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "æ­£è¦è¡¨ç¾ã®è¦ç´  `%.*s' ã¯ãŠãらã `[%.*s]' ã§ã‚ã‚‹ã¹ãã§ã™" #: regcomp.c:131 msgid "Success" msgstr "æˆåŠŸã§ã™" #: regcomp.c:134 msgid "No match" msgstr "一致ã—ã¾ã›ã‚“" #: regcomp.c:137 msgid "Invalid regular expression" msgstr "ç„¡åŠ¹ãªæ­£è¦è¡¨ç¾ã§ã™" #: regcomp.c:140 msgid "Invalid collation character" msgstr "無効ãªç…§åˆæ–‡å­—ã§ã™" #: regcomp.c:143 msgid "Invalid character class name" msgstr "ç„¡åŠ¹ãªæ–‡å­—クラスåã§ã™" #: regcomp.c:146 msgid "Trailing backslash" msgstr "終端ã®ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥" #: regcomp.c:149 msgid "Invalid back reference" msgstr "無効ãªå‰æ–¹å‚ç…§ã§ã™" #: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "[ ã¾ãŸã¯ [^ ãŒä¸ä¸€è‡´ã§ã™" #: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "( ã¾ãŸã¯ \\( ãŒä¸ä¸€è‡´ã§ã™" #: regcomp.c:158 msgid "Unmatched \\{" msgstr "\\{ ãŒä¸ä¸€è‡´ã§ã™" #: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "\\{\\} ã®ä¸­èº«ãŒç„¡åйã§ã™" #: regcomp.c:164 msgid "Invalid range end" msgstr "無効ãªç¯„囲終了ã§ã™" #: regcomp.c:167 msgid "Memory exhausted" msgstr "ãƒ¡ãƒ¢ãƒªã‚’ä½¿ã„æžœãŸã—ã¾ã—ãŸ" #: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "無効ãªå‰æ–¹æ­£è¦è¡¨ç¾ã§ã™" #: regcomp.c:173 msgid "Premature end of regular expression" msgstr "æ­£è¦è¡¨ç¾ãŒé€”中ã§çµ‚了ã—ã¾ã—ãŸ" #: regcomp.c:176 msgid "Regular expression too big" msgstr "æ­£è¦è¡¨ç¾ãŒå¤§ãã™ãŽã¾ã™" #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") ã¾ãŸã¯ \\) ãŒä¸ä¸€è‡´ã§ã™" #: regcomp.c:700 msgid "No previous regular expression" msgstr "以å‰ã«æ­£è¦è¡¨ç¾ãŒã‚りã¾ã›ã‚“" #~ msgid "could not find groups: %s" #~ msgstr "グループãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“: %s" #~ msgid "assignment is not allowed to result of builtin function" #~ msgstr "çµ„è¾¼é–¢æ•°ã®æˆ»ã‚Šå€¤ã¸ã®ä»£å…¥ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" gawk-4.0.1+dfsg.orig/po/de.po0000644000175000017500000017335111734667242014741 0ustar schotschot# Deutsche Meldungen für GNU awk # Copyright (C) 2000 Free Software Foundation, Inc. # This file is distributed under the same license as the gawk package. # # Philipp Thomas , 2011 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-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=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #: 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 "Es wird versucht, die Funktion »%s« als Feld zu verwenden" #: array.c:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "Es wird versucht, den skalaren Parameter »%s« als Feld zu verwenden" #: array.c:257 #, c-format msgid "attempt to use scalar `%s' as an array" msgstr "Es wird versucht, den Skalar »%s« als Array zu verwenden" #: 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 #, c-format msgid "reference to uninitialized 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 "Der Index von Feld »%s« ist ein Nullstring" #: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" 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:910 #, c-format msgid "%s: empty (null)\n" msgstr "%s: leer (Null)\n" #: array.c:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: leer (0)\n" #: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: Tabellengröße = %d, Feldgröße = %d\n" #: array.c:954 #, c-format msgid "%s: is parameter\n" msgstr "%s: ist ein Parameter\n" #: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: Feld-Referenz auf %s\n" #: 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 "%s-Blöcke müssen einen Aktionsteil haben" #: awkgram.y:252 msgid "each rule must have a pattern or an action part" msgstr "Jede Regel muss entweder ein Muster oder einen Aktionsteil haben" #: awkgram.y:323 awkgram.y:334 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "Das alte awk erlaubt keine mehrfachen »BEGIN«- oder »END«-Regeln" #: 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" #: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "" "Die Regulärer-Ausdruck-Konstante »//« sieht wie ein C-Kommentar aus, ist " "aber keiner" #: awkgram.y:436 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "" "Die Regulärer-Ausdruck-Konstante »/%s/« sieht wie ein C-Kommentar aus, ist " "aber keiner" #: awkgram.y:528 #, c-format msgid "duplicate case values in switch body: %s" msgstr "doppelte Case-Werte im Switch-Block: %s" #: 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: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" #: 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« wird außerhalb einer Funktion verwendet" #: 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" #: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "»delete array« ist eine gawk-Erweiterung" #: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "»delete(array)« ist eine gawk-Erweiterung" #: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "mehrstufige Zweiwege-Pipes funktionieren nicht" #: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "Regulärer Ausdruck auf der rechten Seite einer Zuweisung" #: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "Regulärer Ausdruck links vom »~«- oder »!~«-Operator" #: awkgram.y:1265 awkgram.y:1419 msgid "old awk does not support the keyword `in' except after `for'" msgstr "Das alte awk unterstützt das Schlüsselwort »in« nur nach »for«" #: awkgram.y:1275 msgid "regular expression on right of comparison" 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: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" #: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" msgstr "Das alte awk unterstützt keine mehrdimensionalen Felder" #: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "Aufruf von »length« ohne Klammern ist nicht portabel" #: awkgram.y:1580 msgid "indirect function calls are a gawk extension" msgstr "indirekte Funktionsaufrufe sind eine gawk-Erweiterung" #: 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:1671 msgid "invalid subscript expression" msgstr "Ungültiger Index-Ausdruck" #: awkgram.y:1711 msgid "use of non-array as array" msgstr "Verwendung eines Nicht-Feldes als Feld" #: 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: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 "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: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 "Die Quelldatei »%s« kann nicht gelesen werden (%s)" #: awkgram.y:2620 #, c-format msgid "source file `%s' is empty" msgstr "Die Quelldatei »%s« ist leer" #: awkgram.y:2797 msgid "source file does not end in newline" msgstr "Die Quelldatei hört nicht mit einem Zeilenende auf" #: 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" #: 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: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:2935 msgid "unterminated regexp" msgstr "Nicht beendeter regulärer Ausdruck" #: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "Nicht beendeter regulärer Ausdruck am Dateiende" #: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "" "Die Verwendung von »\\#...« zur Fortsetzung von Zeilen ist nicht portabel" #: awkgram.y:3014 msgid "backslash not last character on line" msgstr "das letzte Zeichen auf der Zeile ist kein Backslash (»\\«)" #: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX erlaubt den Operator »**=« nicht" #: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "Das alte awk unterstützt den Operator »**=« nicht" #: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX erlaubt den Operator »**« nicht" #: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "Das alte awk unterstützt den Operator »**« nicht" #: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "Das alte awk unterstützt den Operator »^=« nicht" #: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "Das alte awk unterstützt den Operator »^« nicht" #: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "Nicht beendete Zeichenkette" #: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "Ungültiges Zeichen »%c« in einem Ausdruck" #: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "»%s« ist eine gawk-Erweiterung" #: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "»%s« ist eine Erweiterung der Bell Labs" #: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX erlaubt »%s« nicht" #: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "»%s« wird im alten awk nicht unterstützt" #: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "»goto« gilt als schlechter Stil!\n" #: awkgram.y:3619 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "Unzulässige Argumentzahl %d für %s" #: 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" #: awkgram.y:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "Der dritte Parameter von %s ist ein unveränderliches Objekt" #: 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" #: awkgram.y:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "Fehlerhafte Verwendung von dcgettext(_\"...\"): \n" "Entfernen Sie den führenden Unterstrich" #: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "Fehlerhafte Verwendung von dcngettext(_\"...\"): \n" "Entfernen Sie den führenden Unterstrich" #: awkgram.y:3911 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "Funktion »%s«: Parameter #%d, »%s« wiederholt Parameter #%d" #: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "Funktion »%s«: Parameter »%s« verdeckt eine globale Variable" #: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "»%s« kann nicht zum Schreiben geöffne werden(%s)" #: awkgram.y:4112 msgid "sending variable list to standard error" msgstr "Die Liste der Variablen wird auf der Standardfehlerausgabe ausgegeben" #: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s: close ist gescheitert (%s)" #: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() zweimal aufgerufen!" #: awkgram.y:4176 msgid "there were shadowed variables." msgstr "es sind verdeckte Variablen vorhanden" #: awkgram.y:4206 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "Funktion »%s«: Funktionsnamen können nicht als Parameternamen benutzen" #: awkgram.y:4210 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "Funktion »%s«: die spezielle Variable »%s« kann nicht als Parameter " "verwendet werden" #: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" msgstr "Funktion »%s« wurde bereits definiert" #: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" msgstr "Aufgerufene Funktion »%s« ist nirgends definiert" #: awkgram.y:4403 #, c-format msgid "function `%s' defined but never called directly" msgstr "Funktion »%s« wurde definiert aber nirgends aufgerufen" #: awkgram.y:4435 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" "Regulärer-Ausdruck-Konstante für Parameter #%d ergibt einen \n" "logischen Wert" #: 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« wird mit Leerzeichen zwischen Name und »(« aufgerufen, \n" "oder als Variable oder Feld verwendet" #: awkgram.y:4791 eval.c:2056 msgid "division by zero attempted" msgstr "Division durch Null wurde versucht" #: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "Division durch Null versucht in »%%«" #: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s to \"%s\" fehlgeschlagen (%s)" #: builtin.c:121 msgid "standard output" msgstr "Standardausgabe" #: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "exp: das Argument ist keine Zahl" #: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: das Argument %g liegt außerhalb des gültigen Bereichs" #: 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" #: 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" #: 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" #: builtin.c:333 msgid "index: received non-string first argument" msgstr "index: Erstes Argument ist kein String" #: builtin.c:335 msgid "index: received non-string second argument" msgstr "index: Zweites Argument ist kein string" #: builtin.c:457 msgid "int: received non-numeric argument" msgstr "Argument ist keine Zahl" #: builtin.c:493 msgid "length: received array argument" msgstr "length: Argument ist ein Feld" #: builtin.c:496 msgid "`length(array)' is a gawk extension" msgstr "»length(array)« ist eine gawk-Erweiterung" #: builtin.c:504 msgid "length: received non-string argument" msgstr "length: Argument ist kein String" #: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log: Argument ist keine Zahl" #: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log: Negatives Argument %g" #: 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:762 #, c-format msgid "field width is ignored for `%%' specifier" msgstr "Feldbreite wird für die »%%«-Angabe ignoriert" #: builtin.c:764 #, c-format msgid "precision is ignored for `%%' specifier" msgstr "Genauigkeit wird für die »%%«-Angabe ignoriert" #: builtin.c:766 #, c-format msgid "field width and precision are ignored for `%%' specifier" msgstr "Feldbreite und Genauigkeit werden für die »%%«-Angabe ignoriert" #: builtin.c:817 msgid "fatal: `$' is not permitted in awk formats" msgstr "Fatal: »$« ist in awk-Formaten nicht zulässig" #: builtin.c:826 msgid "fatal: arg count with `$' must be > 0" msgstr "Fatal: die Anzahl der Argumen bei »$« muss > 0 sein" #: 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: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:921 msgid "`l' is meaningless in awk formats; ignored" msgstr "»l« ist in awk-Formaten bedeutungslos, ignoriert" #: 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:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "»L« ist in awk-Formaten bedeutungslos, ignoriert" #: 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:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "»h« ist in awk-Formaten bedeutungslos, ignoriert" #: 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:1272 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" 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:1337 msgid "fatal: not enough arguments to satisfy format string" msgstr "Fatal: Nicht genügend Argumente für die Formatangabe" #: builtin.c:1339 msgid "^ 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-Spezifikation hat keinen Controlcode" #: builtin.c:1349 msgid "too many arguments supplied for format string" msgstr "Zu viele Argumente für den Formatstring" #: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: Keine Argumente" #: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt: das Argument ist keine Zahl" #: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: das Argument %g ist negativ" #: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: Länge %g ist nicht >= 1" #: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: Länge %g ist nicht >= 0" #: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: Nicht ganzzahlige Länge %g wird abgeschnitten" #: 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:1559 msgid "substr: source string is zero length" msgstr "substr: Quellstring ist leer" #: builtin.c:1575 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: Start-Wert %g liegt hinter dem Ende des Strings" #: builtin.c:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" "substr: Länge %g am Start-Wert %g überschreitet die Länge des ersten " "Arguments (%lu)" #: 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: Das erste Argument ist kein String" #: builtin.c:1696 msgid "strftime: received empty format string" msgstr "strftime: Der Format-String ist leer" #: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime: Das Argument ist kein String" #: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" 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:1819 msgid "system: received non-string argument" msgstr "system: Das Argument ist kein String" #: 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 das nicht initialisierte Feld »$%d«" #: builtin.c:2028 msgid "tolower: received non-string argument" msgstr "tolower: das Argument ist kein String" #: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper: das Argument ist kein String" #: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2: das erste Argument ist keine Zahl" #: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2: das zweite Argument ist keine Zahl" #: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin: das Argument ist keine Zahl" #: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos: das Argument ist keine Zahl" #: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand: das Argument ist keine Zahl" #: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match: das dritte Argument ist kein Array" #: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: 0 als drittes Argument wird als 1 interpretiert" #: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift: das erste Argument ist keine Zahl" #: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift: das zweite Argument ist keine Zahl" #: builtin.c:2784 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "" "lshift(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" #: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): Dezimalteil wird abgeschnitten" #: 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 zu merkwürdigen Ergebnissen " "führen" #: builtin.c:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift: das erste Argument ist keine Zahl" #: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift: das zweite Argument ist keine Zahl" #: builtin.c:2821 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "" "rshift (%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" #: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): Dezimalteil wird abgeschnitten" #: 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 zu merkwürdigen Ergebnissen " "führen" #: builtin.c:2850 msgid "and: received non-numeric first argument" msgstr "and: das erste Argument ist keine Zahl" #: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and: das zweite Argument ist keine Zahl" #: builtin.c:2858 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "" "and(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" #: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): Dezimalteil wird abgeschnitten" #: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "or: das erste Argument ist keine Zahl" #: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or: das zweite Argument ist keine Zahl" #: builtin.c:2893 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" #: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): Dezimalteil wird abgeschnitten" #: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "xor: das erste Argument ist keine Zahl" #: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor: das zweite Argument ist keine Zahl" #: builtin.c:2931 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf: Negative Werte werden zu merkwürdigen Ergebnissen führen" #: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): Dezimalteil wird abgeschnitten" #: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl: das erste Argument ist keine Zahl" #: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): Negativer Wert wird zu merkwürdigen Ergebnissen führen" #: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): Dezimalteil wird abgeschnitten" #: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: »%s« ist keine gültige Locale-Kategorie" #: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "Unbekannter Knotentyp %d" #: eval.c:423 eval.c:437 #, c-format msgid "unknown opcode %d" msgstr "Unbekannter Opcode %d" #: 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:488 msgid "buffer overflow in genflags2str" msgstr "Pufferüberlauf in genflags2str" #: eval.c:698 #, c-format msgid "" "\n" "\t# Function Call Stack:\n" "\n" msgstr "" "\n" "\t# Funktions-Aufruf-Stack\n" "\n" #: eval.c:725 msgid "`IGNORECASE' is a gawk extension" msgstr "»IGNORECASE« ist eine gawk-Erweiterung" #: eval.c:754 msgid "`BINMODE' is a gawk extension" msgstr "»BINMODE« ist eine gawk-Erweiterung" #: 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:902 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "Falsche »%sFMT«-Angabe »%s«" #: eval.c:980 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "»--lint« wird abgeschaltet, da an »LINT« zugewiesen wird" #: eval.c:1127 eval.c:1777 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "Funktion »%s« kann nicht als Variable oder Feld verwendet werden" #: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "Referenz auf nicht initialisiertes Argument »%s«" #: eval.c:1177 msgid "attempt to field reference from non-numeric value" msgstr "Nicht numerischer Wert für Feldreferenz verwendet" #: eval.c:1179 msgid "attempt to field reference from null string" msgstr "Referenz auf ein Feld von einem Null-String" #: eval.c:1185 #, c-format msgid "attempt to access field %ld" msgstr "Versuch des Zugriffs auf Feld %ld" #: eval.c:1194 #, c-format msgid "reference to uninitialized field `$%ld'" msgstr "Referenz auf das nicht initialisierte Feld »$%ld«" #: eval.c:1256 #, c-format 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:1532 msgid "division by zero attempted in `/='" msgstr "Division durch Null versucht in »/=«" #: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "Division durch Null versucht in »%%=«" #: eval.c:1876 eval.c:2122 #, c-format 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:1907 msgid "assignment used in conditional context" msgstr "Zuweisung in einer Bedingung" #: eval.c:1911 msgid "statement has no effect" msgstr "Anweisung hat keinen Effekt" #: eval.c:2343 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "for-Schleife: Feld »%s« ändert seine Größe von %ld innerhalb der Schleife zu " "%ld" #: eval.c:2458 #, c-format msgid "function called indirectly through `%s' does not exist" msgstr "die durch »%s« indirekt aufgerufene Funktion existiert nicht" #: eval.c:2470 #, c-format msgid "function `%s' not defined" msgstr "Funktion »%s« ist nicht definiert" #: eval.c:2511 #, c-format msgid "non-redirected `getline' invalid inside `%s' rule" msgstr "Nicht umgelenktes »getline« ist innerhalb der »%s«-Aktion unzuässig" #: eval.c:2600 #, c-format msgid "error reading input file `%s': %s" msgstr "Fehler beim Lesen der Eingabedatei »%s«: %s" #: 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:2661 msgid "`exit' cannot be called in the current context" msgstr "»exit« kann im aktuellen Kontext nicht aufgerufen werden" #: eval.c:2700 #, c-format msgid "`next' cannot be called from a `%s' rule" msgstr "»next« kann nicht in einer »%s«-Regel verwendet werden" #: eval.c:2766 #, c-format msgid "Sorry, don't know how to interpret `%s'" msgstr "Entschuldigung, aber es ist unbekannt, wie »%s« zu interpretieren ist" #: ext.c:54 msgid "extensions are not allowed in sandbox mode" msgstr "Erweiterungen sind im Sandbox-Modus nicht erlaubt" #: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" msgstr "»extension« ist eine gawk-Erweiterung" #: ext.c:75 #, c-format msgid "fatal: extension: cannot open `%s' (%s)\n" msgstr "Fatal: extension: »%s« kann nicht geöffnet werden (%s)\n" #: ext.c:84 #, c-format 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: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: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 "Erweiterung: unzulässiges Zeichen »%c« in Funktionsname »%s«" #: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "Erweiterung: Funktion »%s« kann nicht neu definiert werden" #: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "Erweiterung: Funktion »%s« wurde bereits definiert" #: 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: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:259 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "" "Funktion »%s« wird als Funktion definiert, die nie mehr als %d Argument(e) " "akzeptiert" #: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "Funktion »%s«: fehlendes Argument #%d" #: ext.c:279 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "" "Funktion »%s«: Argument #%d: Es wird versucht, einen Skalar als Feld zu " "verwenden" #: 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:296 msgid "Operation Not Supported" msgstr "Die Operation wird nicht unterstützt" #: field.c:328 msgid "NF set to negative value" msgstr "NF wird ein negativer Wert zugewiesen" #: 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: 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:1010 msgid "split: null string for third arg is a gawk extension" 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: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" #: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "ungültiger FIELDWIDTHS-Wert nah bei »%s«" #: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "Null-String für »FS« ist eine gawk-Erweiterung" #: field.c:1250 msgid "old awk does not support regexps as value of `FS'" msgstr "Das alte awk unterstützt keine regulären Ausdrücke als Wert von »FS«" #: field.c:1369 msgid "`FPAT' is a gawk extension" msgstr "»FPAT« ist eine gawk-Erweiterung" #: 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: Die Option »--%s« hat keine Argumente\n" #: getopt.c:692 getopt.c:697 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: Die Option »%c%s« hat keine Argument\n" #: getopt.c:740 getopt.c:759 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: Die Option »%s« erfordert ein Argument\n" #: getopt.c:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: Die Option »--%s« ist unbekannt\n" #: getopt.c:808 getopt.c:811 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: Die Option »%c%s« ist unbekannt\n" #: getopt.c:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: Ungültige Option -- »%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 Die Option »%c« erfordert ein Argument\n" #: getopt.c:989 getopt.c:1005 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: Die Option »-W %s« ist mehrdeutig\n" #: getopt.c:1029 getopt.c:1047 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: Die Option »-W %s« hat keine Argumente\n" #: getopt.c:1068 getopt.c:1086 #, c-format msgid "%s: option '-W %s' requires an 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:283 io.c:385 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "Die Datei »%s« kann nicht zum Lesen geöffnet werden (%s)" #: io.c:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "Das Schließen des Dateideskriptors %d (»%s«) ist gescheitert (%s)" #: io.c:578 msgid "redirection not allowed in sandbox mode" msgstr "Umlenkungen sind im Sandbox-Modus nicht erlaubt" #: io.c:612 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "" "Der Ausdruck in einer Umlenkung mittels »%s« hat nur einen numerischen Wert" #: io.c:618 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "Der Ausdruck für eine Umlenkung mittels »%s« ist ein leerer String" #: io.c:623 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "Der Dateiname »%s« für eine Umlenkung mittels »%s« kann das Ergebnis eines " "logischen Ausdrucks sein" #: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "Unnötige Kombination von »>« und »>>« für Datei »%.*s«" #: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "Die Pipe »%s« kann nicht für die Ausgabe geöffnet werden (%s)" #: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "Die Pipe »%s« kann nicht für die Eingabe geöffnet werden (%s)" #: io.c:752 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" "Die bidirektionale Pipe »%s« kann nicht für die Ein-/Ausgabe geöffnet werden " "(%s)" #: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "Von »%s« kann nicht umgelenkt werden (%s)" #: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "Zu »%s« kann nicht umgelenkt werden (%s)" #: io.c:888 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "Die Systemgrenze offener Dateien ist erreicht, daher werden nun " "Dateideskriptoren mehrfach verwendet" #: io.c:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "Das Schließen von »%s« ist gescheitert (%s)." #: io.c:912 msgid "too many pipes or input files open" msgstr "Zu viele Pipes oder Eingabedateien offen" #: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close: Das zweite Argument muss »to« oder »from« sein" #: io.c:951 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: »%.*s« ist weder offene Datei, noch Pipe oder Ko-Prozess" #: io.c:956 msgid "close of redirection that was never opened" msgstr "»close« für eine Umlenkung, die nie geöffnet wurde" #: io.c:1053 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: Umlenkung »%s« wurde nicht mit »[&« geöffnet, das zweite Argument " "wird ignoriert" #: 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)" #: io.c:1072 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "Fehlerstatus (%d) beim Schließen der Datei »%s« (%s)" #: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "Das explizite Schließen des Sockets »%s« fehlt" #: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "Das explizite Schließen des Ko-Prozesses »%s« fehlt" #: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "Das explizite Schließen der Pipe »%s« fehlt" #: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "Das explizite Schließen der Datei »%s« fehlt" #: 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 die Standardausgabe (%s)" #: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "Fehler beim Schreiben auf die Standardfehlerausgabe (%s)" #: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "Das Leeren der Pipe »%s« ist gescheitert (%s)" #: io.c:1144 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "Ko-Prozess: Das Leeren der Pipe zu »%s« ist gescheitert (%s)" #: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "Das Leeren der Datei »%s« ist gescheitert (%s)" #: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "Der lokale Port »%s« ist ungültig in »/inet«" #: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "Die Angaben zu entferntem Host und Port (%s, %s) sind ungültig" #: io.c:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "Es wurde kein (bekanntes) Protokoll im Dateinamen »%s« angegeben" #: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "Der Dateiname »%s« ist unvollständig" #: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "Sie müssen in /inet einen Rechnernamen angeben" #: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "Sie müssen in »/inet« einen Port angeben" #: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-Verbindungen werden nicht unterstützt" #: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "»%s« konnte nicht geöffnet werden, Modus »%s«" #: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "" "Das Schließen der übergeordneten Terminal-Gerätedatei ist gescheitert (%s)" #: io.c:1749 io.c:1917 io.c:2074 #, c-format msgid "close of stdout in child failed (%s)" msgstr "Das Schließen der Standardausgabe im Kindprozess ist gescheitert (%s)" #: io.c:1752 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "Das Verschieben der untergeordneten Terminal-Gerätedatei zur Standardausgabe " "im Kindprozess ist gescheitert (dup: %s)" #: 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)" #: io.c:1757 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "Das Verschieben der untergeordneten Terminal-Gerätedatei zur Standardeingabe " "im Kindprozess ist gescheitert (dup: %s)" #: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" msgstr "" "Das Schließen der untergeordneten Terminal-Gerätedatei ist gescheitert (%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 "" "Das Verschieben der Pipe zur Standardausgabe im Kindprozess ist gescheitert " "(dup: %s)" #: io.c:1865 io.c:1925 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" "Das Verschieben der Pipe zur Standardeingabe im Kindprozess ist gescheitert " "(dup: %s)" #: 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:1893 msgid "restoring stdin in parent process failed\n" msgstr "" "Das Wiederherstellen der Standardeingabe im Elternprozess ist gescheitert\n" #: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" msgstr "Das Schließen der Pipe ist gescheitert (%s)" #: io.c:1973 msgid "`|&' not supported" msgstr "»|&« wird nicht unterstützt" #: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "Pipe »%s« kann nicht geöffnet werden (%s)" #: io.c:2087 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "Kindprozess für »%s« kann nicht erzeugt werden (fork: %s)" #: io.c:2520 #, c-format msgid "data file `%s' is empty" msgstr "Die Datei »%s« ist leer" #: io.c:2561 io.c:2569 msgid "could not allocate more input memory" msgstr "Es konnte kein weiterer Speicher für die Eingabe beschafft werden" #: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "Multicharacter-Wert von »RS« ist eine gawk-Erweiterung" #: io.c:3232 msgid "IPv6 communication is not supported" msgstr "IPv6-Verbindungen werden nicht unterstützt" #: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "Die Option »-m[fr]« ist in gawk bedeutungslos" #: main.c:368 msgid "-m option usage: `-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:462 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: Die Option »-W %s« ist unbekannt und wird ignoriert\n" #: main.c:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: Die Option %c erfordert ein Argument\n" #: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "Die Umgebungsvariable »POSIXLY_CORRECT« ist gesetzt: »--posix« wird " "eingeschaltet" #: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "»--posix« hat Vorrang vor »--traditional«" #: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "»--posix« /»--traditional« hat Vorrang vor »--non-decimal-data«" #: 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" #: 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 "" "Das Setzen des Binärermodus für die Standardeingabe ist nicht möglich (%s)" #: main.c:616 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "" "Das Setzen des Binärermodus für die Standardausgabe ist nicht möglich (%s)" #: main.c:618 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "" "Das Setzen des Binärermodus für die Standardfehlerausgabe ist nicht möglich " "(%s)" #: main.c:657 msgid "no program text at all!" msgstr "Es wurde überhaupt kein Programmtext angegeben!" #: main.c:734 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Aufruf: %s [POSIX- oder GNU-Optionen] -f PROGRAMM [--] Datei ...\n" #: main.c:736 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Aufruf: %s [POSIX- oder GNU-Optionen] -- %cPROGRAMM%c Datei ...\n" #: main.c:741 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "POSIX-Optionen\t\tlange GNU-Optionen: (standard)\n" #: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f PROGRAMM\t\t--file=PROGRAMM\n" #: 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: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:745 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-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-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'Programmtext'\t--source=Programmtext\n" #: main.c:751 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-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\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: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" "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: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: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: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" "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" "\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 "" "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: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, lesen Sie bitte\n" "http://www.gnu.org/licenses/.\n" #: main.c:856 msgid "-Ft does not set FS to tab in POSIX awk" 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: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:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "»%s« ist kein gültiger Variablenname" #: 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:1262 msgid "floating point exception" msgstr "Fließkomma-Ausnahme" #: main.c:1269 msgid "fatal error: internal error" msgstr "Fataler Fehler: interner Fehler" #: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "Fataler Fehler: interner Fehler: Speicherbegrenzungsfehler" #: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "Fataler Fehler: interner Fehler: Stapelüberlauf" #: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "Kein bereits geöffneter Dateideskriptor %d" #: main.c:1353 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "/dev/null konnte nicht für Dateideskriptor %d geöffnet werden" #: msg.c:63 #, c-format msgid "cmd. line:" msgstr "Kommandozeile:" #: msg.c:107 msgid "error: " msgstr "Fehler: " #: node.c:406 msgid "backslash at end of string" msgstr "Backslash am Ende der Zeichenkette" #: node.c:517 #, c-format msgid "old awk does not support the `\\%c' escape sequence" msgstr "Das alte awk unterstützt die Fluchsequenz »\\%c« nicht" #: node.c:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX erlaubt keine »\\x«-Escapes" #: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "In der »\\x«-Fluchtsequenz sind keine hexadezimalen Zahlen" #: 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:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "Fluchtsequenz »\\%c« wird wie ein normales »%c« behandelt" #: 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" #: posix/gawkmisc.c:176 #, c-format 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)" #: posix/gawkmisc.c:188 #, c-format 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:83 #, c-format msgid "could not open `%s' for writing: %s" msgstr "»%s« konnte nicht zum Schreiben geöffnet werden: %s" #: profile.c:85 msgid "sending profile to standard error" msgstr "Das Profil wird auf der Standardfehlerausgabe ausgegeben" #: profile.c:203 #, c-format msgid "" "\t# %s block(s)\n" "\n" msgstr "" "\t# %s Blöcke\n" "\n" #: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" "\t# Regeln(s)\n" "\n" #: profile.c:279 #, c-format msgid "internal error: %s with null vname" msgstr "Interner Fehler: %s mit null vname" #: 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# Funktionen in alphabetischer Reihenfolge\n" #: profile.c:1370 #, c-format msgid "redir2str: unknown redirection type %d" msgstr "redir2str: unbekannter Umlenkungstyp %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" #: 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:134 msgid "No match" msgstr "Kein Treffer" #: regcomp.c:137 msgid "Invalid regular expression" msgstr "Ungültiger Regulärer Ausdruck" #: regcomp.c:140 msgid "Invalid collation character" msgstr "Ungültiges Zeichen" #: regcomp.c:143 msgid "Invalid character class name" msgstr "Ungültiger Name für eine Zeichenklasse" #: regcomp.c:146 msgid "Trailing backslash" msgstr "Angehängter Backslash" #: regcomp.c:149 msgid "Invalid back reference" msgstr "Ungültige Rück-Referenz" #: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "[ oder [^ werden nicht geschlossen" #: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "( oder \\( werden nicht geschlossen" #: regcomp.c:158 msgid "Unmatched \\{" msgstr "\\{ wird nicht geschlossen" #: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Ungültiger Inhalt von \\{\\}" #: regcomp.c:164 msgid "Invalid range end" msgstr "Ungültiges Bereichsende" #: regcomp.c:167 msgid "Memory exhausted" msgstr "Kein freier Speicher mehr vorhanden" #: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Vorangehender regulärer Ausdruck ist ungültig" #: regcomp.c:173 msgid "Premature end of regular expression" msgstr "Vorzeitiges Ende des regulären Ausdrucks" #: regcomp.c:176 msgid "Regular expression too big" msgstr "Regulärer Ausdruck ist zu groß" #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") oder \\) werden nicht geöffnet" #: regcomp.c:700 msgid "No previous regular expression" msgstr "Kein vorangehender regulärer Ausdruck" #~ msgid "could not find groups: %s" #~ msgstr "Die Gruppen konnten nicht gefunden werden: %s" #~ msgid "assignment is not allowed to result of builtin function" #~ msgstr "" #~ "Zuweisungen an das Ergebnis einer eingebauten Funktion sind nicht erlaubt" gawk-4.0.1+dfsg.orig/po/Rules-quot0000644000175000017500000000340011504446322015764 0ustar schotschot# Special Makefile rules for English message catalogs with quotation marks. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-create: $(MAKE) en@quot.po-update en@boldquot.po-create: $(MAKE) en@boldquot.po-update en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ 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 \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en@quot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header en@boldquot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header gawk-4.0.1+dfsg.orig/eval.c0000644000175000017500000020243711734666153014464 0ustar schotschot/* * eval.c - gawk bytecode interpreter */ /* * 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. * * 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 "awk.h" 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 int OFSlen; int ORSlen; int OFMTidx; int CONVFMTidx; /* Profiling stuff */ #ifdef PROFILING #define INCREMENT(n) n++ #else #define INCREMENT(n) /* nothing */ #endif /* 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 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 * is compiled on doesn't use 7-bit ascii, casetable[] should not be * defined to the linker, so gawk should not load. * * Do NOT make this array static, it is used in several spots, not * just in this file. * * 6/2004: * This table is also used for IGNORECASE for == and !=, and index(). * Although with GLIBC, we could use tolower() everywhere and RE_ICASE * for the regex matcher, precomputing this table once gives us a * performance improvement. I also think it's better for portability * to non-GLIBC systems. All the world is not (yet :-) GNU/Linux. */ #if 'a' == 97 /* it's ascii */ char casetable[] = { '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', /* ' ' '!' '"' '#' '$' '%' '&' ''' */ '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', /* '(' ')' '*' '+' ',' '-' '.' '/' */ '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', /* '0' '1' '2' '3' '4' '5' '6' '7' */ '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', /* '8' '9' ':' ';' '<' '=' '>' '?' */ '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', /* '@' 'A' 'B' 'C' 'D' 'E' 'F' 'G' */ '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', /* 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O' */ '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', /* 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' */ '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', /* 'X' 'Y' 'Z' '[' '\' ']' '^' '_' */ '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', /* '`' 'a' 'b' 'c' 'd' 'e' 'f' 'g' */ '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', /* 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' */ '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', /* 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' */ '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', /* 'x' 'y' 'z' '{' '|' '}' '~' */ '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', /* Latin 1: */ C('\200'), C('\201'), C('\202'), C('\203'), C('\204'), C('\205'), C('\206'), C('\207'), C('\210'), C('\211'), C('\212'), C('\213'), C('\214'), C('\215'), C('\216'), C('\217'), C('\220'), C('\221'), C('\222'), C('\223'), C('\224'), C('\225'), C('\226'), C('\227'), C('\230'), C('\231'), C('\232'), C('\233'), C('\234'), C('\235'), C('\236'), C('\237'), C('\240'), C('\241'), C('\242'), C('\243'), C('\244'), C('\245'), C('\246'), C('\247'), C('\250'), C('\251'), C('\252'), C('\253'), C('\254'), C('\255'), C('\256'), C('\257'), C('\260'), C('\261'), C('\262'), C('\263'), C('\264'), C('\265'), C('\266'), C('\267'), C('\270'), C('\271'), C('\272'), C('\273'), C('\274'), C('\275'), C('\276'), C('\277'), C('\340'), C('\341'), C('\342'), C('\343'), C('\344'), C('\345'), C('\346'), C('\347'), C('\350'), C('\351'), C('\352'), C('\353'), C('\354'), C('\355'), C('\356'), C('\357'), C('\360'), C('\361'), C('\362'), C('\363'), C('\364'), C('\365'), C('\366'), C('\327'), C('\370'), C('\371'), C('\372'), C('\373'), C('\374'), C('\375'), C('\376'), C('\337'), C('\340'), C('\341'), C('\342'), C('\343'), C('\344'), C('\345'), C('\346'), C('\347'), C('\350'), C('\351'), C('\352'), C('\353'), C('\354'), C('\355'), C('\356'), C('\357'), C('\360'), C('\361'), C('\362'), C('\363'), C('\364'), C('\365'), C('\366'), C('\367'), C('\370'), C('\371'), C('\372'), C('\373'), C('\374'), C('\375'), C('\376'), C('\377'), }; #elif 'a' == 0x81 /* it's EBCDIC */ char casetable[] = { /*00 NU SH SX EX PF HT LC DL */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /*08 SM VT FF CR SO SI */ 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /*10 DE D1 D2 TM RS NL BS IL */ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /*18 CN EM CC C1 FS GS RS US */ 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, /*20 DS SS FS BP LF EB EC */ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /*28 SM C2 EQ AK BL */ 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, /*30 SY PN RS UC ET */ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /*38 C3 D4 NK SU */ 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, /*40 SP */ 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /*48 CENT . < ( + | */ 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, /*50 & */ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /*58 ! $ * ) ; ^ */ 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, /*60 - / */ 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /*68 | , % _ > ? */ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, /*70 */ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /*78 ` : # @ ' = " */ 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, /*80 a b c d e f g */ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /*88 h i { */ 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, /*90 j k l m n o p */ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /*98 q r } */ 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, /*A0 ~ s t u v w x */ 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, /*A8 y z [ */ 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, /*B0 */ 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, /*B8 ] */ 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, /*C0 { A B C D E F G */ 0xC0, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /*C8 H I */ 0x88, 0x89, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, /*D0 } J K L M N O P */ 0xD0, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /*D8 Q R */ 0x98, 0x99, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, /*E0 \ S T U V W X */ 0xE0, 0xE1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, /*E8 Y Z */ 0xA8, 0xA9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, /*F0 0 1 2 3 4 5 6 7 */ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, /*F8 8 9 */ 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF }; #else #include "You lose. You will need a translation table for your character set." #endif #undef C /* load_casetable --- for a non-ASCII locale, redo the table */ void load_casetable(void) { #if defined(LC_CTYPE) int i; char *cp; static int loaded = FALSE; if (loaded || do_traditional) return; loaded = TRUE; cp = setlocale(LC_CTYPE, NULL); /* this is not per standard, but it's pretty safe */ if (cp == NULL || strcmp(cp, "C") == 0 || strcmp(cp, "POSIX") == 0) return; #ifndef ZOS_USS for (i = 0200; i <= 0377; i++) { if (isalpha(i) && islower(i) && i != toupper(i)) casetable[i] = toupper(i); } #endif #endif } /* * This table maps node types to strings for debugging. * KEEP IN SYNC WITH awk.h!!!! */ static const char *const nodetypes[] = { "Node_illegal", "Node_val", "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_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 * nodetype2str(NODETYPE type) { static char buf[40]; if (type >= Node_illegal && type <= Node_final) return nodetypes[(int) type]; sprintf(buf, _("unknown nodetype %d"), (int) type); 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 * flags2str(int flagval) { static const struct flagtab values[] = { { MALLOC, "MALLOC" }, { PERM, "PERM" }, { STRING, "STRING" }, { STRCUR, "STRCUR" }, { NUMCUR, "NUMCUR" }, { NUMBER, "NUMBER" }, { MAYBE_NUM, "MAYBE_NUM" }, { ARRAYMAXED, "ARRAYMAXED" }, { FUNC, "FUNC" }, { FIELD, "FIELD" }, { INTLSTR, "INTLSTR" }, { NUMIND, "NUMIND" }, #ifdef WSTRCUR { WSTRCUR, "WSTRCUR" }, #endif { 0, NULL }, }; return genflags2str(flagval, values); } /* genflags2str --- general routine to convert a flag value to a string */ const char * genflags2str(int flagval, const struct flagtab *tab) { static char buffer[BUFSIZ]; char *sp; int i, space_left, space_needed; sp = buffer; space_left = BUFSIZ; for (i = 0; tab[i].name != NULL; i++) { if ((flagval & tab[i].val) != 0) { /* * note the trick, we want 1 or 0 for whether we need * the '|' character. */ space_needed = (strlen(tab[i].name) + (sp != buffer)); if (space_left < space_needed) fatal(_("buffer overflow in genflags2str")); if (sp != buffer) { *sp++ = '|'; space_left--; } strcpy(sp, tab[i].name); /* note ordering! */ space_left -= strlen(sp); sp += strlen(sp); } } return buffer; } /* posix_compare --- compare strings using strcoll */ static int posix_compare(NODE *s1, NODE *s2) { int ret = 0; char save1, save2; size_t l = 0; save1 = s1->stptr[s1->stlen]; s1->stptr[s1->stlen] = '\0'; save2 = s2->stptr[s2->stlen]; s2->stptr[s2->stlen] = '\0'; 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; if (s1->stlen < s2->stlen) l = s1->stlen; else l = s2->stlen; 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); } } /* * Either worked through the strings or ret != 0. * In either case, ret will be the right thing to return. */ } #if MBS_SUPPORT else { /* Similar logic, using wide characters */ (void) force_wstring(s1); (void) force_wstring(s2); 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; if (s1->wstlen < s2->wstlen) l = s1->wstlen; else l = s2->wstlen; 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); } } /* * Either worked through the strings or ret != 0. * In either case, ret will be the right thing to return. */ } #endif s1->stptr[s1->stlen] = save1; s2->stptr[s2->stlen] = save2; return ret; } /* cmp_nodes --- compare two nodes, returning negative, 0, positive */ int cmp_nodes(NODE *t1, NODE *t2) { int ret = 0; size_t len1, len2; int l, ldiff; 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) 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; } (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_posix) return posix_compare(t1, t2); 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 MBS_SUPPORT if (gawk_mb_cur_max > 1) { ret = strncasecmpmbs((const unsigned char *) cp1, (const unsigned char *) cp2, 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); } #if defined(PROFILING) || defined(DEBUGGING) static void push_frame(NODE *f) { static long max_fcall; /* NB: frame numbering scheme as in GDB. frame_ptr => frame #0. */ 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"); } if (fcall_count > 1) memmove(fcall_list + 2, fcall_list + 1, (fcall_count - 1) * sizeof(NODE *)); fcall_list[1] = f; } 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 #ifdef PROFILING /* dump_fcall_stack --- print a backtrace of the awk function calls */ void dump_fcall_stack(FILE *fp) { NODE *f, *func; long i = 0; if (fcall_count == 0) return; fprintf(fp, _("\n\t# Function Call Stack:\n\n")); /* 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); } fprintf(fp, "\t# %3ld. -- main --\n", fcall_count); } #endif /* PROFILING */ /* set_IGNORECASE --- update IGNORECASE as appropriate */ void set_IGNORECASE() { static short warned = FALSE; 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; } /* calc_exp --- calculate x1^x2 */ AWKNUM calc_exp(AWKNUM x1, AWKNUM x2) { long lx; if ((lx = x2) == x2) { /* integer exponent */ if (lx == 0) return 1; return (lx > 0) ? calc_exp_posint(x1, lx) : 1.0 / calc_exp_posint(x1, -lx); } return (AWKNUM) pow((double) x1, (double) x2); } /* setup_frame --- setup new frame for function call */ static INSTRUCTION * setup_frame(INSTRUCTION *pc) { 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; /* 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); } if (pcount > 0) { emalloc(sp, NODE **, pcount * sizeof(NODE *), "setup_frame"); memset(sp, 0, pcount * sizeof(NODE *)); } 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; } m = PEEK(arg_count - i - 1); /* arguments in reverse order on runtime stack */ 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; case Node_array_ref: r->type = Node_array_ref; r->orig_array = m->orig_array; r->prev_array = m; break; 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; case Node_val: r->type = Node_var; r->var_value = m; break; default: cant_happen(); } r->vname = varnames[i]; } stack_adj(-arg_count); /* adjust stack pointer */ if (pc->opcode == Op_indirect_func_call) { r = POP(); /* indirect var */ DEREF(r); } frame_ptr->vname = source; /* save current source */ push_frame(frame_ptr); /* save current frame in stack */ PUSH(frame_ptr); /* 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 */ return f->code_ptr; } /* restore_frame --- clean up the stack and update frame */ static INSTRUCTION * restore_frame(NODE *fp) { NODE *r; NODE **sp; int n; NODE *func; INSTRUCTION *ri; 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(); /* restore frame */ frame_ptr = fp; /* restore source */ source = fp->vname; fp->vname = NULL; return ri->nexti; } /* free_arrayfor --- free 'for (var in array)' related data */ 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); } freenode(r); } /* unwind_stack --- pop items off the run-time stack; * 'n' is the # of items left in the stack. */ INSTRUCTION * unwind_stack(long n) { NODE *r; INSTRUCTION *cp = NULL; STACK_ITEM *sp; 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; } if (stack_ptr < sp) break; } return cp; } /* pop_fcall --- pop off the innermost frame */ #define pop_fcall() unwind_stack(frame_ptr->prev_frame_size) /* pop the run-time stack */ #define pop_stack() (void) unwind_stack(0) /* * 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)) */ static inline int eval_condition(NODE *t) { if ((t->flags & MAYBE_NUM) != 0) force_number(t); if ((t->flags & NUMBER) != 0) return (t->numbr != 0.0); return (t->stlen != 0); } /* cmp_scalar -- compare two nodes on the stack */ static inline int cmp_scalar() { NODE *t1, *t2; int di; 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; } /* 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 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 `/='")); } r = *lhs = make_number(x1 / x2); break; case Op_assign_mod: if (x2 == (AWKNUM) 0) { decr_sp(); fatal(_("division by zero attempted in `%%='")); } #ifdef 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: break; } UPREF(r); REPLACE(r); } /* 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_CODE --- pop a code off the runtime stack */ INSTRUCTION * POP_CODE() { NODE *r; INSTRUCTION *cp; r = POP(); cp = r->code_ptr; freenode(r); return cp; } /* 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. */ typedef struct exec_state { struct exec_state *next; INSTRUCTION *cptr; /* either getline (Op_K_getline) or the * implicit "open-file, read-record" loop (Op_newfile). */ int rule; /* rule for the INSTRUCTION */ 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. */ 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_exec_state(INSTRUCTION *cp, int rule, char *src, STACK_ITEM *sp) { 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; } /* 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; } /* * r_interpret: * code is a list of instructions to run. returns the exit value * from the awk code. */ /* 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) { 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; 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"); /* array subscript */ #define mk_sub(n) (n == 1 ? POP_STRING() : concat_exp(n, TRUE)) #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 pc = code; /* 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). */ /* loop until hit Op_stop instruction */ /* forever { */ top: if (pc->source_line > 0) sourceline = pc->source_line; #ifdef DEBUGGING if (! pre_execute(&pc)) goto top; #endif 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; 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; 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; 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; case Op_push_lhs: lhs = get_lhs(pc->memory, pc->do_reference); PUSH_ADDRESS(lhs); break; 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; 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; 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; 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; 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; case Op_lint: if (do_lint) { switch (pc->lint_type) { case LINT_assign_in_cond: lintwarn(_("assignment used in conditional context")); break; case LINT_no_effect: lintwarn(_("statement has no effect")); break; default: cant_happen(); } } break; 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; case Op_jmp_true: r = POP_SCALAR(); di = eval_condition(r); DEREF(r); if (di) JUMPTO(pc->target_jmp); break; 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; case Op_not: t1 = TOP_SCALAR(); r = make_number((AWKNUM) ! eval_condition(t1)); DEREF(t1); REPLACE(r); break; case Op_equal: r = make_number((AWKNUM) (cmp_scalar() == 0)); REPLACE(r); break; case Op_notequal: r = make_number((AWKNUM) (cmp_scalar() != 0)); REPLACE(r); break; case Op_less: r = make_number((AWKNUM) (cmp_scalar() < 0)); REPLACE(r); break; case Op_greater: r = make_number((AWKNUM) (cmp_scalar() > 0)); REPLACE(r); break; case Op_leq: r = make_number((AWKNUM) (cmp_scalar() <= 0)); REPLACE(r); break; case Op_geq: r = make_number((AWKNUM) (cmp_scalar() >= 0)); REPLACE(r); break; 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; 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; 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; 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; 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 `%%'")); 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; 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; 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; case Op_store_field: { /* field assignment optimization, * see awkgram.y (optimize_assignment) */ 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 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 Op_assign: lhs = POP_ADDRESS(); r = TOP_SCALAR(); unref(*lhs); *lhs = r; UPREF(r); REPLACE(r); 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 Op_var_update: /* update value of NR, FNR or NF */ pc->update_var(); 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. */ 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 */ break; } if (pc->opcode == Op_var_assign) pc->assign_var(); else pc->field_assign(); break; case Op_concat: r = concat_exp(pc->expr_count, pc->concat_flag & CSUBSEP); PUSH(r); 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); } if (di) { /* match found */ decr_sp(); DEREF(t2); JUMPTO(pc->target_jmp); } break; case Op_K_delete: t1 = POP_ARRAY(); do_delete(t1, pc->expr_count); stack_adj(-pc->expr_count); break; case Op_K_delete_loop: t1 = POP_ARRAY(); lhs = POP_ADDRESS(); /* item */ do_delete_loop(t1, lhs); 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 Op_arrayfor_init: { NODE **list = NULL; NODE *array, *sort_str; size_t num_elems = 0; static NODE *sorted_in = NULL; const char *how_to_sort = "@unsorted"; /* get the array */ array = POP_ARRAY(); /* sanity: check if empty */ if (array->var_array == NULL || array->table_size == 0) goto arrayfor; num_elems = array->table_size; if (sorted_in == NULL) /* do this once */ sorted_in = make_string("sorted_in", 9); 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); if (sort_str != NULL) { sort_str = force_string(sort_str); if (sort_str->stlen > 0) how_to_sort = sort_str->stptr; } list = assoc_list(array, how_to_sort, SORTED_IN); /* * Actual array for use in lint warning * in Op_arrayfor_incr */ list[num_elems] = array; 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 (num_elems == 0) JUMPTO(pc->target_jmp); /* Op_arrayfor_final */ } break; 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 */ } 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; case Op_arrayfor_final: r = POP(); assert(r->type == Node_arrayfor); free_arrayfor(r); 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 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; 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; } 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 */ } /* save current frame along with source */ 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 */ } /* run the function instructions */ JUMPTO(ni); /* Op_func or Op_ext_func */ case Op_K_return: m = POP_SCALAR(); /* return value */ 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; 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 */ PUSH(r); break; case Op_after_endfile: /* Find the execution state to return to */ ni = pop_exec_state(& currule, & source, NULL); assert(ni->opcode == Op_newfile || ni->opcode == Op_K_getline); JUMPTO(ni); case Op_after_beginfile: after_beginfile(& curfile); /* Find the execution state to return to */ ni = pop_exec_state(& currule, & source, NULL); assert(ni->opcode == Op_newfile || ni->opcode == Op_K_getline); if (ni->opcode == Op_K_getline || curfile == NULL /* skipping directory argument */ ) JUMPTO(ni); break; /* read a record, Op_get_record */ case Op_newfile: { int ret; ret = nextfile(& curfile, FALSE); if (ret < 0) /* end of input */ JUMPTO(pc->target_jmp); /* end block or Op_atexit */ if (ret == 0) /* read a record */ JUMPTO((pc + 1)->target_get_record); /* ret > 0 */ /* Save execution state for use in Op_after_beginfile or Op_after_endfile. */ push_exec_state(pc, currule, source, stack_ptr); if (curfile == NULL) /* EOF */ JUMPTO(pc->target_endfile); /* else execute beginfile block */ } break; case Op_get_record: { int errcode = 0; ni = pc->target_newfile; if (curfile == NULL) { /* from non-redirected getline, e.g.: * { * while (getline > 0) ; * } */ ni = ni->target_jmp; /* end_block or Op_atexit */ JUMPTO(ni); } 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; case Op_K_nextfile: { int ret; if (currule != Rule && currule != BEGINFILE) fatal(_("`nextfile' cannot be called from a `%s' rule"), ruletab[currule]); ret = nextfile(& curfile, TRUE); /* skip current file */ if (currule == BEGINFILE) { long stack_size; ni = pop_exec_state(& currule, & source, & stack_size); assert(ni->opcode == Op_K_getline || ni->opcode == Op_newfile); /* pop stack returning to the state of Op_K_getline or Op_newfile. */ unwind_stack(stack_size); if (ret == 0) { /* There was an error opening the file; * don't run ENDFILE block(s). */ 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); JUMPTO(pc->target_endfile); } } /* else Start over with the first rule. */ /* empty the run-time stack to avoid memory leak */ pop_stack(); /* Push an execution state for Op_after_endfile to return to */ push_exec_state(pc->target_newfile, currule, source, stack_ptr); 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 */ /* not reached */ return 0; #undef mk_sub #undef JUMPTO } gawk-4.0.1+dfsg.orig/dfa.h0000644000175000017500000001065311734665351014270 0ustar schotschot/* dfa.h - declarations for GNU deterministic regexp compiler 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 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 */ /* Written June, 1988 by Mike Haertel */ #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) || __STRICT_ANSI__ # 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 { int exact; char *must; struct dfamust *next; }; /* The dfa structure. It is completely opaque. */ struct dfa; /* Entry points. */ /* Allocate a struct dfa. The struct dfa is completely opaque. The returned pointer should be passed directly to free() after calling dfafree() on it. */ extern struct dfa *dfaalloc (void); /* Return the dfamusts associated with a dfa. */ extern struct dfamust *dfamusts (struct dfa const *); /* dfasyntax() takes three arguments; the first sets the syntax bits described earlier in this file, the second sets the case-folding flag, and the third specifies the line terminator. */ extern void dfasyntax (reg_syntax_t, int, unsigned char); /* Compile the given string of the given length into the given struct dfa. Final argument is a flag specifying whether to build a searching or an exact matcher. */ extern void dfacomp (char const *, size_t, struct dfa *, int); /* 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 buffer, and the shortest possible version thereof. Return a pointer to the first character after the match, or NULL if none is found. BEGIN 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. 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. */ extern char *dfaexec (struct dfa *d, char const *begin, char *end, int newline, int *count, int *backref); /* Free the storage held by the components of a struct dfa. */ extern void dfafree (struct dfa *); /* Entry points for people who know what they're doing. */ /* Initialize the components of a struct dfa. */ extern void dfainit (struct dfa *); /* Incrementally parse a string of given length into a struct dfa. */ extern void dfaparse (char const *, size_t, struct dfa *); /* Analyze a parsed regexp; second argument tells whether to build a searching or an exact matcher. */ extern void dfaanalyze (struct dfa *, int); /* Compute, for each possible character, the transitions out of a given state, storing them in an array of integers. */ extern void dfastate (int, struct dfa *, int []); /* 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. */ extern void dfaerror (const char *) __attribute__ ((noreturn)); gawk-4.0.1+dfsg.orig/missing0000755000175000017500000002557711463242060014762 0ustar schotschot#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: gawk-4.0.1+dfsg.orig/configure0000755000175000017500000127425011734667212015300 0ustar schotschot#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # 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, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) 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 for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # 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 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 : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-gawk@gnu.org $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` 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" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # 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. as_fn_error () { 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: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # 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` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='GNU Awk' PACKAGE_TARNAME='gawk' 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/' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" gt_needs= ac_header_list= ac_func_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBREADLINE SOCKET_LIBS LIBSIGSEGV_PREFIX LTLIBSIGSEGV LIBSIGSEGV HAVE_LIBSIGSEGV LIBOBJS POSUB LTLIBINTL LIBINTL INTLLIBS LTLIBICONV LIBICONV INTL_MACOSX_LIBS host_os host_vendor host_cpu host build_os build_vendor build_cpu build XGETTEXT_EXTRA_OPTIONS MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 MSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS LN_S YFLAGS YACC EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_whiny_user_strftime enable_lint enable_dependency_tracking enable_largefile enable_nls with_gnu_ld enable_rpath with_libiconv_prefix with_libintl_prefix with_libsigsegv_prefix with_readline ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP YACC YFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) 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" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) 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" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_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" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) 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" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # 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'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $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}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` 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" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac 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' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $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 fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null 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" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 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" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures GNU Awk 4.0.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/gawk] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of GNU Awk 4.0.1:";; esac cat <<\_ACEOF Optional Features: --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] --disable-lint Disable gawk lint checking --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-largefile omit support for large files --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-whiny-user-strftime Force use of included version of strftime for deficient systems --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --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 CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor 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. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . GNU Awk home page: . General help using GNU software: . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF GNU Awk configure 4.0.1 generated by GNU Autoconf 2.68 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 exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi 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; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $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;} ( $as_echo "## ------------------------------- ## ## Report this to bug-gawk@gnu.org ## ## ------------------------------- ##" ) | 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 eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { 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 eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # 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; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { 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 eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES # ---------------------------------------------------- # Tries to find if the field MEMBER exists in type AGGR, after including # INCLUDES, setting cache variable VAR accordingly. ac_fn_c_check_member () { 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 eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else eval "$4=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member # 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_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 /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } 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 4.0.1, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # 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 else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $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" \ || { { $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 if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi gt_needs="$gt_needs " as_fn_append ac_header_list " sys/time.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_func_list " alarm" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $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 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # This is a hack. Different versions of install on different systems # are just too different. Chuck it and use install-sh. # # If the user supplies $INSTALL, figure they know what they're doing. # # With Autoconf 2.5x, this needs to come very early on, but *after* # the INIT macro. Sigh. if test "x$INSTALL" = "x" then INSTALL="$srcdir/install-sh -c" export INSTALL fi am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then 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, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $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 ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) 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;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else 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 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $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 ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $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 eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # 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;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." 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 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='gawk' VERSION='4.0.1' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # Check whether --with-whiny-user-strftime was given. if test "${with_whiny_user_strftime+set}" = set; then : withval=$with_whiny_user_strftime; if test "$withval" = yes then $as_echo "#define USE_INCLUDED_STRFTIME 1" >>confdefs.h fi fi # Check whether --enable-lint was given. if test "${enable_lint+set}" = set; then : enableval=$enable_lint; if test "$enableval" = no then $as_echo "#define NO_LINT 1" >>confdefs.h fi fi DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. 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 ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi 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; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 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; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done 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; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes 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. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out 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 ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $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; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext 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 ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} 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 ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $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 ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } 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 # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 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; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $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 ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done 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 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done 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 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $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 ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$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 " 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 fi done 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" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $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 ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done 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 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. 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 ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi 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; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $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 ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} 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 ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $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 ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } 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 # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 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; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $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 eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # 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;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # This is mainly for my use during testing and development. # Yes, it's a bit of a hack. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special development options" >&5 $as_echo_n "checking for special development options... " >&6; } if test -f $srcdir/.developing then # add other debug flags as appropriate, save GAWKDEBUG for emergencies CFLAGS="$CFLAGS -DARRAYDEBUG -DYYDEBUG" if grep dbug $srcdir/.developing then CFLAGS="$CFLAGS -DDBUG" LIBS="$LIBS dbug/libdbug.a" fi # turn on compiler warnings if we're doing development # enable debugging using macros also if test "$GCC" = yes then CFLAGS="$CFLAGS -Wall -fno-builtin -g3 -gdwarf-2" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for z/OS USS compilation" >&5 $as_echo_n "checking for z/OS USS compilation... " >&6; } if test "OS/390" = "`uname`" then CFLAGS="$CFLAGS -D_ALL_SOURCE -DZOS_USS -DUSE_EBCDIC" # 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_zos_uss}" >&5 $as_echo "${ac_cv_zos_uss}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5 $as_echo_n "checking for strerror in -lcposix... " >&6; } if ${ac_cv_lib_cposix_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cposix_strerror=yes else ac_cv_lib_cposix_strerror=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS 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" = xyes; then : LIBS="$LIBS -lcposix" fi # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $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 ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $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 ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* 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 ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX compilation hacks" >&5 $as_echo_n "checking for AIX compilation hacks... " >&6; } if ${gawk_cv_aix_hack+:} false; then : $as_echo_n "(cached) " >&6 else if test -d /lpp then CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1 -DGAWK_AIX=1" gawk_cv_aix_hack=yes else gawk_cv_aix_hack=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${gawk_cv_aix_hack}" >&5 $as_echo "${gawk_cv_aix_hack}" >&6; } { $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 ${gawk_cv_linux_alpha_hack+:} false; then : $as_echo_n "(cached) " >&6 else if test "Linux" = "`uname`" && test "alpha" = "`uname -m`" then # this isn't necessarily always true, # the vendor's compiler is also often found if test "$GCC" = yes then CFLAGS="$CFLAGS -mieee" gawk_cv_linux_alpha_hack=yes else gawk_cv_linux_alpha_hack=no fi else gawk_cv_linux_alpha_hack=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${gawk_cv_linux_alpha_hack}" >&5 $as_echo "${gawk_cv_linux_alpha_hack}" >&6; } if test "$ISC" = 1 # will be set by test for ISC then CFLAGS="$CFLAGS -D_SYSV3" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu case `(uname) 2> /dev/null` in *CYGWIN*) with_libiconv_prefix=no with_libintl_prefix=no ;; *) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } GETTEXT_MACRO_VERSION=0.18 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. 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 ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. 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 ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. 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 ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. 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 ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$localedir" || localedir='${datadir}/locale' test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= ac_config_commands="$ac_config_commands po-directories" if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # 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_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } 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 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 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;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } 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 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 $as_echo_n "checking for ld used by GCC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else { $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 { $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 ${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. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $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 ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes fi 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 ;; *) 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" use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` 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 if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= 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;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFPreferencesCopyAppValue=yes else gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFLocaleCopyCurrent(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFLocaleCopyCurrent=yes else gt_cv_func_CFLocaleCopyCurrent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h 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 LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { $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 eval \${$gt_func_gnugettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libc=yes" else eval "$gt_func_gnugettext_libc=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } 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 ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ 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_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) 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. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes else am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then $as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. if test "${with_libintl_prefix+set}" = set; then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBINTL= LTLIBINTL= INCINTL= LIBINTL_PREFIX= HAVE_LIBINTL= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` 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 if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= 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;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { $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 eval \${$gt_func_gnugettext_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libintl=yes" else eval "$gt_func_gnugettext_libintl=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 $as_echo_n "checking whether to use NLS... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 $as_echo_n "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 $as_echo "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 $as_echo_n "checking how to link with libintl... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 $as_echo "$LIBINTL" >&6; } for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h fi POSUB=po fi INTLLIBS="$LIBINTL" { $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 ${am_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char* cs = nl_langinfo(CODESET); return !cs; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_langinfo_codeset=yes else am_cv_langinfo_codeset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 $as_echo "$am_cv_langinfo_codeset" >&6; } if test $am_cv_langinfo_codeset = yes; then $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } if ${gt_cv_val_LC_MESSAGES+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_val_LC_MESSAGES=yes else gt_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5 $as_echo "$gt_cv_val_LC_MESSAGES" >&6; } if test $gt_cv_val_LC_MESSAGES = yes; then $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h fi { $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 ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $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 ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi { $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 ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi 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/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" 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 fi done if test "$ac_cv_header_string_h" = yes then 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" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MEMORY_H 1 _ACEOF fi done else 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" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRINGS_H 1 _ACEOF fi done 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" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi { $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 ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $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 ${ac_cv_type_uid_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then : ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 $as_echo "$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then $as_echo "#define uid_t int" >>confdefs.h $as_echo "#define gid_t int" >>confdefs.h fi { $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 ${ac_cv_type_getgroups+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_type_getgroups=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Mike Rendell for this test. */ $ac_includes_default #define NGID 256 #undef MAX #define MAX(x, y) ((x) > (y) ? (x) : (y)) int main () { gid_t gidset[NGID]; int i, n; union { gid_t gval; long int lval; } val; val.lval = -1; for (i = 0; i < NGID; i++) gidset[i] = val.gval; n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, gidset); /* Exit non-zero if getgroups seems to require an array of ints. This happens when gid_t is short int but getgroups modifies an array of ints. */ return n > 0 && gidset[n] != val.gval; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_type_getgroups=gid_t else ac_cv_type_getgroups=int fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_type_getgroups = cross; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then : ac_cv_type_getgroups=gid_t else ac_cv_type_getgroups=int fi rm -f conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 $as_echo "$ac_cv_type_getgroups" >&6; } cat >>confdefs.h <<_ACEOF #define GETGROUPS_T $ac_cv_type_getgroups _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 $as_echo_n "checking for long long int... " >&6; } if ${ac_cv_type_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; int i = 63; int main () { long long int llmax = 9223372036854775807ll; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll)); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_type_long_long_int=yes else ac_cv_type_long_long_int=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 $as_echo "$ac_cv_type_long_long_int" >&6; } if test $ac_cv_type_long_long_int = yes; then $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h fi ac_cv_type_long_long=$ac_cv_type_long_long_int if test $ac_cv_type_long_long = yes; then $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h fi { $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 ${ac_cv_type_unsigned_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ unsigned long long int ull = 18446744073709551615ULL; typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63; int main () { unsigned long long int ullmax = 18446744073709551615ull; return (ull << 63 | ull >> 63 | ull << i | ull >> i | ullmax / ull | ullmax % ull); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_type_unsigned_long_long_int=yes else ac_cv_type_unsigned_long_long_int=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } if test $ac_cv_type_unsigned_long_long_int = yes; then $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h fi ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int if test $ac_cv_type_unsigned_long_long = yes; then $as_echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>confdefs.h fi if test "OS/390" = "`uname`" then gl_cv_header_inttypes_h=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 $as_echo_n "checking for inttypes.h... " >&6; } if ${gl_cv_header_inttypes_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; return !i; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_header_inttypes_h=yes else gl_cv_header_inttypes_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5 $as_echo "$gl_cv_header_inttypes_h" >&6; } if test $gl_cv_header_inttypes_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H_WITH_UINTMAX 1 _ACEOF fi fi if test "OS/390" = "`uname`" then gl_cv_header_stdint_h=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 $as_echo_n "checking for stdint.h... " >&6; } if ${gl_cv_header_stdint_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; return !i; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_header_stdint_h=yes else gl_cv_header_stdint_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5 $as_echo "$gl_cv_header_stdint_h" >&6; } if test $gl_cv_header_stdint_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H_WITH_UINTMAX 1 _ACEOF fi fi if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then test $ac_cv_type_long_long = yes \ && ac_type='long long' \ || ac_type='long' cat >>confdefs.h <<_ACEOF #define intmax_t $ac_type _ACEOF else $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h fi if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then test $ac_cv_type_unsigned_long_long = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' cat >>confdefs.h <<_ACEOF #define uintmax_t $ac_type _ACEOF else $as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h 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" = xyes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # 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 ${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 : else 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_error 77 "cannot compute sizeof (unsigned int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_int" >&5 $as_echo "$ac_cv_sizeof_unsigned_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # 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 ${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 : else 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_error 77 "cannot compute sizeof (unsigned long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long _ACEOF cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { time_t foo; foo = 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define TIME_T_IN_SYS_TYPES_H 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { wctype_t foo; foo = 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_WCTYPE_T 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { wint_t foo; foo = 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_WINT_T 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct sockaddr_storage foo; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include #include " 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 ${rsync_cv_socklen_t_equiv+:} false; then : $as_echo_n "(cached) " >&6 else # Systems have either "struct sockaddr *" or # "void *" as the second argument to getpeername rsync_cv_socklen_t_equiv= for arg2 in "struct sockaddr" void; do for t in int size_t unsigned long "unsigned long"; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int getpeername (int, $arg2 *, $t *); int main () { $t len; getpeername(0,0,&len); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : rsync_cv_socklen_t_equiv="$t" break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done if test "x$rsync_cv_socklen_t_equiv" = x; then rsync_cv_socklen_t_equiv=int fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_socklen_t_equiv" >&5 $as_echo "$rsync_cv_socklen_t_equiv" >&6; } cat >>confdefs.h <<_ACEOF #define socklen_t $rsync_cv_socklen_t_equiv _ACEOF fi for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h fi fi done for ac_header in $ac_header_list do : 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 " 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 fi done for ac_func in $ac_func_list 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" 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 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 $as_echo_n "checking for working mktime... " >&6; } if ${ac_cv_func_working_mktime+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_working_mktime=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Test program from Paul Eggert and Tony Leneis. */ #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include #include #ifdef HAVE_UNISTD_H # include #endif #ifndef HAVE_ALARM # define alarm(X) /* empty */ #endif /* Work around redefinition to rpl_putenv by other config tests. */ #undef putenv static time_t time_t_max; static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ 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])) /* Return 0 if mktime fails to convert a date in the spring-forward gap. Based on a problem report from Andreas Jaeger. */ static int spring_forward_gap () { /* glibc (up to about 1998-10-07) failed this test. */ struct tm tm; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; tm.tm_mday = 5; tm.tm_hour = 2; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; return mktime (&tm) != (time_t) -1; } static int mktime_test1 (time_t now) { struct tm *lt; return ! (lt = localtime (&now)) || mktime (lt) == now; } static int mktime_test (time_t now) { return (mktime_test1 (now) && mktime_test1 ((time_t) (time_t_max - now)) && mktime_test1 ((time_t) (time_t_min + now))); } static int irix_6_4_bug () { /* Based on code from Ariel Faigon. */ struct tm tm; tm.tm_year = 96; tm.tm_mon = 3; tm.tm_mday = 0; tm.tm_hour = 0; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; mktime (&tm); return tm.tm_mon == 2 && tm.tm_mday == 31; } static int bigtime_test (int j) { struct tm tm; time_t now; tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; now = mktime (&tm); if (now != (time_t) -1) { struct tm *lt = localtime (&now); if (! (lt && lt->tm_year == tm.tm_year && lt->tm_mon == tm.tm_mon && lt->tm_mday == tm.tm_mday && lt->tm_hour == tm.tm_hour && lt->tm_min == tm.tm_min && lt->tm_sec == tm.tm_sec && lt->tm_yday == tm.tm_yday && lt->tm_wday == tm.tm_wday && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) return 0; } return 1; } static int year_2050_test () { /* The correct answer for 2050-02-01 00:00:00 in Pacific time, ignoring leap seconds. */ unsigned long int answer = 2527315200UL; struct tm tm; time_t t; tm.tm_year = 2050 - 1900; tm.tm_mon = 2 - 1; tm.tm_mday = 1; tm.tm_hour = tm.tm_min = tm.tm_sec = 0; tm.tm_isdst = -1; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); t = mktime (&tm); /* Check that the result is either a failure, or close enough to the correct answer that we can assume the discrepancy is due to leap seconds. */ return (t == (time_t) -1 || (0 < t && answer - 120 <= t && t <= answer + 120)); } int main () { time_t t, delta; int i, j; /* This test makes some buggy mktime implementations loop. Give up after 60 seconds; a mktime slower than that isn't worth using anyway. */ alarm (60); for (;;) { t = (time_t_max << 1) + 1; if (t <= time_t_max) break; time_t_max = t; } time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; delta = time_t_max / 997; /* a suitable prime number */ for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) putenv ((char*) tz_strings[i]); for (t = 0; t <= time_t_max - delta; t += delta) if (! mktime_test (t)) return 1; if (! (mktime_test ((time_t) 1) && mktime_test ((time_t) (60 * 60)) && mktime_test ((time_t) (60 * 60 * 24)))) return 1; for (j = 1; ; j <<= 1) if (! bigtime_test (j)) return 1; else if (INT_MAX / 2 < j) break; if (! bigtime_test (INT_MAX)) return 1; } return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_working_mktime=yes else ac_cv_func_working_mktime=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 $as_echo "$ac_cv_func_working_mktime" >&6; } if test $ac_cv_func_working_mktime = no; then case " $LIBOBJS " in *" mktime.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;; esac fi case "$ac_cv_func_working_mktime" in yes) $as_echo "#define HAVE_MKTIME 1" >>confdefs.h ;; esac ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" 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 ${ac_cv_lib_socket_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getaddrinfo (); int main () { return getaddrinfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_getaddrinfo=yes else ac_cv_lib_socket_getaddrinfo=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS 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" = xyes; then : $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmod in -lm" >&5 $as_echo_n "checking for fmod in -lm... " >&6; } if ${ac_cv_lib_m_fmod+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fmod (); int main () { return fmod (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_fmod=yes else ac_cv_lib_m_fmod=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS 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" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf in -lm" >&5 $as_echo_n "checking for isinf in -lm... " >&6; } if ${ac_cv_lib_m_isinf+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char isinf (); int main () { return isinf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_isinf=yes else ac_cv_lib_m_isinf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS 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" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ismod in -lm" >&5 $as_echo_n "checking for ismod in -lm... " >&6; } if ${ac_cv_lib_m_ismod+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ismod (); int main () { return ismod (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_ismod=yes else ac_cv_lib_m_ismod=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS 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" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi case `uname` in OSF1) : ;; *) use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libsigsegv-prefix was given. if test "${with_libsigsegv_prefix+set}" = set; then : withval=$with_libsigsegv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBSIGSEGV= LTLIBSIGSEGV= INCSIGSEGV= LIBSIGSEGV_PREFIX= HAVE_LIBSIGSEGV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='sigsegv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBSIGSEGV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi 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" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBSIGSEGV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so" else LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a" else LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` 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 if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCSIGSEGV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= 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;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBSIGSEGV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBSIGSEGV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep" LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep" ;; esac done fi else LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name" LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir" done fi ac_save_CPPFLAGS="$CPPFLAGS" for element in $INCSIGSEGV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5 $as_echo_n "checking for libsigsegv... " >&6; } if ${ac_cv_libsigsegv+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_LIBS="$LIBS" case " $LIBSIGSEGV" in *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;; *) LIBS="$LIBSIGSEGV $LIBS" ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { sigsegv_deinstall_handler(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_libsigsegv=yes else ac_cv_libsigsegv='no, consider installing GNU libsigsegv' fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5 $as_echo "$ac_cv_libsigsegv" >&6; } if test "$ac_cv_libsigsegv" = yes; then HAVE_LIBSIGSEGV=yes $as_echo "#define HAVE_LIBSIGSEGV 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5 $as_echo_n "checking how to link with libsigsegv... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5 $as_echo "$LIBSIGSEGV" >&6; } else HAVE_LIBSIGSEGV=no CPPFLAGS="$ac_save_CPPFLAGS" LIBSIGSEGV= LTLIBSIGSEGV= LIBSIGSEGV_PREFIX= fi gl_cv_lib_sigsegv="$ac_cv_libsigsegv" ;; esac # Need the check for mkstemp and tmpfile for missing_d/snprintf.c. for ac_func in atexit btowc fmod getgrent getgroups grantpt \ isascii iswctype iswlower iswupper mbrlen \ memcmp memcpy memcpy_ulong memmove memset \ memset_ulong mkstemp setenv setlocale setsid snprintf strchr \ strerror strftime strncasecmp strcoll strtod strtoul \ system tmpfile towlower towupper tzset usleep wcrtomb \ 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" 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 fi done { $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 ${ac_cv_func_mbrtowc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { wchar_t wc; char const s[] = ""; size_t n = 1; mbstate_t state; return ! (sizeof state && (mbrtowc) (&wc, s, n, &state)); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_mbrtowc=yes else ac_cv_func_mbrtowc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5 $as_echo "$ac_cv_func_mbrtowc" >&6; } if test $ac_cv_func_mbrtowc = yes; then $as_echo "#define HAVE_MBRTOWC 1" >>confdefs.h fi 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" = xyes; then : $as_echo "#define DYNAMIC 1" >>confdefs.h if test "$GCC" = yes then # Add others here as appropriate, # one day use GNU libtool. # 3/2010: Used to have cygwin here but removed since # we get complaints that -export-dynamic doesn't work. if uname | $EGREP -i 'linux|freebsd' > /dev/null then LDFLAGS="$LDFLAGS -export-dynamic" fi fi # Check this separately. Some systems have dlopen # in libc. Notably freebsd and cygwin. # 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 ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl zrldsrl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi case `(uname) 2> /dev/null` in *VMS*|*BeOS*|*OS/2*|*MS-DOS*) $as_echo "#define GETPGRP_VOID 1" >>confdefs.h ;; *) { $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 ${ac_cv_func_getpgrp_void+:} false; then : $as_echo_n "(cached) " >&6 else # Use it with a single arg. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { getpgrp (0); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_getpgrp_void=no else ac_cv_func_getpgrp_void=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 $as_echo "$ac_cv_func_getpgrp_void" >&6; } if test $ac_cv_func_getpgrp_void = yes; then $as_echo "#define GETPGRP_VOID 1" >>confdefs.h fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf %F format" >&5 $as_echo_n "checking for printf %F format... " >&6; } if test "$cross_compiling" = yes; then : has_f_format=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() { char buf[100]; sprintf(buf, "%F", 123.45); if (strcmp(buf, "123.450000") == 0) return 0; else return 1; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : has_f_format=yes else has_f_format=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "$has_f_format" = yes; then $as_echo "#define PRINTF_HAS_F_FORMAT 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_f_format" >&5 $as_echo "$has_f_format" >&6; } gawk_have_sockets=no # Check for system-dependent location of socket libraries SOCKET_LIBS= if test "$ISC" = yes; then SOCKET_LIBS="-lnsl_s -linet" else # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). # # ADR: Is this needed just for sockets??? # AC_CHECK_LIB(dnet, dnet_ntoa, [SOCKET_LIBS="$SOCKET_LIBS -ldnet"]) # if test $ac_cv_lib_dnet_ntoa = no; then # AC_CHECK_LIB(dnet_stub, dnet_ntoa, # [SOCKET_LIBS="$SOCKET_LIBS -ldnet_stub"]) # fi # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # chad@anasazi.com says the Pyramid MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" 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 ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS 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" = xyes; then : SOCKET_LIBS="$SOCKET_LIBS -lnsl" fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says simon@lia.di.epfl.ch: it contains # gethostby* variants that don't use the nameserver (or something). # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" 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 ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $SOCKET_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS 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" = xyes; then : SOCKET_LIBS="-lsocket $SOCKET_LIBS" gawk_have_sockets=yes fi else gawk_have_sockets=yes fi fi if test "${gawk_have_sockets}" = "yes" then { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the socket library calls" >&5 $as_echo_n "checking where to find the socket library calls... " >&6; } case "${SOCKET_LIBS}" in ?*) gawk_lib_loc="${SOCKET_LIBS}" ;; *) gawk_lib_loc="the standard library" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${gawk_lib_loc}" >&5 $as_echo "${gawk_lib_loc}" >&6; } $as_echo "#define HAVE_SOCKETS 1" >>confdefs.h 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" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 _ACEOF $as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h fi { $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 ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi { $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 ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include #include <$ac_cv_struct_tm> " if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 _ACEOF fi if test "$ac_cv_member_struct_tm_tm_zone" = yes; then $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h else ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include " if test "x$ac_cv_have_decl_tzname" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_TZNAME $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 $as_echo_n "checking for tzname... " >&6; } if ${ac_cv_var_tzname+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !HAVE_DECL_TZNAME extern char *tzname[]; #endif int main () { return tzname[0][0]; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_var_tzname=yes else ac_cv_var_tzname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 $as_echo "$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then $as_echo "#define HAVE_TZNAME 1" >>confdefs.h fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 $as_echo_n "checking whether char is unsigned... " >&6; } if ${ac_cv_c_char_unsigned+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((char) -1) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_char_unsigned=no else ac_cv_c_char_unsigned=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 $as_echo "$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h fi { $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 ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $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 ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_restrict=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) $as_echo "#define restrict /**/" >>confdefs.h ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5 $as_echo_n "checking for preprocessor stringizing operator... " >&6; } if ${ac_cv_c_stringize+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define x(y) #y char *s = x(teststring); _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "#teststring" >/dev/null 2>&1; then : ac_cv_c_stringize=no else ac_cv_c_stringize=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stringize" >&5 $as_echo "$ac_cv_c_stringize" >&6; } if test $ac_cv_c_stringize = yes; then $as_echo "#define HAVE_STRINGIZE 1" >>confdefs.h fi ac_config_headers="$ac_config_headers config.h:configh.in" ac_config_files="$ac_config_files Makefile awklib/Makefile doc/Makefile po/Makefile.in test/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then 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;} 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;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H 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$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then 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. 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. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) 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 for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # 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. as_fn_error () { 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: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` 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" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # 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 4.0.1, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to . GNU Awk home page: . General help using GNU software: ." _ACEOF 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 4.0.1 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" 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." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $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;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:configh.in" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "awklib/Makefile") CONFIG_FILES="$CONFIG_FILES awklib/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "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;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap '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 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || 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. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' 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' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && 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 '^'` 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 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 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat 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 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[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # 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 >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do 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 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) 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 `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || 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'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " 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' "$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 $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;} rm -f "$ac_tmp/stdin" case $ac_file in -) 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 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && 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 "$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 "$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" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || 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 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi gawk-4.0.1+dfsg.orig/missing_d/0000755000175000017500000000000011734667126015336 5ustar schotschotgawk-4.0.1+dfsg.orig/missing_d/ChangeLog0000644000175000017500000000076011734667126017113 0ustar schotschot2012-03-28 Arnold D. Robbins * 4.0.1: Release tar ball made. 2011-11-02 Pat Rankin * wcmisc.c: Make code be conditional upon corresponding !HAVE_WCxxx. 2011-11-01 Arnold D. Robbins * wcmisc.c: New file. 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. gawk-4.0.1+dfsg.orig/missing_d/system.c0000644000175000017500000000166711463242060017021 0ustar schotschot/* system.c --- replacement system() for systems missing one Copyright (C) 1986, 1988, 1989, 1991 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. */ extern void fatal(); int system(s) char *s; { fatal("system() not supported on this system"); return 0; } gawk-4.0.1+dfsg.orig/missing_d/memmove.c0000644000175000017500000001073511473533162017145 0ustar schotschot/* Copy memory to memory until the specified number of bytes has been copied. Overlap is handled correctly. Copyright (C) 1991, 1995, 1996, 1997, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * August 2006. For Gawk: Borrowed from GLIBC and hacked unmercifully. * DON'T steal this for your own code, go straight to the GLIBC * source for the original versions. */ /* This stuff from libc/sysdeps/generic/memcopy.h */ typedef unsigned char byte; /* Copy exactly NBYTES bytes from SRC_BP to DST_BP, without any assumptions about alignment of the pointers. */ #define BYTE_COPY_FWD(dst_bp, src_bp, nbytes) \ do \ { \ size_t __nbytes = (nbytes); \ while (__nbytes > 0) \ { \ byte __x = ((byte *) src_bp)[0]; \ src_bp += 1; \ __nbytes -= 1; \ ((byte *) dst_bp)[0] = __x; \ dst_bp += 1; \ } \ } while (0) /* Copy exactly NBYTES_TO_COPY bytes from SRC_END_PTR to DST_END_PTR, beginning at the bytes right before the pointers and continuing towards smaller addresses. Don't assume anything about alignment of the pointers. */ #define BYTE_COPY_BWD(dst_ep, src_ep, nbytes) \ do \ { \ size_t __nbytes = (nbytes); \ while (__nbytes > 0) \ { \ byte __x; \ src_ep -= 1; \ __x = ((byte *) src_ep)[0]; \ dst_ep -= 1; \ __nbytes -= 1; \ ((byte *) dst_ep)[0] = __x; \ } \ } while (0) /* end of stuff from memcopy.h */ void * memmove (dest, src, len) void *dest; const void *src; size_t len; { unsigned long int dstp = (long int) dest; unsigned long int srcp = (long int) src; /* This test makes the forward copying code be used whenever possible. Reduces the working set. */ if (dstp - srcp >= len) /* *Unsigned* compare! */ { /* Copy from the beginning to the end. */ #if 0 /* screw all this */ /* If there not too few bytes to copy, use word copy. */ if (len >= OP_T_THRES) { /* Copy just a few bytes to make DSTP aligned. */ len -= (-dstp) % OPSIZ; BYTE_COPY_FWD (dstp, srcp, (-dstp) % OPSIZ); /* Copy whole pages from SRCP to DSTP by virtual address manipulation, as much as possible. */ PAGE_COPY_FWD_MAYBE (dstp, srcp, len, len); /* Copy from SRCP to DSTP taking advantage of the known alignment of DSTP. Number of bytes remaining is put in the third argument, i.e. in LEN. This number may vary from machine to machine. */ WORD_COPY_FWD (dstp, srcp, len, len); /* Fall out and copy the tail. */ } /* There are just a few bytes to copy. Use byte memory operations. */ #endif BYTE_COPY_FWD (dstp, srcp, len); } else { /* Copy from the end to the beginning. */ srcp += len; dstp += len; #if 0 /* ditto */ /* If there not too few bytes to copy, use word copy. */ if (len >= OP_T_THRES) { /* Copy just a few bytes to make DSTP aligned. */ len -= dstp % OPSIZ; BYTE_COPY_BWD (dstp, srcp, dstp % OPSIZ); /* Copy from SRCP to DSTP taking advantage of the known alignment of DSTP. Number of bytes remaining is put in the third argument, i.e. in LEN. This number may vary from machine to machine. */ WORD_COPY_BWD (dstp, srcp, len, len); /* Fall out and copy the tail. */ } #endif /* There are just a few bytes to copy. Use byte memory operations. */ BYTE_COPY_BWD (dstp, srcp, len); } return (dest); } gawk-4.0.1+dfsg.orig/missing_d/getaddrinfo.c0000644000175000017500000000453011463242060017753 0ustar schotschot#ifndef HAVE_SOCKETS #error getaddrinfo.c included by mistake! no socket support! #else #include #include #ifdef HAVE_NETDB_H #include #endif #ifdef HAVE_NETINET_IN_H #include #endif #ifdef HAVE_ARPA_INET_H #include #endif #include "getaddrinfo.h" void freeaddrinfo(struct addrinfo *res) { if (res->ai_addr != NULL) free(res->ai_addr); free(res); } int getaddrinfo(const char *hostname, const char *portname, struct addrinfo *hints, struct addrinfo **res) { struct addrinfo *out; if (res == NULL) return -1; out = (struct addrinfo *) malloc(sizeof(*out)); if (out == NULL) { *res = NULL; return -1; } memset(out, '\0', sizeof(*out)); out->ai_addr = (struct sockaddr *) malloc(sizeof(struct sockaddr_in)); if (out->ai_addr == NULL) { free(out); *res = NULL; return -1; } out->ai_socktype = SOCK_STREAM; if (hints != NULL) { if (hints->ai_socktype) out->ai_socktype = hints->ai_socktype; if (hints->ai_protocol) out->ai_protocol = hints->ai_protocol; } if (out->ai_protocol == 0) { switch (out->ai_socktype) { case SOCK_STREAM: out->ai_protocol = IPPROTO_TCP; break; case SOCK_DGRAM: out->ai_protocol = IPPROTO_UDP; break; case SOCK_RAW: out->ai_protocol = IPPROTO_RAW; break; } } out->ai_addrlen = sizeof(struct sockaddr_in); memset(out->ai_addr, '\0', sizeof(struct sockaddr_in)); if (hostname != NULL) { struct hostent *he; he = gethostbyname(hostname); if (he != NULL && he->h_addr_list != NULL) { ((struct sockaddr_in *)out->ai_addr)->sin_addr.s_addr = ((struct in_addr *)he->h_addr_list[0])->s_addr; } else { freeaddrinfo(out); return -1; } } else { if (!(out->ai_flags & AI_PASSIVE)) ((struct sockaddr_in *)out->ai_addr)->sin_addr.s_addr = htonl(INADDR_ANY); } ((struct sockaddr_in *)out->ai_addr)->sin_family = AF_INET; out->ai_family = AF_INET; if (portname != NULL && *portname) { long portnum; char *end; portnum = strtol(portname, &end, 10); if (*end == '\0' && portnum > 0 && portnum < 65536) { ((struct sockaddr_in *)out->ai_addr)->sin_port = htons(portnum); } else { struct servent *se; se = getservbyname(portname, NULL); if (se != NULL) { ((struct sockaddr_in *)out->ai_addr)->sin_port = se->s_port; } } } *res = out; return 0; } #endif gawk-4.0.1+dfsg.orig/missing_d/snprintf.c0000644000175000017500000001110011463242060017317 0ustar schotschot/* * snprintf.c - Implement snprintf and vsnprintf on platforms that need them. */ /* * Copyright (C) 2006, 2007 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 using in a multi-threaded context, then SNPRINTF_REENTRANT must be defined. But in that case, performance will be much worse, since a temporary file is created and closed for each call to snprintf. */ #if defined(HAVE_MKSTEMP) /* If mkstemp is available, use it instead of tmpfile(), since some older implementations of tmpfile() were not secure. */ static char *tmpfilename = NULL; static FILE *safe_f = NULL; #ifdef HAVE_ATEXIT static void close_safe_f() { if (safe_f != NULL) { fclose(safe_f); safe_f = NULL; } if (tmpfilename != NULL) { unlink(tmpfilename); free(tmpfilename); tmpfilename = NULL; } } #endif static FILE * safe_tmpfile (void) { static short first = TRUE; static const char template[] = "snprintfXXXXXX"; int fd; static char *tmpdir = NULL; static int len = 0; if (first) { first = FALSE; /* * First try Unix stanadard env var, then Windows var, * then fall back to /tmp. */ if ((tmpdir = getenv("TMPDIR")) != NULL && *tmpdir != '\0') ; /* got it */ else if ((tmpdir = getenv("TEMP")) != NULL && *tmpdir != '\0') ; /* got it */ else tmpdir = "/tmp"; len = strlen(tmpdir) + 1 + strlen(template) + 1; #ifdef HAVE_ATEXIT atexit(close_safe_f); #endif /* HAVE_ATEXIT */ } if ((tmpfilename = (char *) malloc(len)) == NULL) return NULL; else sprintf(tmpfilename, "%s/%s", tmpdir, template); if ((fd = mkstemp (tmpfilename)) < 0) return NULL; #if ! defined(DJGPP) && ! defined(MSDOS) && ! defined(_MSC_VER) \ && ! defined(_WIN32) && ! defined(__CRTRSXNT__) && ! defined(__EMX__) \ && ! defined(__MINGW32__) && ! defined(__WIN32__) /* If not MS, unlink after opening. */ unlink (tmpfilename); free(tmpfilename); tmpfilename = NULL; #endif if ((safe_f = fdopen (fd, "w+b")) == NULL) { close (fd); return NULL; } /* setvbuf(f,NULL,_IOFBF,4*BUFSIZ); */ return safe_f; } #elif defined(HAVE_TMPFILE) #define safe_tmpfile tmpfile #else #error Neither mkstemp() nor tmpfile() is available on this platform. #endif #if (__STDC_VERSION__ + 0) < 199901 #undef restrict /* force it! */ #define restrict #endif int vsnprintf (char *restrict buf, size_t len, const char *restrict fmt, va_list args) { int actual; int nread; size_t cnt = 0; #ifndef SNPRINTF_REENTRANT static #endif FILE *fp; if ((buf == NULL) || (len < 1)) return -1; buf[0] = '\0'; /* in case the caller does not check the return code! */ #ifdef SNPRINTF_REENTRANT if ((fp = safe_tmpfile ()) == NULL) return -1; #else if ((fp == NULL) && ((fp = safe_tmpfile ()) == NULL)) return -1; rewind (fp); #endif actual = vfprintf (fp, fmt, args); rewind (fp); if (actual < 0) { #ifdef SNPRINTF_REENTRANT fclose (fp); if (tmpfilename != NULL) { unlink(tmpfilename); free(tmpfilename); tmpfilename = NULL; } #endif return -1; } else if ((size_t) actual < len) len = actual; else --len; while (cnt < len && (nread = fread (buf + cnt, 1, len - cnt, fp)) > 0) cnt += nread; buf[cnt] = '\0'; #ifdef SNPRINTF_REENTRANT fclose (fp); if (tmpfilename != NULL) { unlink(tmpfilename); free(tmpfilename); tmpfilename = NULL; } #endif if (cnt < len) return -1; return actual; } int #if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ snprintf (char *restrict buf, size_t len, const char *restrict fmt, ...) #else snprintf (va_alist) va_dcl #endif { int rv; va_list args; #if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ va_start (args, fmt); #else char *buf; size_t len; char *fmt; va_start (args); buf = va_arg (args, char *); len = va_arg (args, size_t); fmt = va_arg (args, char *); #endif rv = vsnprintf (buf, len, fmt, args); va_end (args); return rv; } gawk-4.0.1+dfsg.orig/missing_d/strcoll.c0000644000175000017500000000020011473257064017150 0ustar schotschot/* replacement strcoll.c */ int strcoll(const char *s1, const char *s2) { return strcmp(s1, s2); /* nyah, nyah, so there */ } gawk-4.0.1+dfsg.orig/missing_d/memcpy.c0000644000175000017500000000035211473533413016763 0ustar schotschot/* * memcpy --- copy strings. * * We supply this routine for those systems that aren't standard yet. */ char * memcpy (dest, src, l) char *dest, *src; int l; { char *ret = dest; while (l--) *dest++ = *src++; return ret; } gawk-4.0.1+dfsg.orig/missing_d/tzset.c0000644000175000017500000000125111463242060016633 0ustar schotschot/* * tzset.c * * Quick and dirty emulation of tzset(), tzname[], and daylight * for old BSD systems without it. * * Thanks to Rick Adams, rick@uunet.uu.net, for the basics. * * BUGS: * Totally ignores the value of the TZ environment variable. */ #if 0 #include #endif #include static char tz1[1024]; static char tz2[1024]; /* external variables */ char *tzname[2] = { tz1, tz2 }; int daylight; extern char *timezone(); void tzset() { struct timeval tp; struct timezone tz; (void) gettimeofday(&tp, &tz); (void) strcpy(tz1, timezone(tz.tz_minuteswest, 0)); (void) strcpy(tz2, timezone(tz.tz_minuteswest, 1)); daylight = tz.tz_dsttime; } gawk-4.0.1+dfsg.orig/missing_d/strerror.c0000644000175000017500000000211011463242060017337 0ustar schotschot/* strerror.c --- ANSI C compatible system error routine Copyright (C) 1986, 1988, 1989, 1991 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. */ #if 0 #include #endif extern int sys_nerr; extern char *sys_errlist[]; char * strerror(n) int n; { static char mesg[30]; if (n < 0 || n >= sys_nerr) { sprintf(mesg, "Unknown error (%d)", n); return mesg; } else return sys_errlist[n]; } gawk-4.0.1+dfsg.orig/missing_d/memset.c0000644000175000017500000000041111473533421016756 0ustar schotschot/* * memset --- initialize memory * * We supply this routine for those systems that aren't standard yet. */ void * memset(dest, val, l) void *dest; int val; size_t l; { char *ret = dest; char *d = dest; while (l--) *d++ = val; return ((void *) ret); } gawk-4.0.1+dfsg.orig/missing_d/wcmisc.c0000644000175000017500000000413311670206020016745 0ustar schotschot/* 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*/ gawk-4.0.1+dfsg.orig/missing_d/strncasecmp.c0000644000175000017500000000623511463242060020013 0ustar schotschot/* Copyright (C) 1991,1992,1995,1996,1997,2001,2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * August 2006. For Gawk: Borrowed from GLIBC to replace BSD licensed version. * DON'T steal this for your own code, just go to the GLIBC sources. * This version hacked unmercifully. */ /* Compare S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. */ int strcasecmp (s1, s2) const char *s1; const char *s2; { const unsigned char *p1 = (const unsigned char *) s1; const unsigned char *p2 = (const unsigned char *) s2; int result; if (p1 == p2) return 0; while ((result = tolower (*p1) - tolower (*p2++)) == 0) if (*p1++ == '\0') break; return result; } /* Compare at most N characters of two strings without taking care for the case. Copyright (C) 1992, 1996, 1997, 2001, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ /* * August 2006, for gawk, same comment applies. See strncase.c * in the GLIBC sources. */ /* Compare no more than N characters of S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. */ int strncasecmp (s1, s2, n) const char *s1; const char *s2; size_t n; { const unsigned char *p1 = (const unsigned char *) s1; const unsigned char *p2 = (const unsigned char *) s2; int result; if (p1 == p2 || n == 0) return 0; while ((result = tolower (*p1) - tolower (*p2++)) == 0) if (*p1++ == '\0' || --n == 0) break; return result; } gawk-4.0.1+dfsg.orig/missing_d/mktime.c0000644000175000017500000002754211463242060016763 0ustar schotschot/* Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Eggert (eggert@twinsun.com). The GNU C Library 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 3 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Define this to have a standalone program to test this implementation of mktime. */ /* #define DEBUG 1 */ #ifdef HAVE_CONFIG_H #include #endif #ifdef _LIBC # define HAVE_LIMITS_H 1 # define HAVE_LOCALTIME_R 1 # define STDC_HEADERS 1 #endif /* Assume that leap seconds are possible, unless told otherwise. If the host has a `zic' command with a `-L leapsecondfilename' option, then it supports leap seconds; otherwise it probably doesn't. */ #ifndef LEAP_SECONDS_POSSIBLE #define LEAP_SECONDS_POSSIBLE 1 #endif #ifndef VMS #include /* Some systems define `time_t' here. */ #else #include #endif #include #if HAVE_LIMITS_H #include #endif #if DEBUG #include #if STDC_HEADERS #include #endif /* Make it work even if the system's libc has its own mktime routine. */ #define mktime my_mktime #endif /* DEBUG */ #ifndef __P #if defined (__GNUC__) || (defined (__STDC__) && __STDC__) #define __P(args) args #else #define __P(args) () #endif /* GCC. */ #endif /* Not __P. */ #ifndef CHAR_BIT #define CHAR_BIT 8 #endif #ifndef INT_MIN #define INT_MIN (~0 << (sizeof (int) * CHAR_BIT - 1)) #endif #ifndef INT_MAX #define INT_MAX (~0 - INT_MIN) #endif #ifndef TIME_T_MIN #define TIME_T_MIN (0 < (time_t) -1 ? (time_t) 0 \ : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1)) #endif #ifndef TIME_T_MAX #define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN) #endif #define TM_YEAR_BASE 1900 #define EPOCH_YEAR 1970 #ifndef __isleap /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ #define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) #endif /* How many days come before each month (0-12). */ const unsigned short int __mon_yday[2][13] = { /* Normal years. */ { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, /* Leap years. */ { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } }; static time_t ydhms_tm_diff __P ((int, int, int, int, int, const struct tm *)); time_t __mktime_internal __P ((struct tm *, struct tm *(*) (const time_t *, struct tm *), time_t *)); static struct tm *my_localtime_r __P ((const time_t *, struct tm *)); static struct tm * my_localtime_r (t, tp) const time_t *t; struct tm *tp; { struct tm *l = localtime (t); if (! l) return 0; *tp = *l; return tp; } /* Yield the difference between (YEAR-YDAY HOUR:MIN:SEC) and (*TP), measured in seconds, ignoring leap seconds. YEAR uses the same numbering as TM->tm_year. All values are in range, except possibly YEAR. If overflow occurs, yield the low order bits of the correct answer. */ static time_t ydhms_tm_diff (year, yday, hour, min, sec, tp) int year, yday, hour, min, sec; const struct tm *tp; { /* Compute intervening leap days correctly even if year is negative. Take care to avoid int overflow. time_t overflow is OK, since only the low order bits of the correct time_t answer are needed. Don't convert to time_t until after all divisions are done, since time_t might be unsigned. */ int a4 = (year >> 2) + (TM_YEAR_BASE >> 2) - ! (year & 3); int b4 = (tp->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (tp->tm_year & 3); int a100 = a4 / 25 - (a4 % 25 < 0); int b100 = b4 / 25 - (b4 % 25 < 0); int a400 = a100 >> 2; int b400 = b100 >> 2; int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); time_t years = year - (time_t) tp->tm_year; time_t days = (365 * years + intervening_leap_days + (yday - tp->tm_yday)); return (60 * (60 * (24 * days + (hour - tp->tm_hour)) + (min - tp->tm_min)) + (sec - tp->tm_sec)); } static time_t localtime_offset; /* Convert *TP to a time_t value. */ time_t mktime (tp) struct tm *tp; { #ifdef _LIBC /* POSIX.1 8.1.1 requires that whenever mktime() is called, the time zone names contained in the external variable `tzname' shall be set as if the tzset() function had been called. */ __tzset (); #endif return __mktime_internal (tp, my_localtime_r, &localtime_offset); } /* Convert *TP to a time_t value, inverting the monotonic and mostly-unit-linear conversion function CONVERT. Use *OFFSET to keep track of a guess at the offset of the result, compared to what the result would be for UTC without leap seconds. If *OFFSET's guess is correct, only one CONVERT call is needed. */ time_t __mktime_internal (tp, convert, offset) struct tm *tp; struct tm *(*convert) __P ((const time_t *, struct tm *)); time_t *offset; { time_t t, dt, t0; struct tm tm; /* The maximum number of probes (calls to CONVERT) should be enough to handle any combinations of time zone rule changes, solar time, and leap seconds. Posix.1 prohibits leap seconds, but some hosts have them anyway. */ int remaining_probes = 4; /* Time requested. Copy it in case CONVERT modifies *TP; this can occur if TP is localtime's returned value and CONVERT is localtime. */ int sec = tp->tm_sec; int min = tp->tm_min; int hour = tp->tm_hour; int mday = tp->tm_mday; int mon = tp->tm_mon; int year_requested = tp->tm_year; int isdst = tp->tm_isdst; /* Ensure that mon is in range, and set year accordingly. */ int mon_remainder = mon % 12; int negative_mon_remainder = mon_remainder < 0; int mon_years = mon / 12 - negative_mon_remainder; int year = year_requested + mon_years; /* The other values need not be in range: the remaining code handles minor overflows correctly, assuming int and time_t arithmetic wraps around. Major overflows are caught at the end. */ /* Calculate day of year from year, month, and day of month. The result need not be in range. */ int yday = ((__mon_yday[__isleap (year + TM_YEAR_BASE)] [mon_remainder + 12 * negative_mon_remainder]) + mday - 1); #if LEAP_SECONDS_POSSIBLE /* Handle out-of-range seconds specially, since ydhms_tm_diff assumes every minute has 60 seconds. */ int sec_requested = sec; if (sec < 0) sec = 0; if (59 < sec) sec = 59; #endif /* Invert CONVERT by probing. First assume the same offset as last time. Then repeatedly use the error to improve the guess. */ tm.tm_year = EPOCH_YEAR - TM_YEAR_BASE; tm.tm_yday = tm.tm_hour = tm.tm_min = tm.tm_sec = 0; t0 = ydhms_tm_diff (year, yday, hour, min, sec, &tm); for (t = t0 + *offset; (dt = ydhms_tm_diff (year, yday, hour, min, sec, (*convert) (&t, &tm))); t += dt) if (--remaining_probes == 0) return -1; /* Check whether tm.tm_isdst has the requested value, if any. */ if (0 <= isdst && 0 <= tm.tm_isdst) { int dst_diff = (isdst != 0) - (tm.tm_isdst != 0); if (dst_diff) { /* Move two hours in the direction indicated by the disagreement, probe some more, and switch to a new time if found. The largest known fallback due to daylight savings is two hours: once, in Newfoundland, 1988-10-30 02:00 -> 00:00. */ time_t ot = t - 2 * 60 * 60 * dst_diff; while (--remaining_probes != 0) { struct tm otm; if (! (dt = ydhms_tm_diff (year, yday, hour, min, sec, (*convert) (&ot, &otm)))) { t = ot; tm = otm; break; } if ((ot += dt) == t) break; /* Avoid a redundant probe. */ } } } *offset = t - t0; #if LEAP_SECONDS_POSSIBLE if (sec_requested != tm.tm_sec) { /* Adjust time to reflect the tm_sec requested, not the normalized value. Also, repair any damage from a false match due to a leap second. */ t += sec_requested - sec + (sec == 0 && tm.tm_sec == 60); (*convert) (&t, &tm); } #endif if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3) { /* time_t isn't large enough to rule out overflows in ydhms_tm_diff, so check for major overflows. A gross check suffices, since if t has overflowed, it is off by a multiple of TIME_T_MAX - TIME_T_MIN + 1. So ignore any component of the difference that is bounded by a small value. */ double dyear = (double) year_requested + mon_years - tm.tm_year; double dday = 366 * dyear + mday; double dsec = 60 * (60 * (24 * dday + hour) + min) + sec_requested; if (TIME_T_MAX / 3 - TIME_T_MIN / 3 < (dsec < 0 ? - dsec : dsec)) return -1; } *tp = tm; return t; } #ifdef weak_alias weak_alias (mktime, timelocal) #endif #if DEBUG static int not_equal_tm (a, b) struct tm *a; struct tm *b; { return ((a->tm_sec ^ b->tm_sec) | (a->tm_min ^ b->tm_min) | (a->tm_hour ^ b->tm_hour) | (a->tm_mday ^ b->tm_mday) | (a->tm_mon ^ b->tm_mon) | (a->tm_year ^ b->tm_year) | (a->tm_mday ^ b->tm_mday) | (a->tm_yday ^ b->tm_yday) | (a->tm_isdst ^ b->tm_isdst)); } static void print_tm (tp) struct tm *tp; { printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d", tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday, tp->tm_hour, tp->tm_min, tp->tm_sec, tp->tm_yday, tp->tm_wday, tp->tm_isdst); } static int check_result (tk, tmk, tl, tml) time_t tk; struct tm tmk; time_t tl; struct tm tml; { if (tk != tl || not_equal_tm (&tmk, &tml)) { printf ("mktime ("); print_tm (&tmk); printf (")\nyields ("); print_tm (&tml); printf (") == %ld, should be %ld\n", (long) tl, (long) tk); return 1; } return 0; } int main (argc, argv) int argc; char **argv; { int status = 0; struct tm tm, tmk, tml; time_t tk, tl; char trailer; if ((argc == 3 || argc == 4) && (sscanf (argv[1], "%d-%d-%d%c", &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer) == 3) && (sscanf (argv[2], "%d:%d:%d%c", &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer) == 3)) { tm.tm_year -= TM_YEAR_BASE; tm.tm_mon--; tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]); tmk = tm; tl = mktime (&tmk); tml = *localtime (&tl); printf ("mktime returns %ld == ", (long) tl); print_tm (&tmk); printf ("\n"); status = check_result (tl, tmk, tl, tml); } else if (argc == 4 || (argc == 5 && strcmp (argv[4], "-") == 0)) { time_t from = atol (argv[1]); time_t by = atol (argv[2]); time_t to = atol (argv[3]); if (argc == 4) for (tl = from; tl <= to; tl += by) { tml = *localtime (&tl); tmk = tml; tk = mktime (&tmk); status |= check_result (tk, tmk, tl, tml); } else for (tl = from; tl <= to; tl += by) { /* Null benchmark. */ tml = *localtime (&tl); tmk = tml; tk = tl; status |= check_result (tk, tmk, tl, tml); } } else printf ("Usage:\ \t%s YYYY-MM-DD HH:MM:SS [ISDST] # Test given time.\n\ \t%s FROM BY TO # Test values FROM, FROM+BY, ..., TO.\n\ \t%s FROM BY TO - # Do not test those values (for benchmark).\n", argv[0], argv[0], argv[0]); return status; } #endif /* DEBUG */ /* Local Variables: compile-command: "gcc -DDEBUG=1 -Wall -O -g mktime.c -o mktime" End: */ gawk-4.0.1+dfsg.orig/missing_d/memcmp.c0000644000175000017500000000047711473533405016760 0ustar schotschot/* * memcmp --- compare strings. * * We use our own routine since it has to act like strcmp() for return * value, and the BSD manual says bcmp() only returns zero/non-zero. */ int memcmp (s1, s2, l) char *s1, *s2; int l; { for (; l-- > 0; s1++, s2++) { if (*s1 != *s2) return (*s1 - *s2); } return (0); } gawk-4.0.1+dfsg.orig/missing_d/strchr.c0000644000175000017500000000132211473533426017000 0ustar schotschot/* * strchr --- search a string for a character * * We supply this routine for those systems that aren't standard yet. */ #if 0 #include #endif char * strchr(str, c) const char *str, c; { if (c == '\0') { /* thanks to Mike Brennan ... */ do { if (*str == c) return (char *) str; } while (*str++); } else { for (; *str; str++) if (*str == c) return (char *) str; } return NULL; } /* * strrchr --- find the last occurrence of a character in a string * * We supply this routine for those systems that aren't standard yet. */ char * strrchr(str, c) const char *str, c; { const char *save = NULL; for (; *str; str++) if (*str == c) save = str; return (char *) save; } gawk-4.0.1+dfsg.orig/missing_d/strtod.c0000644000175000017500000000506511473533432017017 0ustar schotschot/* * gawk wrapper for strtod */ /* * Stupid version of System V strtod(3) library routine. * Does no overflow/underflow checking. * * A real number is defined to be * optional leading white space * optional sign * string of digits with optional decimal point * optional 'e' or 'E' * followed by optional sign or space * followed by an integer * * if ptr is not NULL a pointer to the character terminating the * scan is returned in *ptr. If no number formed, *ptr is set to str * and 0 is returned. * * For speed, we don't do the conversion ourselves. Instead, we find * the end of the number and then call atof() to do the dirty work. * This bought us a 10% speedup on a sample program at uunet.uu.net. * * Fall 2000: Changed to enforce C89 semantics, so that 0x... returns 0. * C99 has hexadecimal floating point numbers. * * Summer 2001. Try to make it smarter, so that a string like "0000" * doesn't look like we failed. Sigh. * * Xmass 2002. Fix a bug in ptr determination, eg. for "0e0". * * Spring 2004. Update for I18N. Oh joy. */ #if 0 #include #endif extern double atof(); double gawk_strtod(s, 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 */ int dig = 0; int dig0 = 0; /* optional white space */ while (isspace(*s)) s++; begin = s; /* optional sign */ if (*s == '+' || *s == '-') s++; /* string of digits with optional decimal point */ while (*s == '0') { s++; dig0++; } while (isdigit(*s)) { s++; dig++; } if ( #if defined(HAVE_LOCALE_H) loc.decimal_point != NULL && do_posix ? *s == loc.decimal_point[0] : *s == '.' #else *s == '.' #endif ) { s++; while (*s == '0') { s++; dig0++; } while (isdigit(*s)) { s++; dig++; } } dig0 += dig; /* any digit has appeared */ /* * optional 'e' or 'E' * if a digit (or at least zero) was seen * followed by optional sign * followed by an integer */ if (dig0 && (*s == 'e' || *s == 'E') && (isdigit(s[1]) || ((s[1] == '-' || s[1] == '+') && isdigit(s[2])))) { s++; if (*s == '+' || *s == '-') s++; while (isdigit(*s)) s++; } /* In case we haven't found a number, set ptr to start. */ if (ptr) *ptr = (dig0 ? s : start); /* Go for it. */ return (dig ? atof(begin) : 0.0); } #ifdef TEST int main(argc, argv) int argc; char **argv; { double d; char *p; for (argc--, argv++; argc; argc--, argv++) { d = strtod (*argv, & p); printf ("%lf [%s]\n", d, p); } return 0; } #endif gawk-4.0.1+dfsg.orig/missing_d/getaddrinfo.h0000644000175000017500000000124311506150630017755 0ustar schotschot#ifndef AI_ADDRCONFIG #define AI_ADDRCONFIG 0 #endif /* AI_ADDRCONFIG */ #ifndef AI_PASSIVE #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 struct addrinfo { int ai_flags; int ai_socktype; int ai_family; int ai_protocol; socklen_t ai_addrlen; struct sockaddr * ai_addr; struct xaddrinfo * ai_next; }; void freeaddrinfo(struct xaddrinfo * res); int getaddrinfo(const char * hostname, const char * portname, struct xaddrinfo * hints, struct xaddrinfo ** res); gawk-4.0.1+dfsg.orig/missing_d/strftime.c0000644000175000017500000010635711474766045017354 0ustar schotschot/* Copyright (C) 1991-1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H # include #endif #ifdef _LIBC # define HAVE_LIMITS_H 1 # define HAVE_MBLEN 1 # define HAVE_MBRLEN 1 # define HAVE_STRUCT_ERA_ENTRY 1 # define HAVE_TM_GMTOFF 1 # define HAVE_TM_ZONE 1 # define HAVE_TZNAME 1 # define HAVE_TZSET 1 # define MULTIBYTE_IS_FORMAT_SAFE 1 # define STDC_HEADERS 1 # include "../locale/localeinfo.h" #endif #if defined emacs && !defined HAVE_BCOPY # define HAVE_MEMCPY 1 #endif #include #ifdef TIME_T_IN_SYS_TYPES #include /* Some systems define `time_t' here. */ #endif #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # 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 safe if they cannot contain byte sequences that look like format conversion specifications. The GNU C Library uses UTF8 multibyte encoding, which is safe for formats, but strftime.c can be used with other C libraries that use unsafe encodings. */ #define DO_MULTIBYTE (HAVE_MBLEN && ! MULTIBYTE_IS_FORMAT_SAFE) #if DO_MULTIBYTE # if HAVE_MBRLEN # include # else /* Simulate mbrlen with mblen as best we can. */ # define mbstate_t int # define mbrlen(s, n, ps) mblen (s, n) # define mbsinit(ps) (*(ps) == 0) # endif static const mbstate_t mbstate_zero; #endif #if HAVE_LIMITS_H # include #endif #if STDC_HEADERS # include # include # include #else # ifndef HAVE_MEMCPY # define memcpy(d, s, n) bcopy ((s), (d), (n)) # endif #endif #ifdef COMPILE_WIDE # include # define CHAR_T wchar_t # define UCHAR_T unsigned int # define L_(Str) L##Str # define NLW(Sym) _NL_W##Sym # define MEMCPY(d, s, n) __wmemcpy (d, s, n) # define STRLEN(s) __wcslen (s) #else # define CHAR_T char # define UCHAR_T unsigned char # define L_(Str) Str # define NLW(Sym) Sym # if !defined STDC_HEADERS && !defined HAVE_MEMCPY # define MEMCPY(d, s, n) bcopy ((s), (d), (n)) # else # define MEMCPY(d, s, n) memcpy ((d), (s), (n)) # endif # define STRLEN(s) strlen (s) # ifdef _LIBC # define MEMPCPY(d, s, n) __mempcpy (d, s, n) # else # ifndef HAVE_MEMPCPY # define MEMPCPY(d, s, n) ((void *) ((char *) memcpy (d, s, n) + (n))) # endif # endif #endif #ifndef __P # if defined __GNUC__ || (defined __STDC__ && __STDC__) # define __P(args) args # else # define __P(args) () # endif /* GCC. */ #endif /* Not __P. */ #ifndef PTR # ifdef __STDC__ # define PTR void * # else # define PTR char * # endif #endif #ifndef CHAR_BIT # define CHAR_BIT 8 #endif #ifndef NULL # define NULL 0 #endif /* Test for checking whether a given type is signed or not. Some compilers issue a diagnostic about suspicious construct for a test that will always fail when comparing a value that can't be negative against 0 using `<' or `<=' operator. */ /* #define TYPE_SIGNED(t) ((t) -1 < 0) */ #define TYPE_SIGNED(t) ((t) -1 < 1) #ifndef INT_STRLEN_BOUND /* Bound on length of the string representing an integer value of type t. Subtract one for the sign bit if t is signed; 302 / 1000 is log10 (2) rounded up; add one for integer division truncation; add one more for a minus sign if t is signed. */ #define INT_STRLEN_BOUND(t) \ ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 + 1 + TYPE_SIGNED (t)) #endif #define TM_YEAR_BASE 1900 #ifndef __isleap /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ # define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) #endif #ifdef _LIBC # define my_strftime_gmtime_r __gmtime_r # define my_strftime_localtime_r __localtime_r # define tzname __tzname # define tzset __tzset #else /* If we're a strftime substitute in a GNU program, then prefer gmtime to gmtime_r, since many gmtime_r implementations are buggy. Similarly for localtime_r. */ # if ! HAVE_TM_GMTOFF static struct tm *my_strftime_gmtime_r __P ((const time_t *, struct tm *)); static struct tm * my_strftime_gmtime_r (t, tp) const time_t *t; struct tm *tp; { struct tm *l = gmtime (t); if (! l) return 0; *tp = *l; return tp; } # endif /* ! HAVE_TM_GMTOFF */ static struct tm *my_strftime_localtime_r __P ((const time_t *, struct tm *)); static struct tm * my_strftime_localtime_r (t, tp) const time_t *t; struct tm *tp; { struct tm *l = localtime (t); if (! l) return 0; *tp = *l; return tp; } #endif /* ! defined _LIBC */ #if !defined memset && !defined HAVE_MEMSET && !defined _LIBC /* Some systems lack the `memset' function and we don't want to introduce additional dependencies. */ /* The SGI compiler reportedly barfs on the trailing null if we use a string constant as the initializer. 28 June 1997, rms. */ static const CHAR_T spaces[16] = /* " " */ { L_(' '),L_(' '),L_(' '),L_(' '),L_(' '),L_(' '),L_(' '),L_(' '), L_(' '),L_(' '),L_(' '),L_(' '),L_(' '),L_(' '),L_(' '),L_(' ') }; static const CHAR_T zeroes[16] = /* "0000000000000000" */ { L_('0'),L_('0'),L_('0'),L_('0'),L_('0'),L_('0'),L_('0'),L_('0'), L_('0'),L_('0'),L_('0'),L_('0'),L_('0'),L_('0'),L_('0'),L_('0') }; # define memset_space(P, Len) \ do { \ int _len = (Len); \ \ do \ { \ int _this = _len > 16 ? 16 : _len; \ (P) = MEMPCPY ((P), spaces, _this * sizeof (CHAR_T)); \ _len -= _this; \ } \ while (_len > 0); \ } while (0) # define memset_zero(P, Len) \ do { \ int _len = (Len); \ \ do \ { \ int _this = _len > 16 ? 16 : _len; \ (P) = MEMPCPY ((P), zeroes, _this * sizeof (CHAR_T)); \ _len -= _this; \ } \ while (_len > 0); \ } while (0) #else # ifdef COMPILE_WIDE # define memset_space(P, Len) (wmemset ((P), L' ', (Len)), (P) += (Len)) # define memset_zero(P, Len) (wmemset ((P), L'0', (Len)), (P) += (Len)) # else # define memset_space(P, Len) (memset ((P), ' ', (Len)), (P) += (Len)) # define memset_zero(P, Len) (memset ((P), '0', (Len)), (P) += (Len)) # endif #endif #define add(n, f) \ do \ { \ int _n = (n); \ int _delta = width - _n; \ int _incr = _n + (_delta > 0 ? _delta : 0); \ if ((size_t) _incr >= maxsize - i) \ return 0; \ if (p) \ { \ if (_delta > 0) \ { \ if (pad == L_('0')) \ memset_zero (p, _delta); \ else \ memset_space (p, _delta); \ } \ f; \ p += _n; \ } \ i += _incr; \ } while (0) #define cpy(n, s) \ add ((n), \ if (to_lowcase) \ memcpy_lowcase (p, (s), _n LOCALE_ARG); \ else if (to_uppcase) \ memcpy_uppcase (p, (s), _n LOCALE_ARG); \ else \ MEMCPY ((PTR) p, (const PTR) (s), _n)) #ifdef COMPILE_WIDE # ifndef USE_IN_EXTENDED_LOCALE_MODEL # undef __mbsrtowcs_l # define __mbsrtowcs_l(d, s, l, st, loc) __mbsrtowcs (d, s, l, st) # endif # define widen(os, ws, l) \ { \ mbstate_t __st; \ const char *__s = os; \ memset (&__st, '\0', sizeof (__st)); \ l = __mbsrtowcs_l (NULL, &__s, 0, &__st, loc); \ ws = alloca ((l + 1) * sizeof (wchar_t)); \ (void) __mbsrtowcs_l (ws, &__s, l, &__st, loc); \ } #endif /* For gawk */ #undef TOLOWER #undef TOUPPER #undef ISDIGIT #if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL /* We use this code also for the extended locale handling where the function gets as an additional argument the locale which has to be used. To access the values we have to redefine the _NL_CURRENT macro. */ # define strftime __strftime_l # define wcsftime __wcsftime_l # undef _NL_CURRENT # define _NL_CURRENT(category, item) \ (current->values[_NL_ITEM_INDEX (item)].string) # define LOCALE_PARAM , loc # define LOCALE_ARG , loc # define LOCALE_PARAM_DECL __locale_t loc; # define LOCALE_PARAM_PROTO , __locale_t loc # define HELPER_LOCALE_ARG , current #else # define LOCALE_PARAM # define LOCALE_PARAM_PROTO # define LOCALE_ARG # define LOCALE_PARAM_DECL # ifdef _LIBC # define HELPER_LOCALE_ARG , _NL_CURRENT_DATA (LC_TIME) # else # define HELPER_LOCALE_ARG # endif #endif #ifdef COMPILE_WIDE # ifdef USE_IN_EXTENDED_LOCALE_MODEL # define TOUPPER(Ch, L) __towupper_l (Ch, L) # define TOLOWER(Ch, L) __towlower_l (Ch, L) # else # define TOUPPER(Ch, L) towupper (Ch) # define TOLOWER(Ch, L) towlower (Ch) # endif #else # ifdef _LIBC # ifdef USE_IN_EXTENDED_LOCALE_MODEL # define TOUPPER(Ch, L) __toupper_l (Ch, L) # define TOLOWER(Ch, L) __tolower_l (Ch, L) # else # define TOUPPER(Ch, L) toupper (Ch) # define TOLOWER(Ch, L) tolower (Ch) # endif # else # define TOUPPER(Ch, L) (islower (Ch) ? toupper (Ch) : (Ch)) # define TOLOWER(Ch, L) (isupper (Ch) ? tolower (Ch) : (Ch)) # endif #endif /* We don't use `isdigit' here since the locale dependent interpretation is not what we want here. We only need to accept the arabic digits in the ASCII range. One day there is perhaps a more reliable way to accept other sets of digits. */ #define ISDIGIT(Ch) ((unsigned int) (Ch) - L_('0') <= 9) static CHAR_T *memcpy_lowcase __P ((CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM_PROTO)); static CHAR_T * memcpy_lowcase (dest, src, len LOCALE_PARAM) CHAR_T *dest; const CHAR_T *src; size_t len; LOCALE_PARAM_DECL { while (len-- > 0) dest[len] = TOLOWER ((UCHAR_T) src[len], loc); return dest; } static CHAR_T *memcpy_uppcase __P ((CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM_PROTO)); static CHAR_T * memcpy_uppcase (dest, src, len LOCALE_PARAM) CHAR_T *dest; const CHAR_T *src; size_t len; LOCALE_PARAM_DECL { while (len-- > 0) dest[len] = TOUPPER ((UCHAR_T) src[len], loc); return dest; } #if ! HAVE_TM_GMTOFF /* Yield the difference between *A and *B, measured in seconds, ignoring leap seconds. */ # define tm_diff ftime_tm_diff static int tm_diff __P ((const struct tm *, const struct tm *)); static int tm_diff (a, b) const struct tm *a; const struct tm *b; { /* Compute intervening leap days correctly even if year is negative. Take care to avoid int overflow in leap day calculations, but it's OK to assume that A and B are close to each other. */ int a4 = (a->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (a->tm_year & 3); int b4 = (b->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (b->tm_year & 3); int a100 = a4 / 25 - (a4 % 25 < 0); int b100 = b4 / 25 - (b4 % 25 < 0); int a400 = a100 >> 2; int b400 = b100 >> 2; int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); int years = a->tm_year - b->tm_year; int days = (365 * years + intervening_leap_days + (a->tm_yday - b->tm_yday)); return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) + (a->tm_min - b->tm_min)) + (a->tm_sec - b->tm_sec)); } #endif /* ! HAVE_TM_GMTOFF */ /* The number of days from the first day of the first ISO week of this year to the year day YDAY with week day WDAY. ISO weeks start on Monday; the first ISO week has the year's first Thursday. YDAY may be as small as YDAY_MINIMUM. */ #define ISO_WEEK_START_WDAY 1 /* Monday */ #define ISO_WEEK1_WDAY 4 /* Thursday */ #define YDAY_MINIMUM (-366) static int iso_week_days __P ((int, int)); #ifdef __GNUC__ __inline__ #endif static int iso_week_days (yday, wday) int yday; int wday; { /* Add enough to the first operand of % to make it nonnegative. */ int big_enough_multiple_of_7 = (-YDAY_MINIMUM / 7 + 2) * 7; return (yday - (yday - wday + ISO_WEEK1_WDAY + big_enough_multiple_of_7) % 7 + ISO_WEEK1_WDAY - ISO_WEEK_START_WDAY); } #if !(defined _NL_CURRENT || HAVE_STRFTIME) static CHAR_T const weekday_name[][10] = { L_("Sunday"), L_("Monday"), L_("Tuesday"), L_("Wednesday"), L_("Thursday"), L_("Friday"), L_("Saturday") }; static CHAR_T const month_name[][10] = { L_("January"), L_("February"), L_("March"), L_("April"), L_("May"), L_("June"), L_("July"), L_("August"), L_("September"), L_("October"), L_("November"), L_("December") }; #endif #ifdef emacs # define my_strftime emacs_strftimeu # define ut_argument , ut # define ut_argument_spec int ut; # define ut_argument_spec_iso , int ut #else # ifdef COMPILE_WIDE # define my_strftime wcsftime # define nl_get_alt_digit _nl_get_walt_digit # else # define my_strftime strftime # define nl_get_alt_digit _nl_get_alt_digit # endif # define ut_argument # define ut_argument_spec # define ut_argument_spec_iso /* We don't have this information in general. */ # define ut 0 #endif #if !defined _LIBC && HAVE_TZNAME && HAVE_TZSET /* Solaris 2.5 tzset sometimes modifies the storage returned by localtime. Work around this bug by copying *tp before it might be munged. */ size_t _strftime_copytm __P ((char *, size_t, const char *, const struct tm * ut_argument_spec_iso)); size_t my_strftime (s, maxsize, format, tp ut_argument) CHAR_T *s; size_t maxsize; const CHAR_T *format; const struct tm *tp; ut_argument_spec { struct tm tmcopy; tmcopy = *tp; return _strftime_copytm (s, maxsize, format, &tmcopy ut_argument); } # undef my_strftime # define my_strftime _strftime_copytm #endif /* Write information from TP into S according to the format string FORMAT, writing no more that MAXSIZE characters (including the terminating '\0') and returning number of characters written. If S is NULL, nothing will be written anywhere, so to determine how many characters would be written, use NULL for S and (size_t) UINT_MAX for MAXSIZE. */ size_t my_strftime (s, maxsize, format, tp ut_argument LOCALE_PARAM) CHAR_T *s; size_t maxsize; const CHAR_T *format; const struct tm *tp; ut_argument_spec LOCALE_PARAM_DECL { #if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL struct locale_data *const current = loc->__locales[LC_TIME]; #endif int hour12 = tp->tm_hour; #ifdef _NL_CURRENT /* We cannot make the following values variables since we must delay the evaluation of these values until really needed since some expressions might not be valid in every situation. The `struct tm' might be generated by a strptime() call that initialized only a few elements. Dereference the pointers only if the format requires this. Then it is ok to fail if the pointers are invalid. */ # define a_wkday \ ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday)) # define f_wkday \ ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday)) # define a_month \ ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon)) # define f_month \ ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)) # define ampm \ ((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11 \ ? NLW(PM_STR) : NLW(AM_STR))) # define aw_len STRLEN (a_wkday) # define am_len STRLEN (a_month) # define ap_len STRLEN (ampm) #else # if !HAVE_STRFTIME # define f_wkday (weekday_name[tp->tm_wday]) # define f_month (month_name[tp->tm_mon]) # define a_wkday f_wkday # define a_month f_month # define ampm (L_("AMPM") + 2 * (tp->tm_hour > 11)) size_t aw_len = 3; size_t am_len = 3; size_t ap_len = 2; # endif #endif const char *zone; size_t i = 0; CHAR_T *p = s; const CHAR_T *f; #if DO_MULTIBYTE && !defined COMPILE_WIDE const char *format_end = NULL; #endif zone = NULL; #if HAVE_TM_ZONE /* The POSIX test suite assumes that setting the environment variable TZ to a new value before calling strftime() will influence the result (the %Z format) even if the information in TP is computed with a totally different time zone. This is bogus: though POSIX allows bad behavior like this, POSIX does not require it. Do the right thing instead. */ zone = (const char *) tp->tm_zone; #endif #if HAVE_TZNAME if (ut) { if (! (zone && *zone)) zone = "GMT"; } else { /* POSIX.1 requires that local time zone information is used as though strftime called tzset. */ # if HAVE_TZSET tzset (); # endif } #endif if (hour12 > 12) hour12 -= 12; else if (hour12 == 0) hour12 = 12; for (f = format; *f != '\0'; ++f) { int pad = 0; /* Padding for number ('-', '_', or 0). */ int modifier; /* Field modifier ('E', 'O', or 0). */ int digits; /* Max digits for numeric format. */ int number_value; /* Numeric value to be printed. */ int negative_number; /* 1 if the number is negative. */ const CHAR_T *subfmt; CHAR_T *bufp; CHAR_T buf[1 + (sizeof (int) < sizeof (time_t) ? INT_STRLEN_BOUND (time_t) : INT_STRLEN_BOUND (int))]; int width = -1; int to_lowcase = 0; int to_uppcase = 0; int change_case = 0; int format_char; #if DO_MULTIBYTE && !defined COMPILE_WIDE switch (*f) { case L_('%'): break; case L_('\b'): case L_('\t'): case L_('\n'): case L_('\v'): case L_('\f'): case L_('\r'): case L_(' '): case L_('!'): case L_('"'): case L_('#'): case L_('&'): case L_('\''): case L_('('): case L_(')'): case L_('*'): case L_('+'): case L_(','): case L_('-'): case L_('.'): case L_('/'): case L_('0'): case L_('1'): case L_('2'): case L_('3'): case L_('4'): case L_('5'): case L_('6'): case L_('7'): case L_('8'): case L_('9'): case L_(':'): case L_(';'): case L_('<'): case L_('='): case L_('>'): case L_('?'): case L_('A'): case L_('B'): case L_('C'): case L_('D'): case L_('E'): case L_('F'): case L_('G'): case L_('H'): case L_('I'): case L_('J'): case L_('K'): case L_('L'): case L_('M'): case L_('N'): case L_('O'): case L_('P'): case L_('Q'): case L_('R'): case L_('S'): case L_('T'): case L_('U'): case L_('V'): case L_('W'): case L_('X'): case L_('Y'): case L_('Z'): case L_('['): case L_('\\'): case L_(']'): case L_('^'): case L_('_'): case L_('a'): case L_('b'): case L_('c'): case L_('d'): case L_('e'): case L_('f'): case L_('g'): case L_('h'): case L_('i'): case L_('j'): case L_('k'): case L_('l'): case L_('m'): case L_('n'): case L_('o'): case L_('p'): case L_('q'): case L_('r'): case L_('s'): case L_('t'): case L_('u'): case L_('v'): case L_('w'): case L_('x'): case L_('y'): case L_('z'): case L_('{'): case L_('|'): case L_('}'): case L_('~'): /* The C Standard requires these 98 characters (plus '%') to be in the basic execution character set. None of these characters can start a multibyte sequence, so they need not be analyzed further. */ add (1, *p = *f); continue; default: /* Copy this multibyte sequence until we reach its end, find an error, or come back to the initial shift state. */ { mbstate_t mbstate = mbstate_zero; size_t len = 0; size_t fsize; if (! format_end) format_end = f + strlen (f) + 1; fsize = format_end - f; do { size_t bytes = mbrlen (f + len, fsize - len, &mbstate); if (bytes == 0) break; if (bytes == (size_t) -2) { len += strlen (f + len); break; } if (bytes == (size_t) -1) { len++; break; } len += bytes; } while (! mbsinit (&mbstate)); cpy (len, f); f += len - 1; continue; } } #else /* ! DO_MULTIBYTE */ /* Either multibyte encodings are not supported, they are safe for formats, so any non-'%' byte can be copied through, or this is the wide character version. */ if (*f != L_('%')) { add (1, *p = *f); continue; } #endif /* ! DO_MULTIBYTE */ /* Check for flags that can modify a format. */ while (1) { switch (*++f) { /* This influences the number formats. */ case L_('_'): case L_('-'): case L_('0'): pad = *f; continue; /* This changes textual output. */ case L_('^'): to_uppcase = 1; continue; case L_('#'): change_case = 1; continue; default: break; } break; } /* As a GNU extension we allow to specify the field width. */ if (ISDIGIT (*f)) { width = 0; do { if (width > INT_MAX / 10 || (width == INT_MAX / 10 && *f - L_('0') > INT_MAX % 10)) /* Avoid overflow. */ width = INT_MAX; else { width *= 10; width += *f - L_('0'); } ++f; } while (ISDIGIT (*f)); } /* Check for modifiers. */ switch (*f) { case L_('E'): case L_('O'): modifier = *f++; break; default: modifier = 0; break; } /* Now do the specified format. */ format_char = *f; switch (format_char) { #define DO_NUMBER(d, v) \ digits = d > width ? d : width; \ number_value = v; goto do_number #define DO_NUMBER_SPACEPAD(d, v) \ digits = d > width ? d : width; \ number_value = v; goto do_number_spacepad case L_('%'): if (modifier != 0) goto bad_format; add (1, *p = *f); break; case L_('a'): if (modifier != 0) goto bad_format; if (change_case) { to_uppcase = 1; to_lowcase = 0; } #if defined _NL_CURRENT || !HAVE_STRFTIME cpy (aw_len, a_wkday); break; #else goto underlying_strftime; #endif case 'A': if (modifier != 0) goto bad_format; if (change_case) { to_uppcase = 1; to_lowcase = 0; } #if defined _NL_CURRENT || !HAVE_STRFTIME cpy (STRLEN (f_wkday), f_wkday); break; #else goto underlying_strftime; #endif case L_('b'): case L_('h'): if (change_case) { to_uppcase = 1; to_lowcase = 0; } if (modifier != 0) goto bad_format; #if defined _NL_CURRENT || !HAVE_STRFTIME cpy (am_len, a_month); break; #else goto underlying_strftime; #endif case L_('B'): if (modifier != 0) goto bad_format; if (change_case) { to_uppcase = 1; to_lowcase = 0; } #if defined _NL_CURRENT || !HAVE_STRFTIME cpy (STRLEN (f_month), f_month); break; #else goto underlying_strftime; #endif case L_('c'): if (modifier == L_('O')) goto bad_format; #ifdef _NL_CURRENT if (! (modifier == 'E' && (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ERA_D_T_FMT))) != '\0'))) subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_T_FMT)); #else # if HAVE_STRFTIME goto underlying_strftime; # else subfmt = L_("%a %b %e %H:%M:%S %Y"); # endif #endif subformat: { CHAR_T *old_start = p; size_t len = my_strftime (NULL, (size_t) -1, subfmt, tp ut_argument LOCALE_ARG); add (len, my_strftime (p, maxsize - i, subfmt, tp ut_argument LOCALE_ARG)); if (to_uppcase) while (old_start < p) { *old_start = TOUPPER ((UCHAR_T) *old_start, loc); ++old_start; } } break; #if HAVE_STRFTIME && ! (defined _NL_CURRENT && HAVE_STRUCT_ERA_ENTRY) underlying_strftime: { /* The relevant information is available only via the underlying strftime implementation, so use that. */ char ufmt[4]; char *u = ufmt; char ubuf[1024]; /* enough for any single format in practice */ size_t len; /* Make sure we're calling the actual underlying strftime. In some cases, config.h contains something like "#define strftime rpl_strftime". */ # ifdef strftime # undef strftime size_t strftime (); # endif *u++ = '%'; if (modifier != 0) *u++ = modifier; *u++ = format_char; *u = '\0'; len = strftime (ubuf, sizeof ubuf, ufmt, tp); if (len == 0 && ubuf[0] != '\0') return 0; cpy (len, ubuf); } break; #endif case L_('C'): if (modifier == L_('O')) goto bad_format; if (modifier == L_('E')) { #if HAVE_STRUCT_ERA_ENTRY struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { # ifdef COMPILE_WIDE size_t len = __wcslen (era->era_wname); cpy (len, era->era_wname); # else size_t len = strlen (era->era_name); cpy (len, era->era_name); # endif break; } #else # if HAVE_STRFTIME goto underlying_strftime; # endif #endif } { int year = tp->tm_year + TM_YEAR_BASE; DO_NUMBER (1, year / 100 - (year % 100 < 0)); } case L_('x'): if (modifier == L_('O')) goto bad_format; #ifdef _NL_CURRENT if (! (modifier == L_('E') && (*(subfmt = (const CHAR_T *)_NL_CURRENT (LC_TIME, NLW(ERA_D_FMT))) != L_('\0')))) subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT)); goto subformat; #else # if HAVE_STRFTIME goto underlying_strftime; # else /* Fall through. */ # endif #endif case L_('D'): if (modifier != 0) goto bad_format; subfmt = L_("%m/%d/%y"); goto subformat; case L_('d'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, tp->tm_mday); case L_('e'): if (modifier == L_('E')) goto bad_format; DO_NUMBER_SPACEPAD (2, tp->tm_mday); /* All numeric formats set DIGITS and NUMBER_VALUE and then jump to one of these two labels. */ do_number_spacepad: /* Force `_' flag unless overwritten by `0' flag. */ if (pad != L_('0')) pad = L_('_'); do_number: /* Format the number according to the MODIFIER flag. */ if (modifier == L_('O') && 0 <= number_value) { #ifdef _NL_CURRENT /* Get the locale specific alternate representation of the number NUMBER_VALUE. If none exist NULL is returned. */ const CHAR_T *cp = nl_get_alt_digit (number_value HELPER_LOCALE_ARG); if (cp != NULL) { size_t digitlen = STRLEN (cp); if (digitlen != 0) { cpy (digitlen, cp); break; } } #else # if HAVE_STRFTIME goto underlying_strftime; # endif #endif } { unsigned int u = number_value; bufp = buf + sizeof (buf) / sizeof (buf[0]); negative_number = number_value < 0; if (negative_number) u = -u; do *--bufp = u % 10 + L_('0'); while ((u /= 10) != 0); } do_number_sign_and_padding: if (negative_number) *--bufp = L_('-'); if (pad != L_('-')) { int padding = digits - (buf + (sizeof (buf) / sizeof (buf[0])) - bufp); if (padding > 0) { if (pad == L_('_')) { if ((size_t) padding >= maxsize - i) return 0; if (p) memset_space (p, padding); i += padding; width = width > padding ? width - padding : 0; } else { if ((size_t) digits >= maxsize - i) return 0; if (negative_number) { ++bufp; if (p) *p++ = L_('-'); ++i; } if (p) memset_zero (p, padding); i += padding; width = 0; } } } cpy (buf + sizeof (buf) / sizeof (buf[0]) - bufp, bufp); break; case L_('F'): if (modifier != 0) goto bad_format; subfmt = L_("%Y-%m-%d"); goto subformat; case L_('H'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, tp->tm_hour); case L_('I'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, hour12); case L_('k'): /* GNU extension. */ if (modifier == L_('E')) goto bad_format; DO_NUMBER_SPACEPAD (2, tp->tm_hour); case L_('l'): /* GNU extension. */ if (modifier == L_('E')) goto bad_format; DO_NUMBER_SPACEPAD (2, hour12); case L_('j'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (3, 1 + tp->tm_yday); case L_('M'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, tp->tm_min); case L_('m'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, tp->tm_mon + 1); case L_('n'): add (1, *p = L_('\n')); break; case L_('P'): to_lowcase = 1; #if !defined _NL_CURRENT && HAVE_STRFTIME format_char = L_('p'); #endif /* FALLTHROUGH */ case L_('p'): if (change_case) { to_uppcase = 0; to_lowcase = 1; } #if defined _NL_CURRENT || !HAVE_STRFTIME cpy (ap_len, ampm); break; #else goto underlying_strftime; #endif case L_('R'): subfmt = L_("%H:%M"); goto subformat; case L_('r'): #ifdef _NL_CURRENT if (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT_AMPM))) == L_('\0')) #endif subfmt = L_("%I:%M:%S %p"); goto subformat; case L_('S'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, tp->tm_sec); case L_('s'): /* GNU extension. */ { struct tm ltm; time_t t; ltm = *tp; t = mktime (<m); /* Generate string value for T using time_t arithmetic; this works even if sizeof (long) < sizeof (time_t). */ bufp = buf + sizeof (buf) / sizeof (buf[0]); #ifndef TIME_T_UNSIGNED negative_number = t < 0; #endif do { int d = t % 10; t /= 10; #ifndef TIME_T_UNSIGNED if (negative_number) { d = -d; /* Adjust if division truncates to minus infinity. */ if (0 < -1 % 10 && d < 0) { t++; d += 10; } } #endif *--bufp = d + L_('0'); } while (t != 0); digits = 1; goto do_number_sign_and_padding; } case L_('X'): if (modifier == L_('O')) goto bad_format; #ifdef _NL_CURRENT if (! (modifier == L_('E') && (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ERA_T_FMT))) != L_('\0')))) subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT)); goto subformat; #else # if HAVE_STRFTIME goto underlying_strftime; # else /* Fall through. */ # endif #endif case L_('T'): subfmt = L_("%H:%M:%S"); goto subformat; case L_('t'): add (1, *p = L_('\t')); break; case L_('u'): DO_NUMBER (1, (tp->tm_wday - 1 + 7) % 7 + 1); case L_('U'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, (tp->tm_yday - tp->tm_wday + 7) / 7); case L_('V'): case L_('g'): case L_('G'): if (modifier == L_('E')) goto bad_format; { int year = tp->tm_year + TM_YEAR_BASE; int days = iso_week_days (tp->tm_yday, tp->tm_wday); if (days < 0) { /* This ISO week belongs to the previous year. */ year--; days = iso_week_days (tp->tm_yday + (365 + __isleap (year)), tp->tm_wday); } else { int d = iso_week_days (tp->tm_yday - (365 + __isleap (year)), tp->tm_wday); if (0 <= d) { /* This ISO week belongs to the next year. */ year++; days = d; } } switch (*f) { case L_('g'): DO_NUMBER (2, (year % 100 + 100) % 100); case L_('G'): DO_NUMBER (1, year); default: DO_NUMBER (2, days / 7 + 1); } } case L_('W'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, (tp->tm_yday - (tp->tm_wday - 1 + 7) % 7 + 7) / 7); case L_('w'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (1, tp->tm_wday); case L_('Y'): if (modifier == 'E') { #if HAVE_STRUCT_ERA_ENTRY struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { # ifdef COMPILE_WIDE subfmt = era->era_wformat; # else subfmt = era->era_format; # endif goto subformat; } #else # if HAVE_STRFTIME goto underlying_strftime; # endif #endif } if (modifier == L_('O')) goto bad_format; else DO_NUMBER (1, tp->tm_year + TM_YEAR_BASE); case L_('y'): if (modifier == L_('E')) { #if HAVE_STRUCT_ERA_ENTRY struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { int delta = tp->tm_year - era->start_date[0]; DO_NUMBER (1, (era->offset + delta * era->absolute_direction)); } #else # if HAVE_STRFTIME goto underlying_strftime; # endif #endif } DO_NUMBER (2, (tp->tm_year % 100 + 100) % 100); case L_('Z'): if (change_case) { to_uppcase = 0; to_lowcase = 1; } #if HAVE_TZNAME /* The tzset() call might have changed the value. */ if (!(zone && *zone) && tp->tm_isdst >= 0) zone = tzname[tp->tm_isdst]; #endif if (! zone) zone = ""; #ifdef COMPILE_WIDE { /* The zone string is always given in multibyte form. We have to transform it first. */ wchar_t *wczone; size_t len; widen (zone, wczone, len); cpy (len, wczone); } #else cpy (strlen (zone), zone); #endif break; case L_('z'): if (tp->tm_isdst < 0) break; { int diff; #if HAVE_TM_GMTOFF diff = tp->tm_gmtoff; #else if (ut) diff = 0; else { struct tm gtm; struct tm ltm; time_t lt; ltm = *tp; lt = mktime (<m); if (lt == (time_t) -1) { /* mktime returns -1 for errors, but -1 is also a valid time_t value. Check whether an error really occurred. */ struct tm tm; if (! my_strftime_localtime_r (<, &tm) || ((ltm.tm_sec ^ tm.tm_sec) | (ltm.tm_min ^ tm.tm_min) | (ltm.tm_hour ^ tm.tm_hour) | (ltm.tm_mday ^ tm.tm_mday) | (ltm.tm_mon ^ tm.tm_mon) | (ltm.tm_year ^ tm.tm_year))) break; } if (! my_strftime_gmtime_r (<, >m)) break; diff = tm_diff (<m, >m); } #endif if (diff < 0) { add (1, *p = L_('-')); diff = -diff; } else add (1, *p = L_('+')); diff /= 60; DO_NUMBER (4, (diff / 60) * 100 + diff % 60); } case L_('\0'): /* GNU extension: % at end of format. */ --f; /* Fall through. */ default: /* Unknown format; output the format, including the '%', since this is most likely the right thing to do if a multibyte string has been misparsed. */ bad_format: { int flen; for (flen = 1; f[1 - flen] != L_('%'); flen++) continue; cpy (flen, &f[1 - flen]); } break; } } if (p && maxsize != 0) *p = L_('\0'); return i; } #ifdef _LIBC libc_hidden_def (my_strftime) #endif #ifdef emacs /* For Emacs we have a separate interface which corresponds to the normal strftime function and does not have the extra information whether the TP arguments comes from a `gmtime' call or not. */ size_t emacs_strftime (s, maxsize, format, tp) char *s; size_t maxsize; const char *format; const struct tm *tp; { return my_strftime (s, maxsize, format, tp, 0); } #endif gawk-4.0.1+dfsg.orig/missing_d/COPYING.LIB0000644000175000017500000006131311463242060016763 0ustar schotschot GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library 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 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! gawk-4.0.1+dfsg.orig/missing_d/ChangeLog.00000644000175000017500000001250411474766154017252 0ustar schotschotMon 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. gawk-4.0.1+dfsg.orig/missing_d/README0000644000175000017500000000066011463242060016201 0ustar schotschotFri Aug 25 13:23:06 IDT 2006 ============================ The files memmove.c, mktime.c, snprintf.c, strerror.c, strftime.c, strncasecmp.c, and system.c are copyright by the Free Software Foundation. They are licensed under the GPL or the LGPL. See the COPYING.LIB file in this directory and the COPYING file in the parent directory for licensing information. All other files are public domain. Arnold Robbins arnold@skeeve.com gawk-4.0.1+dfsg.orig/missing_d/usleep.c0000644000175000017500000000052711463242060016764 0ustar schotschot/* * usleep - round microseconds up to an integral number of seconds. * * The real usleep() doesn't work this way; this is a hack for systems * that don't have usleep(). */ int usleep(unsigned int usec) { unsigned int seconds = usec / 1000000; /* Round up: */ seconds += (usec % 1000000 > 0); /* 1 or 0 */ return sleep(seconds); } gawk-4.0.1+dfsg.orig/missing_d/setenv.c0000644000175000017500000001257111463242060016775 0ustar schotschot/* $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 */ gawk-4.0.1+dfsg.orig/missing_d/strtoul.c0000644000175000017500000001350311463242060017201 0ustar schotschot/* * Very simple implementation of strtoul() for gawk, * for old systems. Descriptive prose from the Linux man page. * * May 2004 */ /* #define TEST 1 */ #ifdef TEST #include #include #include #include #include #include #define TRUE 1 #define FALSE 0 #define strtoul mystrtoul #endif #ifndef ULONG_MAX #define ULONG_MAX (~ 0UL) #endif unsigned long int strtoul(nptr, endptr, base) const char *nptr; char **endptr; int base; { static char lower[] = "abcdefghijklmnopqrstuvwxyz"; unsigned long result = 0UL; char *nptr_orig = (char *) nptr; int neg = FALSE; char *cp, c; int val; int sawdigs = FALSE; /* * The strtoul() function converts the initial part of the * string in nptr to an unsigned long integer value according * to the given base, which must be between 2 and 36 inclusive, * or be the special value 0. */ if ((base != 0 && (base < 2 || base > 36)) || nptr == NULL) { if (endptr != NULL) *endptr = nptr_orig; errno = EINVAL; return 0; } /* * The string must [sic] begin with an arbitrary amount of white space * (as determined by isspace(3)) followed by a single optional * `+' or `-' sign. */ while (isspace(*nptr)) nptr++; if (*nptr == '+') nptr++; else if (*nptr == '-') { nptr++; neg = TRUE; } /* * If base is zero or 16, the string may then include a `0x' prefix, * and the number will be read in base 16; otherwise, a zero base is * taken as 10 (decimal) unless the next character is `0', in which * case it is taken as 8 (octal). */ if ((base == 0 || base == 16) && nptr[0] == '0' && (nptr[1] == 'x' || nptr[1] == 'X')) { base = 16; /* force it */ nptr += 2; /* skip 0x */ } else if ((base == 0 || base == 8) && nptr[0] == '0') { base = 8; nptr++; } else if (base == 0) base = 10; /* * The remainder of the string is converted to an unsigned long int * value in the obvious manner, stopping at the first character * which is not a valid digit in the given base. (In bases above 10, * the letter `A' in either upper or lower case represents 10, * `B' represents 11, and so forth, with `Z' representing 35.) */ for (; *nptr != '\0'; nptr++) { c = *nptr; #if defined(HAVE_LOCALE_H) if (base == 10 && loc.thousands_sep != NULL && loc.thousands_sep[0] != '\0' && c == loc.thousands_sep[0]) continue; #endif switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': val = c - '0'; if (val >= base) /* even base 2 allowed ... */ goto out; result *= base; result += val; sawdigs = TRUE; break; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': c += 'a' - 'A'; /* downcase */ /* fall through */ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': cp = strchr(lower, c); val = cp - lower; val += 10; /* 'a' == 10 */ if (val >= base) goto out; result *= base; result += val; sawdigs = TRUE; break; default: goto out; } } out: /* * If endptr is not NULL, strtoul() stores the address of the * first invalid character in *endptr. If there were no digits * at all, strtoul() stores the original value of nptr in *endptr * (and returns 0). In particular, if *nptr is not `\0' but * **endptr is `\0' on return, the entire string is valid. */ if (endptr != NULL) { if (! sawdigs) { *endptr = nptr_orig; return 0; } else *endptr = (char *) nptr; } /* * RETURN VALUE * The strtoul() function returns either the result of the * conversion or, if there was a leading minus sign, the * negation of the result of the conversion, unless the original * (non-negated) value would overflow; in the latter case, * strtoul() returns ULONG_MAX and sets the global variable errno * to ERANGE. */ /* * ADR: This computation is probably bogus. If it's a * problem, upgrade to a modern system. */ if (neg && result == ULONG_MAX) { errno = ERANGE; return ULONG_MAX; } else if (neg) result = -result; return result; } #ifdef TEST #undef strtoul int main(void) { char *endptr; unsigned long res1, res2; res1 = strtoul("0xdeadBeeF", & endptr, 0), res2 = mystrtoul("0xdeadBeeF", & endptr, 0), printf("(real,my)strtoul(\"0xdeadBeeF\", & endptr, 0) is %lu, %lu *endptr = %d\n", res1, res2, *endptr); res1 = strtoul("0101101", & endptr, 2), res2 = mystrtoul("0101101", & endptr, 2), printf("(real,my)strtoul(\"0101101\", & endptr, 2) is %lu, %lu *endptr = %d\n", res1, res2, *endptr); res1 = strtoul("01011012", & endptr, 2), res2 = mystrtoul("01011012", & endptr, 2), printf("(real,my)strtoul(\"01011012\", & endptr, 2) is %lu, %lu *endptr = %d\n", res1, res2, *endptr); res1 = strtoul(" +42a", & endptr, 0), res2 = mystrtoul(" +42a", & endptr, 0), printf("(real,my)strtoul(\" +42a\", & endptr, 0) is %lu, %lu *endptr = %d\n", res1, res2, *endptr); res1 = strtoul("0377", & endptr, 0), res2 = mystrtoul("0377", & endptr, 0), printf("(real,my)strtoul(\"0377\", & endptr, 0) is %lu, %lu *endptr = %d\n", res1, res2, *endptr); res1 = strtoul("Z", & endptr, 36), res2 = mystrtoul("Z", & endptr, 36), printf("(real,my)strtoul(\"Z\", & endptr, 36) is %lu, %lu *endptr = %d\n", res1, res2, *endptr); res1 = strtoul("qZ*", & endptr, 36), res2 = mystrtoul("qZ*", & endptr, 36), printf("(real,my)strtoul(\"qZ*\", & endptr, 36) is %lu, %lu *endptr = %d\n", res1, res2, *endptr); } #endif gawk-4.0.1+dfsg.orig/getopt.h0000644000175000017500000001502611734665352015040 0ustar schotschot/* Declarations for getopt. Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _GETOPT_H #ifndef __need_getopt # define _GETOPT_H 1 #endif /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include , but that does not exist if we are standalone. So: if __GNU_LIBRARY__ is not defined, include , which will pull in for us if it's from glibc. (Why ctype.h? It's guaranteed to exist and it doesn't flood the namespace with stuff the way some other headers do.) */ #if !defined __GNU_LIBRARY__ # include #endif #ifndef __THROW # ifndef __GNUC_PREREQ # define __GNUC_PREREQ(maj, min) (0) # endif # if defined __cplusplus && __GNUC_PREREQ (2,8) # define __THROW throw () # else # define __THROW # endif #endif #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { const char *name; /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `--', then non-option arguments are treated as arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ #ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW; # if defined __need_getopt && defined __USE_POSIX2 \ && !defined __USE_POSIX_IMPLICITLY && !defined __USE_GNU /* The GNU getopt has more functionality than the standard version. The additional functionality can be disable at runtime. This redirection helps to also do this at runtime. */ # ifdef __REDIRECT extern int __REDIRECT_NTH (getopt, (int ___argc, char *const *___argv, const char *__shortopts), __posix_getopt); # else extern int __posix_getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW; # define getopt __posix_getopt # endif # endif #else /* not __GNU_LIBRARY__ */ extern int getopt (); #endif /* __GNU_LIBRARY__ */ #ifndef __need_getopt extern int getopt_long (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW; extern int getopt_long_only (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW; #endif #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ gawk-4.0.1+dfsg.orig/regex_internal.h0000644000175000017500000005347611734665352016557 0ustar schotschot/* Extended regular expression matching and search library. 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 . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _REGEX_INTERNAL_H #define _REGEX_INTERNAL_H 1 #include #include #include #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 MBS_SUPPORT && (defined HAVE_WCHAR_H || defined _LIBC) # include #endif /* HAVE_WCHAR_H || _LIBC */ #if MBS_SUPPORT && (defined HAVE_WCTYPE_H || defined _LIBC) # include #endif /* HAVE_WCTYPE_H || _LIBC */ #if defined HAVE_STDBOOL_H || defined _LIBC # include #endif /* HAVE_STDBOOL_H || _LIBC */ #if !defined(ZOS_USS) #if defined HAVE_STDINT_H || defined _LIBC # include #endif /* HAVE_STDINT_H || _LIBC */ #endif /* !ZOS_USS */ #if defined _LIBC # include #else # define __libc_lock_define(CLASS,NAME) # define __libc_lock_init(NAME) do { } while (0) # define __libc_lock_lock(NAME) do { } while (0) # define __libc_lock_unlock(NAME) do { } while (0) #endif #ifndef GAWK /* In case that the system doesn't have isblank(). */ #if !defined _LIBC && !defined HAVE_ISBLANK && !defined isblank # define isblank(ch) ((ch) == ' ' || (ch) == '\t') #endif #else /* GAWK */ /* * This is a freaking mess. On glibc systems you have to define * a magic constant to get isblank() out of , since it's * a C99 function. To heck with all that and borrow a page from * dfa.c's book. */ static int is_blank (int c) { return (c == ' ' || c == '\t'); } #endif /* GAWK */ #ifdef _LIBC # ifndef _RE_DEFINE_LOCALE_FUNCTIONS # define _RE_DEFINE_LOCALE_FUNCTIONS 1 # include # include # include # endif #endif /* This is for other GNU distributions with internationalized messages. */ #if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC # include # ifdef _LIBC # undef gettext # define gettext(msgid) \ INTUSE(__dcgettext) (_libc_intl_domainname, msgid, LC_MESSAGES) # endif #else # define gettext(msgid) (msgid) #endif #ifndef gettext_noop /* This define is so xgettext can find the internationalizable strings. */ # define gettext_noop(String) String #endif /* For loser systems without the definition. */ #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif #if MBS_SUPPORT || _LIBC # define RE_ENABLE_I18N #endif #if __GNUC__ >= 3 # define BE(expr, val) __builtin_expect (expr, val) #else # define BE(expr, val) (expr) # ifdef inline # undef inline # endif # define inline #endif /* Number of single byte character. */ #define SBC_MAX 256 #define COLL_ELEM_LEN_MAX 8 /* The character which represents newline. */ #define NEWLINE_CHAR '\n' #define WIDE_NEWLINE_CHAR L'\n' /* Rename to standard API for using out of glibc. */ #ifndef _LIBC # ifdef __wctype # undef __wctype # endif # define __wctype wctype # ifdef __iswctype # undef __iswctype # endif # define __iswctype iswctype # define __btowc btowc # define __mbrtowc mbrtowc #undef __mempcpy /* GAWK */ # define __mempcpy mempcpy # define __wcrtomb wcrtomb # define __regfree regfree # define attribute_hidden #endif /* not _LIBC */ #ifdef __GNUC__ # define __attribute(arg) __attribute__ (arg) #else # 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; /* An integer used to represent a set of bits. It must be unsigned, and must be at least as wide as unsigned int. */ typedef unsigned long int bitset_word_t; /* All bits set in a bitset_word_t. */ #define BITSET_WORD_MAX ULONG_MAX /* Number of bits in a bitset_word_t. */ #define BITSET_WORD_BITS (sizeof (bitset_word_t) * CHAR_BIT) /* Number of bitset_word_t in a bit_set. */ #define BITSET_WORDS (SBC_MAX / BITSET_WORD_BITS) typedef bitset_word_t bitset_t[BITSET_WORDS]; typedef bitset_word_t *re_bitset_ptr_t; typedef const bitset_word_t *re_const_bitset_ptr_t; #define bitset_set(set,i) \ (set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS) #define bitset_clear(set,i) \ (set[i / BITSET_WORD_BITS] &= ~((bitset_word_t) 1 << i % BITSET_WORD_BITS)) #define bitset_contain(set,i) \ (set[i / BITSET_WORD_BITS] & ((bitset_word_t) 1 << i % BITSET_WORD_BITS)) #define bitset_empty(set) memset (set, '\0', sizeof (bitset_t)) #define bitset_set_all(set) memset (set, '\xff', sizeof (bitset_t)) #define bitset_copy(dest,src) memcpy (dest, src, sizeof (bitset_t)) #define PREV_WORD_CONSTRAINT 0x0001 #define PREV_NOTWORD_CONSTRAINT 0x0002 #define NEXT_WORD_CONSTRAINT 0x0004 #define NEXT_NOTWORD_CONSTRAINT 0x0008 #define PREV_NEWLINE_CONSTRAINT 0x0010 #define NEXT_NEWLINE_CONSTRAINT 0x0020 #define PREV_BEGBUF_CONSTRAINT 0x0040 #define NEXT_ENDBUF_CONSTRAINT 0x0080 #define WORD_DELIM_CONSTRAINT 0x0100 #define NOT_WORD_DELIM_CONSTRAINT 0x0200 typedef enum { INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, LINE_FIRST = PREV_NEWLINE_CONSTRAINT, LINE_LAST = NEXT_NEWLINE_CONSTRAINT, BUF_FIRST = PREV_BEGBUF_CONSTRAINT, BUF_LAST = NEXT_ENDBUF_CONSTRAINT, WORD_DELIM = WORD_DELIM_CONSTRAINT, NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT } re_context_type; typedef struct { int alloc; int nelem; int *elems; } re_node_set; typedef enum { NON_TYPE = 0, /* Node type, These are used by token, node, tree. */ CHARACTER = 1, END_OF_RE = 2, SIMPLE_BRACKET = 3, OP_BACK_REF = 4, OP_PERIOD = 5, #ifdef RE_ENABLE_I18N COMPLEX_BRACKET = 6, OP_UTF8_PERIOD = 7, #endif /* RE_ENABLE_I18N */ /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used when the debugger shows values of this enum type. */ #define EPSILON_BIT 8 OP_OPEN_SUBEXP = EPSILON_BIT | 0, OP_CLOSE_SUBEXP = EPSILON_BIT | 1, OP_ALT = EPSILON_BIT | 2, OP_DUP_ASTERISK = EPSILON_BIT | 3, ANCHOR = EPSILON_BIT | 4, /* Tree type, these are used only by tree. */ CONCAT = 16, SUBEXP = 17, /* Token type, these are used only by token. */ OP_DUP_PLUS = 18, OP_DUP_QUESTION, OP_OPEN_BRACKET, OP_CLOSE_BRACKET, OP_CHARSET_RANGE, OP_OPEN_DUP_NUM, OP_CLOSE_DUP_NUM, OP_NON_MATCH_LIST, OP_OPEN_COLL_ELEM, OP_CLOSE_COLL_ELEM, OP_OPEN_EQUIV_CLASS, OP_CLOSE_EQUIV_CLASS, OP_OPEN_CHAR_CLASS, OP_CLOSE_CHAR_CLASS, OP_WORD, OP_NOTWORD, OP_SPACE, OP_NOTSPACE, BACK_SLASH } re_token_type_t; #ifdef RE_ENABLE_I18N typedef struct { /* Multibyte characters. */ wchar_t *mbchars; /* Collating symbols. */ # ifdef _LIBC int32_t *coll_syms; # endif /* Equivalence classes. */ # ifdef _LIBC int32_t *equiv_classes; # endif /* Range expressions. */ # ifdef _LIBC uint32_t *range_starts; uint32_t *range_ends; # else /* not _LIBC */ wchar_t *range_starts; wchar_t *range_ends; # endif /* not _LIBC */ /* Character classes. */ wctype_t *char_classes; /* If this character set is the non-matching list. */ unsigned int non_match : 1; /* # of multibyte characters. */ int nmbchars; /* # of collating symbols. */ int ncoll_syms; /* # of equivalence classes. */ int nequiv_classes; /* # of range expressions. */ int nranges; /* # of character classes. */ int nchar_classes; } re_charset_t; #endif /* RE_ENABLE_I18N */ typedef struct { union { unsigned char c; /* for CHARACTER */ re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */ #ifdef RE_ENABLE_I18N re_charset_t *mbcset; /* for COMPLEX_BRACKET */ #endif /* RE_ENABLE_I18N */ int idx; /* for BACK_REF */ re_context_type ctx_type; /* for ANCHOR */ } opr; #if __GNUC__ >= 2 re_token_type_t type : 8; #else re_token_type_t type; #endif unsigned int constraint : 10; /* context constraint */ unsigned int duplicated : 1; unsigned int opt_subexp : 1; #ifdef RE_ENABLE_I18N unsigned int accept_mb : 1; /* These 2 bits can be moved into the union if needed (e.g. if running out of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */ unsigned int mb_partial : 1; #endif unsigned int word_char : 1; } re_token_t; #define IS_EPSILON_NODE(type) ((type) & EPSILON_BIT) struct re_string_t { /* Indicate the raw buffer which is the original string passed as an argument of regexec(), re_search(), etc.. */ const unsigned char *raw_mbs; /* Store the multibyte string. In case of "case insensitive mode" like REG_ICASE, upper cases of the string are stored, otherwise MBS points the same address that RAW_MBS points. */ unsigned char *mbs; #ifdef RE_ENABLE_I18N /* Store the wide character string which is corresponding to MBS. */ wint_t *wcs; int *offsets; mbstate_t cur_state; #endif /* Index in RAW_MBS. Each character mbs[i] corresponds to raw_mbs[raw_mbs_idx + i]. */ int raw_mbs_idx; /* The length of the valid characters in the buffers. */ int valid_len; /* The corresponding number of bytes in raw_mbs array. */ int valid_raw_len; /* The length of the buffers MBS and WCS. */ int bufs_len; /* The index in MBS, which is updated by re_string_fetch_byte. */ int cur_idx; /* length of RAW_MBS array. */ int raw_len; /* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN. */ int len; /* End of the buffer may be shorter than its length in the cases such as re_match_2, re_search_2. Then, we use STOP for end of the buffer instead of LEN. */ int raw_stop; /* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS. */ int stop; /* The context of mbs[0]. We store the context independently, since the context of mbs[0] may be different from raw_mbs[0], which is the beginning of the input string. */ unsigned int tip_context; /* The translation passed as a part of an argument of re_compile_pattern. */ RE_TRANSLATE_TYPE trans; /* Copy of re_dfa_t's word_char. */ re_const_bitset_ptr_t word_char; /* 1 if REG_ICASE. */ unsigned char icase; unsigned char is_utf8; unsigned char map_notascii; unsigned char mbs_allocated; unsigned char offsets_needed; unsigned char newline_anchor; unsigned char word_ops_used; int mb_cur_max; }; typedef struct re_string_t re_string_t; struct re_dfa_t; typedef struct re_dfa_t re_dfa_t; #ifndef _LIBC # ifdef __i386__ # define internal_function __attribute ((regparm (3), stdcall)) # else # define internal_function # endif #endif #ifndef NOT_IN_libc static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, int new_buf_len) internal_function; # ifdef RE_ENABLE_I18N static void build_wcs_buffer (re_string_t *pstr) internal_function; static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function; # endif /* RE_ENABLE_I18N */ static void build_upper_buffer (re_string_t *pstr) internal_function; static void re_string_translate_buffer (re_string_t *pstr) internal_function; static unsigned int re_string_context_at (const re_string_t *input, int idx, int eflags) internal_function __attribute ((pure)); #endif #define re_string_peek_byte(pstr, offset) \ ((pstr)->mbs[(pstr)->cur_idx + offset]) #define re_string_fetch_byte(pstr) \ ((pstr)->mbs[(pstr)->cur_idx++]) #define re_string_first_byte(pstr, idx) \ ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF) #define re_string_is_single_byte_char(pstr, idx) \ ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \ || (pstr)->wcs[(idx) + 1] != WEOF)) #define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx) #define re_string_cur_idx(pstr) ((pstr)->cur_idx) #define re_string_get_buffer(pstr) ((pstr)->mbs) #define re_string_length(pstr) ((pstr)->len) #define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx]) #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) #ifndef _LIBC # if HAVE_ALLOCA # 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) # else /* alloca is implemented with malloc, so just use malloc. */ # define __libc_use_alloca(n) 0 # endif #endif #define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) #define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t))) #define re_free(p) free (p) struct bin_tree_t { struct bin_tree_t *parent; struct bin_tree_t *left; struct bin_tree_t *right; struct bin_tree_t *first; struct bin_tree_t *next; re_token_t token; /* `node_idx' is the index in dfa->nodes, if `type' == 0. Otherwise `type' indicate the type of this node. */ int node_idx; }; typedef struct bin_tree_t bin_tree_t; #define BIN_TREE_STORAGE_SIZE \ ((1024 - sizeof (void *)) / sizeof (bin_tree_t)) struct bin_tree_storage_t { struct bin_tree_storage_t *next; bin_tree_t data[BIN_TREE_STORAGE_SIZE]; }; typedef struct bin_tree_storage_t bin_tree_storage_t; #define CONTEXT_WORD 1 #define CONTEXT_NEWLINE (CONTEXT_WORD << 1) #define CONTEXT_BEGBUF (CONTEXT_NEWLINE << 1) #define CONTEXT_ENDBUF (CONTEXT_BEGBUF << 1) #define IS_WORD_CONTEXT(c) ((c) & CONTEXT_WORD) #define IS_NEWLINE_CONTEXT(c) ((c) & CONTEXT_NEWLINE) #define IS_BEGBUF_CONTEXT(c) ((c) & CONTEXT_BEGBUF) #define IS_ENDBUF_CONTEXT(c) ((c) & CONTEXT_ENDBUF) #define IS_ORDINARY_CONTEXT(c) ((c) == 0) #define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_') #define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR) #define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_') #define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR) #define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \ ((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\ || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context))) #define NOT_SATISFY_NEXT_CONSTRAINT(constraint,context) \ ((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \ || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context))) struct re_dfastate_t { unsigned int hash; re_node_set nodes; re_node_set non_eps_nodes; re_node_set inveclosure; re_node_set *entrance_nodes; struct re_dfastate_t **trtable, **word_trtable; unsigned int context : 4; unsigned int halt : 1; /* If this state can accept `multi byte'. Note that we refer to multibyte characters, and multi character collating elements as `multi byte'. */ unsigned int accept_mb : 1; /* If this state has backreference node(s). */ unsigned int has_backref : 1; unsigned int has_constraint : 1; }; typedef struct re_dfastate_t re_dfastate_t; struct re_state_table_entry { int num; int alloc; re_dfastate_t **array; }; /* Array type used in re_sub_match_last_t and re_sub_match_top_t. */ typedef struct { int next_idx; int alloc; re_dfastate_t **array; } state_array_t; /* Store information about the node NODE whose type is OP_CLOSE_SUBEXP. */ typedef struct { int node; int str_idx; /* The position NODE match at. */ state_array_t path; } re_sub_match_last_t; /* Store information about the node NODE whose type is OP_OPEN_SUBEXP. And information about the node, whose type is OP_CLOSE_SUBEXP, corresponding to NODE is stored in LASTS. */ typedef struct { int str_idx; int node; state_array_t *path; int alasts; /* Allocation size of LASTS. */ int nlasts; /* The number of LASTS. */ re_sub_match_last_t **lasts; } re_sub_match_top_t; struct re_backref_cache_entry { int node; int str_idx; int subexp_from; int subexp_to; char more; char unused; unsigned short int eps_reachable_subexps_map; }; typedef struct { /* The string object corresponding to the input string. */ re_string_t input; #if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) const re_dfa_t *const dfa; #else const re_dfa_t *dfa; #endif /* EFLAGS of the argument of regexec. */ int eflags; /* Where the matching ends. */ int match_last; int last_node; /* The state log used by the matcher. */ re_dfastate_t **state_log; int state_log_top; /* Back reference cache. */ int nbkref_ents; int abkref_ents; struct re_backref_cache_entry *bkref_ents; int max_mb_elem_len; int nsub_tops; int asub_tops; re_sub_match_top_t **sub_tops; } re_match_context_t; typedef struct { re_dfastate_t **sifted_states; re_dfastate_t **limited_states; int last_node; int last_str_idx; re_node_set limits; } re_sift_context_t; struct re_fail_stack_ent_t { int idx; int node; regmatch_t *regs; re_node_set eps_via_nodes; }; struct re_fail_stack_t { int num; int alloc; struct re_fail_stack_ent_t *stack; }; struct re_dfa_t { re_token_t *nodes; size_t nodes_alloc; size_t nodes_len; int *nexts; int *org_indices; re_node_set *edests; re_node_set *eclosures; re_node_set *inveclosures; struct re_state_table_entry *state_table; re_dfastate_t *init_state; re_dfastate_t *init_state_word; re_dfastate_t *init_state_nl; re_dfastate_t *init_state_begbuf; bin_tree_t *str_tree; bin_tree_storage_t *str_tree_storage; re_bitset_ptr_t sb_char; int str_tree_storage_idx; /* number of subexpressions `re_nsub' is in regex_t. */ unsigned int state_hash_mask; int init_node; int nbackref; /* The number of backreference in this dfa. */ /* Bitmap expressing which backreference is used. */ bitset_word_t used_bkref_map; bitset_word_t completed_bkref_map; unsigned int has_plural_match : 1; /* If this dfa has "multibyte node", which is a backreference or a node which can accept multibyte character or multi character collating element. */ unsigned int has_mb_node : 1; unsigned int is_utf8 : 1; unsigned int map_notascii : 1; unsigned int word_ops_used : 1; int mb_cur_max; bitset_t word_char; reg_syntax_t syntax; int *subexp_map; #ifdef DEBUG char* re_str; #endif #if defined _LIBC __libc_lock_define (, lock) #endif }; #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) #define re_node_set_remove(set,id) \ (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) #define re_node_set_empty(p) ((p)->nelem = 0) #define re_node_set_free(set) re_free ((set)->elems) typedef enum { SB_CHAR, MB_CHAR, EQUIV_CLASS, COLL_SYM, CHAR_CLASS } bracket_elem_type; typedef struct { bracket_elem_type type; union { unsigned char ch; unsigned char *name; wchar_t wch; } opr; } bracket_elem_t; /* Inline functions for bitset operation. */ static inline void bitset_not (bitset_t set) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) set[bitset_i] = ~set[bitset_i]; } static inline void bitset_merge (bitset_t dest, const bitset_t src) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) dest[bitset_i] |= src[bitset_i]; } static inline void bitset_mask (bitset_t dest, const bitset_t src) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) dest[bitset_i] &= src[bitset_i]; } #ifdef RE_ENABLE_I18N /* Inline functions for re_string. */ static inline int internal_function __attribute ((pure)) re_string_char_size_at (const re_string_t *pstr, int idx) { int byte_idx; if (pstr->mb_cur_max == 1) return 1; for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) if (pstr->wcs[idx + byte_idx] != WEOF) break; return byte_idx; } static inline wint_t internal_function __attribute ((pure)) re_string_wchar_at (const re_string_t *pstr, int idx) { if (pstr->mb_cur_max == 1) return (wint_t) pstr->mbs[idx]; return (wint_t) pstr->wcs[idx]; } # ifndef NOT_IN_libc static int internal_function __attribute ((pure)) re_string_elem_size_at (const re_string_t *pstr, int idx) { # ifdef _LIBC const unsigned char *p, *extra; const int32_t *table, *indirect; # include uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); p = pstr->mbs + idx; findidx (&p, pstr->len - idx); return p - pstr->mbs - idx; } else # endif /* _LIBC */ return 1; } # endif #endif /* RE_ENABLE_I18N */ #endif /* _REGEX_INTERNAL_H */ gawk-4.0.1+dfsg.orig/extension/0000755000175000017500000000000011734667111015370 5ustar schotschotgawk-4.0.1+dfsg.orig/extension/ChangeLog0000644000175000017500000000044311734667111017143 0ustar schotschot2012-03-28 Arnold D. Robbins * 4.0.1: Release tar ball made. 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. gawk-4.0.1+dfsg.orig/extension/testordchr.awk0000644000175000017500000000015511463242060020245 0ustar schotschotBEGIN { extension("./ordchr.so", "dlload") print "ord(\"a\") is", ord("a") print "chr(65) is", chr(65) } gawk-4.0.1+dfsg.orig/extension/xreadlink.c0000644000175000017500000000522411532364226017515 0ustar schotschot/* xreadlink.c -- readlink wrapper to return the link name in malloc'd storage 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 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; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Jim Meyering */ #if HAVE_CONFIG_H # include #endif #include "xreadlink.h" #include #include #include #include #include #if HAVE_UNISTD_H # include #endif #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif #ifndef SSIZE_MAX # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) #endif #define MAXSIZE (SIZE_MAX < SSIZE_MAX ? SIZE_MAX : SSIZE_MAX) #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. Return a pointer to that NUL-terminated string in malloc'd storage. If readlink fails, return NULL (caller may use errno to diagnose). If malloc fails, or if the link value is longer than SSIZE_MAX :-), give a diagnostic and exit. */ char * xreadlink (char const *file, size_t size) { /* The initial buffer size for the link value. A power of 2 detects arithmetic overflow earlier, but is not required. */ size_t buf_size = size < MAXSIZE ? size + 1 : MAXSIZE; while (1) { char *buffer = xmalloc (buf_size); ssize_t r = readlink (file, buffer, buf_size); size_t link_length = r; /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1 with errno == ERANGE if the buffer is too small. */ if (r < 0 && errno != ERANGE) { int saved_errno = errno; free (buffer); errno = saved_errno; return NULL; } if (link_length < buf_size) { buffer[link_length] = 0; return buffer; } free (buffer); if (buf_size <= MAXSIZE / 2) buf_size *= 2; else if (buf_size < MAXSIZE) buf_size = MAXSIZE; else xalloc_die (); } } gawk-4.0.1+dfsg.orig/extension/testarg.c0000644000175000017500000000255111734665352017215 0ustar schotschot#include "awk.h" int plugin_is_GPL_compatible; static NODE * 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", 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"); /* Set the return value */ return make_number((AWKNUM) ret); } /* dlload --- load new builtins in this library */ NODE * dlload(tree, dl) NODE *tree; void *dl; { make_builtin("check_arg", do_check_arg, 3); return make_number((AWKNUM) 0); } gawk-4.0.1+dfsg.orig/extension/foo.awk0000644000175000017500000000033511463242060016647 0ustar schotschotBEGIN { extension("./dl.so","dlload") zaxxon("hi there", "this is", "a test", "of argument passing") zaxxon(1) zaxxon(1,2) z = zaxxon(1,2,3,4) z = zaxxon(1,zaxxon(zaxxon("foo")),3,4) print z } gawk-4.0.1+dfsg.orig/extension/fork.c0000644000175000017500000000477611734665352016520 0ustar schotschot/* * fork.c - Provide fork and waitpid functions for gawk. * * Revised 6/2004 */ /* * Copyright (C) 2001, 2004, 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 */ #include "awk.h" int plugin_is_GPL_compatible; /* do_fork --- provide dynamically loaded fork() builtin for gawk */ static NODE * 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"); ret = fork(); if (ret < 0) update_ERRNO(); else if (ret == 0) { /* update PROCINFO in the child */ aptr = assoc_lookup(PROCINFO_node, tmp = make_string("pid", 3), FALSE); (*aptr)->numbr = (AWKNUM) getpid(); unref(tmp); aptr = assoc_lookup(PROCINFO_node, tmp = make_string("ppid", 4), FALSE); (*aptr)->numbr = (AWKNUM) getppid(); unref(tmp); } /* Set the return value */ return make_number((AWKNUM) ret); } /* do_waitpid --- provide dynamically loaded waitpid() builtin for gawk */ static NODE * do_waitpid(int nargs) { NODE *pidnode; int ret = -1; double pidval; pid_t pid; int options = 0; if (do_lint && get_curfunc_arg_count() > 1) lintwarn("waitpid: called with too many arguments"); pidnode = get_scalar_argument(0, FALSE); if (pidnode != NULL) { pidval = force_number(pidnode); pid = (int) pidval; options = WNOHANG|WUNTRACED; ret = waitpid(pid, NULL, options); if (ret < 0) update_ERRNO(); } else if (do_lint) lintwarn("wait: called with no arguments"); /* Set the return value */ return make_number((AWKNUM) ret); } /* dlload --- load new builtins in this library */ NODE * dlload(tree, dl) NODE *tree; void *dl; { make_builtin("fork", do_fork, 0); make_builtin("waitpid", do_waitpid, 1); return make_number((AWKNUM) 0); } gawk-4.0.1+dfsg.orig/extension/dl.c0000644000175000017500000000373011532364226016133 0ustar schotschot/* * dl.c - Example of adding a new builtin function to gawk. * * Christos Zoulas, Thu Jun 29 17:40:41 EDT 1995 * Arnold Robbins, update for 3.1, Wed Sep 13 09:38:56 2000 */ /* * Copyright (C) 1995 - 2001, 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 */ #include "awk.h" #include int plugin_is_GPL_compatible; static void *sdl = NULL; static NODE * zaxxon(int nargs) { NODE *obj; int i; int comma = 0; /* * Print the arguments */ printf("External linkage zaxxon("); for (i = 0; i < nargs; i++) { obj = get_scalar_argument(i, TRUE); if (obj == NULL) break; force_string(obj); printf(comma ? ", %s" : "%s", obj->stptr); comma = 1; } printf(");\n"); /* * Do something useful */ obj = get_scalar_argument(0, FALSE); if (obj != NULL) { force_string(obj); if (strcmp(obj->stptr, "unload") == 0 && sdl) { /* * XXX: How to clean up the function? * I would like the ability to remove a function... */ dlclose(sdl); sdl = NULL; } } /* Set the return value */ return make_number((AWKNUM) 3.14); } NODE * dlload(tree, dl) NODE *tree; void *dl; { sdl = dl; make_builtin("zaxxon", zaxxon, 4); return make_number((AWKNUM) 0); } gawk-4.0.1+dfsg.orig/extension/steps0000755000175000017500000000171711464321767016466 0ustar schotschot# what to do under linux to make dl.so # Tue Nov 24 15:04:14 EST 1998 # Sun Aug 26 16:03:58 IDT 2001 # Sun Apr 28 15:59:57 IDT 2002 # Mon Jun 21 17:03:37 IDT 2004 # Fri May 15 15:48:45 IDT 2009 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 ld -o ordchr.so -shared ordchr.o ld -o arrayparm.so -shared arrayparm.o ld -o readfile.so -shared readfile.o ld -o testarg.so -shared testarg.o ld -o rwarray.so -shared rwarray.o gawk-4.0.1+dfsg.orig/extension/filefuncs.c0000644000175000017500000001716511734665352017531 0ustar schotschot/* * filefuncs.c - Builtin functions that provide initial minimal iterface * to the file system. * * Arnold Robbins, update for 3.1, Mon Nov 23 12:53:39 EST 1998 * Arnold Robbins and John Haque, update for 3.1.4, applied Mon Jun 14 13:55:30 IDT 2004 */ /* * 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. * * 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 "awk.h" #include int plugin_is_GPL_compatible; /* do_chdir --- provide dynamically loaded chdir() builtin for gawk */ static NODE * do_chdir(int nargs) { NODE *newdir; int ret = -1; if (do_lint && get_curfunc_arg_count() != 1) lintwarn("chdir: called with incorrect number of arguments"); newdir = get_scalar_argument(0, FALSE); (void) force_string(newdir); ret = chdir(newdir->stptr); if (ret < 0) update_ERRNO(); return make_number((AWKNUM) ret); } /* format_mode --- turn a stat mode field into something readable */ static char * format_mode(unsigned long fmode) { static char outbuf[12]; int i; strcpy(outbuf, "----------"); /* first, get the file type */ i = 0; switch (fmode & S_IFMT) { #ifdef S_IFSOCK case S_IFSOCK: outbuf[i] = 's'; break; #endif #ifdef S_IFLNK case S_IFLNK: outbuf[i] = 'l'; break; #endif case S_IFREG: outbuf[i] = '-'; /* redundant */ break; case S_IFBLK: outbuf[i] = 'b'; break; case S_IFDIR: outbuf[i] = 'd'; break; #ifdef S_IFDOOR /* Solaris weirdness */ case S_IFDOOR: outbuf[i] = 'D'; break; #endif /* S_IFDOOR */ case S_IFCHR: outbuf[i] = 'c'; break; #ifdef S_IFIFO case S_IFIFO: outbuf[i] = 'p'; break; #endif } i++; if ((fmode & S_IRUSR) != 0) outbuf[i] = 'r'; i++; if ((fmode & S_IWUSR) != 0) outbuf[i] = 'w'; i++; if ((fmode & S_IXUSR) != 0) outbuf[i] = 'x'; i++; if ((fmode & S_IRGRP) != 0) outbuf[i] = 'r'; i++; if ((fmode & S_IWGRP) != 0) outbuf[i] = 'w'; i++; if ((fmode & S_IXGRP) != 0) outbuf[i] = 'x'; i++; if ((fmode & S_IROTH) != 0) outbuf[i] = 'r'; i++; if ((fmode & S_IWOTH) != 0) outbuf[i] = 'w'; i++; if ((fmode & S_IXOTH) != 0) outbuf[i] = 'x'; i++; outbuf[i] = '\0'; if ((fmode & S_ISUID) != 0) { if (outbuf[3] == 'x') outbuf[3] = 's'; else outbuf[3] = 'S'; } /* setgid without execute == locking */ if ((fmode & S_ISGID) != 0) { if (outbuf[6] == 'x') outbuf[6] = 's'; else outbuf[6] = 'l'; } if ((fmode & S_ISVTX) != 0) { if (outbuf[9] == 'x') outbuf[9] = 't'; else outbuf[9] = 'T'; } return outbuf; } /* do_stat --- provide a stat() function for gawk */ static NODE * do_stat(int nargs) { NODE *file, *array, *tmp; struct stat sbuf; int ret; NODE **aptr; char *pmode; /* printable mode */ char *type = "unknown"; if (do_lint && get_curfunc_arg_count() > 2) lintwarn("stat: called with too many arguments"); /* 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); /* lstat the file, if error, set ERRNO and return */ (void) force_string(file); ret = lstat(file->stptr, & sbuf); if (ret < 0) { update_ERRNO(); return make_number((AWKNUM) ret); } /* fill in the array */ aptr = assoc_lookup(array, tmp = make_string("name", 4), FALSE); *aptr = dupnode(file); unref(tmp); aptr = assoc_lookup(array, tmp = make_string("dev", 3), FALSE); *aptr = make_number((AWKNUM) sbuf.st_dev); unref(tmp); aptr = assoc_lookup(array, tmp = make_string("ino", 3), FALSE); *aptr = make_number((AWKNUM) sbuf.st_ino); unref(tmp); aptr = assoc_lookup(array, tmp = make_string("mode", 4), FALSE); *aptr = make_number((AWKNUM) sbuf.st_mode); unref(tmp); aptr = assoc_lookup(array, tmp = make_string("nlink", 5), FALSE); *aptr = make_number((AWKNUM) sbuf.st_nlink); unref(tmp); aptr = assoc_lookup(array, tmp = make_string("uid", 3), FALSE); *aptr = make_number((AWKNUM) sbuf.st_uid); unref(tmp); aptr = assoc_lookup(array, tmp = make_string("gid", 3), FALSE); *aptr = make_number((AWKNUM) sbuf.st_gid); unref(tmp); aptr = assoc_lookup(array, tmp = make_string("size", 4), FALSE); *aptr = make_number((AWKNUM) sbuf.st_size); unref(tmp); aptr = assoc_lookup(array, tmp = make_string("blocks", 6), FALSE); *aptr = make_number((AWKNUM) sbuf.st_blocks); unref(tmp); aptr = assoc_lookup(array, tmp = make_string("atime", 5), FALSE); *aptr = make_number((AWKNUM) sbuf.st_atime); unref(tmp); aptr = assoc_lookup(array, tmp = make_string("mtime", 5), FALSE); *aptr = make_number((AWKNUM) sbuf.st_mtime); unref(tmp); 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 = make_string("rdev", 4), FALSE); *aptr = make_number((AWKNUM) sbuf.st_rdev); unref(tmp); 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 = make_string("minor", 5), FALSE); *aptr = make_number((AWKNUM) minor(sbuf.st_rdev)); unref(tmp); } #ifdef HAVE_ST_BLKSIZE 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 = 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; int linksize; 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 = make_string("linkval", 7), FALSE); *aptr = make_str_node(buf, linksize, ALREADY_MALLOCED); unref(tmp); } } /* add a type field */ switch (sbuf.st_mode & S_IFMT) { #ifdef S_IFSOCK case S_IFSOCK: type = "socket"; break; #endif #ifdef S_IFLNK case S_IFLNK: type = "symlink"; break; #endif case S_IFREG: type = "file"; break; case S_IFBLK: type = "blockdev"; break; case S_IFDIR: type = "directory"; break; #ifdef S_IFDOOR case S_IFDOOR: type = "door"; break; #endif case S_IFCHR: type = "chardev"; break; #ifdef S_IFIFO case S_IFIFO: type = "fifo"; break; #endif } aptr = assoc_lookup(array, tmp = make_string("type", 4), FALSE); *aptr = make_string(type, strlen(type)); unref(tmp); return make_number((AWKNUM) ret); } /* dlload --- load new builtins in this library */ NODE * dlload(NODE *tree, void *dl) { make_builtin("chdir", do_chdir, 1); make_builtin("stat", do_stat, 2); return make_number((AWKNUM) 0); } gawk-4.0.1+dfsg.orig/extension/testfork.awk0000644000175000017500000000071111463242060017723 0ustar schotschotBEGIN { extension("./fork.so", "dlload") printf "before fork, pid = %d, ppid = %d\n", PROCINFO["pid"], PROCINFO["ppid"] fflush() ret = fork() if (ret < 0) printf("ret = %d, ERRNO = %s\n", ret, ERRNO) else if (ret == 0) printf "child, pid = %d, ppid = %d\n", PROCINFO["pid"], PROCINFO["ppid"] else { system("sleep 3") printf "parent, ret = %d\n", ret printf "parent, pid = %d, ppid = %d\n", PROCINFO["pid"], PROCINFO["ppid"] } } gawk-4.0.1+dfsg.orig/extension/xreadlink.h0000644000175000017500000000171311532364226017521 0ustar schotschot/* readlink wrapper to return the link name in malloc'd storage 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 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; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Jim Meyering */ #include char *xreadlink (char const *, size_t); gawk-4.0.1+dfsg.orig/extension/testarg.awk0000644000175000017500000000020511566527600017543 0ustar schotschotBEGIN { 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); } gawk-4.0.1+dfsg.orig/extension/testarrayparm.awk0000644000175000017500000000025311463242060020761 0ustar schotschot#! /bin/awk -f BEGIN { extension("./arrayparm.so", "dlload") mkarray(newvar, "hi", "hello") for (i in newvar) printf ("newvar[\"%s\"] = \"%s\"\n", i, newvar[i]) } gawk-4.0.1+dfsg.orig/extension/ChangeLog.00000644000175000017500000000546711566527662017325 0ustar schotschotMon 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. gawk-4.0.1+dfsg.orig/extension/rwarray.awk0000644000175000017500000000111011464321663017553 0ustar schotschotBEGIN { extension("./rwarray.so","dlload") while ((getline word < "/usr/share/dict/words") > 0) dict[word] = word word for (i in dict) printf("dict[%s] = %s\n", i, dict[i]) > "orig.out" close("orig.out"); writea("orig.bin", dict) reada("orig.bin", dict) for (i in dict) printf("dict[%s] = %s\n", i, dict[i]) > "new.out" close("new.out"); ret = system("cmp orig.out new.out") if (ret == 0) print "old and new are equal - GOOD" else print "old and new are not equal - BAD" if (ret == 0 && !("keepit" in ENVIRON)) system("rm orig.bin orig.out new.out") } gawk-4.0.1+dfsg.orig/extension/arrayparm.c0000644000175000017500000000374311734665352017546 0ustar schotschot/* * arrayparm.c --- figure out how to make a parameter be an array * * Arnold Robbins * arnold@skeeve.com * 10/2001 * * Revised 7/2003 * Revised 6/2004 */ /* * 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. * * 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 "awk.h" int plugin_is_GPL_compatible; /* do_mkarray --- turn a variable into an array */ /* * From awk, call * * mkarray(var, sub, val) */ static NODE * do_mkarray(int args) { int ret = -1; NODE *var, *sub, *val; NODE **elemval; if (do_lint && get_curfunc_arg_count() > 3) lintwarn("mkarray: called with too many arguments"); 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)); printf("val->type = %s\n", nodetype2str(val->type)); assoc_clear(var); elemval = assoc_lookup(var, sub, 0); *elemval = dupnode(val); ret = 0; /* Set the return value */ return make_number((AWKNUM) ret); } /* dlload --- load new builtins in this library */ NODE * dlload(tree, dl) NODE *tree; void *dl; { make_builtin("mkarray", do_mkarray, 3); return make_number((AWKNUM) 0); } gawk-4.0.1+dfsg.orig/extension/testff.awk0000644000175000017500000000113711463242060017360 0ustar schotschotBEGIN { extension("./filefuncs.so", "dlload") # printf "before: " # fflush() # system("pwd") # # chdir("..") # # printf "after: " # fflush() # system("pwd") chdir(".") data[1] = 1 print "Info for testff.awk" ret = stat("testff.awk", data) print "ret =", ret for (i in data) printf "data[\"%s\"] = %s\n", i, data[i] print "testff.awk modified:", strftime("%m %d %y %H:%M:%S", data["mtime"]) print "\nInfo for JUNK" ret = stat("JUNK", data) print "ret =", ret for (i in data) printf "data[\"%s\"] = %s\n", i, data[i] print "JUNK modified:", strftime("%m %d %y %H:%M:%S", data["mtime"]) } gawk-4.0.1+dfsg.orig/extension/rwarray.c0000644000175000017500000002323611734665352017236 0ustar schotschot/* * rwarray.c - Builtin functions to binary read / write arrays to a file. * * Arnold Robbins * May 2009 */ /* * Copyright (C) 2009, 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 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 "awk.h" #include #include #include #include #define MAGIC "awkrulz\n" #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 int read_array(int fd, NODE *array); static NODE *read_elem(int fd, int *index, NODE *array); static NODE *read_value(int fd); /* * Format of array info: * * MAGIC 8 bytes * Major version 4 bytes - network order * Minor version 4 bytes - network order * Element count 4 bytes - network order * Array size 4 bytes - network order * Elements * * For each element: * Bucket number: 4 bytes - network order * 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, 2 = array) * IF string: * Length of value 4 bytes * Value as characters (N bytes) * ELSE * 8 bytes as native double */ /* do_writea --- write an array */ static NODE * do_writea(int nargs) { NODE *file, *array; int ret; int fd; uint32_t major = MAJOR; uint32_t minor = MINOR; 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(0, FALSE); array = get_array_argument(1, FALSE); /* open the file, if error, set ERRNO and return */ (void) force_string(file); fd = creat(file->stptr, 0600); if (fd < 0) { goto done1; } if (write(fd, MAGIC, strlen(MAGIC)) != strlen(MAGIC)) goto done1; major = htonl(major); if (write(fd, & major, sizeof(major)) != sizeof(major)) goto done1; minor = htonl(minor); if (write(fd, & minor, sizeof(minor)) != sizeof(minor)) goto done1; ret = write_array(fd, array); if (ret != 0) goto done1; ret = 0; goto done0; done1: ret = -1; update_ERRNO(); unlink(file->stptr); done0: close(fd); /* Set the return value */ 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; 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 */ /* * Write elements in the chain in reverse order so that * when we read the elements back in we can just push them * onto the front and thus recreate the array as it was. */ static int write_chain(int fd, int index, NODE *bucket) { int ret; if (bucket == NULL) return 0; ret = write_chain(fd, index, bucket->ahnext); if (ret != 0) return ret; return write_elem(fd, index, bucket); } /* write_elem --- write out a single element */ static int write_elem(int fd, int index, NODE *item) { uint32_t hashval, indexval_len; index = htonl(index); if (write(fd, & index, sizeof(index)) != sizeof(index)) return -1; hashval = htonl(item->ahcode); if (write(fd, & hashval, sizeof(hashval)) != sizeof(hashval)) return -1; indexval_len = htonl(item->ahname_len); if (write(fd, & indexval_len, sizeof(indexval_len)) != sizeof(indexval_len)) return -1; if (write(fd, item->ahname_str, item->ahname_len) != item->ahname_len) return -1; return write_value(fd, item->ahvalue); } /* 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)) return -1; if (write(fd, & val->numbr, sizeof(val->numbr)) != sizeof(val->numbr)) return -1; } else { code = 0; if (write(fd, & code, sizeof(code)) != sizeof(code)) return -1; len = htonl(val->stlen); if (write(fd, & len, sizeof(len)) != sizeof(len)) return -1; if (write(fd, val->stptr, val->stlen) != val->stlen) return -1; } return 0; } /* do_reada --- read an array */ static NODE * do_reada(int nargs) { NODE *file, *array; int ret; int fd; uint32_t major; uint32_t minor; char magic_buf[30]; 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(0, FALSE); array = get_array_argument(1, FALSE); (void) force_string(file); fd = open(file->stptr, O_RDONLY); if (fd < 0) { goto done1; } memset(magic_buf, '\0', sizeof(magic_buf)); if (read(fd, magic_buf, strlen(MAGIC)) != strlen(MAGIC)) { goto done1; } if (strcmp(magic_buf, MAGIC) != 0) { goto done1; } if (read(fd, & major, sizeof(major)) != sizeof(major)) { goto done1; } major = ntohl(major); if (major != MAJOR) { goto done1; } if (read(fd, & minor, sizeof(minor)) != sizeof(minor)) { goto done1; } minor = ntohl(minor); if (minor != MINOR) { goto done1; } 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)) { return -1; } array->table_size = ntohl(count); if (read(fd, & array_sz, sizeof(array_sz)) != sizeof(array_sz)) { return -1; } array->array_size = ntohl(array_sz); /* malloc var_array */ array->var_array = (NODE **) malloc(array->array_size * sizeof(NODE *)); memset(array->var_array, '\0', array->array_size * sizeof(NODE *)); 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; } 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, NODE *array) { uint32_t hashval, indexval_len, index; NODE *item; NODE *val; int ret; *the_index = 0; if ((ret = read(fd, & index, sizeof(index))) != sizeof(index)) { return NULL; } *the_index = index = ntohl(index); getnode(item); memset(item, 0, sizeof(*item)); item->type = Node_ahash; item->flags = MALLOC; if (read(fd, & hashval, sizeof(hashval)) != sizeof(hashval)) { return NULL; } item->ahcode = ntohl(hashval); if (read(fd, & indexval_len, sizeof(indexval_len)) != sizeof(indexval_len)) { return NULL; } item->ahname_len = ntohl(indexval_len); item->ahname_str = malloc(item->ahname_len + 2); if (read(fd, item->ahname_str, item->ahname_len) != item->ahname_len) { return NULL; } item->ahname_str[item->ahname_len] = '\0'; item->ahname_ref = 1; 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; } /* read_value --- read a number or a string */ static NODE * read_value(int fd) { NODE *val; int code, len; getnode(val); memset(val, 0, sizeof(*val)); val->type = Node_val; if (read(fd, & code, sizeof(code)) != sizeof(code)) { return NULL; } code = ntohl(code); 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)) { return NULL; } val->stlen = ntohl(len); val->stptr = malloc(val->stlen + 2); memset(val->stptr, '\0', val->stlen + 2); if (read(fd, val->stptr, val->stlen) != val->stlen) { return NULL; } val->flags = STRING|STRCUR|MALLOC; } return val; } /* dlload --- load new builtins in this library */ NODE * dlload(tree, dl) NODE *tree; void *dl; { make_builtin("writea", do_writea, 2); make_builtin("reada", do_reada, 2); return make_number((AWKNUM) 0); } gawk-4.0.1+dfsg.orig/extension/readfile.c0000644000175000017500000000475511734665352017327 0ustar schotschot/* * readfile.c - Read an entire file into a string. * * Arnold Robbins * Tue Apr 23 17:43:30 IDT 2002 * Revised per Peter Tillier * Mon Jun 9 17:05:11 IDT 2003 * Revised for new dynamic function facilities * Mon Jun 14 14:53:07 IDT 2004 */ /* * 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. * * 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 "awk.h" #include #ifndef O_BINARY #define O_BINARY 0 #endif int plugin_is_GPL_compatible; /* do_readfile --- read a file into memory */ NODE * do_readfile(int nargs) { NODE *filename; int ret = -1; struct stat sbuf; char *text; int fd; if (do_lint && get_curfunc_arg_count() > 1) lintwarn("readfile: called with too many arguments"); filename = get_scalar_argument(0, FALSE); if (filename != NULL) { (void) force_string(filename); ret = stat(filename->stptr, & sbuf); if (ret < 0) { update_ERRNO(); goto done; } else if ((sbuf.st_mode & S_IFMT) != S_IFREG) { errno = EINVAL; ret = -1; update_ERRNO(); goto done; } if ((fd = open(filename->stptr, O_RDONLY|O_BINARY)) < 0) { ret = -1; update_ERRNO(); goto done; } emalloc(text, char *, sbuf.st_size + 2, "do_readfile"); memset(text, '\0', sbuf.st_size + 2); if ((ret = read(fd, text, sbuf.st_size)) != sbuf.st_size) { (void) close(fd); ret = -1; update_ERRNO(); goto done; } close(fd); return make_string(text, sbuf.st_size); } else if (do_lint) lintwarn("filename: called with no arguments"); done: /* Set the return value */ return make_number((AWKNUM) ret); } /* dlload --- load new builtins in this library */ NODE * dlload(tree, dl) NODE *tree; void *dl; { make_builtin("readfile", do_readfile, 1); return make_number((AWKNUM) 0); } gawk-4.0.1+dfsg.orig/extension/ordchr.c0000644000175000017500000000441711734665352017030 0ustar schotschot/* * ordchr.c - Builtin functions that provide ord() and chr() functions. * * Arnold Robbins * arnold@skeeve.com * 8/2001 * Revised 6/2004 */ /* * Copyright (C) 2001, 2004, 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 */ #include "awk.h" int plugin_is_GPL_compatible; /* do_ord --- return numeric value of first char of string */ static NODE * do_ord(int nargs) { NODE *str; int ret = -1; if (do_lint && get_curfunc_arg_count() > 1) lintwarn("ord: called with too many arguments"); str = get_scalar_argument(0, FALSE); if (str != NULL) { (void) force_string(str); ret = str->stptr[0]; } else if (do_lint) lintwarn("ord: called with no arguments"); /* Set the return value */ return make_number((AWKNUM) ret); } /* do_chr --- turn numeric value into a string */ static NODE * do_chr(int nargs) { NODE *num; unsigned int ret = 0; AWKNUM val = 0.0; char str[2]; str[0] = str[1] = '\0'; if (do_lint && get_curfunc_arg_count() > 1) lintwarn("chr: called with too many arguments"); num = get_scalar_argument(0, FALSE); if (num != NULL) { val = force_number(num); ret = val; /* convert to int */ ret &= 0xff; str[0] = ret; str[1] = '\0'; } else if (do_lint) lintwarn("chr: called with no arguments"); /* Set the return value */ return make_string(str, 1); } /* dlload --- load new builtins in this library */ NODE * dlload(tree, dl) NODE *tree; void *dl; { make_builtin("ord", do_ord, 1); make_builtin("chr", do_chr, 1); return make_number((AWKNUM) 0); } gawk-4.0.1+dfsg.orig/extension/doit0000755000175000017500000000002311463242060016237 0ustar schotschot../gawk -f foo.awk gawk-4.0.1+dfsg.orig/regex_internal.c0000644000175000017500000013652111734665352016543 0ustar schotschot/* Extended regular expression matching and search library. Copyright (C) 2002-2006, 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ static void re_string_construct_common (const char *str, int len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa) internal_function; static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int hash) internal_function; static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, unsigned int hash) internal_function; #ifdef GAWK #undef MAX /* safety */ static int MAX(size_t a, size_t b) { return (a > b ? a : b); } #endif /* Functions for string operation. */ /* This function allocate the buffers. It is necessary to call re_string_reconstruct before using the object. */ static reg_errcode_t 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) { reg_errcode_t ret; int init_buf_len; /* Ensure at least one character fits into the buffers. */ if (init_len < dfa->mb_cur_max) init_len = dfa->mb_cur_max; init_buf_len = (len + 1 < init_len) ? len + 1: init_len; re_string_construct_common (str, len, pstr, trans, icase, dfa); ret = re_string_realloc_buffers (pstr, init_buf_len); if (BE (ret != REG_NOERROR, 0)) return ret; pstr->word_char = dfa->word_char; pstr->word_ops_used = dfa->word_ops_used; pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len; pstr->valid_raw_len = pstr->valid_len; return REG_NOERROR; } /* This function allocate the buffers, and initialize them. */ static reg_errcode_t 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) { reg_errcode_t ret; memset (pstr, '\0', sizeof (re_string_t)); re_string_construct_common (str, len, pstr, trans, icase, dfa); if (len > 0) { ret = re_string_realloc_buffers (pstr, len + 1); if (BE (ret != REG_NOERROR, 0)) return ret; } pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; if (icase) { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { while (1) { ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; if (pstr->valid_raw_len >= len) break; if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max) break; ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (BE (ret != REG_NOERROR, 0)) return ret; } } else #endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (trans != NULL) re_string_translate_buffer (pstr); else { pstr->valid_len = pstr->bufs_len; pstr->valid_raw_len = pstr->bufs_len; } } } return REG_NOERROR; } /* Helper functions for re_string_allocate, and re_string_construct. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_realloc_buffers (re_string_t *pstr, int new_buf_len) { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { wint_t *new_wcs; /* Avoid overflow in realloc. */ const size_t max_object_size = MAX (sizeof (wint_t), sizeof (int)); if (BE (SIZE_MAX / max_object_size < new_buf_len, 0)) return REG_ESPACE; new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); if (BE (new_wcs == NULL, 0)) return REG_ESPACE; pstr->wcs = new_wcs; if (pstr->offsets != NULL) { int *new_offsets = re_realloc (pstr->offsets, int, new_buf_len); if (BE (new_offsets == NULL, 0)) return REG_ESPACE; pstr->offsets = new_offsets; } } #endif /* RE_ENABLE_I18N */ if (pstr->mbs_allocated) { unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, new_buf_len); if (BE (new_mbs == NULL, 0)) return REG_ESPACE; pstr->mbs = new_mbs; } pstr->bufs_len = new_buf_len; return REG_NOERROR; } static void internal_function re_string_construct_common (const char *str, int len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa) { pstr->raw_mbs = (const unsigned char *) str; pstr->len = len; pstr->raw_len = len; pstr->trans = trans; pstr->icase = icase ? 1 : 0; pstr->mbs_allocated = (trans != NULL || icase); pstr->mb_cur_max = dfa->mb_cur_max; pstr->is_utf8 = dfa->is_utf8; pstr->map_notascii = dfa->map_notascii; pstr->stop = pstr->len; pstr->raw_stop = pstr->stop; } #ifdef RE_ENABLE_I18N /* Build wide character buffer PSTR->WCS. If the byte sequence of the string are: (0), (1), (0), (1), Then wide character buffer will be: , WEOF , , WEOF , We use WEOF for padding, they indicate that the position isn't a first byte of a multibyte character. Note that this function assumes PSTR->VALID_LEN elements are already built and starts from PSTR->VALID_LEN. */ static void internal_function build_wcs_buffer (re_string_t *pstr) { #ifdef _LIBC unsigned char buf[MB_LEN_MAX]; assert (MB_LEN_MAX >= pstr->mb_cur_max); #else unsigned char buf[64]; #endif mbstate_t prev_st; int byte_idx, end_idx, remain_len; size_t mbclen; /* Build the buffers from pstr->valid_len to either pstr->len or pstr->bufs_len. */ end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (byte_idx = pstr->valid_len; byte_idx < end_idx;) { wchar_t wc; const char *p; remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; /* Apply the translation if we need. */ if (BE (pstr->trans != NULL, 0)) { int i, ch; for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) { ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; } p = (const char *) buf; } 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) -1 || mbclen == 0 || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len), 0)) { /* We treat these cases as a singlebyte character. */ mbclen = 1; wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; if (BE (pstr->trans != NULL, 0)) 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; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } pstr->valid_len = byte_idx; pstr->valid_raw_len = byte_idx; } /* Build wide character buffer PSTR->WCS like build_wcs_buffer, but for REG_ICASE. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ build_wcs_upper_buffer (re_string_t *pstr) { mbstate_t prev_st; int src_idx, byte_idx, end_idx, remain_len; size_t mbclen; #ifdef _LIBC char buf[MB_LEN_MAX]; assert (MB_LEN_MAX >= pstr->mb_cur_max); #else char buf[64]; #endif byte_idx = pstr->valid_len; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; /* The following optimization assumes that ASCII characters can be mapped to wide characters with a simple cast. */ if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed) { while (byte_idx < end_idx) { wchar_t wc; if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]) && mbsinit (&pstr->cur_state)) { /* In case of a singlebyte character. */ pstr->mbs[byte_idx] = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]); /* The next step uses the assumption that wchar_t is encoded ASCII-safe: all ASCII values can be converted like this. */ pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx]; ++byte_idx; continue; } remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; mbclen = __mbrtowc (&wc, ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx), remain_len, &pstr->cur_state); if (BE (mbclen + 2 > 2, 1)) { wchar_t wcu = wc; if (iswlower (wc)) { size_t mbcdlen; wcu = towupper (wc); mbcdlen = wcrtomb (buf, wcu, &prev_st); if (BE (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else { src_idx = byte_idx; goto offsets_needed; } } else memcpy (pstr->mbs + byte_idx, pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); pstr->wcs[byte_idx++] = wcu; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } else if (mbclen == (size_t) -1 || mbclen == 0 || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len)) { /* 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. */ pstr->wcs[byte_idx++] = (wchar_t) ch; if (BE (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } } pstr->valid_len = byte_idx; pstr->valid_raw_len = byte_idx; return REG_NOERROR; } else for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) { wchar_t wc; const char *p; offsets_needed: remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; if (BE (pstr->trans != NULL, 0)) { int i, ch; for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) { ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; buf[i] = pstr->trans[ch]; } p = (const char *) buf; } else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); if (BE (mbclen + 2 > 2, 1)) { wchar_t wcu = wc; if (iswlower (wc)) { size_t mbcdlen; wcu = towupper (wc); mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st); if (BE (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else if (mbcdlen != (size_t) -1) { size_t i; if (byte_idx + mbcdlen > pstr->bufs_len) { pstr->cur_state = prev_st; break; } if (pstr->offsets == NULL) { pstr->offsets = re_malloc (int, pstr->bufs_len); if (pstr->offsets == NULL) return REG_ESPACE; } if (!pstr->offsets_needed) { for (i = 0; i < (size_t) byte_idx; ++i) pstr->offsets[i] = i; pstr->offsets_needed = 1; } memcpy (pstr->mbs + byte_idx, buf, mbcdlen); pstr->wcs[byte_idx] = wcu; pstr->offsets[byte_idx] = src_idx; for (i = 1; i < mbcdlen; ++i) { pstr->offsets[byte_idx + i] = src_idx + (i < mbclen ? i : mbclen - 1); pstr->wcs[byte_idx + i] = WEOF; } pstr->len += mbcdlen - mbclen; if (pstr->raw_stop > src_idx) pstr->stop += mbcdlen - mbclen; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; byte_idx += mbcdlen; src_idx += mbclen; continue; } else memcpy (pstr->mbs + byte_idx, p, mbclen); } else memcpy (pstr->mbs + byte_idx, p, mbclen); if (BE (pstr->offsets_needed != 0, 0)) { size_t i; for (i = 0; i < mbclen; ++i) pstr->offsets[byte_idx + i] = src_idx + i; } src_idx += mbclen; pstr->wcs[byte_idx++] = wcu; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } 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]; if (BE (pstr->trans != NULL, 0)) ch = pstr->trans [ch]; pstr->mbs[byte_idx] = ch; if (BE (pstr->offsets_needed != 0, 0)) pstr->offsets[byte_idx] = src_idx; ++src_idx; /* And also cast it to wide char. */ pstr->wcs[byte_idx++] = (wchar_t) ch; if (BE (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } } pstr->valid_len = byte_idx; pstr->valid_raw_len = src_idx; return REG_NOERROR; } /* Skip characters until the index becomes greater than NEW_RAW_IDX. Return the index. */ static int internal_function re_string_skip_chars (re_string_t *pstr, int new_raw_idx, wint_t *last_wc) { mbstate_t prev_st; int rawbuf_idx; size_t mbclen; wint_t wc = WEOF; /* Skip the characters which are not necessary to check. */ for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; rawbuf_idx < new_raw_idx;) { wchar_t wc2; 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 ((ssize_t) mbclen <= 0, 0)) { /* We treat these cases as a single byte character. */ if (mbclen == 0 || remain_len == 0) wc = L'\0'; else wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); mbclen = 1; pstr->cur_state = prev_st; } else wc = (wint_t) wc2; /* Then proceed the next character. */ rawbuf_idx += mbclen; } *last_wc = (wint_t) wc; return rawbuf_idx; } #endif /* RE_ENABLE_I18N */ /* Build the buffer PSTR->MBS, and apply the translation if we need. This function is used in case of REG_ICASE. */ static void internal_function build_upper_buffer (re_string_t *pstr) { int char_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; if (BE (pstr->trans != NULL, 0)) ch = pstr->trans[ch]; if (islower (ch)) pstr->mbs[char_idx] = toupper (ch); else pstr->mbs[char_idx] = ch; } pstr->valid_len = char_idx; pstr->valid_raw_len = char_idx; } /* Apply TRANS to the buffer in PSTR. */ static void internal_function re_string_translate_buffer (re_string_t *pstr) { int buf_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; pstr->mbs[buf_idx] = pstr->trans[ch]; } pstr->valid_len = buf_idx; pstr->valid_raw_len = buf_idx; } /* This function re-construct the buffers. Concretely, convert to wide character in case of pstr->mb_cur_max > 1, convert to upper case in case of REG_ICASE, apply translation. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_reconstruct (re_string_t *pstr, int idx, int eflags) { int offset = idx - pstr->raw_mbs_idx; if (BE (offset < 0, 0)) { /* Reset buffer. */ #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); #endif /* RE_ENABLE_I18N */ pstr->len = pstr->raw_len; pstr->stop = pstr->raw_stop; pstr->valid_len = 0; pstr->raw_mbs_idx = 0; pstr->valid_raw_len = 0; pstr->offsets_needed = 0; pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF); if (!pstr->mbs_allocated) pstr->mbs = (unsigned char *) pstr->raw_mbs; offset = idx; } if (BE (offset != 0, 1)) { /* Should the already checked characters be kept? */ if (BE (offset < pstr->valid_raw_len, 1)) { /* Yes, move them to the front of the buffer. */ #ifdef RE_ENABLE_I18N if (BE (pstr->offsets_needed, 0)) { int low = 0, high = pstr->valid_len, mid; do { mid = (high + low) / 2; if (pstr->offsets[mid] > offset) high = mid; else if (pstr->offsets[mid] < offset) low = mid + 1; else break; } while (low < high); if (pstr->offsets[mid] < offset) ++mid; pstr->tip_context = re_string_context_at (pstr, mid - 1, eflags); /* This can be quite complicated, so handle specially only the common and easy case where the character with different length representation of lower and upper case is present at or after offset. */ if (pstr->valid_len > offset && mid == offset && pstr->offsets[mid] == offset) { memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; for (low = 0; low < pstr->valid_len; low++) pstr->offsets[low] = pstr->offsets[low + offset] - offset; } else { /* Otherwise, just find out how long the partial multibyte character at offset is and fill it with WEOF/255. */ pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; while (mid > 0 && pstr->offsets[mid - 1] == offset) --mid; while (mid < pstr->valid_len) if (pstr->wcs[mid] != WEOF) break; else ++mid; if (mid == pstr->valid_len) pstr->valid_len = 0; else { pstr->valid_len = pstr->offsets[mid] - offset; if (pstr->valid_len) { for (low = 0; low < pstr->valid_len; ++low) pstr->wcs[low] = WEOF; memset (pstr->mbs, 255, pstr->valid_len); } } pstr->valid_raw_len = pstr->valid_len; } } else #endif { pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags); #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); #endif /* RE_ENABLE_I18N */ if (BE (pstr->mbs_allocated, 0)) memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; #if DEBUG assert (pstr->valid_len > 0); #endif } } else { #ifdef RE_ENABLE_I18N /* No, skip all characters until IDX. */ int prev_valid_len = pstr->valid_len; if (BE (pstr->offsets_needed, 0)) { pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; } #endif pstr->valid_len = 0; #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { int wcs_idx; wint_t wc = WEOF; if (pstr->is_utf8) { const unsigned char *raw, *p, *end; /* Special case UTF-8. Multi-byte chars start with any byte other than 0x80 - 0xbf. */ raw = pstr->raw_mbs + pstr->raw_mbs_idx; end = raw + (offset - pstr->mb_cur_max); if (end < pstr->raw_mbs) end = pstr->raw_mbs; p = raw + offset - 1; #ifdef _LIBC /* We know the wchar_t encoding is UCS4, so for the simple case, ASCII characters, skip the conversion step. */ if (isascii (*p) && BE (pstr->trans == NULL, 1)) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); /* pstr->valid_len = 0; */ wc = (wchar_t) *p; } else #endif for (; p >= end; --p) if ((*p & 0xc0) != 0x80) { mbstate_t cur_state; wchar_t wc2; int mlen = raw + pstr->len - p; 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 *) pp, mlen, &cur_state); if (raw + offset - p <= mbclen && mbclen < (size_t) -2) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); pstr->valid_len = mbclen - (raw + offset - p); wc = wc2; } break; } } if (wc == WEOF) pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; if (wc == WEOF) pstr->tip_context = re_string_context_at (pstr, prev_valid_len - 1, eflags); else pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) ? CONTEXT_WORD : ((IS_WIDE_NEWLINE (wc) && pstr->newline_anchor) ? CONTEXT_NEWLINE : 0)); if (BE (pstr->valid_len, 0)) { for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) pstr->wcs[wcs_idx] = WEOF; if (pstr->mbs_allocated) memset (pstr->mbs, 255, pstr->valid_len); } pstr->valid_raw_len = pstr->valid_len; } else #endif /* RE_ENABLE_I18N */ { int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; pstr->valid_raw_len = 0; if (pstr->trans) c = pstr->trans[c]; pstr->tip_context = (bitset_contain (pstr->word_char, c) ? CONTEXT_WORD : ((IS_NEWLINE (c) && pstr->newline_anchor) ? CONTEXT_NEWLINE : 0)); } } if (!BE (pstr->mbs_allocated, 0)) pstr->mbs += offset; } pstr->raw_mbs_idx = idx; pstr->len -= offset; pstr->stop -= offset; /* Then build the buffers. */ #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { if (pstr->icase) { reg_errcode_t ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; } else build_wcs_buffer (pstr); } else #endif /* RE_ENABLE_I18N */ if (BE (pstr->mbs_allocated, 0)) { if (pstr->icase) build_upper_buffer (pstr); else if (pstr->trans != NULL) re_string_translate_buffer (pstr); } else pstr->valid_len = pstr->len; pstr->cur_idx = 0; return REG_NOERROR; } static unsigned char internal_function __attribute ((pure)) re_string_peek_byte_case (const re_string_t *pstr, int idx) { int ch, off; /* Handle the common (easiest) cases first. */ if (BE (!pstr->mbs_allocated, 1)) return re_string_peek_byte (pstr, idx); #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1 && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) return re_string_peek_byte (pstr, idx); #endif off = pstr->cur_idx + idx; #ifdef RE_ENABLE_I18N if (pstr->offsets_needed) off = pstr->offsets[off]; #endif ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; #ifdef RE_ENABLE_I18N /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I this function returns CAPITAL LETTER I instead of first byte of DOTLESS SMALL LETTER I. The latter would confuse the parser, since peek_byte_case doesn't advance cur_idx in any way. */ if (pstr->offsets_needed && !isascii (ch)) return re_string_peek_byte (pstr, idx); #endif return ch; } static unsigned char internal_function re_string_fetch_byte_case (re_string_t *pstr) { if (BE (!pstr->mbs_allocated, 1)) return re_string_fetch_byte (pstr); #ifdef RE_ENABLE_I18N if (pstr->offsets_needed) { int off, ch; /* For tr_TR.UTF-8 [[:islower:]] there is [[: CAPITAL LETTER I WITH DOT lower:]] in mbs. Skip in that case the whole multi-byte character and return the original letter. On the other side, with [[: DOTLESS SMALL LETTER I return [[:I, as doing anything else would complicate things too much. */ if (!re_string_first_byte (pstr, pstr->cur_idx)) return re_string_fetch_byte (pstr); off = pstr->offsets[pstr->cur_idx]; ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; if (! isascii (ch)) return re_string_fetch_byte (pstr); re_string_skip_bytes (pstr, re_string_char_size_at (pstr, pstr->cur_idx)); return ch; } #endif return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; } static void internal_function re_string_destruct (re_string_t *pstr) { #ifdef RE_ENABLE_I18N re_free (pstr->wcs); re_free (pstr->offsets); #endif /* RE_ENABLE_I18N */ if (pstr->mbs_allocated) re_free (pstr->mbs); } /* Return the context at IDX in INPUT. */ static unsigned int internal_function re_string_context_at (const re_string_t *input, int idx, int eflags) { int c; if (BE (idx < 0, 0)) /* In this case, we use the value stored in input->tip_context, since we can't know the character in input->mbs[-1] here. */ return input->tip_context; if (BE (idx == input->len, 0)) return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF : CONTEXT_NEWLINE | CONTEXT_ENDBUF); #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc; int wc_idx = idx; while(input->wcs[wc_idx] == WEOF) { #ifdef DEBUG /* It must not happen. */ assert (wc_idx >= 0); #endif --wc_idx; if (wc_idx < 0) return input->tip_context; } wc = input->wcs[wc_idx]; if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) return CONTEXT_WORD; return (IS_WIDE_NEWLINE (wc) && input->newline_anchor ? CONTEXT_NEWLINE : 0); } else #endif { c = re_string_byte_at (input, idx); if (bitset_contain (input->word_char, c)) return CONTEXT_WORD; return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0; } } /* Functions for set operation. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_alloc (re_node_set *set, int size) { /* * ADR: valgrind says size can be 0, which then doesn't * free the block of size 0. Harumph. This seems * to work ok, though. */ if (size == 0) { memset(set, 0, sizeof(*set)); return REG_NOERROR; } set->alloc = size; set->nelem = 0; set->elems = re_malloc (int, size); if (BE (set->elems == NULL, 0)) return REG_ESPACE; return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_1 (re_node_set *set, int elem) { set->alloc = 1; set->nelem = 1; set->elems = re_malloc (int, 1); if (BE (set->elems == NULL, 0)) { set->alloc = set->nelem = 0; return REG_ESPACE; } set->elems[0] = elem; return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_2 (re_node_set *set, int elem1, int elem2) { set->alloc = 2; set->elems = re_malloc (int, 2); if (BE (set->elems == NULL, 0)) return REG_ESPACE; if (elem1 == elem2) { set->nelem = 1; set->elems[0] = elem1; } else { set->nelem = 2; if (elem1 < elem2) { set->elems[0] = elem1; set->elems[1] = elem2; } else { set->elems[0] = elem2; set->elems[1] = elem1; } } return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_copy (re_node_set *dest, const re_node_set *src) { dest->nelem = src->nelem; if (src->nelem > 0) { dest->alloc = dest->nelem; dest->elems = re_malloc (int, dest->alloc); if (BE (dest->elems == NULL, 0)) { dest->alloc = dest->nelem = 0; return REG_ESPACE; } memcpy (dest->elems, src->elems, src->nelem * sizeof (int)); } else re_node_set_init_empty (dest); return REG_NOERROR; } /* Calculate the intersection of the sets SRC1 and SRC2. And merge it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. Note: We assume dest->elems is NULL, when dest->alloc is 0. */ static reg_errcode_t 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) { int i1, i2, is, id, delta, sbase; if (src1->nelem == 0 || src2->nelem == 0) return REG_NOERROR; /* We need dest->nelem + 2 * elems_in_intersection; this is a conservative estimate. */ if (src1->nelem + src2->nelem + dest->nelem > dest->alloc) { int new_alloc = src1->nelem + src2->nelem + dest->alloc; int *new_elems = re_realloc (dest->elems, int, new_alloc); if (BE (new_elems == NULL, 0)) return REG_ESPACE; dest->elems = new_elems; dest->alloc = new_alloc; } /* Find the items in the intersection of SRC1 and SRC2, and copy into the top of DEST those that are not already in DEST itself. */ sbase = dest->nelem + src1->nelem + src2->nelem; i1 = src1->nelem - 1; i2 = src2->nelem - 1; id = dest->nelem - 1; for (;;) { if (src1->elems[i1] == src2->elems[i2]) { /* Try to find the item in DEST. Maybe we could binary search? */ while (id >= 0 && dest->elems[id] > src1->elems[i1]) --id; if (id < 0 || dest->elems[id] != src1->elems[i1]) dest->elems[--sbase] = src1->elems[i1]; if (--i1 < 0 || --i2 < 0) break; } /* Lower the highest of the two items. */ else if (src1->elems[i1] < src2->elems[i2]) { if (--i2 < 0) break; } else { if (--i1 < 0) break; } } id = dest->nelem - 1; is = dest->nelem + src1->nelem + src2->nelem - 1; delta = is - sbase + 1; /* Now copy. When DELTA becomes zero, the remaining DEST elements are already in place; this is more or less the same loop that is in re_node_set_merge. */ dest->nelem += delta; if (delta > 0 && id >= 0) for (;;) { if (dest->elems[is] > dest->elems[id]) { /* Copy from the top. */ dest->elems[id + delta--] = dest->elems[is--]; if (delta == 0) break; } else { /* Slide from the bottom. */ dest->elems[id + delta] = dest->elems[id]; if (--id < 0) break; } } /* Copy remaining SRC elements. */ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (int)); return REG_NOERROR; } /* Calculate the union set of the sets SRC1 and SRC2. And store it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t 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) { int i1, i2, id; if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0) { dest->alloc = src1->nelem + src2->nelem; dest->elems = re_malloc (int, dest->alloc); if (BE (dest->elems == NULL, 0)) return REG_ESPACE; } else { if (src1 != NULL && src1->nelem > 0) return re_node_set_init_copy (dest, src1); else if (src2 != NULL && src2->nelem > 0) return re_node_set_init_copy (dest, src2); else re_node_set_init_empty (dest); return REG_NOERROR; } for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) { if (src1->elems[i1] > src2->elems[i2]) { dest->elems[id++] = src2->elems[i2++]; continue; } if (src1->elems[i1] == src2->elems[i2]) ++i2; dest->elems[id++] = src1->elems[i1++]; } if (i1 < src1->nelem) { memcpy (dest->elems + id, src1->elems + i1, (src1->nelem - i1) * sizeof (int)); id += src1->nelem - i1; } else if (i2 < src2->nelem) { memcpy (dest->elems + id, src2->elems + i2, (src2->nelem - i2) * sizeof (int)); id += src2->nelem - i2; } dest->nelem = id; return REG_NOERROR; } /* Calculate the union set of the sets DEST and SRC. And store it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_merge (re_node_set *dest, const re_node_set *src) { int is, id, sbase, delta; if (src == NULL || src->nelem == 0) return REG_NOERROR; if (dest->alloc < 2 * src->nelem + dest->nelem) { int new_alloc = 2 * (src->nelem + dest->alloc); int *new_buffer = re_realloc (dest->elems, int, new_alloc); if (BE (new_buffer == NULL, 0)) return REG_ESPACE; dest->elems = new_buffer; dest->alloc = new_alloc; } if (BE (dest->nelem == 0, 0)) { dest->nelem = src->nelem; memcpy (dest->elems, src->elems, src->nelem * sizeof (int)); return REG_NOERROR; } /* Copy into the top of DEST the items of SRC that are not found in DEST. Maybe we could binary search in DEST? */ for (sbase = dest->nelem + 2 * src->nelem, is = src->nelem - 1, id = dest->nelem - 1; is >= 0 && id >= 0; ) { if (dest->elems[id] == src->elems[is]) is--, id--; else if (dest->elems[id] < src->elems[is]) dest->elems[--sbase] = src->elems[is--]; else /* if (dest->elems[id] > src->elems[is]) */ --id; } if (is >= 0) { /* If DEST is exhausted, the remaining items of SRC must be unique. */ sbase -= is + 1; memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (int)); } id = dest->nelem - 1; is = dest->nelem + 2 * src->nelem - 1; delta = is - sbase + 1; if (delta == 0) return REG_NOERROR; /* Now copy. When DELTA becomes zero, the remaining DEST elements are already in place. */ dest->nelem += delta; for (;;) { if (dest->elems[is] > dest->elems[id]) { /* Copy from the top. */ dest->elems[id + delta--] = dest->elems[is--]; if (delta == 0) break; } else { /* Slide from the bottom. */ dest->elems[id + delta] = dest->elems[id]; if (--id < 0) { /* Copy remaining SRC elements. */ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (int)); break; } } } return REG_NOERROR; } /* Insert the new element ELEM to the re_node_set* SET. SET should not already have ELEM. return -1 if an error is occured, return 1 otherwise. */ static int internal_function __attribute_warn_unused_result__ re_node_set_insert (re_node_set *set, int elem) { int idx; /* In case the set is empty. */ if (set->alloc == 0) { if (BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1)) return 1; else return -1; } if (BE (set->nelem, 0) == 0) { /* We already guaranteed above that set->alloc != 0. */ set->elems[0] = elem; ++set->nelem; return 1; } /* Realloc if we need. */ if (set->alloc == set->nelem) { int *new_elems; set->alloc = set->alloc * 2; new_elems = re_realloc (set->elems, int, set->alloc); if (BE (new_elems == NULL, 0)) return -1; set->elems = new_elems; } /* Move the elements which follows the new element. Test the first element separately to skip a check in the inner loop. */ if (elem < set->elems[0]) { idx = 0; for (idx = set->nelem; idx > 0; idx--) set->elems[idx] = set->elems[idx - 1]; } else { for (idx = set->nelem; set->elems[idx - 1] > elem; idx--) set->elems[idx] = set->elems[idx - 1]; } /* Insert the new element. */ set->elems[idx] = elem; ++set->nelem; return 1; } /* Insert the new element ELEM to the re_node_set* SET. SET should not already have any element greater than or equal to ELEM. Return -1 if an error is occured, return 1 otherwise. */ static int internal_function __attribute_warn_unused_result__ re_node_set_insert_last (re_node_set *set, int elem) { /* Realloc if we need. */ if (set->alloc == set->nelem) { int *new_elems; set->alloc = (set->alloc + 1) * 2; new_elems = re_realloc (set->elems, int, set->alloc); if (BE (new_elems == NULL, 0)) return -1; set->elems = new_elems; } /* Insert the new element. */ set->elems[set->nelem++] = elem; return 1; } /* Compare two node sets SET1 and SET2. return 1 if SET1 and SET2 are equivalent, return 0 otherwise. */ static int internal_function __attribute ((pure)) re_node_set_compare (const re_node_set *set1, const re_node_set *set2) { int i; if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem) return 0; for (i = set1->nelem ; --i >= 0 ; ) if (set1->elems[i] != set2->elems[i]) return 0; return 1; } /* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */ static int internal_function __attribute ((pure)) re_node_set_contains (const re_node_set *set, int elem) { unsigned int idx, right, mid; if (set->nelem <= 0) return 0; /* Binary search the element. */ idx = 0; right = set->nelem - 1; while (idx < right) { mid = (idx + right) / 2; if (set->elems[mid] < elem) idx = mid + 1; else right = mid; } return set->elems[idx] == elem ? idx + 1 : 0; } static void internal_function re_node_set_remove_at (re_node_set *set, int idx) { if (idx < 0 || idx >= set->nelem) return; --set->nelem; for (; idx < set->nelem; idx++) set->elems[idx] = set->elems[idx + 1]; } /* Add the token TOKEN to dfa->nodes, and return the index of the token. Or return -1, if an error will be occured. */ static int internal_function re_dfa_add_node (re_dfa_t *dfa, re_token_t token) { if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0)) { size_t new_nodes_alloc = dfa->nodes_alloc * 2; int *new_nexts, *new_indices; re_node_set *new_edests, *new_eclosures; re_token_t *new_nodes; /* Avoid overflows in realloc. */ const size_t max_object_size = MAX (sizeof (re_token_t), MAX (sizeof (re_node_set), sizeof (int))); if (BE (SIZE_MAX / max_object_size < new_nodes_alloc, 0)) return -1; new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc); if (BE (new_nodes == NULL, 0)) return -1; dfa->nodes = new_nodes; new_nexts = re_realloc (dfa->nexts, int, new_nodes_alloc); new_indices = re_realloc (dfa->org_indices, int, new_nodes_alloc); new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc); if (BE (new_nexts == NULL || new_indices == NULL || new_edests == NULL || new_eclosures == NULL, 0)) return -1; dfa->nexts = new_nexts; dfa->org_indices = new_indices; dfa->edests = new_edests; dfa->eclosures = new_eclosures; dfa->nodes_alloc = new_nodes_alloc; } dfa->nodes[dfa->nodes_len] = token; dfa->nodes[dfa->nodes_len].constraint = 0; #ifdef RE_ENABLE_I18N dfa->nodes[dfa->nodes_len].accept_mb = (token.type == OP_PERIOD && dfa->mb_cur_max > 1) || token.type == COMPLEX_BRACKET; #endif dfa->nexts[dfa->nodes_len] = -1; re_node_set_init_empty (dfa->edests + dfa->nodes_len); re_node_set_init_empty (dfa->eclosures + dfa->nodes_len); return dfa->nodes_len++; } static inline unsigned int internal_function calc_state_hash (const re_node_set *nodes, unsigned int context) { unsigned int hash = nodes->nelem + context; int i; for (i = 0 ; i < nodes->nelem ; i++) hash += nodes->elems[i]; return hash; } /* Search for the state whose node_set is equivalent to NODES. Return the pointer to the state, if we found it in the DFA. Otherwise create the new one and return it. In case of an error return NULL and set the error code in ERR. Note: - We assume NULL as the invalid state, then it is possible that return value is NULL and ERR is REG_NOERROR. - We never return non-NULL value in case of any errors, it is for optimization. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes) { unsigned int hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; int i; if (BE (nodes->nelem == 0, 0)) { *err = REG_NOERROR; return NULL; } hash = calc_state_hash (nodes, 0); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (hash != state->hash) continue; if (re_node_set_compare (&state->nodes, nodes)) return state; } /* There are no appropriate state in the dfa, create the new one. */ new_state = create_ci_newstate (dfa, nodes, hash); if (BE (new_state == NULL, 0)) *err = REG_ESPACE; return new_state; } /* Search for the state whose node_set is equivalent to NODES and whose context is equivalent to CONTEXT. Return the pointer to the state, if we found it in the DFA. Otherwise create the new one and return it. In case of an error return NULL and set the error code in ERR. Note: - We assume NULL as the invalid state, then it is possible that return value is NULL and ERR is REG_NOERROR. - We never return non-NULL value in case of any errors, it is for optimization. */ static re_dfastate_t * 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) { unsigned int hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; int i; if (nodes->nelem == 0) { *err = REG_NOERROR; return NULL; } hash = calc_state_hash (nodes, context); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (state->hash == hash && state->context == context && re_node_set_compare (state->entrance_nodes, nodes)) return state; } /* There are no appropriate state in `dfa', create the new one. */ new_state = create_cd_newstate (dfa, nodes, context, hash); if (BE (new_state == NULL, 0)) *err = REG_ESPACE; return new_state; } /* Finish initialization of the new state NEWSTATE, and using its hash value HASH put in the appropriate bucket of DFA's state table. Return value 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) { struct re_state_table_entry *spot; reg_errcode_t err; int i; newstate->hash = hash; err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; for (i = 0; i < newstate->nodes.nelem; i++) { int elem = newstate->nodes.elems[i]; if (!IS_EPSILON_NODE (dfa->nodes[elem].type)) if (re_node_set_insert_last (&newstate->non_eps_nodes, elem) < 0) return REG_ESPACE; } spot = dfa->state_table + (hash & dfa->state_hash_mask); if (BE (spot->alloc <= spot->num, 0)) { int new_alloc = 2 * spot->num + 2; re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *, new_alloc); if (BE (new_array == NULL, 0)) return REG_ESPACE; spot->array = new_array; spot->alloc = new_alloc; } spot->array[spot->num++] = newstate; return REG_NOERROR; } static void free_state (re_dfastate_t *state) { re_node_set_free (&state->non_eps_nodes); re_node_set_free (&state->inveclosure); if (state->entrance_nodes != &state->nodes) { re_node_set_free (state->entrance_nodes); re_free (state->entrance_nodes); } re_node_set_free (&state->nodes); re_free (state->word_trtable); re_free (state->trtable); re_free (state); } /* Create the new state which is independ of contexts. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int hash) { int i; reg_errcode_t err; re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); if (BE (err != REG_NOERROR, 0)) { re_free (newstate); return NULL; } newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; if (type == CHARACTER && !node->constraint) continue; #ifdef RE_ENABLE_I18N newstate->accept_mb |= node->accept_mb; #endif /* RE_ENABLE_I18N */ /* If the state has the halt node, the state is a halt state. */ if (type == END_OF_RE) newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; else if (type == ANCHOR || node->constraint) newstate->has_constraint = 1; } err = register_state (dfa, newstate, hash); if (BE (err != REG_NOERROR, 0)) { free_state (newstate); newstate = NULL; } return newstate; } /* Create the new state which is depend on the context CONTEXT. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * 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) { int i, nctx_nodes = 0; reg_errcode_t err; re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); if (BE (err != REG_NOERROR, 0)) { re_free (newstate); return NULL; } newstate->context = context; newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; unsigned int constraint = node->constraint; if (type == CHARACTER && !constraint) continue; #ifdef RE_ENABLE_I18N newstate->accept_mb |= node->accept_mb; #endif /* RE_ENABLE_I18N */ /* If the state has the halt node, the state is a halt state. */ if (type == END_OF_RE) newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; if (constraint) { if (newstate->entrance_nodes == &newstate->nodes) { newstate->entrance_nodes = re_malloc (re_node_set, 1); if (BE (newstate->entrance_nodes == NULL, 0)) { free_state (newstate); return NULL; } if (re_node_set_init_copy (newstate->entrance_nodes, nodes) != REG_NOERROR) return NULL; nctx_nodes = 0; newstate->has_constraint = 1; } if (NOT_SATISFY_PREV_CONSTRAINT (constraint,context)) { re_node_set_remove_at (&newstate->nodes, i - nctx_nodes); ++nctx_nodes; } } } err = register_state (dfa, newstate, hash); if (BE (err != REG_NOERROR, 0)) { free_state (newstate); newstate = NULL; } return newstate; } gawk-4.0.1+dfsg.orig/floatcomp.c0000644000175000017500000000623211532364226015504 0ustar schotschot/* * floatcomp.c - Isolate floating point details. */ /* * 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. * * 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 "awk.h" #include /* Assume IEEE-754 arithmetic on pre-C89 hosts. */ #ifndef FLT_RADIX #define FLT_RADIX 2 #endif #ifndef FLT_MANT_DIG #define FLT_MANT_DIG 24 #endif #ifndef DBL_MANT_DIG #define DBL_MANT_DIG 53 #endif /* * The number of base-FLT_RADIX digits in an AWKNUM fraction, assuming * that AWKNUM is not long double. */ #define AWKSMALL_MANT_DIG \ (sizeof (AWKNUM) == sizeof (double) ? DBL_MANT_DIG : FLT_MANT_DIG) /* * The number of base-FLT_DIGIT digits in an AWKNUM fraction, even if * AWKNUM is long double. Don't mention 'long double' unless * LDBL_MANT_DIG is defined, for the sake of ancient compilers that * lack 'long double'. */ #ifdef LDBL_MANT_DIG #define AWKNUM_MANT_DIG \ (sizeof (AWKNUM) == sizeof (long double) ? LDBL_MANT_DIG : AWKSMALL_MANT_DIG) #else #define AWKNUM_MANT_DIG AWKSMALL_MANT_DIG #endif /* * The number of bits in an AWKNUM fraction, assuming FLT_RADIX is * either 2 or 16. IEEE and VAX formats use radix 2, and IBM * mainframe format uses radix 16; we know of no other radices in * practical use. */ #if FLT_RADIX != 2 && FLT_RADIX != 16 Please port the following code to your weird host; #endif #define AWKNUM_FRACTION_BITS (AWKNUM_MANT_DIG * (FLT_RADIX == 2 ? 1 : 4)) #define DBL_FRACTION_BITS (DBL_MANT_DIG * (FLT_RADIX == 2 ? 1 : 4)) /* * Floor and Ceil --- Work around a problem in conversion of * doubles to exact integers. */ /* Floor --- do floor(), also for Cray */ AWKNUM Floor(AWKNUM n) { return floor(n); } /* Ceil --- do ceil(), also for Cray */ AWKNUM Ceil(AWKNUM n) { return ceil(n); } #ifdef HAVE_UINTMAX_T /* adjust_uint --- fiddle with values, ask Paul Eggert to explain */ uintmax_t adjust_uint(uintmax_t n) { /* * If uintmax_t is so wide that AWKNUM cannot represent all its * values, strip leading nonzero bits of integers that are so large * that they cannot be represented exactly as AWKNUMs, so that their * low order bits are represented exactly, without rounding errors. * This is more desirable in practice, since it means the user sees * integers that are the same width as the AWKNUM fractions. */ if (AWKNUM_FRACTION_BITS < CHAR_BIT * sizeof n) n &= ((uintmax_t) 1 << AWKNUM_FRACTION_BITS) - 1; return n; } #endif /* HAVE_UINTMAX_T */ gawk-4.0.1+dfsg.orig/aclocal.m40000644000175000017500000010464511734667212015230 0ustar schotschot# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 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'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # 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 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # 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 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # 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 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 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 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 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 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 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 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # 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 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 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. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 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 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # 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 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 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 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 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 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/arch.m4]) 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]) m4_include([m4/lcmessage.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/libsigsegv.m4]) m4_include([m4/longlong.m4]) 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]) m4_include([m4/ulonglong.m4]) gawk-4.0.1+dfsg.orig/NEWS0000644000175000017500000001056411734665351014065 0ustar schotschot 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 4.0.0 to 4.0.1 --------------------------- 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. 2. Completed the implementation of Rational Range Interpretation. 3. Failure to get the group set is no longer a fatal error. 4. Lots of minor bugs fixed and portability clean-ups along the way. See the ChangeLog for details. Changes from 3.1.8 to 4.0.0 --------------------------- 1. The special files /dev/pid, /dev/ppid, /dev/pgrpid and /dev/user are now completely gone. Use PROCINFO instead. 2. The POSIX 2008 behavior for `sub' and `gsub' are now the default. THIS CHANGES BEHAVIOR!!!! 3. The \s and \S escape sequences are now recognized in regular expressions. 4. The split() function accepts an optional fourth argument which is an array to hold the values of the separators. 5. The new -b / --characters-as-bytes option means "hands off my data"; gawk won't try to treat input as a multibyte string. 6. There is a new --sandbox option; see the doc. 7. Indirect function calls are now available. 8. Interval expressions are now part of default regular expressions for GNU Awk syntax. 9. --gen-po is now correctly named --gen-pot. 10. switch / case is now enabled by default. There's no longer a need for a configure-time option. 11. Gawk now supports BEGINFILE and ENDFILE. See the doc for details. 12. Directories named on the command line now produce a warning, not a fatal error, unless --posix or --traditional. 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. 14. All long options now have short options, for use in `#!' scripts. 15. Support for IPv6 is added via the /inet6/... special file. /inet4/... forces IPv4 and /inet chooses the system default (probably IPv4). 16. Added a warning for /[:space:]/ that should be /[[:space:]]/. 17. Merged with John Haque's byte code internals. Adds dgawk debugger and possibly improved performance. 18. `break' and `continue' are no longer valid outside a loop, even with --traditional. 19. POSIX character classes work with --traditional (BWK awk supports them). 20. Nuked redundant --compat, --copyleft, and --usage long options. 21. Arrays of arrays added. See the doc. 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!!!! 23. In POSIX mode, string comparisons use strcoll/wcscoll. THIS CHANGES BEHAVIOR!!!! 24. The option for raw sockets was removed, since it was never implemented. 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!!!! 26. PROCINFO["strftime"] now holds the default format for strftime(). 27. Updated to latest infrastructure: Autoconf 2.68, Automake 1.11.1, Gettext 0.18.1, Bison 2.5. 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 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. 30. A new isarray() function exists to distinguish if an item is an array or not, to make it possible to traverse multidimensional arrays. 31. asort() and asorti() take a third argument specifying how to sort. See the doc. gawk-4.0.1+dfsg.orig/config.rpath0000755000175000017500000004401211504446322015657 0ustar schotschot#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2010 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # 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. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; darwin*) case $cc_basename in xlc*) wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux* | k*bsd*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; pgcc | pgf77 | pgf90) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in 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++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we cannot use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; 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' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; 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. aix_use_runtimelinking=no else aix_use_runtimelinking=no # 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].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) ;; 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 # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if test "$GCC" = yes ; then : else case $cc_basename in xlc*) ;; *) ld_shlibs=no ;; esac fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # 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 # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) library_names_spec='$libname.a' ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd1*) ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; nto-qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < #endif #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 /* enable GNU extensions */ #endif /* _GNU_SOURCE */ #if defined(_TANDEM_SOURCE) && ! defined(_SCO_DS) #define _XOPEN_SOURCE_EXTENDED 1 #endif #include #include #ifdef HAVE_LIMITS_H #include #endif /* HAVE_LIMITS_H */ #include #include #include "gettext.h" #define _(msgid) gettext(msgid) #define N_(msgid) msgid #if ! (defined(HAVE_LIBINTL_H) && defined(ENABLE_NLS) && ENABLE_NLS > 0) #ifndef LOCALEDIR #define LOCALEDIR NULL #endif /* LOCALEDIR */ #endif #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 #error "gawk no longer supports . Please update your compiler and runtime" #endif #include #include #include #if ! defined(errno) extern int errno; #endif #ifdef STDC_HEADERS #include #endif /* not STDC_HEADERS */ #include "mbsupport.h" /* defines MBS_SUPPORT */ #if MBS_SUPPORT /* We can handle multibyte strings. */ #include #include #endif #ifdef STDC_HEADERS #include #endif #undef CHARBITS #undef INTBITS #if !defined(ZOS_USS) #if HAVE_INTTYPES_H # include #endif #if HAVE_STDINT_H # include #endif #endif /* !ZOS_USS */ /* ----------------- System dependencies (with more includes) -----------*/ /* This section is the messiest one in the file, not a lot that can be done */ #define MALLOC_ARG_T size_t #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 #include "protos.h" #ifdef HAVE_STRING_H #include #ifdef NEED_MEMORY_H #include #endif /* NEED_MEMORY_H */ #else /* not HAVE_STRING_H */ #ifdef HAVE_STRINGS_H #include #endif /* HAVE_STRINGS_H */ #endif /* not HAVE_STRING_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #ifdef VMS #include #include "vms/redirect.h" #endif /*VMS*/ #ifndef O_BINARY #define O_BINARY 0 #endif #ifndef HAVE_VPRINTF #error "you lose: you need a system with vfprintf" #endif /* HAVE_VPRINTF */ #ifndef HAVE_SETLOCALE #define setlocale(locale, val) /* nothing */ #endif /* HAVE_SETLOCALE */ #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)) #include "regex.h" #include "dfa.h" typedef struct Regexp { struct re_pattern_buffer pat; struct re_registers regs; 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 /* 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 */ /* Stuff for losing systems. */ #if !defined(HAVE_STRTOD) extern double gawk_strtod(); #define strtod gawk_strtod #endif #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __attribute__(x) #endif #ifndef ATTRIBUTE_UNUSED #define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #endif /* ATTRIBUTE_UNUSED */ #ifndef ATTRIBUTE_NORETURN #define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) #endif /* ATTRIBUTE_NORETURN */ #ifndef ATTRIBUTE_PRINTF #define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) #define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2) #define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3) #endif /* ATTRIBUTE_PRINTF */ /* We use __extension__ in some places to suppress -pedantic warnings about GCC extensions. This feature didn't work properly before gcc 2.8. */ #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) #define __extension__ #endif /* ------------------ Constants, Structures, Typedefs ------------------ */ #define AWKNUM double #ifndef TRUE /* a bit hackneyed, but what the heck */ #define TRUE 1 #define FALSE 0 #endif #define LINT_INVALID 1 /* only warn about invalid */ #define LINT_ALL 2 /* warn about all things */ 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, Node_val, /* node is a value - type in flags */ Node_regex, /* a regexp, text, compiled, flags, etc */ Node_dynregex, /* a dynamic regexp */ /* symbol table values */ Node_var, /* scalar variable, lnode is value */ Node_var_array, /* array is ptr to elements, table_size num of eles */ 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_hashnode, /* an identifier in the symbol table */ Node_ahash, /* an array element */ Node_array_ref, /* array passed by ref as parameter */ /* 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. */ typedef struct exp_node { union { struct { union { struct exp_node *lptr; struct exp_instruction *li; long ll; } l; union { struct exp_node *rptr; Regexp *preg; struct exp_node **av; void (*uptr)(void); struct exp_instruction *ri; } r; union { struct exp_node *extra; void (*aptr)(void); long xl; char **param_list; } x; char *name; struct exp_node *rn; unsigned long reflags; # define CASE 1 # define CONSTANT 2 # define FS_DFLT 4 } nodep; struct { AWKNUM fltnum; /* this is here for optimal packing of * the structure on many machines */ char *sp; size_t slen; long sref; int idx; #if MBS_SUPPORT wchar_t *wsp; size_t wslen; #endif } val; struct { AWKNUM num; struct exp_node *next; char *name; size_t length; struct exp_node *value; long ref; size_t code; } hash; #define hnext sub.hash.next #define hname sub.hash.name #define hlength sub.hash.length #define hvalue sub.hash.value #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 } sub; NODETYPE type; unsigned short flags; # define MALLOC 1 /* can be free'd */ # 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 128 /* array is at max size */ # define FUNC 256 /* this parameter is really a * function name; see awkgram.y */ # 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 */ } NODE; #define vname sub.nodep.name #define lnode sub.nodep.l.lptr #define nextp sub.nodep.l.lptr #define rnode sub.nodep.r.rptr #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 flags #define stptr sub.val.sp #define stlen sub.val.slen #define valref sub.val.sref #define stfmt sub.val.idx #define wstptr sub.val.wsp #define wstlen sub.val.wslen #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 parent_array sub.nodep.rn /* Node_array_ref: */ #define orig_array lnode #define prev_array rnode /* --------------------------------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 target_stmt x.xi /* 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 */ int fd; /* file descriptor */ struct stat sbuf; /* stat buf */ char *buf; /* start data buffer */ char *off; /* start of current record in buffer */ char *dataend; /* first byte in buffer to hold new data, NULL if not read yet */ char *end; /* end of buffer */ size_t readsize; /* set from fstat call */ size_t size; /* buffer size */ ssize_t count; /* amount read last time */ size_t scanoff; /* where we were in the buffer when we had to regrow/refill */ void *opaque; /* private data for open 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_NOFREE_OBJ 2 # define IOP_AT_EOF 4 # define IOP_CLOSED 8 # define IOP_AT_START 16 } IOBUF; typedef void (*Func_ptr)(void); /* structure used to dynamically maintain a linked-list of open files/pipes */ struct redirect { unsigned int flag; # define RED_FILE 1 # define RED_PIPE 2 # define RED_READ 4 # define RED_WRITE 8 # define RED_APPEND 16 # define RED_NOBUF 32 # define RED_USED 64 /* closed temporarily to reuse fd */ # define RED_EOF 128 # define RED_TWOWAY 256 # define RED_PTY 512 # define RED_SOCKET 1024 # define RED_TCP 2048 char *value; FILE *fp; FILE *ifp; /* input fp, needed for PIPES_SIMULATED */ IOBUF *iop; int pid; int status; struct redirect *prev; struct redirect *next; const char *mode; }; /* * structure for our source, either a command line string or a source file. */ 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 { int val; const char *name; }; #ifndef LONG_MAX #define LONG_MAX ((long)(~(1L << (sizeof (long) * 8 - 1)))) #endif #ifndef ULONG_MAX #define ULONG_MAX (~(unsigned long)0) #endif #ifndef LONG_MIN #define LONG_MIN ((long)(-LONG_MAX - 1L)) #endif #define UNLIMITED LONG_MAX /* -------------------------- External variables -------------------------- */ /* gawk builtin variables */ extern long NF; extern long NR; extern long FNR; extern int BINMODE; extern int IGNORECASE; extern int RS_is_null; extern char *OFS; extern int OFSlen; extern char *ORS; extern int ORSlen; extern char *OFMT; extern char *CONVFMT; 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, *FPAT_node; extern NODE *Nnull_string; extern NODE *Null_field; extern NODE **fields_arr; extern int sourceline; extern char *source; #if __GNUC__ < 2 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; extern int do_traditional; extern int do_posix; 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 exit_val; #ifdef NO_LINT #define do_lint 0 #define do_lint_old 0 #else extern int do_lint; extern int do_lint_old; #endif #if MBS_SUPPORT extern int gawk_mb_cur_max; #else #define gawk_mb_cur_max (1) #endif #if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 extern GETGROUPS_T *groupset; extern int ngroups; #endif #ifdef HAVE_LOCALE_H extern struct lconv loc; #endif /* HAVE_LOCALE_H */ extern const char *myname; extern const char def_strftime_format[]; extern char quote; extern char *defpath; extern char envsep; 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 #define freenode(n) efree(n) #else /* not MPROF */ #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 */ #define make_number(x) mk_number((x), (unsigned int)(MALLOC|NUMCUR|NUMBER)) #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 SCAN 1 #define ALREADY_MALLOCED 2 #define cant_happen() r_fatal("internal error line %d, file: %s", \ __LINE__, __FILE__) #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 = (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)) #define efree(p) free(p) #ifdef GAWKDEBUG #define force_number r_force_number #define force_string r_force_string #else /* not GAWKDEBUG */ #if __GNUC__ >= 2 #define force_number(n) __extension__ ({NODE *_tn = (n);\ (_tn->flags & NUMCUR) ? _tn->numbr : r_force_number(_tn);}) #define force_string(s) __extension__ ({NODE *_ts = (s);\ ((_ts->flags & STRCUR) && \ (_ts->stfmt == -1 || _ts->stfmt == CONVFMTidx)) ?\ _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 */ 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 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(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 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(FILE *fp); #endif /* ext.c */ NODE *do_ext(int nargs); #ifdef DYNAMIC 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(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); /* 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(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 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 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; #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 /* profile.c */ 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(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(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(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? */ #define Ceil gawk_ceil #define Floor gawk_floor #endif extern AWKNUM Floor(AWKNUM n); extern AWKNUM Ceil(AWKNUM n); #ifdef HAVE_UINTMAX_T extern uintmax_t adjust_uint(uintmax_t n); #else #define adjust_uint(n) (n) #endif #define INVALID_HANDLE (-1) #ifdef HAVE_SYS_WAIT_H #include #endif #ifndef WEXITSTATUS #if defined(VMS) #define WEXITSTATUS(stat_val) (stat_val) #else /* ! defined(VMS) */ #define WEXITSTATUS(stat_val) ((((unsigned) (stat_val)) >> 8) & 0xFF) #endif /* ! defined(VMS)) */ #endif /* WEXITSTATUS */ /* EXIT_SUCCESS and EXIT_FAILURE normally come from */ #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif #ifndef EXIT_FAILURE # define EXIT_FAILURE 1 #endif /* EXIT_FATAL is specific to gawk, not part of Standard C */ #ifndef EXIT_FATAL # define EXIT_FATAL 2 #endif /* For z/OS, from Dave Pitts. EXIT_FAILURE is normally 8, make it 1. */ #ifdef ZOS_USS #undef DYNAMIC #ifdef EXIT_FAILURE #undef EXIT_FAILURE #endif #define EXIT_FAILURE 1 #endif gawk-4.0.1+dfsg.orig/PROBLEMS0000644000175000017500000000124611463242060014514 0ustar schotschot Copyright (C) 2005, 2006 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. This is a list of known problems in gawk 3.1. I don't know when this will be fixed, if ever. See also FUTURES and the gawk.texi doc for other things that need doing. 1. The interactions with the lexer and yyerror need reworking. It is possible to get line numbers that are one line off if --compat or --posix is true and either `nextfile' or `delete array' are used. Really the whole lexical analysis stuff needs reworking. gawk-4.0.1+dfsg.orig/gawkmisc.c0000644000175000017500000000317111532364226015324 0ustar schotschot/* * gawkmisc.c --- miscellanious gawk routines that are OS specific. */ /* * 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 * 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 "awk.h" #if defined(HAVE_FCNTL_H) #include #endif /* some old compilers don't grok #elif. sigh */ #if defined(__EMX__) || defined(__DJGPP__) || defined(__MINGW32__) #include "pc/gawkmisc.pc" #else /* not __DJGPP__, not __MINGW32__ */ #if defined(VMS) #include "vms/gawkmisc.vms" #else /* not VMS */ #include "posix/gawkmisc.c" #endif /* not VMS */ #endif /* not __DJGPP__, not __MINGW32__ */ /* xmalloc --- provide this so that other GNU library routines work */ typedef void *pointer; 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; } gawk-4.0.1+dfsg.orig/ChangeLog.00000644000175000017500000134746711600556265015311 0ustar schotschotMon 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. gawk-4.0.1+dfsg.orig/awklib/0000755000175000017500000000000011734667242014632 5ustar schotschotgawk-4.0.1+dfsg.orig/awklib/ChangeLog0000644000175000017500000000065711734667061016413 0ustar schotschot2012-03-28 Arnold D. Robbins * 4.0.1: Release tar ball made. 2011-06-24 Arnold D. Robbins * Makefile.am (EXTRA_DIST): Add ChangeLog.0. * 4.0.0: Remake the tar ball. 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. gawk-4.0.1+dfsg.orig/awklib/stamp-eg0000644000175000017500000000015311734667231016267 0ustar schotschotsome makes are stupid and will not check a directory against a file, so this file is a place holder. gack. gawk-4.0.1+dfsg.orig/awklib/Makefile.am0000644000175000017500000000607611734141552016666 0ustar schotschot# # awklib/Makefile.am --- automake input file for gawk # # Copyright (C) 1995-2006 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 # ## process this file with automake to produce Makefile.in 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 $(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) pkgdatadir = $(datadir)/awk pkglibexecdir = $(libexecdir)/awk bin_SCRIPTS = igawk pkglibexec_PROGRAMS = pwcat grcat AUXAWK = passwd.awk group.awk nodist_grcat_SOURCES = grcat.c nodist_pwcat_SOURCES = pwcat.c all: $(srcdir)/stamp-eg $(AUXPROGS) igawk $(AUXAWK) install-exec-hook: $(AUXAWK) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) for i in $(AUXAWK) $(srcdir)/eg/lib/*.awk ; do \ progname=`echo $$i | sed 's;.*/;;'` ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(pkgdatadir)/$$progname ; \ done # pkglibexecdir and pkgdatadir are removed in the top level Makefile's uninstall uninstall-local: rm -fr $(DESTDIR)$(pkglibexecdir)/* $(DESTDIR)$(pkgdatadir)/* rm -f $(DESTDIR)$(bindir)/igawk clean-local: rm -f $(AUXAWK) igawk *.exe rm -fr eg.old $(srcdir)/stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi cd $(srcdir) && \ 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 $(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; @: pwcat$(EXEEXT): $(srcdir)/eg/lib/pwcat.c $(COMPILE) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@ grcat$(EXEEXT): $(srcdir)/eg/lib/grcat.c $(COMPILE) $(srcdir)/eg/lib/grcat.c $(LDFLAGS) -o $@ igawk: $(srcdir)/eg/prog/igawk.sh cp $(srcdir)/eg/prog/igawk.sh $@ ; chmod 755 $@ passwd.awk: $(srcdir)/eg/lib/passwdawk.in sed 's;/usr/local/libexec/awk;$(pkglibexecdir);' < $(srcdir)/eg/lib/passwdawk.in > passwd.awk group.awk: $(srcdir)/eg/lib/groupawk.in sed 's;/usr/local/libexec/awk;$(pkglibexecdir);' < $(srcdir)/eg/lib/groupawk.in > group.awk gawk-4.0.1+dfsg.orig/awklib/extract.awk0000644000175000017500000000411011734141552016773 0ustar schotschot# extract.awk --- extract files and run programs # from texinfo files # # Arnold Robbins, arnold@gnu.org, Public Domain # May 1993 # Revised September 2000 BEGIN { IGNORECASE = 1 } /^@c(omment)?[ \t]+system/ \ { if (NF < 3) { e = (FILENAME ":" FNR) e = (e ": badly formed `system' line") print e > "/dev/stderr" next } $1 = "" $2 = "" stat = system($0) if (stat != 0) { e = (FILENAME ":" FNR) e = (e ": warning: system returned " stat) print e > "/dev/stderr" } } /^@c(omment)?[ \t]+file/ \ { if (NF != 3) { e = (FILENAME ":" FNR ": badly formed `file' line") print e > "/dev/stderr" next } if ($3 != curfile) { if (curfile != "") close(curfile) curfile = $3 } for (;;) { if ((getline line) <= 0) unexpected_eof() if (line ~ /^@c(omment)?[ \t]+endfile/) break else if (line ~ /^@(end[ \t]+)?group/) continue else if (line ~ /^@c(omment+)?[ \t]+/) continue if (index(line, "@") == 0) { print line > curfile continue } n = split(line, a, "@") # if a[1] == "", means leading @, # don't add one back in. for (i = 2; i <= n; i++) { if (a[i] == "") { # was an @@ a[i] = "@" if (a[i+1] == "") i++ } } print join(a, 1, n, SUBSEP) > curfile } } function unexpected_eof() { printf("%s:%d: unexpected EOF or error\n", FILENAME, FNR) > "/dev/stderr" exit 1 } END { if (curfile) close(curfile) } # join.awk --- join an array into a string # # Arnold Robbins, arnold@gnu.org, Public Domain # May 1993 function join(array, start, end, sep, result, i) { if (sep == "") sep = " " else if (sep == SUBSEP) # magic value sep = "" result = array[start] for (i = start + 1; i <= end; i++) result = result sep array[i] return result } gawk-4.0.1+dfsg.orig/awklib/eg/0000755000175000017500000000000011734667231015223 5ustar schotschotgawk-4.0.1+dfsg.orig/awklib/eg/network/0000755000175000017500000000000011734667231016714 5ustar schotschotgawk-4.0.1+dfsg.orig/awklib/eg/network/protbase.request0000644000175000017500000000024211734667231022143 0ustar schotschotPROGRAM blastn DATALIB month EXPECT 0.75 BEGIN >GAWK310 the gawking gene GNU AWK tgcttggctgaggagccataggacgagagcttcctggtgaagtgtgtttcttgaaatcat caccaccatggacagcaaa gawk-4.0.1+dfsg.orig/awklib/eg/network/fingerclient.awk0000644000175000017500000000024111734667231022066 0ustar schotschotBEGIN { NetService = "/inet/tcp/0/localhost/finger" print "var{name}" |& NetService while ((NetService |& getline) > 0) print $0 close(NetService) } gawk-4.0.1+dfsg.orig/awklib/eg/network/PostAgent.sh0000644000175000017500000000042211734667231021152 0ustar schotschot#!/bin/sh MobAg=/tmp/MobileAgent.$$ # direct script to mobile agent file cat > $MobAg # execute agent concurrently gawk -f $MobAg $MobAg > /dev/null & # HTTP header, terminator and body gawk 'BEGIN { print "\r\nAgent started" }' rm $MobAg # delete script file of agent gawk-4.0.1+dfsg.orig/awklib/eg/network/protbase.awk0000644000175000017500000000062011734667231021235 0ustar schotschot{ request = request "\n" $0 } END { BLASTService = "/inet/tcp/0/www.ncbi.nlm.nih.gov/80" printf "POST /cgi-bin/BLAST/nph-blast_report HTTP/1.0\n" |& BLASTService printf "Content-Length: " length(request) "\n\n" |& BLASTService printf request |& BLASTService while ((BLASTService |& getline) > 0) print $0 close(BLASTService) } gawk-4.0.1+dfsg.orig/awklib/eg/network/maze.awk0000644000175000017500000000513711734667231020362 0ustar schotschotfunction SetUpServer() { TopHeader = "Walk through a maze" TopDoc = "\

Please choose one of the following actions:

\
" TopFooter = "" srand() } function HandleGET() { if (MENU[2] == "AboutServer") { Document = "If your browser has a VRML 2 plugin,\ this server shows you a simple VRML scene." } else if (MENU[2] == "VRMLtest") { XSIZE = YSIZE = 11 # initially, everything is wall for (y = 0; y < YSIZE; y++) for (x = 0; x < XSIZE; x++) Maze[x, y] = "#" delete Maze[0, 1] # entry is not wall delete Maze[XSIZE-1, YSIZE-2] # exit is not wall MakeMaze(1, 1) Document = "\ #VRML V2.0 utf8\n\ Group {\n\ children [\n\ PointLight {\n\ ambientIntensity 0.2\n\ color 0.7 0.7 0.7\n\ location 0.0 8.0 10.0\n\ }\n\ DEF B1 Background {\n\ skyColor [0 0 0, 1.0 1.0 1.0 ]\n\ skyAngle 1.6\n\ groundColor [1 1 1, 0.8 0.8 0.8, 0.2 0.2 0.2 ]\n\ groundAngle [ 1.2 1.57 ]\n\ }\n\ DEF Wall Shape {\n\ geometry Box {size 1 1 1}\n\ appearance Appearance { material Material { diffuseColor 0 0 1 } }\n\ }\n\ DEF Entry Viewpoint {\n\ position 0.5 1.0 5.0\n\ orientation 0.0 0.0 -1.0 0.52\n\ }\n" for (i in Maze) { split(i, t, SUBSEP) Document = Document " Transform { translation " Document = Document t[1] " 0 -" t[2] " children USE Wall }\n" } Document = Document " ] # end of group for world\n}" Reason = "OK" ORS "Content-type: model/vrml" Header = Footer = "" } } function MakeMaze(x, y) { delete Maze[x, y] # here we are, we have no wall here p = 0 # count unvisited fields in all directions if (x-2 SUBSEP y in Maze) d[p++] = "-x" 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 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) } else 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) } # we are back from recursion MakeMaze(x, y); # try again while there are unvisited fields } } gawk-4.0.1+dfsg.orig/awklib/eg/network/eliza.awk0000644000175000017500000002375211734667231020535 0ustar schotschotfunction SetUpServer() { SetUpEliza() TopHeader = \ "An HTTP-based System with GAWK\ \ " TopDoc = "\

Please choose one of the following actions:

\
" TopFooter = "" } function HandleGET() { # A real HTTP server would treat some parts of the URI as a file name. # We take parts of the URI as menu choices and go on accordingly. if(MENU[2] == "AboutServer") { Document = "This is not a CGI script.\ This is an httpd, an HTML file, and a CGI script all \ in one GAWK script. It needs no separate www-server, \ no installation, and no root privileges.\

To run it, do this:

    \
  • start this script with \"gawk -f httpserver.awk\",
  • \
  • and on the same host let your www browser open location\ \"http://localhost:8080\"
  • \
\

\ Details of HTTP come from:

    \
  • Hethmon: Illustrated Guide to HTTP

    \
  • RFC 2068

JK 14.9.1997

" } else if (MENU[2] == "AboutELIZA") { Document = "This is an implementation of the famous ELIZA\ program by Joseph Weizenbaum. It is written in GAWK and\ uses an HTML GUI." } else if (MENU[2] == "StartELIZA") { gsub(/\+/, " ", GETARG["YouSay"]) # Here we also have to substitute coded special characters Document = "
" \ "

" ElizaSays(GETARG["YouSay"]) "

\

\

" } } function ElizaSays(YouSay) { if (YouSay == "") { cost = 0 answer = "HI, IM ELIZA, TELL ME YOUR PROBLEM" } else { q = toupper(YouSay) gsub("'", "", q) if(q == qold) { answer = "PLEASE DONT REPEAT YOURSELF !" } else { if (index(q, "SHUT UP") > 0) { answer = "WELL, PLEASE PAY YOUR BILL. ITS EXACTLY ... $"\ int(100*rand()+30+cost/100) } else { qold = q w = "-" # no keyword recognized yet for (i in k) { # search for keywords if (index(q, i) > 0) { w = i break } } if (w == "-") { # no keyword, take old subject w = wold subj = subjold } else { # find subject subj = substr(q, index(q, w) + length(w)+1) wold = w subjold = subj # remember keyword and subject } for (i in conj) gsub(i, conj[i], q) # conjugation # from all answers to this keyword, select one randomly answer = r[indices[int(split(k[w], indices) * rand()) + 1]] # insert subject into answer gsub("_", subj, answer) } } } cost += length(answer) # for later payment : 1 cent per character return answer } function SetUpEliza() { srand() wold = "-" subjold = " " # table for conjugation conj[" ARE " ] = " AM " conj["WERE " ] = "WAS " conj[" YOU " ] = " I " conj["YOUR " ] = "MY " conj[" IVE " ] =\ conj[" I HAVE " ] = " YOU HAVE " conj[" YOUVE " ] =\ conj[" YOU HAVE "] = " I HAVE " conj[" IM " ] =\ conj[" I AM " ] = " YOU ARE " conj[" YOURE " ] =\ conj[" YOU ARE " ] = " I AM " # table of all answers r[1] = "DONT YOU BELIEVE THAT I CAN _" r[2] = "PERHAPS YOU WOULD LIKE TO BE ABLE TO _ ?" r[3] = "YOU WANT ME TO BE ABLE TO _ ?" r[4] = "PERHAPS YOU DONT WANT TO _ " r[5] = "DO YOU WANT TO BE ABLE TO _ ?" r[6] = "WHAT MAKES YOU THINK I AM _ ?" r[7] = "DOES IT PLEASE YOU TO BELIEVE I AM _ ?" r[8] = "PERHAPS YOU WOULD LIKE TO BE _ ?" r[9] = "DO YOU SOMETIMES WISH YOU WERE _ ?" r[10] = "DONT YOU REALLY _ ?" r[11] = "WHY DONT YOU _ ?" r[12] = "DO YOU WISH TO BE ABLE TO _ ?" r[13] = "DOES THAT TROUBLE YOU ?" r[14] = "TELL ME MORE ABOUT SUCH FEELINGS" r[15] = "DO YOU OFTEN FEEL _ ?" r[16] = "DO YOU ENJOY FEELING _ ?" r[17] = "DO YOU REALLY BELIEVE I DONT _ ?" r[18] = "PERHAPS IN GOOD TIME I WILL _ " r[19] = "DO YOU WANT ME TO _ ?" r[20] = "DO YOU THINK YOU SHOULD BE ABLE TO _ ?" r[21] = "WHY CANT YOU _ ?" r[22] = "WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM _ ?" r[23] = "WOULD YOU PREFER IF I WERE NOT _ ?" r[24] = "PERHAPS IN YOUR FANTASIES I AM _ " r[25] = "HOW DO YOU KNOW YOU CANT _ ?" r[26] = "HAVE YOU TRIED ?" r[27] = "PERHAPS YOU CAN NOW _ " r[28] = "DID YOU COME TO ME BECAUSE YOU ARE _ ?" r[29] = "HOW LONG HAVE YOU BEEN _ ?" r[30] = "DO YOU BELIEVE ITS NORMAL TO BE _ ?" r[31] = "DO YOU ENJOY BEING _ ?" r[32] = "WE WERE DISCUSSING YOU -- NOT ME" r[33] = "Oh, I _" r[34] = "YOU'RE NOT REALLY TALKING ABOUT ME, ARE YOU ?" r[35] = "WHAT WOULD IT MEAN TO YOU, IF YOU GOT _ ?" r[36] = "WHY DO YOU WANT _ ?" r[37] = "SUPPOSE YOU SOON GOT _" r[38] = "WHAT IF YOU NEVER GOT _ ?" r[39] = "I SOMETIMES ALSO WANT _" r[40] = "WHY DO YOU ASK ?" r[41] = "DOES THAT QUESTION INTEREST YOU ?" r[42] = "WHAT ANSWER WOULD PLEASE YOU THE MOST ?" r[43] = "WHAT DO YOU THINK ?" r[44] = "ARE SUCH QUESTIONS IN YOUR MIND OFTEN ?" r[45] = "WHAT IS IT THAT YOU REALLY WANT TO KNOW ?" r[46] = "HAVE YOU ASKED ANYONE ELSE ?" r[47] = "HAVE YOU ASKED SUCH QUESTIONS BEFORE ?" r[48] = "WHAT ELSE COMES TO MIND WHEN YOU ASK THAT ?" r[49] = "NAMES DON'T INTEREST ME" r[50] = "I DONT CARE ABOUT NAMES -- PLEASE GO ON" r[51] = "IS THAT THE REAL REASON ?" r[52] = "DONT ANY OTHER REASONS COME TO MIND ?" r[53] = "DOES THAT REASON EXPLAIN ANYTHING ELSE ?" r[54] = "WHAT OTHER REASONS MIGHT THERE BE ?" r[55] = "PLEASE DON'T APOLOGIZE !" r[56] = "APOLOGIES ARE NOT NECESSARY" r[57] = "WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE ?" r[58] = "DON'T BE SO DEFENSIVE" r[59] = "WHAT DOES THAT DREAM SUGGEST TO YOU ?" r[60] = "DO YOU DREAM OFTEN ?" r[61] = "WHAT PERSONS APPEAR IN YOUR DREAMS ?" r[62] = "ARE YOU DISTURBED BY YOUR DREAMS ?" r[63] = "HOW DO YOU DO ... PLEASE STATE YOUR PROBLEM" r[64] = "YOU DON'T SEEM QUITE CERTAIN" r[65] = "WHY THE UNCERTAIN TONE ?" r[66] = "CAN'T YOU BE MORE POSITIVE ?" r[67] = "YOU AREN'T SURE ?" r[68] = "DON'T YOU KNOW ?" r[69] = "WHY NO _ ?" r[70] = "DON'T SAY NO, IT'S ALWAYS SO NEGATIVE" r[71] = "WHY NOT ?" r[72] = "ARE YOU SURE ?" r[73] = "WHY NO ?" r[74] = "WHY ARE YOU CONCERNED ABOUT MY _ ?" r[75] = "WHAT ABOUT YOUR OWN _ ?" r[76] = "CAN'T YOU THINK ABOUT A SPECIFIC EXAMPLE ?" r[77] = "WHEN ?" r[78] = "WHAT ARE YOU THINKING OF ?" r[79] = "REALLY, ALWAYS ?" r[80] = "DO YOU REALLY THINK SO ?" r[81] = "BUT YOU ARE NOT SURE YOU _ " r[82] = "DO YOU DOUBT YOU _ ?" r[83] = "IN WHAT WAY ?" r[84] = "WHAT RESEMBLANCE DO YOU SEE ?" r[85] = "WHAT DOES THE SIMILARITY SUGGEST TO YOU ?" r[86] = "WHAT OTHER CONNECTION DO YOU SEE ?" r[87] = "COULD THERE REALLY BE SOME CONNECTIONS ?" r[88] = "HOW ?" r[89] = "YOU SEEM QUITE POSITIVE" r[90] = "ARE YOU SURE ?" r[91] = "I SEE" r[92] = "I UNDERSTAND" r[93] = "WHY DO YOU BRING UP THE TOPIC OF FRIENDS ?" r[94] = "DO YOUR FRIENDS WORRY YOU ?" r[95] = "DO YOUR FRIENDS PICK ON YOU ?" r[96] = "ARE YOU SURE YOU HAVE ANY FRIENDS ?" r[97] = "DO YOU IMPOSE ON YOUR FRIENDS ?" r[98] = "PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU" r[99] = "DO COMPUTERS WORRY YOU ?" r[100] = "ARE YOU TALKING ABOUT ME IN PARTICULAR ?" r[101] = "ARE YOU FRIGHTENED BY MACHINES ?" r[102] = "WHY DO YOU MENTION COMPUTERS ?" r[103] = "WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEMS ?" r[104] = "DON'T YOU THINK COMPUTERS CAN HELP PEOPLE ?" r[105] = "WHAT IS IT ABOUT MACHINES THAT WORRIES YOU ?" r[106] = "SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS ?" r[107] = "WHAT DOES THAT SUGGEST TO YOU ?" r[108] = "I SEE" r[109] = "IM NOT SURE I UNDERSTAND YOU FULLY" r[110] = "COME COME ELUCIDATE YOUR THOUGHTS" r[111] = "CAN YOU ELABORATE ON THAT ?" r[112] = "THAT IS QUITE INTERESTING" r[113] = "WHY DO YOU HAVE PROBLEMS WITH MONEY ?" r[114] = "DO YOU THINK MONEY IS EVERYTHING ?" r[115] = "ARE YOU SURE THAT MONEY IS THE PROBLEM ?" r[116] = "I THINK WE WANT TO TALK ABOUT YOU, NOT ABOUT ME" r[117] = "WHAT'S ABOUT ME ?" r[118] = "WHY DO YOU ALWAYS BRING UP MY NAME ?" # table for looking up answers that # fit to a certain keyword k["CAN YOU"] = "1 2 3" k["CAN I"] = "4 5" k["YOU ARE"] =\ k["YOURE"] = "6 7 8 9" k["I DONT"] = "10 11 12 13" k["I FEEL"] = "14 15 16" k["WHY DONT YOU"] = "17 18 19" k["WHY CANT I"] = "20 21" k["ARE YOU"] = "22 23 24" k["I CANT"] = "25 26 27" k["I AM"] =\ k["IM "] = "28 29 30 31" k["YOU "] = "32 33 34" k["I WANT"] = "35 36 37 38 39" k["WHAT"] =\ k["HOW"] =\ k["WHO"] =\ k["WHERE"] =\ k["WHEN"] =\ k["WHY"] = "40 41 42 43 44 45 46 47 48" k["NAME"] = "49 50" k["CAUSE"] = "51 52 53 54" k["SORRY"] = "55 56 57 58" k["DREAM"] = "59 60 61 62" k["HELLO"] =\ k["HI "] = "63" k["MAYBE"] = "64 65 66 67 68" k[" NO "] = "69 70 71 72 73" k["YOUR"] = "74 75" k["ALWAYS"] = "76 77 78 79" k["THINK"] = "80 81 82" k["LIKE"] = "83 84 85 86 87 88 89" k["YES"] = "90 91 92" k["FRIEND"] = "93 94 95 96 97 98" k["COMPUTER"] = "99 100 101 102 103 104 105" k["-"] = "106 107 108 109 110 111 112" k["MONEY"] = "113 114 115" k["ELIZA"] = "116 117 118" } gawk-4.0.1+dfsg.orig/awklib/eg/network/remconf.awk0000644000175000017500000000421111734667231021047 0ustar schotschotfunction SetUpServer() { TopHeader = "Remote Configuration" TopDoc = "\

Please choose one of the following actions:

\ " TopFooter = "" if (ConfigFile == "") ConfigFile = "config.asc" } function HandleGET() { if(MENU[2] == "AboutServer") { Document = "This is a GUI for remote configuration of an\ embedded system. It is is implemented as one GAWK script." } else if (MENU[2] == "ReadConfig") { RS = "\n" while ((getline < ConfigFile) > 0) config[$1] = $2; close(ConfigFile) RS = "\r\n" Document = "Configuration has been read." } else if (MENU[2] == "CheckConfig") { Document = "" for (i in config) Document = Document "" \ "" Document = Document "
" i "" config[i] "
" } else if (MENU[2] == "ChangeConfig") { if ("Param" in GETARG) { # any parameter to set? if (GETARG["Param"] in config) { # is parameter valid? config[GETARG["Param"]] = GETARG["Value"] Document = (GETARG["Param"] " = " GETARG["Value"] ".") } else { Document = "Parameter " GETARG["Param"] " is invalid." } } else { Document = "

Change one parameter

\ \ \ \ \
ParameterValue
" } } else if (MENU[2] == "SaveConfig") { for (i in config) printf("%s %s\n", i, config[i]) > ConfigFile close(ConfigFile) Document = "Configuration has been saved." } } gawk-4.0.1+dfsg.orig/awklib/eg/network/statist.awk0000644000175000017500000000703311734667231021116 0ustar schotschotfunction SetUpServer() { TopHeader = "Statistics with GAWK" TopDoc = "\

Please choose one of the following actions:

\ " TopFooter = "" GnuPlot = "gnuplot 2>&1" m1=m2=0; v1=v2=1; n1=n2=10 } function HandleGET() { if(MENU[2] == "AboutServer") { Document = "This is a GUI for a statistical computation.\ It compares means and variances of two distributions.\ It is implemented as one GAWK script and uses GNUPLOT." } else if (MENU[2] == "EnterParameters") { Document = "" if ("m1" in GETARG) { # are there parameters to compare? Document = Document "" m1 = GETARG["m1"]; v1 = GETARG["v1"]; n1 = GETARG["n1"] m2 = GETARG["m2"]; v2 = GETARG["v2"]; n2 = GETARG["n2"] t = (m1-m2)/sqrt(v1/n1+v2/n2) df = (v1/n1+v2/n2)*(v1/n1+v2/n2)/((v1/n1)*(v1/n1)/(n1-1) \ + (v2/n2)*(v2/n2) /(n2-1)) if (v1>v2) { f = v1/v2 df1 = n1 - 1 df2 = n2 - 1 } else { f = v2/v1 df1 = n2 - 1 df2 = n1 - 1 } print "pt=ibeta(" df/2 ",0.5," df/(df+t*t) ")" |& GnuPlot print "pF=2.0*ibeta(" df2/2 "," df1/2 "," \ df2/(df2+df1*f) ")" |& GnuPlot print "print pt, pF" |& GnuPlot RS="\n"; GnuPlot |& getline; RS="\r\n" # $1 is pt, $2 is pF print "invsqrt2pi=1.0/sqrt(2.0*pi)" |& GnuPlot print "nd(x)=invsqrt2pi/sd*exp(-0.5*((x-mu)/sd)**2)" |& GnuPlot print "set term png small color" |& GnuPlot #print "set term postscript color" |& GnuPlot #print "set term gif medium size 320,240" |& GnuPlot print "set yrange[-0.3:]" |& GnuPlot print "set label 'p(m1=m2) =" $1 "' at 0,-0.1 left" |& GnuPlot print "set label 'p(v1=v2) =" $2 "' at 0,-0.2 left" |& GnuPlot print "plot mu=" m1 ",sd=" sqrt(v1) ", nd(x) title 'sample 1',\ mu=" m2 ",sd=" sqrt(v2) ", nd(x) title 'sample 2'" |& GnuPlot print "quit" |& GnuPlot GnuPlot |& getline Image while ((GnuPlot |& getline) > 0) Image = Image RS $0 close(GnuPlot) } Document = Document "\

Do these samples have the same Gaussian distribution?

\
\ \ \ \ \ \ \ \ \ \
1. Mean 1. Variance 1. Count
2. Mean 2. Variance 2. Count

" } else if (MENU[2] ~ "Image") { Reason = "OK" ORS "Content-type: image/png" #Reason = "OK" ORS "Content-type: application/x-postscript" #Reason = "OK" ORS "Content-type: image/gif" Header = Footer = "" Document = Image } } gawk-4.0.1+dfsg.orig/awklib/eg/network/protbase.result0000644000175000017500000000120211734667231021766 0ustar schotschotSequences producing significant alignments: (bits) Value gb|AC021182.14|AC021182 Homo sapiens chromosome 7 clone RP11-733... 38 0.20 gb|AC021056.12|AC021056 Homo sapiens chromosome 3 clone RP11-115... 38 0.20 emb|AL160278.10|AL160278 Homo sapiens chromosome 9 clone RP11-57... 38 0.20 emb|AL391139.11|AL391139 Homo sapiens chromosome X clone RP11-35... 38 0.20 emb|AL365192.6|AL365192 Homo sapiens chromosome 6 clone RP3-421H... 38 0.20 emb|AL138812.9|AL138812 Homo sapiens chromosome 11 clone RP1-276... 38 0.20 gb|AC073881.3|AC073881 Homo sapiens chromosome 15 clone CTD-2169... 38 0.20 gawk-4.0.1+dfsg.orig/awklib/eg/network/mobag.awk0000644000175000017500000000543111734667231020510 0ustar schotschotBEGIN { if (ARGC != 2) { print "MOBAG - a simple mobile agent" print "CALL:\n gawk -f mobag.awk mobag.awk" print "IN:\n the name of this script as a command-line parameter" print "PARAM:\n -v MyOrigin=myhost.com" print "OUT:\n the result on stdout" print "JK 29.03.1998 01.04.1998" exit } if (MyOrigin == "") { "uname -n" | getline MyOrigin close("uname -n") } } #ReadMySelf /^function / { FUNC = $2 } /^END/ || /^#ReadMySelf/ { FUNC = $1 } FUNC != "" { MOBFUN[FUNC] = MOBFUN[FUNC] RS $0 } (FUNC != "") && (/^}/ || /^#EndOfMySelf/) \ { FUNC = "" } #EndOfMySelf function migrate(Destination, MobCode, Label) { MOBVAR["Label"] = Label MOBVAR["Destination"] = Destination RS = ORS = "\r\n" HttpService = "/inet/tcp/0/" Destination for (i in MOBFUN) MobCode = (MobCode "\n" MOBFUN[i]) MobCode = MobCode "\n\nBEGIN {" for (i in MOBVAR) MobCode = (MobCode "\n MOBVAR[\"" i "\"] = \"" MOBVAR[i] "\"") MobCode = MobCode "\n}\n" print "POST /cgi-bin/PostAgent.sh HTTP/1.0" |& HttpService print "Content-length:", length(MobCode) ORS |& HttpService printf "%s", MobCode |& HttpService while ((HttpService |& getline) > 0) print $0 close(HttpService) } END { if (ARGC != 2) exit # stop when called with wrong parameters if (MyOrigin != "") # is this the originating host? MyInit() # if so, initialize the application else # we are on a host with migrated data MyJob() # so we do our job } function MyInit() { MOBVAR["MyOrigin"] = MyOrigin MOBVAR["Machines"] = "localhost/80 max/80 moritz/80 castor/80" split(MOBVAR["Machines"], Machines) # which host is the first? migrate(Machines[1], "", "") # go to the first host while (("/inet/tcp/8080/0/0" |& getline) > 0) # wait for result print $0 # print result close("/inet/tcp/8080/0/0") } function MyJob() { # forget this host sub(MOBVAR["Destination"], "", MOBVAR["Machines"]) MOBVAR["Result"]=MOBVAR["Result"] SUBSEP SUBSEP MOBVAR["Destination"] ":" while (("who" | getline) > 0) # who is logged in? MOBVAR["Result"] = MOBVAR["Result"] SUBSEP $0 close("who") if (index(MOBVAR["Machines"], "/") > 0) { # any more machines to visit? split(MOBVAR["Machines"], Machines) # which host is next? migrate(Machines[1], "", "") # go there } else { # no more machines gsub(SUBSEP, "\n", MOBVAR["Result"]) # send result to origin print MOBVAR["Result"] |& "/inet/tcp/0/" MOBVAR["MyOrigin"] "/8080" close("/inet/tcp/0/" MOBVAR["MyOrigin"] "/8080") } } gawk-4.0.1+dfsg.orig/awklib/eg/network/stoxdata.txt0000644000175000017500000000024511734667231021305 0ustar schotschotDate,Open,High,Low,Close,Volume 9-Oct-00,22.75,22.75,21.375,22.375,7888500 6-Oct-00,23.8125,24.9375,21.5625,22,10701100 5-Oct-00,24.4375,24.625,23.125,23.50,5810300 gawk-4.0.1+dfsg.orig/awklib/eg/network/urlchk.awk0000644000175000017500000000203511734667231020710 0ustar schotschotBEGIN { if (ARGC != 2) { print "URLCHK - check if URLs have changed" print "IN:\n the file with URLs as a command-line parameter" print " file contains URL, old length, new length" print "PARAMS:\n -v Proxy=MyProxy -v ProxyPort=8080" print "OUT:\n same as file with URLs" print "JK 02.03.1998" exit } URLfile = ARGV[1]; ARGV[1] = "" if (Proxy != "") Proxy = " -v Proxy=" Proxy if (ProxyPort != "") ProxyPort = " -v ProxyPort=" ProxyPort while ((getline < URLfile) > 0) Length[$1] = $3 + 0 close(URLfile) # now, URLfile is read in and can be updated GetHeader = "gawk " Proxy ProxyPort " -v Method=\"HEAD\" -f geturl.awk " for (i in Length) { GetThisHeader = GetHeader i " 2>&1" while ((GetThisHeader | getline) > 0) if (toupper($0) ~ /CONTENT-LENGTH/) NewLength = $2 + 0 close(GetThisHeader) print i, Length[i], NewLength > URLfile if (Length[i] != NewLength) # report only changed URLs print i, Length[i], NewLength } close(URLfile) } gawk-4.0.1+dfsg.orig/awklib/eg/network/coreserv.awk0000644000175000017500000000647411734667231021263 0ustar schotschot# CGI Library and core of a web server # # Juergen Kahrs, Juergen.Kahrs@vr-web.de # with Arnold Robbins, arnold@gnu.org # September 2000 # Global arrays # GETARG --- arguments to CGI GET command # MENU --- menu items (path names) # PARAM --- parameters of form x=y # Optional variable MyHost contains host address # Optional variable MyPort contains port number # Needs TopHeader, TopDoc, TopFooter # Sets MyPrefix, HttpService, Status, Reason BEGIN { if (MyHost == "") { "uname -n" | getline MyHost close("uname -n") } if (MyPort == 0) MyPort = 8080 HttpService = "/inet/tcp/" MyPort "/0/0" MyPrefix = "http://" MyHost ":" MyPort SetUpServer() while ("awk" != "complex") { # header lines are terminated this way RS = ORS = "\r\n" Status = 200 # this means OK Reason = "OK" Header = TopHeader Document = TopDoc Footer = TopFooter if (GETARG["Method"] == "GET") { HandleGET() } else if (GETARG["Method"] == "HEAD") { # not yet implemented } else if (GETARG["Method"] != "") { print "bad method", GETARG["Method"] } Prompt = Header Document Footer print "HTTP/1.0", Status, Reason |& HttpService print "Connection: Close" |& HttpService print "Pragma: no-cache" |& HttpService len = length(Prompt) + length(ORS) print "Content-length:", len |& HttpService print ORS Prompt |& HttpService # ignore all the header lines while ((HttpService |& getline) > 0) continue # stop talking to this client close(HttpService) # wait for new client request HttpService |& getline # do some logging print systime(), strftime(), $0 CGI_setup($1, $2, $3) } } function CGI_setup( method, uri, version, i) { delete GETARG delete MENU delete PARAM GETARG["Method"] = method GETARG["URI"] = uri GETARG["Version"] = version i = index(uri, "?") if (i > 0) { # is there a "?" indicating a CGI request? split(substr(uri, 1, i-1), MENU, "[/:]") split(substr(uri, i+1), PARAM, "&") for (i in PARAM) { PARAM[i] = _CGI_decode(PARAM[i]) j = index(PARAM[i], "=") GETARG[substr(PARAM[i], 1, j-1)] = \ substr(PARAM[i], j+1) } } else { # there is no "?", no need for splitting PARAMs split(uri, MENU, "[/:]") } for (i in MENU) # decode characters in path if (i > 4) # but not those in host name MENU[i] = _CGI_decode(MENU[i]) } function _CGI_decode(str, hexdigs, i, pre, code1, code2, val, result) { hexdigs = "123456789abcdef" i = index(str, "%") if (i == 0) # no work to do return str do { pre = substr(str, 1, i-1) # part before %xx code1 = substr(str, i+1, 1) # first hex digit code2 = substr(str, i+2, 1) # second hex digit str = substr(str, i+3) # rest of string code1 = tolower(code1) code2 = tolower(code2) val = index(hexdigs, code1) * 16 \ + index(hexdigs, code2) result = result pre sprintf("%c", val) i = index(str, "%") } while (i != 0) if (length(str) > 0) result = result str return result } gawk-4.0.1+dfsg.orig/awklib/eg/network/testserv.awk0000644000175000017500000000051611734667231021301 0ustar schotschotBEGIN { CGI_setup("GET", "http://www.gnu.org/cgi-bin/foo?p1=stuff&p2=stuff%26junk" \ "&percent=a %25 sign", "1.0") for (i in MENU) printf "MENU[\"%s\"] = %s\n", i, MENU[i] for (i in PARAM) printf "PARAM[\"%s\"] = %s\n", i, PARAM[i] for (i in GETARG) printf "GETARG[\"%s\"] = %s\n", i, GETARG[i] } gawk-4.0.1+dfsg.orig/awklib/eg/network/hello-serv.awk0000644000175000017500000000071711734667231021505 0ustar schotschotBEGIN { RS = ORS = "\r\n" HttpService = "/inet/tcp/8080/0/0" Hello = "" \ "A Famous Greeting" \ "

Hello, world

" Len = length(Hello) + length(ORS) print "HTTP/1.0 200 OK" |& HttpService print "Content-Length: " Len ORS |& HttpService print Hello |& HttpService while ((HttpService |& getline) > 0) continue; close(HttpService) } gawk-4.0.1+dfsg.orig/awklib/eg/network/panic.awk0000644000175000017500000000107711734667231020517 0ustar schotschotBEGIN { RS = ORS = "\r\n" if (MyPort == 0) MyPort = 8080 HttpService = "/inet/tcp/" MyPort "/0/0" Hello = "Out Of Service" \ "

" \ "This site is temporarily out of service." \ "

" Len = length(Hello) + length(ORS) while ("awk" != "complex") { print "HTTP/1.0 200 OK" |& HttpService print "Content-Length: " Len ORS |& HttpService print Hello |& HttpService while ((HttpService |& getline) > 0) continue; close(HttpService) } } gawk-4.0.1+dfsg.orig/awklib/eg/network/geturl.awk0000644000175000017500000000142311734667231020722 0ustar schotschotBEGIN { if (ARGC != 2) { print "GETURL - retrieve Web page via HTTP 1.0" print "IN:\n the URL as a command-line parameter" print "PARAM(S):\n -v Proxy=MyProxy" print "OUT:\n the page content on stdout" print " the page header on stderr" print "JK 16.05.1997" print "ADR 13.08.2000" exit } URL = ARGV[1]; ARGV[1] = "" if (Proxy == "") Proxy = "127.0.0.1" if (ProxyPort == 0) ProxyPort = 80 if (Method == "") Method = "GET" HttpService = "/inet/tcp/0/" Proxy "/" ProxyPort ORS = RS = "\r\n\r\n" print Method " " URL " HTTP/1.0" |& HttpService HttpService |& getline Header print Header > "/dev/stderr" while ((HttpService |& getline) > 0) printf "%s", $0 close(HttpService) } gawk-4.0.1+dfsg.orig/awklib/eg/network/webgrab.awk0000644000175000017500000000027111734667231021031 0ustar schotschotBEGIN { RS = "http://[#%&\\+\\-\\./0-9\\:;\\?A-Z_a-z\\~]*" } RT != "" { command = ("gawk -v Proxy=MyProxy -f geturl.awk " RT \ " > doc" NR ".html") print command } gawk-4.0.1+dfsg.orig/awklib/eg/network/stoxpred.awk0000644000175000017500000001124411734667231021272 0ustar schotschotfunction ReadQuotes() { # Retrieve historical data for each ticker symbol FS = "," for (stock = 1; stock <= StockCount; stock++) { URL = "http://chart.yahoo.com/table.csv?s=" name[stock] \ "&a=" month "&b=" day "&c=" year-1 \ "&d=" month "&e=" day "&f=" year \ "g=d&q=q&y=0&z=" name[stock] "&x=.csv" printf("GET " URL " HTTP/1.0\r\n\r\n") |& YahooData while ((YahooData |& getline) > 0) { if (NF == 6 && $1 ~ /Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec/) { if (stock == 1) days[++daycount] = $1; quote[$1, stock] = $5 } } close(YahooData) } FS = " " } function CleanUp() { # clean up time series; eliminate incomplete data sets for (d = 1; d <= daycount; d++) { for (stock = 1; stock <= StockCount; stock++) if (! ((days[d], stock) in quote)) stock = StockCount + 10 if (stock > StockCount + 1) continue datacount++ for (stock = 1; stock <= StockCount; stock++) data[datacount, stock] = int(0.5 + quote[days[d], stock]) } delete quote delete days } function Prediction() { # Predict each ticker symbol by prolonging yesterday's trend for (stock = 1; stock <= StockCount; stock++) { if (data[1, stock] > data[2, stock]) { predict[stock] = "up" } else if (data[1, stock] < data[2, stock]) { predict[stock] = "down" } else { predict[stock] = "neutral" } if ((data[1, stock] > data[2, stock]) && (data[2, stock] > data[3, stock])) hot[stock] = 1 if ((data[1, stock] < data[2, stock]) && (data[2, stock] < data[3, stock])) avoid[stock] = 1 } # Do a plausibility check: how many predictions proved correct? for (s = 1; s <= StockCount; s++) { for (d = 1; d <= datacount-2; d++) { if (data[d+1, s] > data[d+2, s]) { UpCount++ } else if (data[d+1, s] < data[d+2, s]) { DownCount++ } else { NeutralCount++ } if (((data[d, s] > data[d+1, s]) && (data[d+1, s] > data[d+2, s])) || ((data[d, s] < data[d+1, s]) && (data[d+1, s] < data[d+2, s])) || ((data[d, s] == data[d+1, s]) && (data[d+1, s] == data[d+2, s]))) CorrectCount++ } } } function Report() { # Generate report report = "\nThis is your daily " report = report "stock market report for "strftime("%A, %B %d, %Y")".\n" report = report "Here are the predictions for today:\n\n" for (stock = 1; stock <= StockCount; stock++) report = report "\t" name[stock] "\t" predict[stock] "\n" for (stock in hot) { if (HotCount++ == 0) report = report "\nThe most promising shares for today are these:\n\n" report = report "\t" name[stock] "\t\thttp://biz.yahoo.com/n/" \ tolower(substr(name[stock], 1, 1)) "/" tolower(name[stock]) ".html\n" } for (stock in avoid) { if (AvoidCount++ == 0) report = report "\nThe stock shares to avoid today are these:\n\n" report = report "\t" name[stock] "\t\thttp://biz.yahoo.com/n/" \ tolower(substr(name[stock], 1, 1)) "/" tolower(name[stock]) ".html\n" } report = report "\nThis sums up to " HotCount+0 " winners and " AvoidCount+0 report = report " losers. When using this kind\nof prediction scheme for" report = report " the 12 months which lie behind us,\nwe get " UpCount report = report " 'ups' and " DownCount " 'downs' and " NeutralCount report = report " 'neutrals'. Of all\nthese " UpCount+DownCount+NeutralCount report = report " predictions " CorrectCount " proved correct next day.\n" report = report "A success rate of "\ int(100*CorrectCount/(UpCount+DownCount+NeutralCount)) "%.\n" report = report "Random choice would have produced a 33% success rate.\n" report = report "Disclaimer: Like every other prediction of the stock\n" report = report "market, this report is, of course, complete nonsense.\n" report = report "If you are stupid enough to believe these predictions\n" report = report "you should visit a doctor who can treat your ailment." } function SendMail() { # send report to customers customer["uncle.scrooge@ducktown.gov"] = "Uncle Scrooge" customer["more@utopia.org" ] = "Sir Thomas More" customer["spinoza@denhaag.nl" ] = "Baruch de Spinoza" customer["marx@highgate.uk" ] = "Karl Marx" customer["keynes@the.long.run" ] = "John Maynard Keynes" customer["bierce@devil.hell.org" ] = "Ambrose Bierce" customer["laplace@paris.fr" ] = "Pierre Simon de Laplace" for (c in customer) { MailPipe = "mail -s 'Daily Stock Prediction Newsletter'" c print "Good morning " customer[c] "," | MailPipe print report "\n.\n" | MailPipe close(MailPipe) } } gawk-4.0.1+dfsg.orig/awklib/eg/data/0000755000175000017500000000000011734667231016134 5ustar schotschotgawk-4.0.1+dfsg.orig/awklib/eg/data/guide.po0000644000175000017500000000013611734667231017571 0ustar schotschot#: guide.awk:4 msgid "Don't Panic" msgstr "" #: guide.awk:5 msgid "The Answer Is" msgstr "" gawk-4.0.1+dfsg.orig/awklib/eg/data/inventory-shipped0000644000175000017500000000050111734667231021542 0ustar schotschotJan 13 25 15 115 Feb 15 32 24 226 Mar 15 24 34 228 Apr 31 52 63 420 May 16 34 29 208 Jun 31 42 75 492 Jul 24 34 67 436 Aug 15 34 47 316 Sep 13 55 37 277 Oct 29 54 68 525 Nov 20 87 82 577 Dec 17 35 61 401 Jan 21 36 64 620 Feb 26 58 80 652 Mar 24 75 70 495 Apr 21 70 74 514 gawk-4.0.1+dfsg.orig/awklib/eg/data/BBS-list0000644000175000017500000000077211734667231017444 0ustar schotschotaardvark 555-5553 1200/300 B alpo-net 555-3412 2400/1200/300 A barfly 555-7685 1200/300 A bites 555-1675 2400/1200/300 A camelot 555-0542 300 C core 555-2912 1200/300 C fooey 555-1234 2400/1200/300 B foot 555-6699 1200/300 B macfoo 555-6480 1200/300 A sdace 555-3430 2400/1200/300 A sabafoo 555-2127 1200/300 C gawk-4.0.1+dfsg.orig/awklib/eg/data/class_data10000644000175000017500000000023111734667231020232 0ustar schotschotBiology_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 gawk-4.0.1+dfsg.orig/awklib/eg/data/guide-mellow.po0000644000175000017500000000017711734667231021073 0ustar schotschot#: guide.awk:4 msgid "Don't Panic" msgstr "Hey man, relax!" #: guide.awk:5 msgid "The Answer Is" msgstr "Like, the scoop is" gawk-4.0.1+dfsg.orig/awklib/eg/data/class_data20000644000175000017500000000027211734667231020240 0ustar schotschotBiology_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 gawk-4.0.1+dfsg.orig/awklib/eg/lib/0000755000175000017500000000000011734667231015771 5ustar schotschotgawk-4.0.1+dfsg.orig/awklib/eg/lib/gettime.awk0000644000175000017500000000467311734667231020145 0ustar schotschot# gettimeofday.awk --- get the time of day in a usable format # # Arnold Robbins, arnold@skeeve.com, Public Domain, May 1993 # # Returns a string in the format of output of date(1) # Populates the array argument time with individual values: # time["second"] -- seconds (0 - 59) # time["minute"] -- minutes (0 - 59) # time["hour"] -- hours (0 - 23) # time["althour"] -- hours (0 - 12) # time["monthday"] -- day of month (1 - 31) # time["month"] -- month of year (1 - 12) # time["monthname"] -- name of the month # time["shortmonth"] -- short name of the month # time["year"] -- year modulo 100 (0 - 99) # time["fullyear"] -- full year # time["weekday"] -- day of week (Sunday = 0) # time["altweekday"] -- day of week (Monday = 0) # time["dayname"] -- name of weekday # time["shortdayname"] -- short name of weekday # time["yearday"] -- day of year (0 - 365) # time["timezone"] -- abbreviation of timezone name # time["ampm"] -- AM or PM designation # time["weeknum"] -- week number, Sunday first day # time["altweeknum"] -- week number, Monday first day function gettimeofday(time, ret, now, i) { # get time once, avoids unnecessary system calls now = systime() # return date(1)-style output ret = strftime("%a %b %e %H:%M:%S %Z %Y", now) # clear out target array delete time # fill in values, force numeric values to be # numeric by adding 0 time["second"] = strftime("%S", now) + 0 time["minute"] = strftime("%M", now) + 0 time["hour"] = strftime("%H", now) + 0 time["althour"] = strftime("%I", now) + 0 time["monthday"] = strftime("%d", now) + 0 time["month"] = strftime("%m", now) + 0 time["monthname"] = strftime("%B", now) time["shortmonth"] = strftime("%b", now) time["year"] = strftime("%y", now) + 0 time["fullyear"] = strftime("%Y", now) + 0 time["weekday"] = strftime("%w", now) + 0 time["altweekday"] = strftime("%u", now) + 0 time["dayname"] = strftime("%A", now) time["shortdayname"] = strftime("%a", now) time["yearday"] = strftime("%j", now) + 0 time["timezone"] = strftime("%Z", now) time["ampm"] = strftime("%p", now) time["weeknum"] = strftime("%U", now) + 0 time["altweeknum"] = strftime("%W", now) + 0 return ret } gawk-4.0.1+dfsg.orig/awklib/eg/lib/ctime.awk0000644000175000017500000000035111734667231017575 0ustar schotschot# ctime.awk # # awk version of C ctime(3) function function ctime(ts, format) { format = "%a %b %e %H:%M:%S %Z %Y" if (ts == 0) ts = systime() # use current time as default return strftime(format, ts) } gawk-4.0.1+dfsg.orig/awklib/eg/lib/zerofile.awk0000644000175000017500000000065011734667231020315 0ustar schotschot# zerofile.awk --- library file to process empty input files # # Arnold Robbins, arnold@skeeve.com, Public Domain # June 2003 BEGIN { Argind = 0 } ARGIND > Argind + 1 { for (Argind++; Argind < ARGIND; Argind++) zerofile(ARGV[Argind], Argind) } ARGIND != Argind { Argind = ARGIND } END { if (ARGIND > Argind) for (Argind++; Argind <= ARGIND; Argind++) zerofile(ARGV[Argind], Argind) } gawk-4.0.1+dfsg.orig/awklib/eg/lib/passwdawk.in0000644000175000017500000000226511734667231020332 0ustar schotschot# passwd.awk --- access password file information # # 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, using_fpat) { if (_pw_inited) return oldfs = FS oldrs = RS olddol0 = $0 using_fw = (PROCINFO["FS"] == "FIELDWIDTHS") using_fpat = (PROCINFO["FS"] == "FPAT") FS = ":" RS = "\n" pwcat = _pw_awklib "pwcat" while ((pwcat | getline) > 0) { _pw_byname[$1] = $0 _pw_byuid[$3] = $0 _pw_bycount[++_pw_total] = $0 } close(pwcat) _pw_count = 0 _pw_inited = 1 FS = oldfs if (using_fw) FIELDWIDTHS = FIELDWIDTHS else if (using_fpat) FPAT = FPAT RS = oldrs $0 = olddol0 } function getpwnam(name) { _pw_init() return _pw_byname[name] } function getpwuid(uid) { _pw_init() return _pw_byuid[uid] } function getpwent() { _pw_init() if (_pw_count < _pw_total) return _pw_bycount[++_pw_count] return "" } function endpwent() { _pw_count = 0 } gawk-4.0.1+dfsg.orig/awklib/eg/lib/bits2str.awk0000644000175000017500000000050711734667231020253 0ustar schotschot# bits2str --- turn a byte into readable 1's and 0's function bits2str(bits, data, mask) { if (bits == 0) return "0" mask = 1 for (; bits != 0; bits = rshift(bits, 1)) data = (and(bits, mask) ? "1" : "0") data while ((length(data) % 8) != 0) data = "0" data return data } gawk-4.0.1+dfsg.orig/awklib/eg/lib/libintl.awk0000644000175000017500000000035611734667231020136 0ustar schotschotfunction bindtextdomain(dir, domain) { return dir } function dcgettext(string, domain, category) { return string } function dcngettext(string1, string2, number, domain, category) { return (number == 1 ? string1 : string2) } gawk-4.0.1+dfsg.orig/awklib/eg/lib/assert.awk0000644000175000017500000000057611734667231020006 0ustar schotschot# assert --- assert that a condition is true. Otherwise exit. # # Arnold Robbins, arnold@skeeve.com, Public Domain # May, 1993 function assert(condition, string) { if (! condition) { printf("%s:%d: assertion failed: %s\n", FILENAME, FNR, string) > "/dev/stderr" _assert_exit = 1 exit 1 } } END { if (_assert_exit) exit 1 } gawk-4.0.1+dfsg.orig/awklib/eg/lib/groupawk.in0000644000175000017500000000340611734667231020163 0ustar schotschot# group.awk --- functions for dealing with the group file # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 # Revised October 2000 # Revised December 2010 BEGIN \ { # Change to suit your system _gr_awklib = "/usr/local/libexec/awk/" } function _gr_init( oldfs, oldrs, olddol0, grcat, using_fw, using_fpat, n, a, i) { if (_gr_inited) return oldfs = FS oldrs = RS olddol0 = $0 using_fw = (PROCINFO["FS"] == "FIELDWIDTHS") using_fpat = (PROCINFO["FS"] == "FPAT") FS = ":" RS = "\n" grcat = _gr_awklib "grcat" while ((grcat | getline) > 0) { if ($1 in _gr_byname) _gr_byname[$1] = _gr_byname[$1] "," $4 else _gr_byname[$1] = $0 if ($3 in _gr_bygid) _gr_bygid[$3] = _gr_bygid[$3] "," $4 else _gr_bygid[$3] = $0 n = split($4, a, "[ \t]*,[ \t]*") for (i = 1; i <= n; i++) if (a[i] in _gr_groupsbyuser) _gr_groupsbyuser[a[i]] = \ _gr_groupsbyuser[a[i]] " " $1 else _gr_groupsbyuser[a[i]] = $1 _gr_bycount[++_gr_count] = $0 } close(grcat) _gr_count = 0 _gr_inited++ FS = oldfs if (using_fw) FIELDWIDTHS = FIELDWIDTHS else if (using_fpat) FPAT = FPAT RS = oldrs $0 = olddol0 } function getgrnam(group) { _gr_init() return _gr_byname[group] } function getgrgid(gid) { _gr_init() return _gr_bygid[gid] } function getgruser(user) { _gr_init() return _gr_groupsbyuser[user] } function getgrent() { _gr_init() if (++_gr_count in _gr_bycount) return _gr_bycount[_gr_count] return "" } function endgrent() { _gr_count = 0 } gawk-4.0.1+dfsg.orig/awklib/eg/lib/cliff_rand.awk0000644000175000017500000000046311734667231020567 0ustar schotschot# cliff_rand.awk --- generate Cliff random numbers # # Arnold Robbins, arnold@skeeve.com, Public Domain # December 2000 BEGIN { _cliff_seed = 0.1 } function cliff_rand() { _cliff_seed = (100 * log(_cliff_seed)) % 1 if (_cliff_seed < 0) _cliff_seed = - _cliff_seed return _cliff_seed } gawk-4.0.1+dfsg.orig/awklib/eg/lib/round.awk0000644000175000017500000000122511734667231017624 0ustar schotschot# round.awk --- do normal rounding # # Arnold Robbins, arnold@skeeve.com, Public Domain # August, 1996 function round(x, ival, aval, fraction) { ival = int(x) # integer part, int() truncates # see if fractional part if (ival == x) # no fraction return ival # ensure no decimals if (x < 0) { aval = -x # absolute value ival = int(aval) fraction = aval - ival if (fraction >= .5) return int(x) - 1 # -2.5 --> -3 else return int(x) # -2.3 --> -2 } else { fraction = x - ival if (fraction >= .5) return ival + 1 else return ival } } gawk-4.0.1+dfsg.orig/awklib/eg/lib/rewind.awk0000644000175000017500000000062411734667231017767 0ustar schotschot# rewind.awk --- rewind the current file and start over # # Arnold Robbins, arnold@skeeve.com, Public Domain # September 2000 function rewind( i) { # shift remaining arguments up for (i = ARGC; i > ARGIND; i--) ARGV[i] = ARGV[i-1] # make sure gawk knows to keep going ARGC++ # make current file next to get done ARGV[ARGIND+1] = FILENAME # do it nextfile } gawk-4.0.1+dfsg.orig/awklib/eg/lib/pwcat.c0000644000175000017500000000144011734667231017252 0ustar schotschot/* * pwcat.c * * Generate a printable version of the password database */ /* * Arnold Robbins, arnold@skeeve.com, May 1993 * Public Domain * December 2010, move to ANSI C definition for main(). */ #if HAVE_CONFIG_H #include #endif #include #include #if defined (STDC_HEADERS) #include #endif int main(int argc, char **argv) { struct passwd *p; while ((p = getpwent()) != NULL) #ifdef ZOS_USS printf("%s:%ld:%ld:%s:%s\n", p->pw_name, (long) p->pw_uid, (long) p->pw_gid, p->pw_dir, p->pw_shell); #else printf("%s:%s:%ld:%ld:%s:%s:%s\n", p->pw_name, p->pw_passwd, (long) p->pw_uid, (long) p->pw_gid, p->pw_gecos, p->pw_dir, p->pw_shell); #endif endpwent(); return 0; } gawk-4.0.1+dfsg.orig/awklib/eg/lib/grcat.c0000644000175000017500000000172511734667231017242 0ustar schotschot/* * grcat.c * * Generate a printable version of the group database */ /* * Arnold Robbins, arnold@skeeve.com, May 1993 * Public Domain * December 2010, move to ANSI C definition for main(). */ /* For OS/2, do nothing. */ #if HAVE_CONFIG_H #include #endif #if defined (STDC_HEADERS) #include #endif #ifndef HAVE_GETGRENT int main() { return 0; } #else #include #include int main(int argc, char **argv) { struct group *g; int i; while ((g = getgrent()) != NULL) { #ifdef ZOS_USS printf("%s:%ld:", g->gr_name, (long) g->gr_gid); #else printf("%s:%s:%ld:", g->gr_name, g->gr_passwd, (long) g->gr_gid); #endif for (i = 0; g->gr_mem[i] != NULL; i++) { printf("%s", g->gr_mem[i]); if (g->gr_mem[i+1] != NULL) putchar(','); } putchar('\n'); } endgrent(); return 0; } #endif /* HAVE_GETGRENT */ gawk-4.0.1+dfsg.orig/awklib/eg/lib/ftrans.awk0000644000175000017500000000047511734667231020000 0ustar schotschot# ftrans.awk --- handle data file transitions # # user supplies beginfile() and endfile() functions # # Arnold Robbins, arnold@skeeve.com, Public Domain # November 1992 FNR == 1 { if (_filename_ != "") endfile(_filename_) _filename_ = FILENAME beginfile(FILENAME) } END { endfile(_filename_) } gawk-4.0.1+dfsg.orig/awklib/eg/lib/ord.awk0000644000175000017500000000165111734667231017264 0ustar schotschot# ord.awk --- do ord and chr # Global identifiers: # _ord_: numerical values indexed by characters # _ord_init: function to initialize _ord_ # # Arnold Robbins, arnold@skeeve.com, Public Domain # 16 January, 1992 # 20 July, 1992, revised BEGIN { _ord_init() } function _ord_init( low, high, i, t) { low = sprintf("%c", 7) # BEL is ascii 7 if (low == "\a") { # regular ascii low = 0 high = 127 } else if (sprintf("%c", 128 + 7) == "\a") { # ascii, mark parity low = 128 high = 255 } else { # ebcdic(!) low = 0 high = 255 } for (i = low; i <= high; i++) { t = sprintf("%c", i) _ord_[t] = i } } function ord(str, c) { # only first character is of interest c = substr(str, 1, 1) return _ord_[c] } function chr(c) { # force c to be numeric by adding 0 return sprintf("%c", c + 0) } gawk-4.0.1+dfsg.orig/awklib/eg/lib/join.awk0000644000175000017500000000057211734667231017440 0ustar schotschot# join.awk --- join an array into a string # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 function join(array, start, end, sep, result, i) { if (sep == "") sep = " " else if (sep == SUBSEP) # magic value sep = "" result = array[start] for (i = start + 1; i <= end; i++) result = result sep array[i] return result } gawk-4.0.1+dfsg.orig/awklib/eg/lib/getopt.awk0000644000175000017500000000427511734667231020007 0ustar schotschot# getopt.awk --- Do C library getopt(3) function in awk # # Arnold Robbins, arnold@skeeve.com, Public Domain # # Initial version: March, 1991 # Revised: May, 1993 # External variables: # Optind -- index in ARGV of first nonoption argument # Optarg -- string value of argument to current option # Opterr -- if nonzero, print our own diagnostic # Optopt -- current option letter # Returns: # -1 at end of options # "?" for unrecognized option # a character representing the current option # Private Data: # _opti -- index in multi-flag option, e.g., -abc function getopt(argc, argv, options, thisopt, i) { if (length(options) == 0) # no options given return -1 if (argv[Optind] == "--") { # all done Optind++ _opti = 0 return -1 } else if (argv[Optind] !~ /^-[^:[:space:]]/) { _opti = 0 return -1 } if (_opti == 0) _opti = 2 thisopt = substr(argv[Optind], _opti, 1) Optopt = thisopt i = index(options, thisopt) if (i == 0) { if (Opterr) printf("%c -- invalid option\n", thisopt) > "/dev/stderr" if (_opti >= length(argv[Optind])) { Optind++ _opti = 0 } else _opti++ return "?" } if (substr(options, i + 1, 1) == ":") { # get option argument if (length(substr(argv[Optind], _opti + 1)) > 0) Optarg = substr(argv[Optind], _opti + 1) else Optarg = argv[++Optind] _opti = 0 } else Optarg = "" if (_opti == 0 || _opti >= length(argv[Optind])) { Optind++ _opti = 0 } else _opti++ return thisopt } BEGIN { Opterr = 1 # default is to diagnose Optind = 1 # skip ARGV[0] # test program if (_getopt_test) { while ((_go_c = getopt(ARGC, ARGV, "ab:cd")) != -1) printf("c = <%c>, optarg = <%s>\n", _go_c, Optarg) printf("non-option arguments:\n") for (; Optind < ARGC; Optind++) printf("\tARGV[%d] = <%s>\n", Optind, ARGV[Optind]) } } gawk-4.0.1+dfsg.orig/awklib/eg/lib/readable.awk0000644000175000017500000000075411734667231020242 0ustar schotschot# readable.awk --- library file to skip over unreadable files # # Arnold Robbins, arnold@skeeve.com, Public Domain # October 2000 # December 2010 BEGIN { for (i = 1; i < ARGC; 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] else close(ARGV[i]) } } gawk-4.0.1+dfsg.orig/awklib/eg/lib/walkarray.awk0000644000175000017500000000032611734667231020473 0ustar schotschotfunction 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]) } } gawk-4.0.1+dfsg.orig/awklib/eg/lib/noassign.awk0000644000175000017500000000065111734667231020320 0ustar schotschot# noassign.awk --- library file to avoid the need for a # special option that disables command-line assignments # # Arnold Robbins, arnold@skeeve.com, Public Domain # October 1999 function disable_assigns(argc, argv, i) { for (i = 1; i < argc; i++) if (argv[i] ~ /^[[:alpha:]_][[:alnum:]_]*=.*/) argv[i] = ("./" argv[i]) } BEGIN { if (No_command_assign) disable_assigns(ARGC, ARGV) } gawk-4.0.1+dfsg.orig/awklib/eg/lib/strtonum.awk0000644000175000017500000000266611734667231020402 0ustar schotschot# mystrtonum --- convert string to number # # Arnold Robbins, arnold@skeeve.com, Public Domain # February, 2004 function mystrtonum(str, ret, chars, n, i, k, c) { if (str ~ /^0[0-7]*$/) { # octal n = length(str) ret = 0 for (i = 1; i <= n; i++) { c = substr(str, i, 1) if ((k = index("01234567", c)) > 0) k-- # adjust for 1-basing in awk ret = ret * 8 + k } } else if (str ~ /^0[xX][[:xdigit:]]+/) { # hexadecimal str = substr(str, 3) # lop off leading 0x n = length(str) ret = 0 for (i = 1; i <= n; i++) { c = substr(str, i, 1) c = tolower(c) if ((k = index("0123456789", c)) > 0) k-- # adjust for 1-basing in awk else if ((k = index("abcdef", c)) > 0) k += 9 ret = ret * 16 + k } } else if (str ~ \ /^[-+]?([0-9]+([.][0-9]*([Ee][0-9]+)?)?|([.][0-9]+([Ee][-+]?[0-9]+)?))$/) { # decimal number, possibly floating point ret = str + 0 } else ret = "NOT-A-NUMBER" return ret } # BEGIN { # gawk test harness # a[1] = "25" # a[2] = ".31" # a[3] = "0123" # a[4] = "0xdeadBEEF" # a[5] = "123.45" # a[6] = "1.e3" # a[7] = "1.32" # a[7] = "1.32E2" # # for (i = 1; i in a; i++) # print a[i], strtonum(a[i]), mystrtonum(a[i]) # } gawk-4.0.1+dfsg.orig/awklib/eg/lib/quicksort.awk0000644000175000017500000000177711734667231020535 0ustar schotschot# 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 } gawk-4.0.1+dfsg.orig/awklib/eg/misc/0000755000175000017500000000000011734667231016156 5ustar schotschotgawk-4.0.1+dfsg.orig/awklib/eg/misc/simple-csv.awk0000644000175000017500000000022311734667231020741 0ustar schotschotBEGIN { FPAT = "([^,]+)|(\"[^\"]+\")" } { print "NF = ", NF for (i = 1; i <= NF; i++) { printf("$%d = <%s>\n", i, $i) } } gawk-4.0.1+dfsg.orig/awklib/eg/misc/addresses.csv0000644000175000017500000000011011734667231020640 0ustar schotschotRobbins,Arnold,"1234 A Pretty Street, NE",MyTown,MyState,12345-6789,USA gawk-4.0.1+dfsg.orig/awklib/eg/misc/arraymax.awk0000644000175000017500000000014711734667231020510 0ustar schotschot{ if ($1 > max) max = $1 arr[$1] = $0 } END { for (x = 1; x <= max; x++) print arr[x] } gawk-4.0.1+dfsg.orig/awklib/eg/misc/findpat.awk0000644000175000017500000000033011734667231020303 0ustar schotschot{ if ($1 == "FIND") regex = $2 else { where = match($0, regex) if (where != 0) print "Match of", regex, "found at", where, "in", $0 } } gawk-4.0.1+dfsg.orig/awklib/eg/misc/arraymax.data0000644000175000017500000000017711734667231020642 0ustar schotschot5 I am the Five man 2 Who are you? The new number two! 4 . . . And four on the floor 1 Who is number one? 3 I three you. gawk-4.0.1+dfsg.orig/awklib/eg/misc/findpat.data0000644000175000017500000000020311734667231020431 0ustar schotschotFIND ru+n My program runs but not very quickly FIND Melvin JF+KM This line is property of Reality Engineering Co. Melvin was here. gawk-4.0.1+dfsg.orig/awklib/eg/prog/0000755000175000017500000000000011734667231016172 5ustar schotschotgawk-4.0.1+dfsg.orig/awklib/eg/prog/tee.awk0000644000175000017500000000141411734667231017453 0ustar schotschot# 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 BEGIN \ { for (i = 1; i < ARGC; i++) copy[i] = ARGV[i] if (ARGV[1] == "-a") { append = 1 delete ARGV[1] delete copy[1] ARGC-- } if (ARGC < 2) { print "usage: tee [-a] file ..." > "/dev/stderr" exit 1 } ARGV[1] = "-" ARGC = 2 } { # moving the if outside the loop makes it run faster if (append) for (i in copy) print >> copy[i] else for (i in copy) print > copy[i] print } END \ { for (i in copy) close(copy[i]) } gawk-4.0.1+dfsg.orig/awklib/eg/prog/igawk.sh0000644000175000017500000000616411734667231017637 0ustar schotschot#! /bin/sh # igawk --- like gawk but do @include processing # # Arnold Robbins, arnold@skeeve.com, Public Domain # July 1993 # December 2010, minor edits if [ "$1" = debug ] then set -x shift fi # A literal newline, so that program text is formatted correctly n=' ' # Initialize variables to empty program= opts= while [ $# -ne 0 ] # loop over arguments do case $1 in --) shift break ;; -W) shift # The ${x?'message here'} construct prints a # diagnostic if $x is the null string set -- -W"${@?'missing operand'}" continue ;; -[vF]) opts="$opts $1 '${2?'missing operand'}'" shift ;; -[vF]*) opts="$opts '$1'" ;; -f) program="$program$n@include ${2?'missing operand'}" shift ;; -f*) f=$(expr "$1" : '-f\(.*\)') program="$program$n@include $f" ;; -[W-]file=*) f=$(expr "$1" : '-.file=\(.*\)') program="$program$n@include $f" ;; -[W-]file) program="$program$n@include ${2?'missing operand'}" shift ;; -[W-]source=*) t=$(expr "$1" : '-.source=\(.*\)') program="$program$n$t" ;; -[W-]source) program="$program$n${2?'missing operand'}" shift ;; -[W-]version) echo igawk: version 3.0 1>&2 gawk --version exit 0 ;; -[W-]*) opts="$opts '$1'" ;; *) break ;; esac shift done if [ -z "$program" ] then program=${1?'missing program'} shift fi # At this point, `program' has the program. expand_prog=' function pathto(file, i, t, junk) { 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) { # found it close(t) return t } } return "" } BEGIN { path = ENVIRON["AWKPATH"] ndirs = split(path, pathlist, ":") for (i = 1; i <= ndirs; i++) { if (pathlist[i] == "") pathlist[i] = "." } stackptr = 0 input[stackptr] = ARGV[1] # ARGV[1] is first file for (; stackptr >= 0; stackptr--) { while ((getline < input[stackptr]) > 0) { if (tolower($1) != "@include") { print continue } fpath = pathto($2) if (fpath == "") { printf("igawk:%s:%d: cannot find %s\n", input[stackptr], FNR, $2) > "/dev/stderr" continue } if (! (fpath in processed)) { processed[fpath] = input[stackptr] input[++stackptr] = fpath # push onto stack } else print $2, "included in", input[stackptr], "already included in", processed[fpath] > "/dev/stderr" } close(input[stackptr]) } }' # close quote ends `expand_prog' variable processed_program=$(gawk -- "$expand_prog" /dev/stdin << EOF $program EOF ) eval gawk $opts -- '"$processed_program"' '"$@"' gawk-4.0.1+dfsg.orig/awklib/eg/prog/wordfreq.awk0000644000175000017500000000053311734667231020530 0ustar schotschot# wordfreq.awk --- print list of word frequencies { $0 = tolower($0) # remove case distinctions # remove punctuation gsub(/[^[:alnum:]_[:blank:]]/, "", $0) for (i = 1; i <= NF; i++) freq[$i]++ } END { sort = "sort -k 2nr" for (word in freq) printf "%s\t%d\n", word, freq[word] | sort close(sort) } gawk-4.0.1+dfsg.orig/awklib/eg/prog/alarm.awk0000644000175000017500000000447711734667231020006 0ustar schotschot# alarm.awk --- set an alarm # # Requires gettimeofday() library function # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 # Revised December 2010 # usage: alarm time [ "message" [ count [ delay ] ] ] BEGIN \ { # Initial argument sanity checking usage1 = "usage: alarm time ['message' [count [delay]]]" usage2 = sprintf("\t(%s) time ::= hh:mm", ARGV[1]) if (ARGC < 2) { print usage1 > "/dev/stderr" print usage2 > "/dev/stderr" exit 1 } switch (ARGC) { case 5: delay = ARGV[4] + 0 # fall through case 4: count = ARGV[3] + 0 # fall through case 3: message = ARGV[2] 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 if (delay == 0) delay = 180 # 3 minutes if (count == 0) count = 5 if (message == "") message = sprintf("\aIt is now %s!\a", ARGV[1]) else if (index(message, "\a") == 0) message = "\a" message "\a" # split up alarm time split(ARGV[1], atime, ":") hour = atime[1] + 0 # force numeric minute = atime[2] + 0 # force numeric # get current broken down time gettimeofday(now) # if time given is 12-hour hours and it's after that # hour, e.g., `alarm 5:30' at 9 a.m. means 5:30 p.m., # then add 12 to real hour if (hour < 12 && now["hour"] > hour) hour += 12 # set target time in seconds since midnight target = (hour * 60 * 60) + (minute * 60) # get current time in seconds since midnight current = (now["hour"] * 60 * 60) + \ (now["minute"] * 60) + now["second"] # how long to sleep for naptime = target - current if (naptime <= 0) { print "time is in the past!" > "/dev/stderr" exit 1 } # zzzzzz..... go away if interrupted if (system(sprintf("sleep %d", naptime)) != 0) exit 1 # time to notify! command = sprintf("sleep %d", delay) for (i = 1; i <= count; i++) { print message # if sleep command interrupted, go away if (system(command) != 0) break } exit 0 } gawk-4.0.1+dfsg.orig/awklib/eg/prog/histsort.awk0000644000175000017500000000043311734667231020555 0ustar schotschot# histsort.awk --- compact a shell history file # Thanks to Byron Rakitzis for the general idea # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 { if (data[$0]++ == 0) lines[++count] = $0 } END { for (i = 1; i <= count; i++) print lines[i] } gawk-4.0.1+dfsg.orig/awklib/eg/prog/dupword.awk0000644000175000017500000000077311734667231020371 0ustar schotschot# dupword.awk --- find duplicate words in text # # Arnold Robbins, arnold@skeeve.com, Public Domain # December 1991 # Revised October 2000 { $0 = tolower($0) gsub(/[^[:alnum:][:blank:]]/, " "); $0 = $0 # re-split if (NF == 0) next if ($1 == prev) printf("%s:%d: duplicate %s\n", FILENAME, FNR, $1) for (i = 2; i <= NF; i++) if ($i == $(i-1)) printf("%s:%d: duplicate %s\n", FILENAME, FNR, $i) prev = $NF } gawk-4.0.1+dfsg.orig/awklib/eg/prog/indirectcall.awk0000644000175000017500000000167411734667231021343 0ustar schotschot# 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)) } # 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") } gawk-4.0.1+dfsg.orig/awklib/eg/prog/guide.awk0000644000175000017500000000024511734667231017774 0ustar schotschotBEGIN { TEXTDOMAIN = "guide" bindtextdomain(".") # for testing print _"Don't Panic" print _"The Answer Is", 42 print "Pardon me, Zaphod who?" } gawk-4.0.1+dfsg.orig/awklib/eg/prog/extract.awk0000644000175000017500000000332411734667231020352 0ustar schotschot# extract.awk --- extract files and run programs # from texinfo files # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 # Revised September 2000 BEGIN { IGNORECASE = 1 } /^@c(omment)?[ \t]+system/ \ { if (NF < 3) { e = (FILENAME ":" FNR) e = (e ": badly formed `system' line") print e > "/dev/stderr" next } $1 = "" $2 = "" stat = system($0) if (stat != 0) { e = (FILENAME ":" FNR) e = (e ": warning: system returned " stat) print e > "/dev/stderr" } } /^@c(omment)?[ \t]+file/ \ { if (NF != 3) { e = (FILENAME ":" FNR ": badly formed `file' line") print e > "/dev/stderr" next } if ($3 != curfile) { if (curfile != "") close(curfile) curfile = $3 } for (;;) { if ((getline line) <= 0) unexpected_eof() if (line ~ /^@c(omment)?[ \t]+endfile/) break else if (line ~ /^@(end[ \t]+)?group/) continue else if (line ~ /^@c(omment+)?[ \t]+/) continue if (index(line, "@") == 0) { print line > curfile continue } n = split(line, a, "@") # if a[1] == "", means leading @, # don't add one back in. for (i = 2; i <= n; i++) { if (a[i] == "") { # was an @@ a[i] = "@" if (a[i+1] == "") i++ } } print join(a, 1, n, SUBSEP) > curfile } } function unexpected_eof() { printf("%s:%d: unexpected EOF or error\n", FILENAME, FNR) > "/dev/stderr" exit 1 } END { if (curfile) close(curfile) } gawk-4.0.1+dfsg.orig/awklib/eg/prog/wc.awk0000644000175000017500000000271011734667231017307 0ustar schotschot# wc.awk --- count lines, words, characters # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 # Options: # -l only count lines # -w only count words # -c only count characters # # Default is to count lines, words, characters # # Requires getopt() and file transition library functions BEGIN { # let getopt() print a message about # invalid options. we ignore them while ((c = getopt(ARGC, ARGV, "lwc")) != -1) { if (c == "l") do_lines = 1 else if (c == "w") do_words = 1 else if (c == "c") do_chars = 1 } for (i = 1; i < Optind; i++) ARGV[i] = "" # if no options, do all if (! do_lines && ! do_words && ! do_chars) do_lines = do_words = do_chars = 1 print_total = (ARGC - i > 2) } function beginfile(file) { lines = words = chars = 0 fname = FILENAME } function endfile(file) { tlines += lines twords += words tchars += chars if (do_lines) printf "\t%d", lines if (do_words) printf "\t%d", words if (do_chars) printf "\t%d", chars printf "\t%s\n", fname } # do per line { chars += length($0) + 1 # get newline lines++ words += NF } END { if (print_total) { if (do_lines) printf "\t%d", tlines if (do_words) printf "\t%d", twords if (do_chars) printf "\t%d", tchars print "\ttotal" } } gawk-4.0.1+dfsg.orig/awklib/eg/prog/uniq.awk0000644000175000017500000000523411734667231017656 0ustar schotschot# uniq.awk --- do uniq in awk # # Requires getopt() and join() library functions # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 function usage( e) { e = "Usage: uniq [-udc [-n]] [+n] [ in [ out ]]" print e > "/dev/stderr" exit 1 } # -c count lines. overrides -d and -u # -d only repeated lines # -u only nonrepeated lines # -n skip n fields # +n skip n characters, skip fields first BEGIN \ { count = 1 outputfile = "/dev/stdout" opts = "udc0:1:2:3:4:5:6:7:8:9:" while ((c = getopt(ARGC, ARGV, opts)) != -1) { if (c == "u") non_repeated_only++ else if (c == "d") repeated_only++ else if (c == "c") do_count++ else if (index("0123456789", c) != 0) { # getopt requires args to options # this messes us up for things like -5 if (Optarg ~ /^[[:digit:]]+$/) fcount = (c Optarg) + 0 else { fcount = c + 0 Optind-- } } else usage() } if (ARGV[Optind] ~ /^\+[[:digit:]]+$/) { charcount = substr(ARGV[Optind], 2) + 0 Optind++ } for (i = 1; i < Optind; i++) ARGV[i] = "" if (repeated_only == 0 && non_repeated_only == 0) repeated_only = non_repeated_only = 1 if (ARGC - Optind == 2) { outputfile = ARGV[ARGC - 1] ARGV[ARGC - 1] = "" } } function are_equal( n, m, clast, cline, alast, aline) { if (fcount == 0 && charcount == 0) return (last == $0) if (fcount > 0) { n = split(last, alast) m = split($0, aline) clast = join(alast, fcount+1, n) cline = join(aline, fcount+1, m) } else { clast = last cline = $0 } if (charcount) { clast = substr(clast, charcount + 1) cline = substr(cline, charcount + 1) } return (clast == cline) } NR == 1 { last = $0 next } { equal = are_equal() if (do_count) { # overrides -d and -u if (equal) count++ else { printf("%4d %s\n", count, last) > outputfile last = $0 count = 1 # reset } next } if (equal) count++ else { if ((repeated_only && count > 1) || (non_repeated_only && count == 1)) print last > outputfile last = $0 count = 1 } } END { if (do_count) printf("%4d %s\n", count, last) > outputfile else if ((repeated_only && count > 1) || (non_repeated_only && count == 1)) print last > outputfile close(outputfile) } gawk-4.0.1+dfsg.orig/awklib/eg/prog/id.awk0000644000175000017500000000260711734667231017277 0ustar schotschot# id.awk --- implement id in awk # # Requires user and group library functions # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 # Revised February 1996 # output is: # uid=12(foo) euid=34(bar) gid=3(baz) \ # egid=5(blat) groups=9(nine),2(two),1(one) BEGIN \ { uid = PROCINFO["uid"] euid = PROCINFO["euid"] gid = PROCINFO["gid"] egid = PROCINFO["egid"] printf("uid=%d", uid) pw = getpwuid(uid) if (pw != "") { split(pw, a, ":") printf("(%s)", a[1]) } if (euid != uid) { printf(" euid=%d", euid) pw = getpwuid(euid) if (pw != "") { split(pw, a, ":") printf("(%s)", a[1]) } } printf(" gid=%d", gid) pw = getgrgid(gid) if (pw != "") { split(pw, a, ":") printf("(%s)", a[1]) } if (egid != gid) { printf(" egid=%d", egid) pw = getgrgid(egid) if (pw != "") { split(pw, a, ":") printf("(%s)", a[1]) } } for (i = 1; ("group" i) in PROCINFO; i++) { if (i == 1) printf(" groups=") group = PROCINFO["group" i] printf("%d", group) pw = getgrgid(group) if (pw != "") { split(pw, a, ":") printf("(%s)", a[1]) } if (("group" (i+1)) in PROCINFO) printf(",") } print "" } gawk-4.0.1+dfsg.orig/awklib/eg/prog/cut.awk0000644000175000017500000000717311734667231017501 0ustar schotschot# cut.awk --- implement cut in awk # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 # Options: # -f list Cut fields # -d c Field delimiter character # -c list Cut characters # # -s Suppress lines without the delimiter # # Requires getopt() and join() library functions function usage( e1, e2) { e1 = "usage: cut [-f list] [-d c] [-s] [files...]" e2 = "usage: cut [-c list] [files...]" print e1 > "/dev/stderr" print e2 > "/dev/stderr" exit 1 } BEGIN \ { FS = "\t" # default OFS = FS while ((c = getopt(ARGC, ARGV, "sf:c:d:")) != -1) { if (c == "f") { by_fields = 1 fieldlist = Optarg } else if (c == "c") { by_chars = 1 fieldlist = Optarg OFS = "" } else if (c == "d") { if (length(Optarg) > 1) { printf("Using first character of %s" \ " for delimiter\n", Optarg) > "/dev/stderr" Optarg = substr(Optarg, 1, 1) } FS = Optarg OFS = FS if (FS == " ") # defeat awk semantics FS = "[ ]" } else if (c == "s") suppress++ else usage() } # Clear out options for (i = 1; i < Optind; i++) ARGV[i] = "" if (by_fields && by_chars) usage() if (by_fields == 0 && by_chars == 0) by_fields = 1 # default if (fieldlist == "") { print "cut: needs list for -c or -f" > "/dev/stderr" exit 1 } if (by_fields) set_fieldlist() else set_charlist() } function set_fieldlist( n, m, i, j, k, f, g) { n = split(fieldlist, f, ",") j = 1 # index in flist for (i = 1; i <= n; i++) { if (index(f[i], "-") != 0) { # a range m = split(f[i], g, "-") if (m != 2 || g[1] >= g[2]) { printf("bad field list: %s\n", f[i]) > "/dev/stderr" exit 1 } for (k = g[1]; k <= g[2]; k++) flist[j++] = k } else flist[j++] = f[i] } nfields = j - 1 } function set_charlist( field, i, j, f, g, t, filler, last, len) { field = 1 # count total fields n = split(fieldlist, f, ",") j = 1 # index in flist for (i = 1; i <= n; i++) { if (index(f[i], "-") != 0) { # range m = split(f[i], g, "-") if (m != 2 || g[1] >= g[2]) { printf("bad character list: %s\n", f[i]) > "/dev/stderr" exit 1 } len = g[2] - g[1] + 1 if (g[1] > 1) # compute length of filler filler = g[1] - last - 1 else filler = 0 if (filler) t[field++] = filler t[field++] = len # length of field last = g[2] flist[j++] = field - 1 } else { if (f[i] > 1) filler = f[i] - last - 1 else filler = 0 if (filler) t[field++] = filler t[field++] = 1 last = f[i] flist[j++] = field - 1 } } FIELDWIDTHS = join(t, 1, field - 1) nfields = j - 1 } { if (by_fields && suppress && index($0, FS) != 0) next for (i = 1; i <= nfields; i++) { if ($flist[i] != "") { printf "%s", $flist[i] if (i < nfields && $flist[i+1] != "") printf "%s", OFS } } print "" } gawk-4.0.1+dfsg.orig/awklib/eg/prog/egrep.awk0000644000175000017500000000367411734667231020012 0ustar schotschot# egrep.awk --- simulate egrep in awk # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 # Options: # -c count of lines # -s silent - use exit value # -v invert test, success if no match # -i ignore case # -l print filenames only # -e argument is pattern # # Requires getopt and file transition library functions BEGIN { while ((c = getopt(ARGC, ARGV, "ce:svil")) != -1) { if (c == "c") count_only++ else if (c == "s") no_print++ else if (c == "v") invert++ else if (c == "i") IGNORECASE = 1 else if (c == "l") filenames_only++ else if (c == "e") pattern = Optarg else usage() } if (pattern == "") pattern = ARGV[Optind++] for (i = 1; i < Optind; i++) ARGV[i] = "" if (Optind >= ARGC) { ARGV[1] = "-" ARGC = 2 } else if (ARGC - Optind > 1) do_filenames++ # if (IGNORECASE) # pattern = tolower(pattern) } #{ # if (IGNORECASE) # $0 = tolower($0) #} function beginfile(junk) { fcount = 0 } function endfile(file) { if (! no_print && count_only) { if (do_filenames) print file ":" fcount else print fcount } total += fcount } { matches = ($0 ~ pattern) if (invert) matches = ! matches fcount += matches # 1 or 0 if (! matches) next if (! count_only) { if (no_print) nextfile if (filenames_only) { print FILENAME nextfile } if (do_filenames) print FILENAME ":" $0 else print } } END \ { if (total == 0) exit 1 exit 0 } function usage( e) { e = "Usage: egrep [-csvil] [-e pat] [files ...]" e = e "\n\tegrep [-csvil] pat [files ...]" print e > "/dev/stderr" exit 1 } gawk-4.0.1+dfsg.orig/awklib/eg/prog/labels.awk0000644000175000017500000000177311734667231020150 0ustar schotschot# labels.awk --- print mailing labels # # 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 # the bottom. BEGIN { RS = "" ; MAXLINES = 100 } function printpage( i, j) { if (Nlines <= 0) return printf "\n\n" # header for (i = 1; i <= Nlines; i += 10) { if (i == 21 || i == 61) print "" for (j = 0; j < 5; j++) { if (i + j > MAXLINES) break printf " %-41s %s\n", line[i+j], line[i+j+5] } print "" } printf "\n\n" # footer delete line } # main rule { if (Count >= 20) { printpage() Count = 0 Nlines = 0 } n = split($0, a, "\n") for (i = 1; i <= n; i++) line[++Nlines] = a[i] for (; i <= 5; i++) line[++Nlines] = "" Count++ } END \ { printpage() } gawk-4.0.1+dfsg.orig/awklib/eg/prog/translate.awk0000644000175000017500000000223711734667231020677 0ustar schotschot# translate.awk --- do tr-like stuff # # Arnold Robbins, arnold@skeeve.com, Public Domain # August 1989 # February 2009 - bug fix # Bugs: does not handle things like: tr A-Z a-z, it has # to be spelled out. However, if `to' is shorter than `from', # the last character in `to' is used for the rest of `from'. function stranslate(from, to, target, lf, lt, ltarget, t_ar, i, c, result) { lf = length(from) lt = length(to) ltarget = length(target) for (i = 1; i <= lt; i++) t_ar[substr(from, i, 1)] = substr(to, i, 1) if (lt < lf) for (; i <= lf; i++) t_ar[substr(from, i, 1)] = substr(to, lt, 1) for (i = 1; i <= ltarget; i++) { c = substr(target, i, 1) if (c in t_ar) c = t_ar[c] result = result c } return result } function translate(from, to) { return $0 = stranslate(from, to, $0) } # main program BEGIN { if (ARGC < 3) { print "usage: translate from to" > "/dev/stderr" exit } FROM = ARGV[1] TO = ARGV[2] ARGC = 2 ARGV[1] = "-" } { translate(FROM, TO) print } gawk-4.0.1+dfsg.orig/awklib/eg/prog/testbits.awk0000644000175000017500000000133111734667231020535 0ustar schotschot# bits2str --- turn a byte into readable 1's and 0's function bits2str(bits, data, mask) { if (bits == 0) return "0" mask = 1 for (; bits != 0; bits = rshift(bits, 1)) data = (and(bits, mask) ? "1" : "0") data while ((length(data) % 8) != 0) data = "0" data return data } BEGIN { printf "123 = %s\n", bits2str(123) printf "0123 = %s\n", bits2str(0123) printf "0x99 = %s\n", bits2str(0x99) comp = compl(0x99) printf "compl(0x99) = %#x = %s\n", comp, bits2str(comp) shift = lshift(0x99, 2) printf "lshift(0x99, 2) = %#x = %s\n", shift, bits2str(shift) shift = rshift(0x99, 2) printf "rshift(0x99, 2) = %#x = %s\n", shift, bits2str(shift) } gawk-4.0.1+dfsg.orig/awklib/eg/prog/split.awk0000644000175000017500000000222111734667231020026 0ustar schotschot# split.awk --- do split in awk # # Requires ord() and chr() library functions # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 # usage: split [-num] [file] [outname] BEGIN { outfile = "x" # default count = 1000 if (ARGC > 4) usage() i = 1 if (ARGV[i] ~ /^-[[:digit:]]+$/) { count = -ARGV[i] ARGV[i] = "" i++ } # test argv in case reading from stdin instead of file if (i in ARGV) i++ # skip data file name if (i in ARGV) { outfile = ARGV[i] ARGV[i] = "" } s1 = s2 = "a" out = (outfile s1 s2) } { if (++tcount > count) { close(out) if (s2 == "z") { if (s1 == "z") { printf("split: %s is too large to split\n", FILENAME) > "/dev/stderr" exit 1 } s1 = chr(ord(s1) + 1) s2 = "a" } else s2 = chr(ord(s2) + 1) out = (outfile s1 s2) tcount = 1 } print > out } function usage( e) { e = "usage: split [-num] [file] [outname]" print e > "/dev/stderr" exit 1 } gawk-4.0.1+dfsg.orig/awklib/eg/prog/awksed.awk0000644000175000017500000000100311734667231020146 0ustar schotschot# awksed.awk --- do s/foo/bar/g using just print # Thanks to Michael Brennan for the idea # # Arnold Robbins, arnold@skeeve.com, Public Domain # August 1995 function usage() { print "usage: awksed pat repl [files...]" > "/dev/stderr" exit 1 } BEGIN { # validate arguments if (ARGC < 3) usage() RS = ARGV[1] ORS = ARGV[2] # don't use arguments as files ARGV[1] = ARGV[2] = "" } # look ma, no hands! { if (RT == "") printf "%s", $0 else print } gawk-4.0.1+dfsg.orig/awklib/eg/prog/anagram.awk0000644000175000017500000000251411734667231020306 0ustar schotschot# 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) } gawk-4.0.1+dfsg.orig/awklib/ChangeLog.00000644000175000017500000001262411734141552016536 0ustar schotschotMon 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. gawk-4.0.1+dfsg.orig/awklib/Makefile.in0000644000175000017500000005163211734667212016703 0ustar schotschot# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # awklib/Makefile.am --- automake input file for gawk # # Copyright (C) 1995-2006 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 # VPATH = @srcdir@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ pkglibexec_PROGRAMS = pwcat$(EXEEXT) grcat$(EXEEXT) subdir = awklib DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog 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/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) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(bindir)" PROGRAMS = $(pkglibexec_PROGRAMS) nodist_grcat_OBJECTS = grcat.$(OBJEXT) grcat_OBJECTS = $(nodist_grcat_OBJECTS) grcat_LDADD = $(LDADD) nodist_pwcat_OBJECTS = pwcat.$(OBJEXT) pwcat_OBJECTS = $(nodist_pwcat_OBJECTS) pwcat_LDADD = $(LDADD) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(nodist_grcat_SOURCES) $(nodist_pwcat_SOURCES) DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkgdatadir = $(datadir)/awk pkglibexecdir = $(libexecdir)/awk ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBSIGSEGV = @LIBSIGSEGV@ LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LTLIBSIGSEGV = @LTLIBSIGSEGV@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ 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 $(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) bin_SCRIPTS = igawk AUXAWK = passwd.awk group.awk nodist_grcat_SOURCES = grcat.c nodist_pwcat_SOURCES = pwcat.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu awklib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu awklib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pkglibexecPROGRAMS: $(pkglibexec_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(pkglibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibexecdir)" @list='$(pkglibexec_PROGRAMS)'; test -n "$(pkglibexecdir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibexecdir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibexecdir)$$dir" || exit $$?; \ } \ ; done uninstall-pkglibexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(pkglibexec_PROGRAMS)'; test -n "$(pkglibexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkglibexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkglibexecdir)" && rm -f $$files clean-pkglibexecPROGRAMS: -test -z "$(pkglibexec_PROGRAMS)" || rm -f $(pkglibexec_PROGRAMS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grcat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwcat.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local clean-pkglibexecPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-pkglibexecPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-local \ uninstall-pkglibexecPROGRAMS .MAKE: install-am install-exec-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-local clean-pkglibexecPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-exec-hook \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am \ install-pkglibexecPROGRAMS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binSCRIPTS \ uninstall-local uninstall-pkglibexecPROGRAMS all: $(srcdir)/stamp-eg $(AUXPROGS) igawk $(AUXAWK) install-exec-hook: $(AUXAWK) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) for i in $(AUXAWK) $(srcdir)/eg/lib/*.awk ; do \ progname=`echo $$i | sed 's;.*/;;'` ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(pkgdatadir)/$$progname ; \ done # pkglibexecdir and pkgdatadir are removed in the top level Makefile's uninstall uninstall-local: rm -fr $(DESTDIR)$(pkglibexecdir)/* $(DESTDIR)$(pkgdatadir)/* rm -f $(DESTDIR)$(bindir)/igawk clean-local: rm -f $(AUXAWK) igawk *.exe rm -fr eg.old $(srcdir)/stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi cd $(srcdir) && \ 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 $(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; @: pwcat$(EXEEXT): $(srcdir)/eg/lib/pwcat.c $(COMPILE) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@ grcat$(EXEEXT): $(srcdir)/eg/lib/grcat.c $(COMPILE) $(srcdir)/eg/lib/grcat.c $(LDFLAGS) -o $@ igawk: $(srcdir)/eg/prog/igawk.sh cp $(srcdir)/eg/prog/igawk.sh $@ ; chmod 755 $@ passwd.awk: $(srcdir)/eg/lib/passwdawk.in sed 's;/usr/local/libexec/awk;$(pkglibexecdir);' < $(srcdir)/eg/lib/passwdawk.in > passwd.awk group.awk: $(srcdir)/eg/lib/groupawk.in sed 's;/usr/local/libexec/awk;$(pkglibexecdir);' < $(srcdir)/eg/lib/groupawk.in > group.awk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gawk-4.0.1+dfsg.orig/regex.c0000644000175000017500000000574511734665352014652 0ustar schotschot/* Extended regular expression matching and search library. Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* Make sure noone compiles this code with a C++ compiler. */ #ifdef __cplusplus # error "This is C code, use a C compiler" #endif #ifdef _LIBC /* We have to keep the namespace clean. */ # define regfree(preg) __regfree (preg) # define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) # define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) # define regerror(errcode, preg, errbuf, errbuf_size) \ __regerror(errcode, preg, errbuf, errbuf_size) # define re_set_registers(bu, re, nu, st, en) \ __re_set_registers (bu, re, nu, st, en) # define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) # define re_match(bufp, string, size, pos, regs) \ __re_match (bufp, string, size, pos, regs) # define re_search(bufp, string, size, startpos, range, regs) \ __re_search (bufp, string, size, startpos, range, regs) # define re_compile_pattern(pattern, length, bufp) \ __re_compile_pattern (pattern, length, bufp) # define re_set_syntax(syntax) __re_set_syntax (syntax) # define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \ __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop) # define re_compile_fastmap(bufp) __re_compile_fastmap (bufp) # include "../locale/localeinfo.h" #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. */ #include #ifdef GAWK #undef alloca #define alloca alloca_is_bad_you_should_never_use_it #endif #include #include "regex_internal.h" #include "regex_internal.c" #ifdef GAWK #define bool int #define true (1) #define false (0) #endif #include "regcomp.c" #include "regexec.c" /* Binary backward compatibility. */ #if _LIBC # include # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3) link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.") int re_max_failures = 2000; # endif #endif gawk-4.0.1+dfsg.orig/getopt.c0000644000175000017500000010261011734665352015027 0ustar schotschot/* Getopt for GNU. 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,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO # define _NO_PROTO #endif #ifdef HAVE_CONFIG_H # include #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 # include # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION # define ELIDE_CODE # endif #endif /* !@#$%^&*() !!!!!!!! */ #ifdef GAWK #undef ELIDE_CODE #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #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. */ #include #ifdef VMS # include #endif #ifdef _LIBC # include #else # include "gettext.h" # define _(msgid) gettext (msgid) #endif #if defined _LIBC # include #endif #ifndef attribute_hidden # define attribute_hidden #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" #include "getopt_int.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Keep a global copy of all internal members of getopt_data. */ static struct _getopt_data getopt_data; #ifndef __GNU_LIBRARY__ /* Avoid depending on library functions or files whose names are inconsistent. */ #ifndef getenv extern char *getenv (); #endif #endif /* not __GNU_LIBRARY__ */ #ifdef _LIBC /* Stored original parameters. XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ extern int __libc_argc; extern char **__libc_argv; /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ # ifdef USE_NONOPTION_FLAGS /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; # endif # ifdef USE_NONOPTION_FLAGS # define SWAP_FLAGS(ch1, ch2) \ if (d->__nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } # else # define SWAP_FLAGS(ch1, ch2) # endif #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ static void exchange (char **argv, struct _getopt_data *d) { int bottom = d->__first_nonopt; int middle = d->__last_nonopt; int top = d->optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, d->__nonoption_flags_max_len), '\0', top + 1 - d->__nonoption_flags_max_len); d->__nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ d->__first_nonopt += (d->optind - d->__last_nonopt); d->__last_nonopt = d->optind; } /* Initialize the internal data when the first call is made. */ static const char * _getopt_initialize (int argc, char *const *argv, const char *optstring, struct _getopt_data *d, int posixly_correct) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ d->__first_nonopt = d->__last_nonopt = d->optind; d->__nextchar = NULL; d->__posixly_correct = posixly_correct | !!getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { d->__ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { d->__ordering = REQUIRE_ORDER; ++optstring; } else if (d->__posixly_correct) d->__ordering = REQUIRE_ORDER; else d->__ordering = PERMUTE; #if defined _LIBC && defined USE_NONOPTION_FLAGS if (!d->__posixly_correct && argc == __libc_argc && argv == __libc_argv) { if (d->__nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') d->__nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = d->__nonoption_flags_max_len = strlen (orig_str); if (d->__nonoption_flags_max_len < argc) d->__nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (d->__nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) d->__nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', d->__nonoption_flags_max_len - len); } } d->__nonoption_flags_len = d->__nonoption_flags_max_len; } else d->__nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal_r (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longind, int long_only, struct _getopt_data *d, int posixly_correct) { int print_errors = d->opterr; if (argc < 1) return -1; d->optarg = NULL; if (d->optind == 0 || !d->__initialized) { if (d->optind == 0) d->optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring, d, posixly_correct); d->__initialized = 1; } else if (optstring[0] == '-' || optstring[0] == '+') optstring++; if (optstring[0] == ':') print_errors = 0; /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ || (d->optind < d->__nonoption_flags_len \ && __getopt_nonoption_flags[d->optind] == '1')) #else # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') #endif if (d->__nextchar == NULL || *d->__nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (d->__last_nonopt > d->optind) d->__last_nonopt = d->optind; if (d->__first_nonopt > d->optind) d->__first_nonopt = d->optind; if (d->__ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__last_nonopt != d->optind) d->__first_nonopt = d->optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (d->optind < argc && NONOPTION_P) d->optind++; d->__last_nonopt = d->optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (d->optind != argc && !strcmp (argv[d->optind], "--")) { d->optind++; if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__first_nonopt == d->__last_nonopt) d->__first_nonopt = d->optind; d->__last_nonopt = argc; d->optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (d->optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (d->__first_nonopt != d->__last_nonopt) d->optind = d->__first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (d->__ordering == REQUIRE_ORDER) return -1; d->optarg = argv[d->optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ d->__nextchar = (argv[d->optind] + 1 + (longopts != NULL && argv[d->optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[d->optind][1] == '-' || (long_only && (argv[d->optind][2] || !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 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, namelen)) { if (namelen == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) { /* Second or later nonexact match found. */ struct option_list *newp = malloc (sizeof (*newp)); newp->p = p; newp->needs_free = 1; newp->next = ambig_list; ambig_list = newp; } } if (ambig_list != NULL && !exact) { if (print_errors) { 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 (__builtin_expect (fclose (fp) != EOF, 1)) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } } #else 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); d->optind++; d->optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; d->optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC char *buf; int n; #endif if (argv[d->optind - 1][1] == '-') { /* --option */ #if defined _LIBC n = __asprintf (&buf, _("\ %s: option '--%s' doesn't allow an argument\n"), argv[0], pfound->name); #else fprintf (stderr, _("\ %s: option '--%s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } else { /* +option or -option */ #if defined _LIBC n = __asprintf (&buf, _("\ %s: option '%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #else fprintf (stderr, _("\ %s: option '%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #endif } #if defined _LIBC if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC char *buf; if (__asprintf (&buf, _("\ %s: option '--%s' requires an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '--%s' requires an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[d->optind][1] == '-' || strchr (optstring, *d->__nextchar) == NULL) { if (print_errors) { #if defined _LIBC char *buf; int n; #endif if (argv[d->optind][1] == '-') { /* --option */ #if defined _LIBC n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), argv[0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option '--%s'\n"), argv[0], d->__nextchar); #endif } else { /* +option or -option */ #if defined _LIBC n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #endif } #if defined _LIBC if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar = (char *) ""; d->optind++; d->optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *d->__nextchar++; char *temp = strchr (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*d->__nextchar == '\0') ++d->optind; if (temp == NULL || c == ':' || c == ';') { if (print_errors) { #if defined _LIBC char *buf; int n; #endif #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 if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; if (longopts == NULL) goto no_longs; /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { #if defined _LIBC char *buf; if (__asprintf (&buf, _("%s: option requires an argument -- '%c'\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- '%c'\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `d->optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* 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 ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) { #if defined _LIBC char *buf; if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), argv[0], d->optarg) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), argv[0], d->optarg); #endif } d->__nextchar += strlen (d->__nextchar); d->optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC char *buf; if (__asprintf (&buf, _("\ %s: option '-W %s' doesn't allow an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("\ %s: option '-W %s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC char *buf; if (__asprintf (&buf, _("\ %s: option '-W %s' requires an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("\ %s: option '-W %s' requires an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); return optstring[0] == ':' ? ':' : '?'; } } else d->optarg = NULL; d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } no_longs: d->__nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; d->optind++; } else d->optarg = NULL; d->__nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { #if defined _LIBC char *buf; if (__asprintf (&buf, _("\ %s: option requires an argument -- '%c'\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- '%c'\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; d->__nextchar = NULL; } } return c; } } int _getopt_internal (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct) { int result; getopt_data.optind = optind; getopt_data.opterr = opterr; result = _getopt_internal_r (argc, argv, optstring, longopts, longind, long_only, &getopt_data, posixly_correct); optind = getopt_data.optind; optarg = getopt_data.optarg; optopt = getopt_data.optopt; return result; } int getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0, 0); } #ifdef _LIBC int __posix_getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0, 1); } #endif #endif /* Not ELIDE_CODE. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value '%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ gawk-4.0.1+dfsg.orig/AUTHORS0000644000175000017500000000075711463242060014424 0ustar schotschot Copyright (C) 2006, 2007 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. Gawk was written by Paul Rubin, and finished by Paul Finlason and Richard Stallman. David Trueman and Arnold Robbins took it over, with David doing most of the work to make it compatible with new awk. Circa 1994, Arnold Robbins took over maintenance. gawk-4.0.1+dfsg.orig/ABOUT-NLS0000644000175000017500000026713311504446322014611 0ustar schotschot1 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. 1.1 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. 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. Installers may use special options at configuration time for changing the default behaviour. The command: ./configure --disable-nls 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' 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 translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.2 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. If you happen to have the `LC_ALL' or some other `LC_xxx' environment variables set, you should unset them before setting `LANG', otherwise the setting of `LANG' will not have the desired effect. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. 1.3 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `coordinator@translationproject.org' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.4 Available Packages ====================== Languages are not equally supported in all packages. The following 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 an ar as ast az be be@latin bg bn_IN bs ca +--------------------------------------------------+ 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 | [] [] | +--------------------------------------------------+ 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 sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW +---------------------------------------------------+ 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-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 +---------------------------------------------------+ 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 used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. 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.5 Using `gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `coordinator@translationproject.org' to make the `.pot' files available to the translation teams. gawk-4.0.1+dfsg.orig/m4/0000755000175000017500000000000011734667074013704 5ustar schotschotgawk-4.0.1+dfsg.orig/m4/ChangeLog0000644000175000017500000000044311734667074015457 0ustar schotschot2012-03-28 Arnold D. Robbins * 4.0.1: Release tar ball made. 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. gawk-4.0.1+dfsg.orig/m4/glibc2.m40000644000175000017500000000135411463242060015272 0ustar schotschot# glibc2.m4 serial 1 dnl Copyright (C) 2000-2002, 2004 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. # Test for the GNU C Library, version 2.0 or newer. # From Bruno Haible. AC_DEFUN([gt_GLIBC2], [ AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer, ac_cv_gnu_library_2, [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ >= 2) Lucky GNU user #endif #endif ], ac_cv_gnu_library_2=yes, ac_cv_gnu_library_2=no) ] ) AC_SUBST(GLIBC2) GLIBC2="$ac_cv_gnu_library_2" ] ) gawk-4.0.1+dfsg.orig/m4/longlong.m40000644000175000017500000000327411463242060015752 0ustar schotschot# longlong.m4 serial 8 dnl Copyright (C) 1999-2006 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 Paul Eggert. # Define HAVE_LONG_LONG_INT if 'long long int' works. # This fixes a bug in Autoconf 2.60, but can be removed once we # assume 2.61 everywhere. # Note: If the type 'long long int' exists but is only 32 bits large # (as on some very old compilers), AC_TYPE_LONG_LONG_INT will not be # defined. In this case you can treat 'long long int' like 'long int'. AC_DEFUN([AC_TYPE_LONG_LONG_INT], [ AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; int i = 63;]], [[long long int llmax = 9223372036854775807ll; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll));]])], [ac_cv_type_long_long_int=yes], [ac_cv_type_long_long_int=no])]) if test $ac_cv_type_long_long_int = yes; then AC_DEFINE([HAVE_LONG_LONG_INT], 1, [Define to 1 if the system has the type `long long int'.]) fi ]) # This macro is obsolescent and should go away soon. AC_DEFUN([gl_AC_TYPE_LONG_LONG], [ AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) ac_cv_type_long_long=$ac_cv_type_long_long_int if test $ac_cv_type_long_long = yes; then AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have the 'long long' type.]) fi ]) gawk-4.0.1+dfsg.orig/m4/progtest.m40000644000175000017500000000557311504446322016011 0ustar schotschot# 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. 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 Authors: dnl Ulrich Drepper , 1996. AC_PREREQ([2.50]) # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # 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], [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$][$1]) else AC_MSG_RESULT([no]) fi AC_SUBST([$1])dnl ]) gawk-4.0.1+dfsg.orig/m4/inttypes.m40000644000175000017500000000163711463242060016013 0ustar schotschot# inttypes.m4 serial 1 (gettext-0.11.4) dnl Copyright (C) 1997-2002 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 Paul Eggert. # Define HAVE_INTTYPES_H if exists and doesn't clash with # . AC_DEFUN([gt_HEADER_INTTYPES_H], [ if test "OS/390" = "`uname`" then gt_cv_header_inttypes_h=no else AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, [ AC_TRY_COMPILE( [#include #include ], [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) ]) if test $gt_cv_header_inttypes_h = yes; then AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, [Define if exists and doesn't clash with .]) fi fi ]) gawk-4.0.1+dfsg.orig/m4/readline.m40000644000175000017500000000367711511134625015726 0ustar schotschotdnl 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 gawk-4.0.1+dfsg.orig/m4/uintmax_t.m40000644000175000017500000000207611463242060016142 0ustar schotschot# uintmax_t.m4 serial 9 dnl Copyright (C) 1997-2004 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 Paul Eggert. AC_PREREQ(2.13) # Define uintmax_t to 'unsigned long' or 'unsigned long long' # if it is not already defined in or . AC_DEFUN([gl_AC_TYPE_UINTMAX_T], [ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) test $ac_cv_type_unsigned_long_long = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, [Define to unsigned long or unsigned long long if and don't define.]) else AC_DEFINE(HAVE_UINTMAX_T, 1, [Define if you have the 'uintmax_t' type in or .]) fi ]) gawk-4.0.1+dfsg.orig/m4/intl.m40000644000175000017500000002333011463242060015074 0ustar schotschot# intl.m4 serial 3 (gettext-0.16) dnl Copyright (C) 1995-2006 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 Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2006. AC_PREREQ(2.52) dnl Checks for all prerequisites of the intl subdirectory, dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. AC_DEFUN([AM_INTL_SUBDIR], [ AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([gt_GLIBC2])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([gl_VISIBILITY])dnl AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl AC_REQUIRE([gt_TYPE_WCHAR_T])dnl AC_REQUIRE([gt_TYPE_WINT_T])dnl AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gt_TYPE_INTMAX_T]) AC_REQUIRE([gt_PRINTF_POSIX]) AC_REQUIRE([gl_GLIBC21])dnl AC_REQUIRE([gl_XSIZE])dnl AC_REQUIRE([gt_INTL_MACOSX])dnl AC_CHECK_TYPE([ptrdiff_t], , [AC_DEFINE([ptrdiff_t], [long], [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) ]) AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen]) dnl Use the _snprintf function only if it is declared (because on NetBSD it dnl is defined as a weak alias of snprintf; we prefer to use the latter). gt_CHECK_DECL(_snprintf, [#include ]) gt_CHECK_DECL(_snwprintf, [#include ]) dnl Use the *_unlocked functions only if they are declared. dnl (because some of them were defined without being declared in Solaris dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built dnl on Solaris 2.5.1 to run on Solaris 2.6). dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. gt_CHECK_DECL(getc_unlocked, [#include ]) case $gt_cv_func_printf_posix in *yes) HAVE_POSIX_PRINTF=1 ;; *) HAVE_POSIX_PRINTF=0 ;; esac AC_SUBST([HAVE_POSIX_PRINTF]) if test "$ac_cv_func_asprintf" = yes; then HAVE_ASPRINTF=1 else HAVE_ASPRINTF=0 fi AC_SUBST([HAVE_ASPRINTF]) if test "$ac_cv_func_snprintf" = yes; then HAVE_SNPRINTF=1 else HAVE_SNPRINTF=0 fi AC_SUBST([HAVE_SNPRINTF]) if test "$ac_cv_func_wprintf" = yes; then HAVE_WPRINTF=1 else HAVE_WPRINTF=0 fi AC_SUBST([HAVE_WPRINTF]) AM_LANGINFO_CODESET gt_LC_MESSAGES dnl Compilation on mingw and Cygwin needs special Makefile rules, because dnl 1. when we install a shared library, we must arrange to export dnl auxiliary pointer variables for every exported variable, dnl 2. when we install a shared library and a static library simultaneously, dnl the include file specifies __declspec(dllimport) and therefore we dnl must arrange to define the auxiliary pointer variables for the dnl exported variables _also_ in the static library. if test "$enable_shared" = yes; then case "$host_os" in cygwin*) is_woe32dll=yes ;; *) is_woe32dll=no ;; esac else is_woe32dll=no fi WOE32DLL=$is_woe32dll AC_SUBST([WOE32DLL]) dnl Rename some macros and functions used for locking. AH_BOTTOM([ #define __libc_lock_t gl_lock_t #define __libc_lock_define gl_lock_define #define __libc_lock_define_initialized gl_lock_define_initialized #define __libc_lock_init gl_lock_init #define __libc_lock_lock gl_lock_lock #define __libc_lock_unlock gl_lock_unlock #define __libc_lock_recursive_t gl_recursive_lock_t #define __libc_lock_define_recursive gl_recursive_lock_define #define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized #define __libc_lock_init_recursive gl_recursive_lock_init #define __libc_lock_lock_recursive gl_recursive_lock_lock #define __libc_lock_unlock_recursive gl_recursive_lock_unlock #define glthread_in_use libintl_thread_in_use #define glthread_lock_init libintl_lock_init #define glthread_lock_lock libintl_lock_lock #define glthread_lock_unlock libintl_lock_unlock #define glthread_lock_destroy libintl_lock_destroy #define glthread_rwlock_init libintl_rwlock_init #define glthread_rwlock_rdlock libintl_rwlock_rdlock #define glthread_rwlock_wrlock libintl_rwlock_wrlock #define glthread_rwlock_unlock libintl_rwlock_unlock #define glthread_rwlock_destroy libintl_rwlock_destroy #define glthread_recursive_lock_init libintl_recursive_lock_init #define glthread_recursive_lock_lock libintl_recursive_lock_lock #define glthread_recursive_lock_unlock libintl_recursive_lock_unlock #define glthread_recursive_lock_destroy libintl_recursive_lock_destroy #define glthread_once libintl_once #define glthread_once_call libintl_once_call #define glthread_once_singlethreaded libintl_once_singlethreaded ]) ]) dnl Checks for the core files of the intl subdirectory: dnl dcigettext.c dnl eval-plural.h dnl explodename.c dnl finddomain.c dnl gettextP.h dnl gmo.h dnl hash-string.h hash-string.c dnl l10nflist.c dnl libgnuintl.h.in (except the *printf stuff) dnl loadinfo.h dnl loadmsgcat.c dnl localealias.c dnl log.c dnl plural-exp.h plural-exp.c dnl plural.y dnl Used by libglocale. AC_DEFUN([gt_INTL_SUBDIR_CORE], [ AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([gl_AC_HEADER_STDINT_H]) AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([gt_INTDIV0])dnl AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl AC_REQUIRE([gt_INTTYPES_PRI])dnl AC_REQUIRE([gl_LOCK])dnl AC_TRY_LINK( [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }], [], [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1, [Define to 1 if the compiler understands __builtin_expect.])]) AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ argz_next __fsetlocking]) dnl Use the *_unlocked functions only if they are declared. dnl (because some of them were defined without being declared in Solaris dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built dnl on Solaris 2.5.1 to run on Solaris 2.6). dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. gt_CHECK_DECL(feof_unlocked, [#include ]) gt_CHECK_DECL(fgets_unlocked, [#include ]) AM_ICONV dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined, dnl and a _NL_LOCALE_NAME macro always. AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name, [AC_TRY_LINK([#include #include ], [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));], gt_cv_nl_locale_name=yes, gt_cv_nl_locale_name=no) ]) if test $gt_cv_nl_locale_name = yes; then AC_DEFINE(HAVE_NL_LOCALE_NAME, 1, [Define if you have and it defines the NL_LOCALE_NAME macro if _GNU_SOURCE is defined.]) fi dnl intl/plural.c is generated from intl/plural.y. It requires bison, dnl because plural.y uses bison specific features. It requires at least dnl bison-1.26 because earlier versions generate a plural.c that doesn't dnl compile. dnl bison is only needed for the maintainer (who touches plural.y). But in dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put dnl the rule in general Makefile. Now, some people carelessly touch the dnl files or have a broken "make" program, hence the plural.c rule will dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not dnl present or too old. AC_CHECK_PROGS([INTLBISON], [bison]) if test -z "$INTLBISON"; then ac_verc_fail=yes else dnl Found it, now check the version. AC_MSG_CHECKING([version of bison]) changequote(<<,>>)dnl ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) changequote([,])dnl ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac AC_MSG_RESULT([$ac_prog_version]) fi if test $ac_verc_fail = yes; then INTLBISON=: fi ]) dnl gt_CHECK_DECL(FUNC, INCLUDES) dnl Check whether a function is declared. AC_DEFUN([gt_CHECK_DECL], [ AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, [AC_TRY_COMPILE([$2], [ #ifndef $1 char *p = (char *) $1; #endif ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) if test $ac_cv_have_decl_$1 = yes; then gt_value=1 else gt_value=0 fi AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) ]) gawk-4.0.1+dfsg.orig/m4/intldir.m40000644000175000017500000000161611463242060015576 0ustar schotschot# intldir.m4 serial 1 (gettext-0.16) dnl Copyright (C) 2006 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. AC_PREREQ(2.52) dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory. AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], []) gawk-4.0.1+dfsg.orig/m4/signed.m40000644000175000017500000000115411463242060015377 0ustar schotschot# signed.m4 serial 1 (gettext-0.10.40) dnl Copyright (C) 2001-2002 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_DEFUN([bh_C_SIGNED], [ AC_CACHE_CHECK([for signed], bh_cv_c_signed, [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)]) if test $bh_cv_c_signed = no; then AC_DEFINE(signed, , [Define to empty if the C compiler doesn't support this keyword.]) fi ]) gawk-4.0.1+dfsg.orig/m4/ulonglong.m40000644000175000017500000000353211463242060016134 0ustar schotschot# ulonglong.m4 serial 6 dnl Copyright (C) 1999-2006 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 Paul Eggert. # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. # This fixes a bug in Autoconf 2.60, but can be removed once we # assume 2.61 everywhere. # Note: If the type 'unsigned long long int' exists but is only 32 bits # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT # will not be defined. In this case you can treat 'unsigned long long int' # like 'unsigned long int'. AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], [ AC_CACHE_CHECK([for unsigned long long int], [ac_cv_type_unsigned_long_long_int], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[unsigned long long int ull = 18446744073709551615ULL; typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63;]], [[unsigned long long int ullmax = 18446744073709551615ull; return (ull << 63 | ull >> 63 | ull << i | ull >> i | ullmax / ull | ullmax % ull);]])], [ac_cv_type_unsigned_long_long_int=yes], [ac_cv_type_unsigned_long_long_int=no])]) if test $ac_cv_type_unsigned_long_long_int = yes; then AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1, [Define to 1 if the system has the type `unsigned long long int'.]) fi ]) # This macro is obsolescent and should go away soon. AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], [ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int if test $ac_cv_type_unsigned_long_long = yes; then AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, [Define if you have the 'unsigned long long' type.]) fi ]) gawk-4.0.1+dfsg.orig/m4/lock.m40000644000175000017500000002770511463242060015070 0ustar schotschot# lock.m4 serial 6 (gettext-0.16) dnl Copyright (C) 2005-2006 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. dnl Tests for a multithreading library to be used. dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, dnl USE_PTH_THREADS, USE_WIN32_THREADS dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with dnl libtool). dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for dnl programs that really need multithread functionality. The difference dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for dnl multithread-safe programs. AC_DEFUN([gl_LOCK_EARLY], [ AC_REQUIRE([gl_LOCK_EARLY_BODY]) ]) dnl The guts of gl_LOCK_EARLY. Needs to be expanded only once. AC_DEFUN([gl_LOCK_EARLY_BODY], [ dnl Ordering constraints: This macro modifies CPPFLAGS in a way that dnl influences the result of the autoconf tests that test for *_unlocked dnl declarations, on AIX 5 at least. Therefore it must come early. AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl AC_BEFORE([$0], [gl_ARGP])dnl AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems dnl Check for multithreading. AC_ARG_ENABLE(threads, AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API]) AC_HELP_STRING([--disable-threads], [build without multithread safety]), [gl_use_threads=$enableval], [case "$host_os" in dnl Disable multithreading by default on OSF/1, because it interferes dnl with fork()/exec(): When msgexec is linked with -lpthread, its child dnl process gets an endless segmentation fault inside execvp(). osf*) gl_use_threads=no ;; *) gl_use_threads=yes ;; esac ]) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # For using : case "$host_os" in osf*) # On OSF/1, the compiler needs the flag -D_REENTRANT so that it # groks . cc also understands the flag -pthread, but # we don't use it because 1. gcc-2.95 doesn't understand -pthread, # 2. putting a flag into CPPFLAGS that has an effect on the linker # causes the AC_TRY_LINK test below to succeed unexpectedly, # leading to wrong values of LIBTHREAD and LTLIBTHREAD. CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac # Some systems optimize for single-threaded programs by default, and # need special flags to disable these optimizations. For example, the # definition of 'errno' in . case "$host_os" in aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac fi ]) dnl The guts of gl_LOCK. Needs to be expanded only once. AC_DEFUN([gl_LOCK_BODY], [ AC_REQUIRE([gl_LOCK_EARLY_BODY]) gl_threads_api=none LIBTHREAD= LTLIBTHREAD= LIBMULTITHREAD= LTLIBMULTITHREAD= if test "$gl_use_threads" != no; then dnl Check whether the compiler and linker support weak declarations. AC_MSG_CHECKING([whether imported symbols can be declared weak]) gl_have_weak=no AC_TRY_LINK([extern void xyzzy (); #pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes]) AC_MSG_RESULT([$gl_have_weak]) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that # it groks . It's added above, in gl_LOCK_EARLY_BODY. AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no) if test "$gl_have_pthread_h" = yes; then # Other possible tests: # -lpthreads (FSU threads, PCthreads) # -lgthreads gl_have_pthread= # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist # in libc. IRIX 6.5 has the first one in both libc and libpthread, but # the second one only in libpthread, and lock.c needs it. AC_TRY_LINK([#include ], [pthread_mutex_lock((pthread_mutex_t*)0); pthread_mutexattr_init((pthread_mutexattr_t*)0);], [gl_have_pthread=yes]) # Test for libpthread by looking for pthread_kill. (Not pthread_self, # since it is defined as a macro on OSF/1.) if test -n "$gl_have_pthread"; then # The program links fine without libpthread. But it may actually # need to link with libpthread in order to create multiple threads. AC_CHECK_LIB(pthread, pthread_kill, [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread # On Solaris and HP-UX, most pthread functions exist also in libc. # Therefore pthread_in_use() needs to actually try to create a # thread: pthread_create from libc will fail, whereas # pthread_create will actually create a thread. case "$host_os" in solaris* | hpux*) AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], 1, [Define if the pthread_in_use() detection is hard.]) esac ]) else # Some library is needed. Try libpthread and libc_r. AC_CHECK_LIB(pthread, pthread_kill, [gl_have_pthread=yes LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) if test -z "$gl_have_pthread"; then # For FreeBSD 4. AC_CHECK_LIB(c_r, pthread_kill, [gl_have_pthread=yes LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) fi fi if test -n "$gl_have_pthread"; then gl_threads_api=posix AC_DEFINE([USE_POSIX_THREADS], 1, [Define if the POSIX multithreading library can be used.]) if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if test $gl_have_weak = yes; then AC_DEFINE([USE_POSIX_THREADS_WEAK], 1, [Define if references to the POSIX multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the # pthread_rwlock_* functions. AC_CHECK_TYPE([pthread_rwlock_t], [AC_DEFINE([HAVE_PTHREAD_RWLOCK], 1, [Define if the POSIX multithreading library has read/write locks.])], [], [#include ]) # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. AC_TRY_COMPILE([#include ], [#if __FreeBSD__ == 4 error "No, in FreeBSD 4.0 recursive mutexes actually don't work." #else int x = (int)PTHREAD_MUTEX_RECURSIVE; return !x; #endif], [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], 1, [Define if the defines PTHREAD_MUTEX_RECURSIVE.])]) fi fi fi if test -z "$gl_have_pthread"; then if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then gl_have_solaristhread= gl_save_LIBS="$LIBS" LIBS="$LIBS -lthread" AC_TRY_LINK([#include #include ], [thr_self();], [gl_have_solaristhread=yes]) LIBS="$gl_save_LIBS" if test -n "$gl_have_solaristhread"; then gl_threads_api=solaris LIBTHREAD=-lthread LTLIBTHREAD=-lthread LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" AC_DEFINE([USE_SOLARIS_THREADS], 1, [Define if the old Solaris multithreading library can be used.]) if test $gl_have_weak = yes; then AC_DEFINE([USE_SOLARIS_THREADS_WEAK], 1, [Define if references to the old Solaris multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi fi fi if test "$gl_use_threads" = pth; then gl_save_CPPFLAGS="$CPPFLAGS" AC_LIB_LINKFLAGS(pth) gl_have_pth= gl_save_LIBS="$LIBS" LIBS="$LIBS -lpth" AC_TRY_LINK([#include ], [pth_self();], gl_have_pth=yes) LIBS="$gl_save_LIBS" if test -n "$gl_have_pth"; then gl_threads_api=pth LIBTHREAD="$LIBPTH" LTLIBTHREAD="$LTLIBPTH" LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" AC_DEFINE([USE_PTH_THREADS], 1, [Define if the GNU Pth multithreading library can be used.]) if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if test $gl_have_weak = yes; then AC_DEFINE([USE_PTH_THREADS_WEAK], 1, [Define if references to the GNU Pth multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi else CPPFLAGS="$gl_save_CPPFLAGS" fi fi if test -z "$gl_have_pthread"; then if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then if { case "$host_os" in mingw*) true;; *) false;; esac }; then gl_threads_api=win32 AC_DEFINE([USE_WIN32_THREADS], 1, [Define if the Win32 multithreading API can be used.]) fi fi fi fi AC_MSG_CHECKING([for multithread API to use]) AC_MSG_RESULT([$gl_threads_api]) AC_SUBST(LIBTHREAD) AC_SUBST(LTLIBTHREAD) AC_SUBST(LIBMULTITHREAD) AC_SUBST(LTLIBMULTITHREAD) ]) AC_DEFUN([gl_LOCK], [ AC_REQUIRE([gl_LOCK_EARLY]) AC_REQUIRE([gl_LOCK_BODY]) gl_PREREQ_LOCK ]) # Prerequisites of lib/lock.c. AC_DEFUN([gl_PREREQ_LOCK], [ AC_REQUIRE([AC_C_INLINE]) ]) dnl Survey of platforms: dnl dnl Platform Available Compiler Supports test-lock dnl flavours option weak result dnl --------------- --------- --------- -------- --------- dnl Linux 2.4/glibc posix -lpthread Y OK dnl dnl GNU Hurd/glibc posix dnl dnl FreeBSD 5.3 posix -lc_r Y dnl posix -lkse ? Y dnl posix -lpthread ? Y dnl posix -lthr Y dnl dnl FreeBSD 5.2 posix -lc_r Y dnl posix -lkse Y dnl posix -lthr Y dnl dnl FreeBSD 4.0,4.10 posix -lc_r Y OK dnl dnl NetBSD 1.6 -- dnl dnl OpenBSD 3.4 posix -lpthread Y OK dnl dnl MacOS X 10.[123] posix -lpthread Y OK dnl dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK dnl dnl HP-UX 11 posix -lpthread N (cc) OK dnl Y (gcc) dnl dnl IRIX 6.5 posix -lpthread Y 0.5 dnl dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK dnl dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK dnl -lpthread (gcc) Y dnl dnl Cygwin posix -lpthread Y OK dnl dnl Any of the above pth -lpth 0.0 dnl dnl Mingw win32 N OK dnl dnl BeOS 5 -- dnl dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is dnl turned off: dnl OK if all three tests terminate OK, dnl 0.5 if the first test terminates OK but the second one loops endlessly, dnl 0.0 if the first test already loops endlessly. gawk-4.0.1+dfsg.orig/m4/codeset.m40000644000175000017500000000136611463242060015561 0ustar schotschot# codeset.m4 serial 2 (gettext-0.16) dnl Copyright (C) 2000-2002, 2006 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_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, [AC_TRY_LINK([#include ], [char* cs = nl_langinfo(CODESET); return !cs;], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE(HAVE_LANGINFO_CODESET, 1, [Define if you have and nl_langinfo(CODESET).]) fi ]) gawk-4.0.1+dfsg.orig/m4/inttypes_h.m40000644000175000017500000000201511463242060016311 0ustar schotschot# inttypes_h.m4 serial 7 dnl Copyright (C) 1997-2004, 2006 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 Paul Eggert. # Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([gl_AC_HEADER_INTTYPES_H], [ if test "OS/390" = "`uname`" then gl_cv_header_inttypes_h=no else AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, [AC_TRY_COMPILE( [#include #include ], [uintmax_t i = (uintmax_t) -1; return !i;], gl_cv_header_inttypes_h=yes, gl_cv_header_inttypes_h=no)]) if test $gl_cv_header_inttypes_h = yes; then AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi fi ]) gawk-4.0.1+dfsg.orig/m4/intdiv0.m40000644000175000017500000000334011463242060015502 0ustar schotschot# intdiv0.m4 serial 1 (gettext-0.11.3) dnl Copyright (C) 2002 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_DEFUN([gt_INTDIV0], [ AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], gt_cv_int_divbyzero_sigfpe, [ AC_TRY_RUN([ #include #include static void #ifdef __cplusplus sigfpe_handler (int sig) #else sigfpe_handler (sig) int sig; #endif { /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ exit (sig != SIGFPE); } int x = 1; int y = 0; int z; int nan; int main () { signal (SIGFPE, sigfpe_handler); /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) signal (SIGTRAP, sigfpe_handler); #endif /* Linux/SPARC yields signal SIGILL. */ #if defined (__sparc__) && defined (__linux__) signal (SIGILL, sigfpe_handler); #endif z = x / y; nan = y / y; exit (1); } ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, [ # Guess based on the CPU. case "$host_cpu" in alpha* | i[34567]86 | m68k | s390*) gt_cv_int_divbyzero_sigfpe="guessing yes";; *) gt_cv_int_divbyzero_sigfpe="guessing no";; esac ]) ]) case "$gt_cv_int_divbyzero_sigfpe" in *yes) value=1;; *) value=0;; esac AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, [Define if integer division by zero raises signal SIGFPE.]) ]) gawk-4.0.1+dfsg.orig/m4/lib-prefix.m40000644000175000017500000002042211504446322016171 0ustar schotschot# 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. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 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-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) 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. 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 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 ;; *) 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" ]) gawk-4.0.1+dfsg.orig/m4/wchar_t.m40000644000175000017500000000132611463242060015556 0ustar schotschot# wchar_t.m4 serial 1 (gettext-0.12) dnl Copyright (C) 2002-2003 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. dnl Test whether has the 'wchar_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WCHAR_T], [ AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t, [AC_TRY_COMPILE([#include wchar_t foo = (wchar_t)'\0';], , gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)]) if test $gt_cv_c_wchar_t = yes; then AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.]) fi ]) gawk-4.0.1+dfsg.orig/m4/libsigsegv.m40000644000175000017500000000115311463242060016263 0ustar schotschot# libsigsegv.m4 serial 4 dnl Copyright (C) 2002-2003, 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. dnl From Bruno Haible, Sam Steingold. AC_DEFUN([gl_LIBSIGSEGV], [ AC_LIB_HAVE_LINKFLAGS([sigsegv], [], [#include ], [sigsegv_deinstall_handler();], [no, consider installing GNU libsigsegv]) dnl Some other autoconf macros and clisp's configure use this variable. gl_cv_lib_sigsegv="$ac_cv_libsigsegv" ]) gawk-4.0.1+dfsg.orig/m4/lcmessage.m40000644000175000017500000000240411463242060016070 0ustar schotschot# lcmessage.m4 serial 4 (gettext-0.14.2) dnl Copyright (C) 1995-2002, 2004-2005 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 Authors: dnl Ulrich Drepper , 1995. # Check whether LC_MESSAGES is available in . AC_DEFUN([gt_LC_MESSAGES], [ AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)]) if test $gt_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi ]) gawk-4.0.1+dfsg.orig/m4/intmax.m40000644000175000017500000000201111463242060015417 0ustar schotschot# intmax.m4 serial 3 (gettext-0.16) dnl Copyright (C) 2002-2005 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. dnl Test whether the system has the 'intmax_t' type, but don't attempt to dnl find a replacement if it is lacking. AC_DEFUN([gt_TYPE_INTMAX_T], [ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, [AC_TRY_COMPILE([ #include #include #if HAVE_STDINT_H_WITH_UINTMAX #include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX #include #endif ], [intmax_t x = -1; return !x;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)]) if test $gt_cv_c_intmax_t = yes; then AC_DEFINE(HAVE_INTMAX_T, 1, [Define if you have the 'intmax_t' type in or .]) fi ]) gawk-4.0.1+dfsg.orig/m4/arch.m40000644000175000017500000000424411463242060015046 0ustar schotschotdnl dnl arch.m4 --- autoconf input file for gawk dnl dnl Copyright (C) 1995, 1996, 1998, 1999, 2000, 2003, 2004 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Progamming Language. dnl dnl GAWK is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 3 of the License, or dnl (at your option) any later version. dnl dnl GAWK is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA dnl dnl Check for AIX and add _XOPEN_SOURCE_EXTENDED AC_DEFUN([GAWK_AC_AIX_TWEAK], [ AC_MSG_CHECKING([for AIX compilation hacks]) AC_CACHE_VAL(gawk_cv_aix_hack, [ if test -d /lpp then CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1 -DGAWK_AIX=1" gawk_cv_aix_hack=yes else gawk_cv_aix_hack=no fi ])dnl AC_MSG_RESULT([${gawk_cv_aix_hack}]) ])dnl dnl Check for Alpha Linux systems AC_DEFUN([GAWK_AC_LINUX_ALPHA], [ AC_MSG_CHECKING([for Linux/Alpha compilation hacks]) AC_CACHE_VAL(gawk_cv_linux_alpha_hack, [ if test "Linux" = "`uname`" && test "alpha" = "`uname -m`" then # this isn't necessarily always true, # the vendor's compiler is also often found if test "$GCC" = yes then CFLAGS="$CFLAGS -mieee" gawk_cv_linux_alpha_hack=yes else gawk_cv_linux_alpha_hack=no fi else gawk_cv_linux_alpha_hack=no fi ])dnl AC_MSG_RESULT([${gawk_cv_linux_alpha_hack}]) ])dnl dnl Check for z/OS Unix Systems Services AC_DEFUN([AC_ZOS_USS], [ AC_MSG_CHECKING([for z/OS USS compilation]) if test "OS/390" = "`uname`" then CFLAGS="$CFLAGS -D_ALL_SOURCE -DZOS_USS -DUSE_EBCDIC" # 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 fi AC_MSG_RESULT([${ac_cv_zos_uss}]) ])dnl gawk-4.0.1+dfsg.orig/m4/nls.m40000644000175000017500000000231511504446322014725 0ustar schotschot# 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. 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 Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.50]) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled 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]) ]) gawk-4.0.1+dfsg.orig/m4/glibc21.m40000644000175000017500000000144511463242060015354 0ustar schotschot# glibc21.m4 serial 3 dnl Copyright (C) 2000-2002, 2004 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. # Test for the GNU C Library, version 2.1 or newer. # From Bruno Haible. AC_DEFUN([gl_GLIBC21], [ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, ac_cv_gnu_library_2_1, [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif ], ac_cv_gnu_library_2_1=yes, ac_cv_gnu_library_2_1=no) ] ) AC_SUBST(GLIBC21) GLIBC21="$ac_cv_gnu_library_2_1" ] ) gawk-4.0.1+dfsg.orig/m4/inttypes-pri.m40000644000175000017500000000215211463242060016574 0ustar schotschot# inttypes-pri.m4 serial 4 (gettext-0.16) dnl Copyright (C) 1997-2002, 2006 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.52) # Define PRI_MACROS_BROKEN if exists and defines the PRI* # macros to non-string values. This is the case on AIX 4.3.3. AC_DEFUN([gt_INTTYPES_PRI], [ AC_CHECK_HEADERS([inttypes.h]) if test $ac_cv_header_inttypes_h = yes; then AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], gt_cv_inttypes_pri_broken, [ AC_TRY_COMPILE([#include #ifdef PRId32 char *p = PRId32; #endif ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) ]) fi if test "$gt_cv_inttypes_pri_broken" = yes; then AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, [Define if exists and defines unusable PRI* macros.]) PRI_MACROS_BROKEN=1 else PRI_MACROS_BROKEN=0 fi AC_SUBST([PRI_MACROS_BROKEN]) ]) gawk-4.0.1+dfsg.orig/m4/lib-link.m40000644000175000017500000010020211504446322015624 0ustar schotschot# 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]) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) 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" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) 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 popdef([NAME]) popdef([Name]) ]) 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. 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 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) 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. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" 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 lib][$1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= LIB[]NAME[]_PREFIX= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) popdef([NAME]) popdef([Name]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl acl_libext, dnl acl_shlibext, dnl acl_hardcode_libdir_flag_spec, dnl acl_hardcode_libdir_separator, dnl acl_hardcode_direct, dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS 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], [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" 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], [ --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. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 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. 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_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 else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) 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 ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= 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= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then 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" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` 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 if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, 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" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= 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;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do 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, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -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" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) gawk-4.0.1+dfsg.orig/m4/longdouble.m40000644000175000017500000000227711463242060016267 0ustar schotschot# longdouble.m4 serial 2 (gettext-0.15) dnl Copyright (C) 2002-2003, 2006 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. dnl Test whether the compiler supports the 'long double' type. dnl Prerequisite: AC_PROG_CC dnl This file is only needed in autoconf <= 2.59. Newer versions of autoconf dnl have a macro AC_TYPE_LONG_DOUBLE with identical semantics. AC_DEFUN([gt_TYPE_LONGDOUBLE], [ AC_CACHE_CHECK([for long double], gt_cv_c_long_double, [if test "$GCC" = yes; then gt_cv_c_long_double=yes else AC_TRY_COMPILE([ /* The Stardent Vistra knows sizeof(long double), but does not support it. */ long double foo = 0.0; /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ int array [2*(sizeof(long double) >= sizeof(double)) - 1]; ], , gt_cv_c_long_double=yes, gt_cv_c_long_double=no) fi]) if test $gt_cv_c_long_double = yes; then AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.]) fi ]) gawk-4.0.1+dfsg.orig/m4/printf-posix.m40000644000175000017500000000266111463242060016574 0ustar schotschot# printf-posix.m4 serial 2 (gettext-0.13.1) dnl Copyright (C) 2003 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. dnl Test whether the printf() function supports POSIX/XSI format strings with dnl positions. AC_DEFUN([gt_PRINTF_POSIX], [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], gt_cv_func_printf_posix, [ AC_TRY_RUN([ #include #include /* The string "%2$d %1$d", with dollar characters protected from the shell's dollar expansion (possibly an autoconf bug). */ static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; static char buf[100]; int main () { sprintf (buf, format, 33, 55); return (strcmp (buf, "55 33") != 0); }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, [ AC_EGREP_CPP(notposix, [ #if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ notposix #endif ], gt_cv_func_printf_posix="guessing no", gt_cv_func_printf_posix="guessing yes") ]) ]) case $gt_cv_func_printf_posix in *yes) AC_DEFINE(HAVE_POSIX_PRINTF, 1, [Define if your printf() function supports format strings with positions.]) ;; esac ]) gawk-4.0.1+dfsg.orig/m4/wint_t.m40000644000175000017500000000130411463242060015427 0ustar schotschot# wint_t.m4 serial 1 (gettext-0.12) dnl Copyright (C) 2003 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. dnl Test whether has the 'wint_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WINT_T], [ AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, [AC_TRY_COMPILE([#include wint_t foo = (wchar_t)'\0';], , gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) if test $gt_cv_c_wint_t = yes; then AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) fi ]) gawk-4.0.1+dfsg.orig/m4/visibility.m40000644000175000017500000000413011463242060016312 0ustar schotschot# visibility.m4 serial 1 (gettext-0.15) dnl Copyright (C) 2005 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. dnl Tests whether the compiler supports the command-line option dnl -fvisibility=hidden and the function and variable attributes dnl __attribute__((__visibility__("hidden"))) and dnl __attribute__((__visibility__("default"))). dnl Does *not* test for __visibility__("protected") - which has tricky dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on dnl MacOS X. dnl Does *not* test for __visibility__("internal") - which has processor dnl dependent semantics. dnl Does *not* test for #pragma GCC visibility push(hidden) - which is dnl "really only recommended for legacy code". dnl Set the variable CFLAG_VISIBILITY. dnl Defines and sets the variable HAVE_VISIBILITY. AC_DEFUN([gl_VISIBILITY], [ AC_REQUIRE([AC_PROG_CC]) CFLAG_VISIBILITY= HAVE_VISIBILITY=0 if test -n "$GCC"; then AC_MSG_CHECKING([for simple visibility declarations]) AC_CACHE_VAL(gl_cv_cc_visibility, [ gl_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden" AC_TRY_COMPILE( [extern __attribute__((__visibility__("hidden"))) int hiddenvar; extern __attribute__((__visibility__("default"))) int exportedvar; extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); extern __attribute__((__visibility__("default"))) int exportedfunc (void);], [], gl_cv_cc_visibility=yes, gl_cv_cc_visibility=no) CFLAGS="$gl_save_CFLAGS"]) AC_MSG_RESULT([$gl_cv_cc_visibility]) if test $gl_cv_cc_visibility = yes; then CFLAG_VISIBILITY="-fvisibility=hidden" HAVE_VISIBILITY=1 fi fi AC_SUBST([CFLAG_VISIBILITY]) AC_SUBST([HAVE_VISIBILITY]) AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) ]) gawk-4.0.1+dfsg.orig/m4/isc-posix.m40000644000175000017500000000170611463242060016047 0ustar schotschot# isc-posix.m4 serial 2 (gettext-0.11.2) dnl Copyright (C) 1995-2002 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. # This file is not needed with autoconf-2.53 and newer. Remove it in 2005. # This test replaces the one in autoconf. # Currently this macro should have the same name as the autoconf macro # because gettext's gettext.m4 (distributed in the automake package) # still uses it. Otherwise, the use in gettext.m4 makes autoheader # give these diagnostics: # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX undefine([AC_ISC_POSIX]) AC_DEFUN([AC_ISC_POSIX], [ dnl This test replaces the obsolescent AC_ISC_POSIX kludge. AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) ] ) gawk-4.0.1+dfsg.orig/m4/gettext.m40000644000175000017500000003513211504446322015620 0ustar schotschot# 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. 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 Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2006, 2008-2010. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. 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 ])])])]) define([gt_included_intl], ifelse([$1], [external], ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) 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]) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE([ENABLE_NLS], [1], [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE([HAVE_GETTEXT], [1], [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE([HAVE_DCGETTEXT], [1], [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. 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= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST([DATADIRNAME]) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST([INSTOBJEXT]) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=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]) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST([INTLLIBS]) dnl Make all documented variables known to autoconf. AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) AC_SUBST([POSUB]) ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) gawk-4.0.1+dfsg.orig/m4/po.m40000644000175000017500000004461611504446322014561 0ustar schotschot# 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. 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 Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.50]) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake AC_REQUIRE([AM_NLS])dnl 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.18]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$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]) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac changequote([,])dnl AC_SUBST([MSGFMT_015]) changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac changequote([,])dnl AC_SUBST([GMSGFMT_015]) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Test whether it is GNU xgettext >= 0.15. changequote(,)dnl case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac changequote([,])dnl AC_SUBST([XGETTEXT_015]) dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) dnl Installation directories. dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we dnl have to define it here, so that it can be used in po/Makefile. test -n "$localedir" || localedir='${datadir}/locale' AC_SUBST([localedir]) dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" < exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([gl_AC_HEADER_STDINT_H], [ if test "OS/390" = "`uname`" then gl_cv_header_stdint_h=no else AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h, [AC_TRY_COMPILE( [#include #include ], [uintmax_t i = (uintmax_t) -1; return !i;], gl_cv_header_stdint_h=yes, gl_cv_header_stdint_h=no)]) if test $gl_cv_header_stdint_h = yes; then AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi fi ]) gawk-4.0.1+dfsg.orig/m4/xsize.m40000644000175000017500000000064511463242060015274 0ustar schotschot# xsize.m4 serial 3 dnl Copyright (C) 2003-2004 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. AC_DEFUN([gl_XSIZE], [ dnl Prerequisites of lib/xsize.h. AC_REQUIRE([gl_SIZE_MAX]) AC_REQUIRE([AC_C_INLINE]) AC_CHECK_HEADERS(stdint.h) ]) gawk-4.0.1+dfsg.orig/m4/ChangeLog.00000644000175000017500000001321311511135066015574 0ustar schotschotWed 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. gawk-4.0.1+dfsg.orig/m4/iconv.m40000644000175000017500000001653711504446322015262 0ustar schotschot# 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. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 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 #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], [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, HP-UX 11.11, Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_TRY_RUN([ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ 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_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) 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. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) 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_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], [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([ $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 ]) gawk-4.0.1+dfsg.orig/m4/intmax_t.m40000644000175000017500000000236211463242060015753 0ustar schotschot#serial 6 dnl From Paul Eggert. AC_PREREQ(2.52) # Define intmax_t to long or long long if doesn't define. AC_DEFUN([gl_AC_TYPE_INTMAX_T], [ dnl For simplicity, we assume that a header file defines 'intmax_t' if and dnl only if it defines 'uintmax_t'. AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) test $ac_cv_type_long_long = yes \ && ac_type='long long' \ || ac_type='long' AC_DEFINE_UNQUOTED(intmax_t, $ac_type, [Define to long or long long if and don't define.]) else AC_DEFINE(HAVE_INTMAX_T, 1, [Define if you have the 'intmax_t' type in or .]) fi ]) # Define uintmax_t to unsigned long or unsigned long long # if doesn't define. AC_DEFUN([jm_AC_TYPE_UINTMAX_T], [ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) AC_CHECK_TYPE(uintmax_t, , [test $ac_cv_type_unsigned_long_long = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, [Define to widest unsigned type if doesn't define.])]) ]) gawk-4.0.1+dfsg.orig/m4/lib-ld.m40000644000175000017500000000660311504446322015300 0ustar schotschot# 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. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. 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], [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi 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 test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT([$LD]) else AC_MSG_RESULT([no]) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) gawk-4.0.1+dfsg.orig/m4/intlmacosx.m40000644000175000017500000000456511463242060016320 0ustar schotschot# 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]) ]) gawk-4.0.1+dfsg.orig/m4/socket.m40000644000175000017500000000614211463242060015420 0ustar schotschotdnl dnl socket.m4 --- autoconf input file for gawk dnl dnl Copyright (C) 1995, 1996, 1998, 1999, 2000, 2003, 2004 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Progamming Language. dnl dnl GAWK is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 3 of the License, or dnl (at your option) any later version. dnl dnl GAWK is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA dnl dnl Find the socket libraries dnl largely stolen from AC_PATH_XTRA AC_DEFUN([GAWK_AC_LIB_SOCKETS], [ gawk_have_sockets=no # Check for system-dependent location of socket libraries SOCKET_LIBS= if test "$ISC" = yes; then SOCKET_LIBS="-lnsl_s -linet" else # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). # # ADR: Is this needed just for sockets??? # AC_CHECK_LIB(dnet, dnet_ntoa, [SOCKET_LIBS="$SOCKET_LIBS -ldnet"]) # if test $ac_cv_lib_dnet_ntoa = no; then # AC_CHECK_LIB(dnet_stub, dnet_ntoa, # [SOCKET_LIBS="$SOCKET_LIBS -ldnet_stub"]) # fi # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # chad@anasazi.com says the Pyramid MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. AC_CHECK_FUNC(gethostbyname) if test $ac_cv_func_gethostbyname = no; then AC_CHECK_LIB(nsl, gethostbyname, SOCKET_LIBS="$SOCKET_LIBS -lnsl") fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says simon@lia.di.epfl.ch: it contains # gethostby* variants that don't use the nameserver (or something). # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. AC_CHECK_FUNC(connect) if test $ac_cv_func_connect = no; then AC_CHECK_LIB(socket, connect, SOCKET_LIBS="-lsocket $SOCKET_LIBS" gawk_have_sockets=yes, , $SOCKET_LIBS) else gawk_have_sockets=yes fi fi if test "${gawk_have_sockets}" = "yes" then AC_MSG_CHECKING([where to find the socket library calls]) case "${SOCKET_LIBS}" in ?*) gawk_lib_loc="${SOCKET_LIBS}" ;; *) gawk_lib_loc="the standard library" ;; esac AC_MSG_RESULT([${gawk_lib_loc}]) AC_DEFINE(HAVE_SOCKETS, 1, [we have sockets on this system]) fi AC_SUBST(SOCKET_LIBS)dnl ])dnl gawk-4.0.1+dfsg.orig/m4/size_max.m40000644000175000017500000000461011463242060015745 0ustar schotschot# size_max.m4 serial 5 dnl Copyright (C) 2003, 2005-2006 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_DEFUN([gl_SIZE_MAX], [ AC_CHECK_HEADERS(stdint.h) dnl First test whether the system already has SIZE_MAX. AC_MSG_CHECKING([for SIZE_MAX]) AC_CACHE_VAL([gl_cv_size_max], [ gl_cv_size_max= AC_EGREP_CPP([Found it], [ #include #if HAVE_STDINT_H #include #endif #ifdef SIZE_MAX Found it #endif ], gl_cv_size_max=yes) if test -z "$gl_cv_size_max"; then dnl Define it ourselves. Here we assume that the type 'size_t' is not wider dnl than the type 'unsigned long'. Try hard to find a definition that can dnl be used in a preprocessor #if, i.e. doesn't contain a cast. _AC_COMPUTE_INT([sizeof (size_t) * CHAR_BIT - 1], size_t_bits_minus_1, [#include #include ], size_t_bits_minus_1=) _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint, [#include ], fits_in_uint=) if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then if test $fits_in_uint = 1; then dnl Even though SIZE_MAX fits in an unsigned int, it must be of type dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. AC_TRY_COMPILE([#include extern size_t foo; extern unsigned long foo; ], [], fits_in_uint=0) fi dnl We cannot use 'expr' to simplify this expression, because 'expr' dnl works only with 'long' integers in the host environment, while we dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. if test $fits_in_uint = 1; then gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" else gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" fi else dnl Shouldn't happen, but who knows... gl_cv_size_max='((size_t)~(size_t)0)' fi fi ]) AC_MSG_RESULT([$gl_cv_size_max]) if test "$gl_cv_size_max" != yes; then AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], [Define as the maximum value of type 'size_t', if the system doesn't define it.]) fi ]) gawk-4.0.1+dfsg.orig/README0000644000175000017500000000646711734665351014255 0ustar schotschot 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 notice and this notice are preserved. README: 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. Work to be done is described briefly in the FUTURES file. Changes in this version are summarized in the NEWS file. Please read the LIMITATIONS file. 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 2010-12-23.17 of texinfo.tex. There is a usable copy of texinfo.tex in the doc directory. INSTALLATION: Check whether there is a system-specific README file for your system under the `README_d' directory. If there's something there that you should have read and didn't, and you bug me about it, I'm going to yell at you. See the file INSTALL for installation instructions. If you have neither bison nor yacc, use the awkgram.c file here. It was generated with bison, and has no proprietary code in it. (Note that 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 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 Automake. After successful compilation, do `make check' to run the test suite. There should be no output from the `cmp' invocations except in the cases where there are small differences in floating point values, and possibly in the case of strftime. Several of the tests ignore errors on purpose; those are not a problem. If there are other differences, please investigate and report the problem. PRINTING THE MANUAL The `doc' directory contains a recent version of texinfo.tex, which will 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, the man page and the reference card. BUG REPORTS AND FIXES (Un*x systems): Please coordinate changes through Arnold Robbins. In particular, see the section in the manual on reporting bugs. Note that comp.lang.awk 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 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: MS-DOS with DJGPP: Scott Deifik scottd.mail@sbcglobal.net MS-Windows with MinGW: Eli Zaretskii eliz@gnu.org OS/2: Andreas Buening andreas.buening@nexgo.de VMS: Pat Rankin r.pat.rankin@gmail.com z/OS (OS/390): Dave Pitts dpitts@cozx.com gawk-4.0.1+dfsg.orig/doc/0000755000175000017500000000000011735015040014106 5ustar schotschotgawk-4.0.1+dfsg.orig/doc/lflashlight-small.xpic0000644000175000017500000000044707215354275020425 0ustar schotschot#! /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 gawk-4.0.1+dfsg.orig/doc/ChangeLog0000644000175000017500000000362011734667134015701 0ustar schotschot2012-03-28 Arnold D. Robbins * 4.0.1: Release tar ball made. 2012-02-10 Arnold D. Robbins * gawk.texi, awkcard.in: Bump patch level. * texinfo.tex: Updated from Texinfo CVS. 2011-12-06 Arnold D. Robbins * gawk.texi: Various typo fixes from mailing list. 2011-11-10 Arnold D. Robbins * gawk.1: Fix some .BR to be .B. 2011-11-08 Arnold D. Robbins * gawk.texi: Further improvement in the discussion of sorted array traversal. Some sections reordered and text edited to suit. 2011-11-06 Arnold D. Robbins * gawk.texi: Try to improve discussion of sorted array traversal. 2011-09-24 Arnold D. Robbins * gawk.1: Fix some spelling errors. Thanks to Jeroen Schot . * gawk.texi: Some minor fixes. 2011-07-28 Arnold D. Robbins * gawk.texi (Gory Details): Restore text on historical behavior etc. and add explanation on gawk 4.0.x. 2011-07-17 Arnold D. Robbins * gawk.texi: Add reference in node Expressions to node Precedence, based on suggestion from Dan Jacobson dated 4 Jun 2001. 2011-07-17 Paul Eggert * 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). 2011-06-24 Arnold D. Robbins * Makefile.am (EXTRA_DIST): Add ChangeLog.0. * 4.0.0: Remake the tar ball. 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. gawk-4.0.1+dfsg.orig/doc/setter.outline0000644000175000017500000000372311463242060017024 0ustar schotschot%!PS-Adobe-3.0 % SSC Reference card typesetter outline / cut marks % % Copyright (C) 1996, Specialized System Consultants Inc. (SSC) % % 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 2 of the License, or % (at your option) any later version. % % This file 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 % %! page cut marks and stuff for Pocket References - 10-26-88 - ph %! modified to move the cut marks onto the page %! center a string /inch {72 mul} def /cshow % stk: string % center string in space (space us variable) { dup stringwidth pop % get length of string space exch sub 2 div % compute initial space needed 0 rmoveto % move over show } def /flashme { /space 612 def 0 0 0 setrgbcolor % always print this stuff /Helvetica findfont 12 scalefont setfont gsave % for groff (I hope) -6 -6 translate 0.2 setlinewidth 0.25 inch 10.5 inch moveto 0.5 inch 10.5 inch lineto .75 inch 10.75 inch moveto .75 inch 11 inch lineto stroke 0.25 inch 2 inch moveto 0.5 inch 2 inch lineto .75 inch 1.75 inch moveto .75 inch 1.50 inch lineto stroke 4.25 inch 11 inch moveto 4.25 inch 10.75 inch lineto stroke 4.25 inch 1.75 inch moveto 4.25 inch 1.5 inch lineto stroke 7.75 inch 1.5 inch moveto 7.75 inch 1.75 inch lineto 8 inch 2 inch moveto 8.25 inch 2 inch lineto stroke 7.75 inch 11 inch moveto 7.75 inch 10.75 inch lineto 8 inch 10.5 inch moveto 8.25 inch 10.5 inch lineto stroke grestore } def % actually do something gawk-4.0.1+dfsg.orig/doc/lflashlight.pdf0000644000175000017500000000163211463242060017106 0ustar schotschot%PDF-1.3 %Çì¢ 6 0 obj <> stream xœUA! E÷=EO€¥¯ànôÄ“™ÅèÂëÛ51„P¿Ÿß)D$[ól;pº >ÞÀ3~ âE÷*ò²à¹äXpƒ±Z)IwZyBêÈš¢Èl·jFœBæ3fI¡–aáV ¤HàTúMÿÔV›‡*´R‘ÔÈèjÂñowU¢¹Î4ÍEÔì ¼îImä‘tÐ>’Á1Òªë ŸO>endstream endobj 7 0 obj 168 endobj 5 0 obj <> /Contents 6 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 5 0 R ] /Count 1 >> endobj 1 0 obj <> endobj 4 0 obj <> endobj 8 0 obj <> endobj 2 0 obj <>endobj xref 0 9 0000000000 65535 f 0000000471 00000 n 0000000617 00000 n 0000000412 00000 n 0000000519 00000 n 0000000272 00000 n 0000000015 00000 n 0000000253 00000 n 0000000588 00000 n trailer << /Size 9 /Root 1 0 R /Info 2 0 R >> startxref 667 %%EOF gawk-4.0.1+dfsg.orig/doc/rflashlight.pdf0000644000175000017500000000164111463242060017114 0ustar schotschot%PDF-1.3 %Çì¢ 6 0 obj <> stream xœEQà †ß9'pBQ»+ì­ÛšeYRº%Ûõ'(] ‚ð£îaÔ5üZa‡ÓUðñœð „—fOàyFÁzD›EÌSH|FN)”,hŒ²ù¨äÀS?iWk¬Ö*Úž%H!F¯Ž¦Ð®®MÁë\m…ø¬ 2±õmƒÆÁ òt‡”gÉÏH–¿ðëÞXTR»Û쬊š>@ÿŒ2{¤MéWV¶´õó'E€endstream endobj 7 0 obj 175 endobj 5 0 obj <> /Contents 6 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 5 0 R ] /Count 1 >> endobj 1 0 obj <> endobj 4 0 obj <> endobj 8 0 obj <> endobj 2 0 obj <>endobj xref 0 9 0000000000 65535 f 0000000478 00000 n 0000000624 00000 n 0000000419 00000 n 0000000526 00000 n 0000000279 00000 n 0000000015 00000 n 0000000260 00000 n 0000000595 00000 n trailer << /Size 9 /Root 1 0 R /Info 2 0 R >> startxref 674 %%EOF gawk-4.0.1+dfsg.orig/doc/statist.jpg0000644000175000017500000004766011463242060016322 0ustar schotschotÿØÿàJFIFÿþÆSoftware::XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) Software::gnuplot Linux version 3.7 patchlevel 0.1 CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) Quality = 75, Smoothing = 0 ÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀà€"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?÷ú(¢€ +“ñ^£©¦³¥èúd×pËyoq2µ¢G¸¼m ¨w‘#‹³3m'åP¹$#èh!‡QÐ|?qsi¡«YGp–á™Æ®â5'$.sß­nQ\^¯â»ÛoéLp]ÛÙ5ïÙæs§Êâëu´Ž H¢¢°LàîÈrv"ýF­©C£h×Ú¥ÂÈÐY[Éq"Æb¨¥ˆ gÔPÊ+Ÿÿ„‡Tÿ¡3\ÿ¿Ö_ü‘Gü$:§ý šçýþ²ÿäŠè(®þSþ„ÍsþÿYòEðêŸô&kŸ÷úËÿ’( ¢¹ÿøHuOú5ÏûýeÿÉÂCªЙ®ßë/þH ‚Šçÿá!Õ?èL×?ïõ—ÿ$Qÿ ©ÿBf¹ÿ¬¿ù"€: +Ÿÿ„‡Tÿ¡3\ÿ¿Ö_ü‘Gü$:§ý šçýþ²ÿäŠè(®þSþ„ÍsþÿYòEðêŸô&kŸ÷úËÿ’( ¢¹ÿøHuOú5ÏûýeÿÉÂCªЙ®ßë/þH ‚Šçÿá!Õ?èL×?ïõ—ÿ$Qÿ ©ÿBf¹ÿ¬¿ù"€: +Ÿÿ„‡Tÿ¡3\ÿ¿Ö_ü‘Uï|_w§À³]xG\Ž6–8Aó,Î^GXÐqqÝ™G¶yâ€:Š+Ÿÿ„‡Tÿ¡3\ÿ¿Ö_ü‘Gü$:§ý šçýþ²ÿäŠè(®þSþ„ÍsþÿYòEðêŸô&kŸ÷úËÿ’( ¢¹ÿøHuOú5ÏûýeÿÉÂCªЙ®ßë/þH ‚Šçÿá!Õ?èL×?ïõ—ÿ$Qÿ ©ÿBf¹ÿ¬¿ù"€: +Ÿÿ„‡Tÿ¡3\ÿ¿Ö_ü‘Gü$:§ý šçýþ²ÿäŠè(®þSþ„ÍsþÿYòEðêŸô&kŸ÷úËÿ’( ¢¹ÿøHuOú5ÏûýeÿÉÂCªЙ®ßë/þH ‚Šçÿá!Õ?èL×?ïõ—ÿ$Qÿ ©ÿBf¹ÿ¬¿ù"€: +Ÿÿ„‡Tÿ¡3\ÿ¿Ö_ü‘T¯ Íqþ“ªÁmÖ8íö³ˆÁõ9ö(§Ž3~¥jÍ_»º¿éŸÜPƒý õ­Oú›†ya=•ººRIgÛ¸y¿U5(dšÉÚÍÌ_½ƒœ|ëÈìÝ=8$w©àš;›x牷G"‡FÆ2È4-‚~ôTþÿëÏüÉ(¢Š£ ¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(ªwºl7×ZuÄ­ { ƒqR0XÅ$Xn:m‘䡹EQE×tŠ6’GTE™˜à:’iÔ×Rñ²«² ¸ÊûŒä~t o©7ðÏ®‰pc-¾ÚD'è ‚Ý: Ôm«Y$)+ÊÈ­'—óÆÊU°[æe~Qœœ sÒ¡·Ñ-­ì§µW}“}ì* ÿ¾UBýrG#Љ|7f¶OkæK±äy P‰ËDc8  ”ç§ZÎóìt¨á®ï'bÛêÖQ¬$ÊÄÌÆ‹36Ò  g#<Œd`ú:[ݳXˆ•%†éЉú|…Á …=ÇnµYôƒö¸$†æXV19ÞŒ7‘ÕúTŽ`ƒÛ¸È–K u}>$¸x©Ì1+/Ï…Ûƒ¸p¤Ž¥—Q5A$ïß¿BgÔ-£¹ìí¿!IÅUE- œŒsÈõf³ŸE³}PjËÄ4hÙ`0J–Àè@ãëµ~¦U4—#鯩ZÒìÜËv†ŒÛÍå|Äß*¶î:gwÿ« }ÅÕ½œbK›ˆ Bv†•‚}2j (bŠæñã»iÚY7È„©òÛp0(çîýjí(»¡IÁÊñÕy~?‰CûsIÿ ¥—þ'øÑý¹¤ÿÐRËÿüjý{Å^—g÷ÿÀ(ni?ô²ÿÀ„ÿrkd²,qêVnìBª¬êI' 5vŠ5éöü®~óþJÿ`«ÿýi]s÷ŸòPôoû_ÿèÛJ£3 ¢Š(¢Š(¢Š(®ÇòOÝj+P6›G˜$Y“çÁÆÃŒüÇ#bOåZÔVÂ6JìçxhÙ+½ ¹àKMç2.Q%ÚÌ¡”/9äàŽàõç¨6.?Ðw¡•ѳ+©°©<ã¹íW(¦¨¥×·áoò)PJú¾Ÿ…¿È ðݶ¤;² ‘È ŽA‡$çøOQÏ¥ú(«Œon¦¦¡vº”l’PÊÓÃ*:Ç´gfÄé•P§8àuô«r£H ,¯Îr€gõŸE‚ŒyE j1å¹[ìÒÿÏõÇýóÿGÙ¥ÿŸëûæ?þ&¬ÑG³^{e?½ÿ™[ìÒÿÏõÇýóÿJ¶ò«o'`pB`ÿãµbŠ9ŸÞÃÙÇÏïæÏÞÉCÑ¿ìÿ£m+ ®~óþJÿ`«ÿýiVhtQEQEQEÏøïþIç‰ìuÿ¢šº çüwÿ$óÄ¿ö ºÿÑM@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@PÔ{5•¯Q$áÜ¡Sçé¹PþÖ:‘Wê‡úÝÓìö¿÷טߦ<¯Çwls2ÚÆ´´n]—ü7ãbýQTdCUýÜ6÷C­´èäžOÈäûv9팞*ýA}möÍ>æ×~Ï:&v3Œ‚3Æ”•Ñ¥)(Í7·éÔžŠ‚Æçíš}µÖÍžtK&Üçã?OM;‘(¸¶˜QE(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š+Ÿ¼ÿ’‡£Ø*ÿÿFÚWA\ýçü”=þÁWÿú6Ò€: (¢€ (¢€ +‡ñíóÛê:U´÷ŸaÓn"¸u%óYÃàÅå³ÈŽŒß!›+|äs€¥ÓSEñ æøZÃ]žHµíZÉ\C$ ¬ò¤Jód“ÁÇ ô ’¹ÿÿÉ<ñ/ý‚®¿ôSV>¿{>-²Ž×TŸûI®àFµ7Ž®°–LùV˜ í¼q·fŒlaô#VJRmÙ¥9B2ŠÓU¿Ï·™fŠ®¯$,v ¬p²Ž{÷>½ ãŒØ­¹1•Š(¦PQEQEQEQEQEQEQEQEQEQEQEQEQEW?yÿ%Fÿ°Uÿþ´®‚¹ûÏù(z7ý‚¯ÿôm¥tQEQEQEÏøïþIç‰ìuÿ¢šº çüwÿ$óÄ¿ö ºÿÑM@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@"ýæ»tßyc‚$SÔ#å€ô$ydM¾Õ~¨i¿;ß\¹5Óm¨Ø3ŸÅ኿Sk|Vì—äQEQUeÿI¸by†"ŽÌã©÷€=Áôë©" IJˆ}¯à>øÅKkI "ª=¨~ó·c7ïJÝõý|Ñ%£‘ÑVV Š©£»É£Y4ŽÍ(…VBÇ-¼ 0>à‚¾jíPÒþDº·?~©wÐï>`ÇàãñÍ7¹Óiµæ¿_øÙ#YP£Œ©ÿ?¨ ‘·É ‡/oï)è~¹~ã5=WºV ³ %â;°,¿Ä¾üt R–žò9§§¼º~_×õ©bŠEeu ¤2‘AÈ"–¬Ð(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š+Ÿ¼ÿ’‡£Ø*ÿÿFÚWA\ýçü”=þÁWÿú6Ò€: (¢€ (¢€ (¢€ çüwÿ$óÄ¿ö ºÿÑM]sþ;ÿ’yâ_û]覠‚Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š*–°ïzÑ»,¦XÊœ6ò0 {’@ø¤Ý•Ê„y¤£Ün‹óhöÒŸ½:ý¡‡`Òäl±Çµ_¦¢$Q¬q¢¢( ª£ÐN¡++¤¹¦åÜ(¢¢º•¡¶w@ ãBÇ…™7evg&¢›dpþúæIÿ…3ŸÌ1ø½Y¦CÁq)%QB‚zà SéAYk¹0M-w ¡mû½bþ!÷]b¸$õÜÁ¦"_ÄŸÂýP—÷zí«}Õ’ Q@ì Ôæ=7{Ñ.Œè¥¯4{¯Ë_пEU­?wæÛÿÏ';Ý<ŒA’¿ð³U§ýÕÌSÿ ýÓþ$m>üñÿ>õf¢{½Œééîöüº—È(¢Š³@¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(®~óþJÿ`«ÿýi]s÷ŸòPôoû_ÿèÛJè(¢Š(¢Š(®Ç·Ïo¨éVÓÞ}‡M¸Šà=Ô—Íg Sƒ–Ï":3|†lD­ó‘ΗMMÄ+›ák vy"×µk%q 2³Ê‘+ÍFOƒÒ€:Jçüwÿ$óÄ¿ö ºÿÑM\ýþ¯o?IJ\‚ÊêÚîJÝjæ7 ¬ncŠÌ ’««íóï íõh+ ñßü“ÏÿØ*ëÿE5tV^›>½-Ã.©¦é¶Ðl%^×PyضGZc<ç°ãž5(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(ª§Î–¶ãïÍuÒz ‡Ì9üþ8«õBÞëv‘ýä†)&  üª¤ýA^}8™lkGã¿k¿¸¿EUV“÷·‘ÅÕ#k~‹ŸQ÷ÕEYªÖ¼F¸<™ŽàØþ{cœz“Q-Z‰œõj?ÖŸÒ,ÑEfT5?‘ìn܆éwÔï ÇâãðÍ_ªZº;é^R3L‘™" 2|Åù“¿ÌéKcJ?ÄIõÓïлE5%dÕÑ€ee9„u31“D³Á$LHWR¤Ž¸#ÛiZX~pªvÈfÔ{RÕaû›â?‚q»þ0?2;²}ê%£LÎ^씾_åøþeš(¢¬Ð(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š+Ÿ¼ÿ’‡£Ø*ÿÿFÚVäæe·•­ãŽIÂHå›À{àãÐ×'o6±/Ä=/ûZÆÆ×U÷—öKǸÝûÛLçtIŽÝ3œž˜ä°¢Š(¢Š(¢Š(®ÇòOü_ªGÏbgëö‰d™\õtf% ÿ€môÕ/tk !'è¿_пEU¯~xE¿üü+>€‚[ñÀ8÷ÅYªÑþöòIz¤cÊCïÕ±ê>èú©«5Õ¹ÃVåýiý0¢Š*ÍŠ(  7ˤÁüûî·Ï÷¼¶)ŸlíÎ;f¯Õ Ý_j—÷«2 è” LºÈ~¹=ù¿Sk|m÷×ïÔ* ¨ÙáÌc2!ƒ¡$™í‘‘øÔôS’º±Œ£Ìšcc‘e‰$C”pO¨4ê­kû·šß Œ†AþÁéø¸èY¥uv(IÊ7aEUQEQEQEQEQEQEQEQEQEQEQEÏÞÉCÑ¿ìÿ£m+ ®~óþJÿ`«ÿýi@Q@Q@Q@sþ;ÿ’yâ_û]覮‚¹ÿÿÉ<ñ/ý‚®¿ôSPAEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPmFáí4ë‰ã Ò¤dÆ­ÎçþÇ|œ wÍ>ÖÝ,ìà¶Œ±HcXÔ·RÀÍVÔþw±·?rk¥ÜGQ°4ƒŠÃ5~¥nk-)¥ß_Ñ~¡QÜKä[É.ÝÅFBçïÃêO%V—÷×qD>ì½NáGç“í·éDÛKMÎz¨é¹,yªnÜÜ–lcs’}²I5%SI%dRI+ ¢Š)Œ(¢Š ÿ¹×cn‹sF'¦ä9P=Èy=ØÕú¡ª|‰kp>ü7Qm¡Þ|³ŸÁÏ㊿R·hÖzÆ2ù}ßð,QEQ‘ZÝ\C8àåIô=?ØÓq«4É¢Y¡hØuAìG¸ëM¶•¦¶Gpã@Ƙ5 I5ÜÍi6»ëþ¡-QVhQEQEQEQEQEQEQEQEQEQEQEÏÞÉCÑ¿ìÿ£m+ ®~óþJÿ`«ÿýi@Q@Q@Q@sþ;ÿ’yâ_û]覮‚¹ÿÿÉ<ñ/ý‚®¿ôSPAEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPõºÿ§Ùíï¯1¿Ly_ŽîØæýPÓ?yöËŽžuÓü¾›1ëåçñÇlÕú˜ísZºK—¶ŸçøÜ*µŸï®&c¸ö?‡Øç¤Ñ{óÂ-ÿçàùYôߎǾ*Í-åéý^§7Å?OÏþó (¢¬Ð(¢Š(¢Š‚úÛíš}Í®ýžtMìgg7?lÓí®¶ló¢Y6ç8Èüjz¡¦~ïí–ý|›§ù½wâ_ÓÌÇážø©êjµ¦×mGú袊£ ªÉû«é¨˜y£ØŒ)ü1·Yª×¿$"ãþ}Ï›P øàœ{â¢z+ö3©¢æí¯ùþš(¢¬Ð(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š+Ÿ¼ÿ’‡£Ø*ÿÿFÚWA\ýçü”=þÁWÿú6Ò€: (¢€ (¢€ +‡ñí‹Þj:WÚlþÓ¤®#¸&ů¼™XÄc‘`T}ÒmY•]—jï$ç;SE¿¾Òôß hú¥Ž¥q¨\Ù*]]*ù±Á,q):LðY²çqÍt•ÏøïþIç‰ìuÿ¢š«ÞŸ´©DÍ»Jº…åÌÐ!2BÈ cËF"93È' ð ±ã¿ù'ž%ÿ°U×þŠjè(¬½6 z+†mSRÓn`ØB¥®žð0lŽK4ÎÆxÇqÏêPEPEPEPEPEPEPEPEPEPEPEPEPEPP_\ýO¹ºÙ¿É‰¤Ûœgœgð©ê†§ûϱÛôó®“æôÙ™_/Ž{b”‘¥(§4žÝ}:–,m¾Ç§ÛZïßäıîÆ3€qøTôS&•a…¤`HQÐu'°ç¥$g9^ò‘ ½¼’^©òûõlzº>ªjÍEmClˆäÆ\Ž…,2jZ˜-5"šj7{°¢Š*Ë (¢€ (¢€ ¡þ«_õûE¯ýóå·ëŸ7ðÛß<_ªŸîþÇq×ɺO—×~bý<Ìþïš™msZZË—¾ŸåøØ¿EUQ@¬~[ õ€˜¿÷»OãVj´ß¹¹Žá|E'çòŸÌãþíVj!¢åìgOEËÛú_×p¢Š*ÍŠ( Š( Š( Š( Š( Š( Š( Š( Š( Š( ¹ûÏù(z7ý‚¯ÿôm¥nN&kyVÞH㜡¼ˆ]U±Á*$g¶F}Ervðë|CÒÿµ¯¬n³¥_yd³{}¿½´ÎwJùíÓÁëž; (¢€ (¢€ (¢€ çüwÿ$óÄ¿ö ºÿÑM]sþ;ÿ’yâ_û]覠‚Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( ¨'ïµÙªÛ@Hé¹ÎXp3F÷~¨i_½·–óþ~å3.:ÀT#Ó(ªyîON‚^éÃHÊ_/¿þËõZoß\Çð¦%“óùGæ3ÿ÷©¦•a…¤`HQÐu'°ç¥6Þ&X¹I»‘Ó=üߥ-_)Í?yòýÿןårZ(¢¬Ð(¢Š(¢Š(¢Š*«t¼³žÚBÁ&£b½@#5 6Ñ[N¸{½:Þy¬¯2*ñµÿ‰qÛ#±Vj…‡înï­z”Mÿ°ã$çÞA'ÿ«~”v.ªJnÛo÷êQE31²F²Äñ¸Ê8*ÃÔŠÖFxŠHs,gcŸSëø‚¶qSÕi¿ssÿÂøŠOÏå?™Çü Ú¢Z>oëúÿ‚g?u©}ÿ×—årÍQVhQEQEQEQEQEQEQEQEQEQEÏÞÉCÑ¿ìÿ£m+ ®~óþJÿ`«ÿýi@Q@Q@Q@sþ;ÿ’yâ_û]覮‚¹ÿÿÉ<ñ/ý‚®¿ôSPAEPEPEPEPEPEPEPEPEPEPEPEPEPEPMJi!²u±s/î ã?;p;÷^=ªx!ŽÚÞ8"]±Æ¡sœ0T‹ý3SyºÃk˜ãôißoC…¨>`5by‘ '÷­‚O÷<Ÿ¯\{ûQ{j]YrAGçþKúîÆÿÇÅϬ1~LùÿÙqôÉõZ³MŽ5‰ Âóøšu8«o¹”#m^áEUQEQEQEQEP¸ÿFÕ`¹éëöyûYÌdú\{—QÏ¿PÝ[¥Ý´9e1¹xe=˜Ä{)–ql ÁVâ2c™W€uÀ<àõê=êVŒÖ^ôí§ù—ÜY¢Š*Œ‚›$k,OŒ£‚¬=A§QCW¯£ ·‘Žø¤9’3‚znåúƒSÔSDÎRHÈÆr¹èGp}óóŠt2¬Ð¬Š : ÷Üt¨‹·ºÈ‹³åc袊²ÂŠ( Š( Š( Š( Š( Š( Š( Š( Š( ¹ûÏù(z7ý‚¯ÿôm¥tÏÞÉCÑ¿ìÿ£m( ¢Š(¢Š(¢Š(®ÇòO¬NI?RjH"d]òfp7°éŸAì;‰4E2ÊA”ŒqÑG þ§¿ä´’¾¬ËYËžAEU”QEQEQEQEQEBoô-@\ô‚ãlrã´™ |í'“ÂvÕúŽxc¹·’ Wtr)G\ã ŒI«— (½v{’QU!šHf[[¦ÜçýTØÀ”p{¨èG#¸[t'qJ.,(¢Šd…V“ýS0ÿU!ýnúpüøÁÍš*d®L£p¢«a­8Dgƒû«Éè;¯°ät ã‘%@ñººŒ§ Ð¥}á]Ùî:Š(ª((¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š+Ÿ¼ÿ’‡£Ø*ÿÿFÚWA\ýçü”=þÁWÿú6Ò€: (¢€ (¢€ (¢€ çüwÿ$óÄ¿ö ºÿÑM\ž¯¥êSøòiE¤‹pºœö7ihÒ;Zš?´Ù@-É1ï !sÀ ‰zÿÇ€¼DfGx†™s½Q‚±_)² àûàý nÑU¶^ÿÏÅ¿ýøoþ.—¿óñoÿ~ÿ‹¨æÊÿó3ç—ò¿ÃüË4Um—¿óñoÿ~ÿ‹£eïüü[ÿ߆ÿâèæÊÿóy+ü?̳EVÙ{ÿ?ÿ÷á¿øº6^ÿÏÅ¿ýøoþ.Žgü¯ðÿ0ç—ò¿ÃüË4Um—¿óñoÿ~ÿ‹£eïüü[ÿ߆ÿâèæÊÿóy+ü?̳EVÙ{ÿ?ÿ÷á¿øº6^ÿÏÅ¿ýøoþ.Žgü¯ðÿ0ç—ò¿ÃüË4Um—¿óñoÿ~ÿ‹£eïüü[ÿ߆ÿâèæÊÿóy+ü?̳EVÙ{ÿ?ÿ÷á¿øº6^ÿÏÅ¿ýøoþ.Žgü¯ðÿ0ç—ò¿ÃüË4Um—¿óñoÿ~ÿ‹£eïüü[ÿ߆ÿâèæÊÿóy+ü?̳EVÙ{ÿ?ÿ÷á¿øº6^ÿÏÅ¿ýøoþ.Žgü¯ðÿ0ç—ò¿ÃüË4Um—¿óñoÿ~ÿ‹£eïüü[ÿ߆ÿâèæÊÿóy+ü?̳EgÜÛj’íò5( Æs‹]ÙüÚ«ýƒ\ÿ Ü_ø?øªNrþWø™¤uWzUo³Kÿ?×÷ÌüMV¸Òd¸9Õµð1ˆè49K¤"bå'k[×þÿ#E™QK1  d’pªÿnø¾ÐßÝ„†üÏAø‘TâðG‰ç“sM+8rG$©;N~˜­4DŠ5Ž4TEUT`:(^ÑïeøÿI>úþ¼ŒØm/§™n/%XÜr‘¡"Ï÷r1œpIÝœœm£1Â¥c@ œŸR}Iî}éôSŒ×v6®îõ×Ýý\(¢Š±…Q@Q@Q@Q@Q@Q@Q@Í w´R®ä>ø ŽAr<‚9ªy÷6\]+ÜÃÚxbË(ôt“Ó•äð s~ŠMÙYêˆmî­ï#2[\E:´´Né‘SUk>ÒêA,°¯œÕ™IYzaÔô=Ï­Cý›*ü°êw±F:&RLÀYâM+²¹i½½Í‘~Š¡ýŸsÿA‹ßûâþ7GÙ5¿Ôê^fzýª|}6lÇãžÝ;—}ƒÙÇù—ãþEú‚K|¹’))R9Vúއ·<:Õ+VÿŸÛ/üþ;G•«Ïí—þ¿ÿ¤õÝ*0–ŽKñÿ"o2ê/¿ Ì?½Á?ð8þÁÑÞ[Èâ5•D‡þY·Êÿ÷Éæ«ùZ·üþÙàÿñÚl–ºœ¨RK«CÕZɈ?ù§Þ[~?×ù“ìmµEó¿ù™£EcÿeÞ¹se¯“k$yúí”fìýdpšÄH½—ì…±ø³“úÑÏ5¼ø`åkv¾WýR6(¬°kŸô‹ÿ‡ÿGØ5Ïú Åÿ€CÿŠ£ÚKù_áþacbЍ‘_¬j¯u°û9>¿~²÷þ~-ÿïÃñu\ïù_áþf\ïù_áþeš*¶Ëßùø·ÿ¿ ÿÅѲ÷þ~-ÿïÃñts?å‡ù‡<¿•þæY¢«l½ÿŸ‹ûðßü]/çâßþü7ÿG3þWø˜sËù_áþeš*¶Ëßùø·ÿ¿ ÿÅѲ÷þ~-ÿïÃñts?å‡ù‡<¿•þæY¢«l½ÿŸ‹ûðßü]/çâßþü7ÿG3þWø˜sËù_áþeš*¶Ëßùø·ÿ¿ ÿÅѲ÷þ~-ÿïÃñts?å‡ù‡<¿•þæY®~óþJÿ`«ÿýiZû/çâßþü7ÿXò†_éBrS¦^ìdUW͵Ü9É?.F0x9àR}¿/ó›oá‡ù QVXQEQEW?ã¿ù'ž%ÿ°U×þŠjè+Ÿñßü“ÏÿØ*ëÿE5tQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEÏÞÉCÑ¿ìÿ£m+ ®~óþJÿ`«ÿýi@Q@Q@Q@sþ;ÿ’yâ_û]覮‚¹ÿÿÉ<ñ/ý‚®¿ôSPAEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP\ýçü”=þÁWÿú6Òº çï?ä¡èßö ¿ÿѶ”ÐQEQEQEW?ã¿ù'ž%ÿ°U×þŠjè+Ÿñßü“ÏÿØ*ëÿE5tQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEÏÞÉCÑ¿ìÿ£m+ ®~óþJÿ`«ÿýi@Q@U=JÊ{ëuŠßS»ÓÜ8c-ªÄÌFÊ|ÄqŽsÓ<zäÔµm7F·[SP´±œ"Éu2Ä¥°Nbp DZ«•Åëº.±î‘uo>¥©Ç½Í­ã@`ŽîD•âqµ³ ýÖÒËóFѸï]  _@Ó|-¡ 6;¸"²[{ûØîB­³E…!n;8Æ:šè ð­Â[´±‰ÝÒ2Ãs*Ô€YA=·ZÃñßü“ÏÿØ*ëÿE5Gue?ü,m7Q‹I‘ eŬ÷êb’7,å¿E «bOÿÉ<ñ/ý‚®¿ôSPAEeéºUåÃKqâ KPB…DWQÛªƒ‘ó.$9ãqÉã¦5(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Šæüu-ô^oìˉ-ïöÊ(¤I<² ÝD¸Ýµ€U† ʰà€t•Ãuoż±Í¨9#`ÊêFApAæ¹8t]RûÂ÷öR,ðG-ÜrÚYê7>tžB˜Ùàž@Òede”ºL$ `°%°×u[ýâÁ/­ w ^Šy“Û ±ðÌ ûN'iåHm¦€:É'†…%–4yŸdJÌvÚ[ êv«ÀžÕ%qrÙkŸ^_é2]ê–nQ¹C6åíš99,2 ެBŒú(7/|1¨Üø¡uXõ.ÔK†×}ç!Bäan–.på–9ä79ê*ž­¦êVöZ…¥Ìö²æ8fWh[$aÀ9S•#ÐúW¤iž+´ñRÏ<—m§½ìï –ìH¢'{Â0¥ŽÕ°ÀåÉÆ7K›²ÔVâÚ}cIÔ­nà²òc5´µ P¼0, _fQ6ùˆXÇ “¸°‚xn­â¸·–9 •Ç$l]HÈ Ž#œÔ•áû‹X¯§¸ìÿn»k¤³ µ ª ä|»™•¤m¼o‘¹o¾Ç‰4‹­kNŽÚÎÿìR,¢C&éÆ@c÷3DÝÇV#Ž™Á5-[MÑ­ÖãTÔ-,`g²]L±)l€Xœqìjåpz‡‡µ«¢I—z‚[[ÝZÞ ÜH’ɃcÜNJÝm-æ3~@¹ Æ‹¯ i¾І›ÜY-½ýìw!VÙ¢‰BŒ7HcMlI«i°êérꉨL›â´i”JëÏ*™É+rcéDz¶›6©6—¡hú„)¾[E™L¨¼rÉœó/$wµÅê~Ön|Qv¡'k VÏSŠH¤D… BÜ8›çó±nÁ!@\$àÅcNÑ5h¼Q›o8±¶Ô.¯WsÅöE‰°Ðàùæcç|ÂOÝÒíà°†þÎâòæÎ¸$ºµÛöˆR@^-Ã+¹G+‘ÈÏZ§‰t´¹µHµ½5ôø_d·kt†$n8gÎù—‚{Zåü+£ø†ÃK—IÔ`’öÝlž;„ÔÚßʺ¹8É¢Ræ'&Rí2—;à’õrÆ-y.µV=:tº»û=¼ ©<&H”Jû‰¾Æ†5”²Þcê[t´¹µHµ½5ôø_d·kt†$n8gÎù—‚{Z’ë]Ñìtè5ÍVÆÞÆ}¾MÌבɸn]¬N@$c¨¬½K@ŠßFVµ]J}B v·6­Ú¤œ©¤&\DO–̸aµW@Ú€a·†õ½"ÇJxd¾¹»‹í¦æãMko´†¸™f*<ð°´y3V%Pªª—Zí/5m7O¸µ·½Ô--§»}–ÑÍ2£L٠˰£Ö¬I<0¼),±£Ìû"V` ¶ÒØ_SµXàvö®Sе4ð­®…k¤F%—LŠÊi¬eÈ;QÃ1—ýŸçÈ1“. ãiåìjþÖ®»ucö}í¢±óUV7 d~Te‚†“øØpªŠ€!ñg†î,îo!ñ•%­®ß´L—±”‹qÂî`p¹< õ£þÏ ÿghÿÂA¥}‡Íò>ÓöØü¿3¶nÎ7cœuÅS¾ðò¾‰wö¨$Õ¯î)n9ÚÕä1¸uX˜6cA(»€ÏÞl³¹¯¦Ûëðé­m wv±]^•…¯.âãO¶òfffq#™Uöåœ(• !Ž€5&ñg†íìí¯&ñ•­Öï³Ì÷±„—iÃmbpØ<t«ëºÓœcËççÎå韼=kZðý¤ §]R»KTš5:n¨ö× æ2³&XüÀì»™™Ëná·1õ½/^ºðôZl¶_kÔ®ôøí¯oí^Žy:¼w¸·-!lÃóà¾Ð‡€;Š(¢€ (¢€ (¢€ (¢€ (¢€ çï?ä¡èßö ¿ÿѶ•¹tžB˜Ùàž@Òede”ºL$ `°j_\Üiú­´ŽVÞH¦Óf¸á¤1•ve,¤ÆPƒŒü®åKÀ6$ž^–XÑæ}‘+0Ûil/©Ú¬p;{T•ÇÞh×¶·>dŸW¸Ò¥Ùu©uClð³¶÷Ýó;#»¾áÎHPl^øcQ¹ñBê±ë]¨–9 ®ûÎB…ÈÂÝ,\àÿË,sÈnrÔU;=[MÔ..­ìµ K™íeÌp̮жHÀr§*F¡ô¬{];ZMRÞ ®d6v··¦çÏ$ܤ¾nËr@ŒËÜ‘ˆ¢Û’ÄEŸàë-En-§Ö4JÖî /&1!³[KPÅ ÃÀÅöeo˜…Œr ;€;'†êÞ+‹ycš P•`O \=ºË]ã 7*±!I@%Xßiô®_Z°Ô/u›{{m2D¶7°]Í:<"ÞãcDÛ§é0•|¬ L©"=ä®å[}”ð|AÖï“$—vV©öÐb <±s~vÈŠ /ü³# \€nCgqysg Ü]ZíûD) /á•Ü£•Èäg­Gs«i¶V÷7z…¤Z¸K‰%™Uab€äœ)!Ѐ¼=EqþÒß&æk„HäÜ7.Ö' 1ÔW?â Ý.“bšd—ÒÉ ··¯ @nnØFÊ÷ÃÊfå0 ¨Œl Q’u×WD³–k ¹µ"’Dn¬ZÔ^@…Õ/îIdEm8ÞÕ#@65/è:5ÂÛêšÞ›c; uŽêé"b¹# 1gØÑ7‰tmPisëzlZuAh÷H²–lm ÎNF9Ȭ»-òM;MЯíàƒI³ÓàIã¶rÑÝHV‡æ;ü• ÌÔ€êú cq©ë>£Ë 9PÚA¸¸pªÞsÿºÄª¡èÈ_æ; já[„·icº3¤e†æU 1©²‚{nµŸ¦ø—AÖnßKÖôÛéÕ ´v·I+È!I8É>â¹ûO kV¿¢Öæ¼´ºµ’Þî9%6¥eDi"h Ýæ‘… pUù\‘ºBÕNÏÃwãN¿Òlô©ìlJžÉí5-NK«i¥!V/(‰D…@”˜‡O—#äì-uÝûNŸQ³Õln,`Ýç\Ãp{FæÜÀà`Nz ’[M¹ÒΩ¡i.žœÝ¤ÊÑ\î;ÁÆNxÁ®NÇD¿¼ƒX¹ÕmõWy"·û;]=¨½2@ï*m#j»)MÜ–.)´U{ß jR|<ñMµÌ꺖µ¾Xíî>Ïæ#˜£Š-ì6E¹|´rWî‘….T3z4ÖñJðɺh¤*Y tí$dtà‘èMI@Q@Q@Q@Q@Q@s÷ŸòPôoû_ÿèÛJÜž6šÞX’i wB«,aK!#ï ÀŒŽ¼‚=A®NßNº°ø‡¥ý§Y¾Ô·éWÛ~Ö/—‰m3*4ëžùè1ŽrØQEQEQEW?ã¿ù'ž%ÿ°U×þŠjè+Ÿñßü“ÏÿØ*ëÿE5tQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEÏÞÉCÑ¿ìÿ£m+ ®~óþJÿ`«ÿýi@Q@Q@Q@sþ;ÿ’yâ_û]覮‚¹ÿÿÉ<ñ/ý‚®¿ôSPAEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP\ýçü”=þÁWÿú6Òº çï?ä¡èßö ¿ÿѶ”ÐQEQEQEW?ã¿ù'ž%ÿ°U×þŠjè+Ÿñßü“ÏÿØ*ëÿE5tQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEÏÞÉCÑ¿ìÿ£m+ ®~óþJÿ`«ÿýi@Q@U=KLƒU·X.$»DW ­Ü¶íœËFÊHç¦qÓÐPzžµe¤yBé§i%ÉHm­¤¸‘€Æ[djÍ´eAl`PNHÍÈ'†êÞ+‹ycš PeÍ?ÿÉ<ñ/ý‚®¿ôSTzÆ‘ªêšÍ™ÿD6÷Γ}¢@È‘™ß9‰)òÈÄ÷îUÜ™mËû}ON¹°¼Ìµº‰á™7¹Ã#‘OJ±Esÿð†éóõ®àö÷ÿQÿn—ÿ?ZçþoøõtW?ÿn—ÿ?Zçþoøõð†éóõ®àö÷ÿPAEsÿð†éóõ®àö÷ÿQÿn—ÿ?ZçþoøõtW?ÿn—ÿ?Zçþoøõð†éóõ®àö÷ÿPAEsÿð†éóõ®àö÷ÿQÿn—ÿ?ZçþoøõtW?ÿn—ÿ?Zçþoøõð†éóõ®àö÷ÿPAEsÿð†éóõ®àö÷ÿQÿn—ÿ?ZçþoøõtW?ÿn—ÿ?Zçþoøõð†éóõ®àö÷ÿPAYúΧý‘cÏ“æï»¶¶Û»n<é’-ÙÁé¿8ïŒqÖ³ÿá Òÿçë\ÿÁíïÿ¨æð6‹r'—Y•«…}nõ€e`Êy—¨`=ˆ€:J+Ÿÿ„7KÿŸ­sÿ·¿üzøCt¿ùú×?ð{{ÿǨ ¢¹ÿøCt¿ùú×?ð{{ÿǨÿ„7KÿŸ­sÿ·¿üz€: +Ÿÿ„7KÿŸ­sÿ·¿üzøCt¿ùú×?ð{{ÿǨ ¢¹ÿøCt¿ùú×?ð{{ÿǨÿ„7KÿŸ­sÿ·¿üz€: +Ÿÿ„7KÿŸ­sÿ·¿üzøCt¿ùú×?ð{{ÿǨ ¢¹ÿøCt¿ùú×?ð{{ÿǨÿ„7KÿŸ­sÿ·¿üz€: +Ÿÿ„7KÿŸ­sÿ·¿üzøCt¿ùú×?ð{{ÿǨ ¢¹ÿøCt¿ùú×?ð{{ÿǨÿ„7KÿŸ­sÿ·¿üz€: ÏÔu?°_i6ÞO™ý¡vÖÛ·cËÄ2Ë»çýV1ÇÞÏlÿøCt¿ùú×?ð{{ÿǪ9< ¢Ìð¼²ë.ð¾ø™µ»ÒQ¶•Êþ÷ƒµ˜dv$w ’Šçÿá Òÿçë\ÿÁíïÿ£þÝ/þ~µÏüÞÿñêè(®þÝ/þ~µÏüÞÿñê?á Òÿçë\ÿÁíïÿ ‚Šçÿá Òÿçë\ÿÁíïÿ£þÝ/þ~µÏüÞÿñêè(®þÝ/þ~µÏüÞÿñê?á Òÿçë\ÿÁíïÿ ‚Šçÿá Òÿçë\ÿÁíïÿ£þÝ/þ~µÏüÞÿñêè(®þÝ/þ~µÏüÞÿñê?á Òÿçë\ÿÁíïÿ ‚Šçÿá Òÿçë\ÿÁíïÿ£þÝ/þ~µÏüÞÿñêè(®þÝ/þ~µÏüÞÿñê?á Òÿçë\ÿÁíïÿ ‚³õOìÚM·“æh]µ¶íØòñ ²îÆ9ÿUŒq÷³Û?þÝ/þ~µÏüÞÿñêŽOh³Ò'ÕƒP’ʺG±„¥|®Ó»<`bµ( Š( Š( Š( Š( Š( Š( Š( ¹»Æñ îªÛßÛÚii%”ËÞ›y5Üñ9\XÄ(I$m9Èr:J(‹ð$±ý£R‚ V=bH\j6÷“Ïbd %š`®¡U›k ‰S*0 í(¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ ó?ˆ:¦¥k¬ÝAmw%¬é¦$úK5ÛD²Ý—ti²›©X‹u°e]Ù#æ '¦Q@Q@Q@Q@Q@Q@Q@Q@Q@yߎÇÙµ–½m~Hl—ìú7Ú.­ÚõÕ¤; x§Œ4¯•Lm¯îÎ>`¢Q@Q@Q@Q@Q@Q@Q@Q@Q@ïÝ#Ó®d–óìQ¬NZë*<ËåÁQŽ¿0#ŽF+Îä×f“ჯ¾Û%ŽÂA£r5n?ãÝÁ2Ü‚0'XÃ0;³•ÃØÞ™Esþ šò Û=íÏÚ¤ΑÜq4+3¬N¥‹VŒ! Y‹ f'' ¢ŠÿÙgawk-4.0.1+dfsg.orig/doc/lflashlight.eps0000644000175000017500000000776111463242060017135 0ustar schotschot%! %%Creator: arnold@skeeve (Aharon Robbins) %%Title: rflashlight.small.xpic (xpic) %%CreationDate: Tue Dec 12 09:51:27 2000 %%Pages: 1 %%BoundingBox: 0 0 72 28.8 % (in inches) at 0 0, width 1, height 0.4 %%EndComments % Prolog for xpic to PostScript converter % Author: Mark Moraes % $Header: x2ps.pro,v 1.2 88/03/19 16:50:09 moraes Exp % %d D - change style SOLID, DOTTED, SHORT-DASH, LONG-DASH, DOT-DASH % %s F - change font to fontname % %d S - change size (font size in points) % (%s) rj %d t - text right just. (%d is TOPLINE, MIDLINE, BOTLINE) % (%s) lj %d t - text left just. (%d is TOPLINE, MIDLINE, BOTLINE) % (%s) ce %d t - text centered (%d is TOPLINE, MIDLINE, BOTLINE) % %d %d l - lineto % %d %d m - moveto % %d %d s - spline segment % x - flush line, spline % b - box % e - ellipse % %d ss - setscale % %d W - change linewidth % getpagesize - gets the values of PAGEHEIGHT and PAGEWIDTH % %d %d flip - translate by %d, PAGEHEIGHT - %d (this % transforms to X windows coordinates) save 50 dict begin /xpic exch def /StartXpic {newpath 0 0 moveto [] 0 setdash 0 setgray 1 setlinecap} def % Set defaults /fontname /Times-Roman def /ptsize 12 def % halign has the values for MIDLINE, TOPLINE, BOTLINE /halign 3 array def /s {rcurveto} def /x {stroke} def /l {lineto} def /m {moveto} def /b { /ury exch def /urx exch def /lly exch def /llx exch def llx lly moveto urx lly lineto urx ury lineto llx ury lineto llx lly lineto stroke } def /mtrx matrix def /e { /yc exch def /xc exch def /yrad exch def /xrad exch def xc xrad add yc moveto /savematrix mtrx currentmatrix def xc yc translate xrad yrad scale 0 0 1 0 360 arc savematrix setmatrix stroke } def % The next three take the text string, and moveto the right horiz. position % leaving the string on the stack. /lj {} def /rj {dup stringwidth pop neg 0 rmoveto} def /ce {dup stringwidth pop 2 div neg 0 rmoveto} def % And this is invoked after one of the three above, and % computes the vert. pos, and then displays the string. /t {halign exch get 0 exch rmoveto show newpath} def % Store an array of patterns in /styles - a pattern is an array consisting % of an array and an offset. Corresp to xpic patterns % solid, dotted, short-dashed, long-dashed, dot-dashed /styles [ [] 0 ] [ [1 3] 0 ] [ [4 4] 0 ] [ [8 4] 0 ] [ [1 4 4 4] 0 ] 5 array astore def % change style to arg. /D {stroke styles exch get aload pop setdash newpath} def /W {stroke 0.5 mul setlinewidth newpath} def % fontbox takes a fontname off the stack, and returns an array % containing the values of the bottom line of the bounding box, the % mid line of the bounding box, and the top line of the bounding box % of that font, taken from the baseline, scaled to a font of size 1 /fontbox { findfont dup /FontMatrix get /fm exch def /FontBBox get aload pop /ytop exch def pop /ybot exch def pop /ymid ytop ybot sub 2 div def 0 ybot fm dtransform exch pop % botline dup neg exch % midline - this works better than (ytop-ybot)/2! 0 ytop fm dtransform exch pop exch %topline % now in the order midline, topline, botline. 3 array astore } def % select font /F { dup /fontname exch def fontbox /thisfontbox exch def SF } def % set point size /S {/ptsize exch def SF} def % actually set font /SF { fontname findfont ptsize curscale div scalefont setfont thisfontbox aload pop 1 1 3 { pop ptsize mul curscale div neg 3 1 roll } for halign astore pop } def % sets the scale to 72 / n, where n is on the stack, and stores the value % in curscale for font scaling /curscale 1 def /getpagesize{newpath clippath pathbbox /pageheight exch def /pagewidth exch def pop pop newpath} def /flip{pageheight exch sub translate} def /ss {/curscale exch 72 exch div dup dup scale def} def /land {90 rotate} def StartXpic %%EndProlog 80 ss 0.5 W 0 D 80 32 m 64 24 l x 32 24 m 56 32 l x 32 8 m 56 0 l x 8 16 56 16 e 0 24 32 8 b 64 16 m 80 16 l x 64 8 m 80 0 l x %%Trailer showpage % Trailer for xpic to PostScript converter % $Header: x2ps.tra,v 1.2 89/07/02 15:59:53 moraes Exp $ xpic end restore gawk-4.0.1+dfsg.orig/doc/ad.block0000644000175000017500000000315211463242060015511 0ustar schotschot.\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com .\" This file is the Ad block (included in cover) .\" .\" Copyright (C) 1996, 1998, 2000, 2001, 2003 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission .\" notice are preserved on all copies. .\" .\" Permission is granted to process this file through troff and print the .\" results, provided the printed document carries copying permission .\" notice identical to this one except for the removal of this paragraph .\" (this paragraph not being relevant to the printed reference card). .\" .\" Permission is granted to copy and distribute modified versions of this .\" reference card under the conditions for verbatim copying, provided that .\" the entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Permission is granted to copy and distribute translations of this .\" reference card into another language, under the above conditions for .\" modified versions, except that this permission notice may be stated in .\" a translation approved by the Foundation. .\" .ft HB .ps 10 .vs 12 .ES .nf .ce 7 \*(CBFree Software Foundation, Inc. .ft H 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA Phone: +1-617-542-5942 Fax (including Japan): +1-617-542-2652 E-mail: gnu@gnu.org URL: http://www.gnu.org .ce 5 .ft HB \*(CGSource Distributions on CD-ROM .\" Deluxe Distributions Emacs, Make and GDB Manuals Emacs and GDB References\*(CX .EB "\f(HBOTHER FSF PRODUCTS:\*(FR" .ps .vs gawk-4.0.1+dfsg.orig/doc/Makefile.am0000644000175000017500000000743611601043432016152 0ustar schotschot# # doc/Makefile.am --- automake input file for gawk # # 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 # 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 # ## process this file with automake to produce Makefile.in info_TEXINFOS = gawk.texi gawkinet.texi man_MANS = gawk.1 igawk.1 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-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 igawk.1.pdf MAKEINFO = @MAKEINFO@ --no-split --force 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/" SEDME2 = sed '/%%Page: 10 10/,/0 Cg EP/d' CARDSRC = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/colors awkcard.tr CARDSRC_N = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/no.colors awkcard.tr CARDFILES= $(CARDSRC) ad.block awkcard.in setter.outline # Use this if your troff can correctly handle macros from 'colors' file AWKCARD = awkcard.ps # Uncomment the following definition of AWKCARD if your troff can produce # Postscript but still has troubles with macros from 'colors'. As this # is not groff you will have to change TROFF macro as well. Do not forget # to ensure that awkcard.tr is processed by tbl. #AWKCARD = awkcard.nc # The following is patterned after the main Makefile.am. The point is to # make pgawk.1 a link to gawk.1 in the installed man directory. # We want hard links for install-data-hook, below LN= ln -f # Link gawk.1 to pgawk.1 install-data-hook: (cd $(DESTDIR)$(man1dir); \ $(LN) gawk.1 pgawk.1 2>/dev/null ; \ exit 0) # Undo the above when uninstalling uninstall-hook: cd $(DESTDIR)$(man1dir); rm -f pgawk.1 ; exit 0 postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD) pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf gawk.ps: gawk.dvi dvips -o gawk.ps gawk.dvi gawkinet.ps: gawkinet.dvi dvips -o gawkinet.ps gawkinet.dvi gawk.1.ps: gawk.1 -groff -man $(srcdir)/gawk.1 > gawk.1.ps 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 awkcard.ps: $(CARDFILES) $(TROFF) $(CARDSRC) | $(SEDME) | cat $(srcdir)/setter.outline - | $(SEDME2) > awkcard.ps 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 gawk-4.0.1+dfsg.orig/doc/awkcard.in0000644000175000017500000017060011734665351016075 0ustar schotschot.\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com .\" .\" Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, .\" 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 .\" notice are preserved on all copies. .\" .\" Permission is granted to process this file through troff and print the .\" results, provided the printed document carries copying permission .\" notice identical to this one except for the removal of this paragraph .\" (this paragraph not being relevant to the printed reference card). .\" .\" Permission is granted to copy and distribute modified versions of this .\" reference card under the conditions for verbatim copying, provided that .\" the entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Permission is granted to copy and distribute translations of this .\" reference card into another language, under the above conditions for .\" modified versions, except that this permission notice may be stated in .\" a translation approved by the Foundation. .\" .\" Strings to save typing .ds AK \*(FCawk\*(FR .ds GK \*(FCgawk\*(FR .ds PK \*(FCpgawk\*(FR .ds NK Bell Labs \*(FCawk\*(FR .ds MK \*(FCmawk\*(FR .\" .\" .de TD\" tab defaults .ta .2i .78i 1i 1.2i 1.4i 1.7i .. .de TE .TD .. .sp .ce \*(CD\f(HB\s+8AWK REFERENCE\s0\*(FR .sp .\" --- Table Of Contents .ta 2.4i 2.6iR .lc . .ES .in +.2i .nf \*(FRAction Statements 9 Arrays 7 Awk Program Execution 5 Bit Manipulation Functions (\*(GK) 17 Bug Reports 2 Closing Redirections 13 Command Line Arguments (standard) 2 Command Line Arguments (\*(GK) 3 Command Line Arguments (\*(MK) 4 Conversions And Comparisons 8 Copying Permissions 18 Definitions 2 Dynamic Extensions (\*(GK) 17 Environment Variables (\*(GK) 11 Escape Sequences 9 Expressions 7 Fields 10 FTP/HTTP Information 18 Historical Features (\*(GK) 10 Input Control 13 Internationalization (\*(GK) 18 Lines And Statements 4 Localization (\*(GK) 12 Numeric Functions 15 Output Control 13 Pattern Elements 8 Printf Formats 14 Records 10 Regular Expressions 11 Signals (\*(PK) 4 Special Filenames 12 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 .TD .fi \*(CD\*(FRArnold Robbins wrote this reference card. We thank Brian Kernighan and Michael Brennan who reviewed it. .sp .4 .SL .sp .4 .so SRCDIR/ad.block .\" a subtlety here; this line changes color. We rely on it .\" also to provide a blank line. \*(CD .SL .nf \*(FRCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. .nf .BT .\" .\" .\" --- Definitions .fi .ES \*(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. \*(CBFeatures specific to just one version\(emusually GNU AWK (\*(GK)\(emare printed in dark blue. \*(CRExceptions and deprecated features are printed in red. \*(CDFeatures mandated by POSIX are printed in black. .sp .5 Several type faces are used to clarify the meaning: .br .nr IN \w'\(bu ' \(bu \*(FC\*(CN\fP is used for computer input. .br .fi .in +\n(INu .ti -\n(INu \(bu\|\^\*(FI\*(IN\fP is used for emphasis, to indicate user input and for syntactic placeholders, such as \*(FIvariable\fP or \*(FIaction\fP. .in -\n(INu .br \(bu \*(RN is used for explanatory text. .sp .5 \*(FInumber\fP \- a floating point number as in ANSI C, such as \*(FC3\*(FR, \*(FC2.3\*(FR, \*(FC.4\*(FR, \*(FC1.4e2\*(FR or \*(FC4.1E5\*(FR. \*(CBNumbers may also be given in octal or hexadecimal: e.g., \*(FC011\*(FR or \*(FC0x11\*(FR.\*(CD .sp .5 \*(FIescape sequences\fP \- a special sequence of characters beginning with a backslash, used to describe otherwise unprintable characters. (See \fHEscape Sequences\fP below.) .sp .5 \*(FIstring\fP \- a group of characters enclosed in double quotes. Strings may contain \*(FIescape sequences\*(FR. .sp .5 \*(FIregexp\fP \- a regular expression, either a regexp constant enclosed in forward slashes, or a dynamic regexp computed at run-time. Regexp constants may contain \*(FIescape sequences\*(FR. .sp .5 \*(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. .sp .5 \*(FIpattern\fP \- an expression describing an input record to be matched. .sp .5 \*(FIaction\fP \- statements to execute when an input record is matched. .sp .5 \*(FIrule\fP \- a pattern-action pair, where the pattern or action may be missing.\*(CX .EB "\s+2\f(HBDEFINITIONS\*(FR\s0" .\" .\" .\" --- Command Line Arguments .ES .fi \*(CDCommand line arguments control setting the field separator, setting variables before the \*(FCBEGIN\fP rule is run, and the location of AWK program source code. Implementation-specific command line arguments change the behavior of the running interpreter. .sp .5 .TS expand; 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 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 \*(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 .TE .EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (standard)\*(FR\s0" .\" --- Bug Reports .ES .fi \*(CDIf you find a bug in this reference card, please report it via electronic mail to \*(FCbug-gawk@gnu.org\*(FR.\*(CX .EB "\s+2\f(HBBUG REPORTS\*(FR\s0" .BT .\" .\" .\" --- Command Line Arguments (gawk) .ES .fi \*(CDLong options may abbreviated as long as the abbreviation remains unique. You may use ``\*(FC\-W \*(FIoption\*(FR'' for full POSIX compliance. .sp .5 .ig .\" This option is left undocumented, on purpose. \*(FC\-\^\-nostalgia\*(FR%T{ provide a moment of nostalgia for 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%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 .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. .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. .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. .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. .TI "\*(FC\-h\*(FR, \*(FC\-\^\-help\*(FR Print a short summary of the available options on \*(FCstdout\*(FR, then exit zero. .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. If \*(FIvalue\*(FR is \*(FCinvalid\*(FR, only issue warnings about things that are actually invalid (not fully implemented yet). .TI "\*(FC\-n\*(FR, \*(FC\-\^\-non\-decimal\-data\*(FR Recognize octal and hexadecimal values in input data. \*(FIUse this option with great caution!\*(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. .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\-\^\-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. .in -4n .sp .5 .fi In compatibility mode, any other options are flagged as invalid, but are otherwise ignored. Normally, if there is program text, unknown options are passed on to the AWK program in \*(FCARGV\*(FR for processing.\*(CB .EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (\*(GK\f(HB)\*(FR\s0" .\" .\" .\" --- Command Line Arguments (mawk) .ES .fi \*(CDThe following options are specific to \*(MK. .sp .5 .fi .TS expand; l lw(1.8i). \*(FC\-W dump\*(FR T{ 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 options are processed. Useful with \*(FC#!\fP. T} \*(FC\-W interactive\*(FR T{ 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 \*(FCsprintf\*(FR buffer. T} \*(FC\-W version\*(FR T{ Print version and copyright on \*(FCstdout\fP and limit information on \*(FCstderr\fP and exit zero. T} .TE .sp .5 .fi The options may be abbreviated using just the first letter, e.g., \*(FC\-We\*(FR, \*(FC\-Wv\*(FR and so on.\*(CB .EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (\*(MK\f(HB)\*(FR\s0" .sp .7 .\" --- Signals (pgawk) .ES .fi \*(CD\*(PK accepts two signals. \*(FCSIGUSR1\fP dumps a profile and function call stack to the profile file. It then continues to run. \*(FCSIGHUP\fP is similar, but exits.\*(CB .EB "\s+2\f(HBSIGNALS (\*(PK\f(HB)\*(FR\s0" .\" --- 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 .sp .5 \*(AK first reads the program source from the \*(FIprog-file\*(FR(s), if specified, \*(CBfrom arguments to \*(FC\-\^\-source\*(FR,\*(CD or from the first non-option argument on the command line. 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 option are performed. Next, \*(AK executes the code in the \*(FCBEGIN\fP rules(s), if any, and then proceeds to read the files \*(FC1\fP through \*(FCARGC \- 1\fP in the \*(FCARGV\fP array. (Adjusting \*(FCARGC\fP and \*(FCARGV\fP thus provides control over the input files that will be processed.) If there are no files named on the command line, \*(AK reads the standard input. .sp .5 If a command line argument has the form \*(FIvar\*(FC=\*(FIval\*(FR, it is treated as a variable assignment. The variable \*(FIvar\fP will be assigned the value \*(FIval\*(FR. (This happens after any \*(FCBEGIN\fP rule(s) have been run.) ... delete this paragraph if no space Command line variable assignment is most useful for dynamically assigning values to the variables \*(AK uses to control how input is broken into fields and records. It is also useful for controlling state if multiple passes are needed over a single data file. .sp .5 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 \*(FIaction\fP is executed. The patterns are tested in the order they occur in the program. .sp .5 Finally, after all the input is exhausted, \*(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 is read. \*(CX .EB "\s+2\f(HBAWK PROGRAM EXECUTION\*(FR\s0" .sp .5 .\" --- Variables .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. Use \*(FC"rw"\fP or \*(FC"wr"\fP for all files.\*(CX T} .TE .EB "\s+2\f(HBVARIABLES\*(FR\s0" .BT .\" --- Variables (continued) .ES .fi .TS expand; l lw(2i). \*(FCCONVFMT\fP T{ Conversion format for numbers, default value is \*(FC"%.6g"\*(FR. T} \*(FCENVIRON\fP T{ 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 \*(FCgetline\*(FR redirection or read fails, or if \*(FCclose()\*(FR fails. T} \*(FCFIELDWIDTHS\fP T{ 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 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. 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 (see \fHFields\fP above). T} \*(CB\*(FCIGNORECASE\fP T{ If non-zero, all regular expression and string operations ignore case. Array subscripting is \*(FInot\*(FR affected. However, the \*(FCasort()\*(FR and \*(FCasorti()\*(FR function are affected. T} \*(CB\*(FCLINT\fP T{ Provides dynamic control of the \*(FC\-\^\-lint\fP 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. Any other true value just prints warnings.\*(CD T} \*(FCNF\fP T{ Number of fields in the current input record. T} \*(FCNR\fP T{ Total number of input records seen so far.\*(CX T} \*(CD\*(FCOFMT\fP T{ Output format for numbers, \*(FC"%.6g"\*(FR, by default. T} \*(FCOFS\fP T{ Output field separator, a space by default. T} \*(FCORS\fP T{ Output record separator, a newline by default. T} \*(CB\*(FCPROCINFO\fP T{ 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; \-1 if no match. T} \*(FCRS\fP T{ Input record separator, a newline by default (see \fHRecords\fP above). T} \*(FCRSTART\fP T{ 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 text that matched the character or regular expression specified by \*(FCRS\*(FR.\*(CD T} \*(FCSUBSEP\fP T{ 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 internationalization text domain, for finding the localized translations of the program's strings.\*(CX T} .TE .EB "\s+2\f(HBVARIABLES (continued)\*(FR\s0" .BT .\" --- Arrays .ES .fi \*(CDAn array subscript is an expression between square brackets (\*(FC[ \*(FRand \*(FC]\*(FR). If the expression is a list (\*(FIexpr\*(FC, \*(FIexpr \*(FR...), then the subscript is a string consisting of the concatenation of the (string) value of each expression, separated by the value of the \*(FCSUBSEP\fP variable. This simulates multi-dimensional arrays. For example: .nf .sp .5 \*(FCi = "A";\^ j = "B";\^ k = "C" x[i, j, k] = "hello, world\en"\*(FR .sp .5 .fi assigns \*(FC"hello, world\en"\*(FR to the element of the array \*(FCx\fP indexed by the string \*(FC"A\e034B\e034C"\*(FR. All arrays in AWK are associative, i.e., indexed by string values. .sp .5 Use the special operator \*(FCin\fP in an \*(FCif\fP or \*(FCwhile\fP statement to see if a particular value is an array index. .sp .5 .nf \*(FCif (val in array) print array[val]\*(FR .sp .5 .fi If the array has multiple subscripts, use \*(FC(i, j) in array\*(FR. .sp .5 Use the \*(FCin\fP construct in a \*(FCfor\fP loop to iterate over all the elements of an array. .sp .5 Use the \*(FCdelete\fP statement to delete an element from an array. \*(CLSpecifying just the array name without a subscript in the \*(FCdelete\fP 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 .ES .fi \*(CDExpressions are used as patterns, for controlling conditional action statements, and to produce parameter values when calling functions. Expressions may also be used as simple statements, particularly if they have side-effects such as assignment. Expressions mix \*(FIoperands\fP and \*(FIoperators\fP. Operands are constants, fields, variables, array elements, and the return values from function calls (both built-in and user-defined). .sp .5 Regexp constants (\*(FC/\*(FIpat\*(FC/\*(FR), when used as simple expressions, i.e., not used on the right-hand side of \*(FC~\fP and \*(FC!~\fP, or as arguments to the \*(CB\*(FCgensub()\fP,\*(CD \*(FCgsub()\fP, \*(FCmatch()\fP, \*(CB\*(FCpatsplit()\fP,\*(CD \*(FCsplit()\fP, and \*(FCsub()\fP, functions, mean \*(FC$0 ~ /\*(FIpat\*(FC/\*(FR. .sp .5 The AWK operators, in order of decreasing precedence, are: .sp .5 .fi .TS expand; l lw(1.8i). \*(FC(\&...)\*(FR Grouping \*(FC$\fP Field reference \*(FC++ \-\^\-\fP T{ 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 .T& l s l lw(1.8i). \*(FC=\0+=\0\-=\0*=\0/=\0%=\0^=\0\*(CL**=\*(CD\fP Assignment operators\*(CX .TE .EB "\s+2\f(HBEXPRESSIONS\*(FR\s0" .BT .\" --- Conversions and Comparisons .ES .fi \*(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, execute any \*(FCEND\fP rule(s). .br .ti -.2i \*(CL\*(FCnextfile\fP .br 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).\*(CD .in -.2i .sp .5 .fi \*(FCgetline\*(FR returns 1 on success, 0 on end of file, and \-1 on an error. \*(CBUpon an error, \*(FCERRNO\*(FR contains a string describing the problem.\*(CX .EB "\s+2\f(HBINPUT CONTROL\*(FR\s0" .\" --- Output Control .ES .fi .in +.2i .ti -.2i \*(CL\*(FCfflush(\*(FR[\*(FIfile\^\*(FR]\*(FC)\*(FR .br 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 (\*(GK and \*(NK)\*(CD. .ti -.2i \*(FCprint\fP .br Print the current record. Terminate output record with \*(FCORS\fP. .ti -.2i \*(FCprint \*(FIexpr-list\*(FR .br 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). .ti -.2i \*(FCsystem(\*(FIcmd\*(FC)\*(FR .br Execute the command \*(FIcmd\*(FR, and return the exit status \*(CR(may not be available on non-POSIX systems)\*(CD. .sp .5 .in -.2i I/O redirections may be used with both \*(FCprint\fP and \*(FCprintf\fP. .sp .5 .in +.2i .ti -.2i \*(CD\*(FCprint "hello" > \*(FIfile\*(FR .br 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. .ti -.2i \*(FCprint "hello" | \*(FIcmd\*(FR .br 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 .in -.2i .EB "\s+2\f(HBOUTPUT CONTROL\*(FR\s0" .\" --- Closing Redirections .ES .fi .in +.2i .ti -.2i \*(CD\*(FCclose(\*(FIfile\*(FC)\*(FR .br 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. 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" .BT .\" --- Printf Formats .ES .fi \*(CDThe \*(FCprintf\fP statement and \*(FCsprintf()\fP function 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[\-]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[\-]ddd.dddddd\*(FR \*(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 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%%\fP A literal \*(FC%\fP; no argument is converted .sp .5 .fi Optional, additional parameters may lie between the \*(FC%\fP and the control letter: .sp .5 .TS expand; l lw(2.2i). \*(CB\*(FIcount\*(FC$\*(FR T{ Use the \*(FIcount\*(FR'th argument at this point in the formatting (a \*(FIpositional specifier\*(FR). Use in translated versions of format strings, not in the original text of an AWK program.\*(CD T} \*(FC\-\fP T{ Left-justify the expression within its field. T} \*(FIspace\fP T{ For numeric conversions, prefix positive values with a space and negative values with a minus sign. T} \*(FC+\fP T{ 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: T} \*(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. T} \*(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. T} \*(FC0\fP T{ 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 T} \*(FIwidth\fP T{ 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. 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. T} \*(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. T} \*(FC%s\fP T{ The maximum number of characters to print. T} .TE .sp .5 .fi 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" .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 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 \*(FR[\*(FC,\*(FI d \*(FR[\*(FC,\*(FI comp\*(FR]]\*(FC)\*(FR .br Sort the source array \*(FIs\*(FR, replacing the indices with numeric values 1 through \*(FIn\*(FR (the number of elements in the array), 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 \*(FR[\*(FC,\*(FI d \*(FR[\*(FC,\*(FI comp\*(FR]]\*(FC)\*(FR .br 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 \*(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, 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. The sequence \*(FC\e0\fP represents the entire matched text, as does the character \*(FC&\*(FR. Unlike \*(FCsub()\fP and \*(FCgsub()\*(FR, the modified string is returned as the result of the function, and the original target string is \*(FInot\fP changed.\*(CD .ti -.2i \*(FCgsub(\*(FIr\*(FC, \*(FIs \*(FR[\*(FC, \*(FIt\*(FR]\*(FC)\*(FR .br 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 replacement text is replaced with the text that was actually matched. Use \*(FC\e&\fP to get a literal \*(FC&\*(FR. See \*(AM for a fuller discussion of the rules for \*(FC&\*(FR's and backslashes in the replacement text of \*(CB\*(FCgensub()\*(FR,\*(CD \*(FCsub()\*(FR and \*(FCgsub()\*(FR .ti -.2i \*(FCindex(\*(FIs\*(FC, \*(FIt\*(FC)\*(FR .br 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 Return the length of the string \*(FIs\*(FR, or the length of \*(FC$0\fP if \*(FIs\fP is not supplied. \*(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 Return the position in \*(FIs\fP where the regular expression \*(FIr\fP occurs, or 0 if \*(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 is placed in \*(FIa\*(FC[0]\*(FR. If there were parenthesized subexpressions, the matching texts are placed in \*(FIa\*(FC[1]\*(FR, \*(FIa\*(FC[2]\*(FR, and so on. Subscripts \*(FCa[\*(FIn\^\*(FC, "start"]\*(FR, and \*(FCa[\*(FIn\^\*(FC, "length"]\*(FR provide the starting index in the string and length respectively, of each matching substring.\*(CD .ti -.2i \*(CB\*(FCpatsplit(\*(FIs\*(FC, \*(FIa \*(FR[\*(FC, \*(FIr \*(CB\*(FR[\*(FC, \*(FIseps \*(FR] \*(FR] \*(FC)\*(FR .br 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 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 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. 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 replace only the first matching substring.\*(CX .ti -.2i \*(CD\*(FCsubstr(\*(FIs\*(FC, \*(FIi \*(FR[\*(FC, \*(FIn\*(FR]\*(FC)\*(FR .br Return the at most \*(FIn\*(FR-character substring of \*(FIs\fP starting at \*(FIi\*(FR. If \*(FIn\fP is omitted, use the rest of \*(FIs\fP. .ti -.2i \*(FCtolower(\*(FIstr\*(FC)\*(FR .br 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 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 .\" --- Built-in Time Functions .ES .fi \*(CD\*(GK provides the following functions for obtaining time stamps and formatting them. .sp .5 .fi .in +.2i .ti -.2i \*(FCmktime(\*(FIdatespec\*(FC)\*(FR .br 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 Format \*(FItimestamp\fP according to the specification in \*(FIformat\*(FR. The \*(FItimestamp\fP should be of the same form as returned by \*(FCsystime()\*(FR. If \*(FIutc-flag\*(FR 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, use \*(FCPROCINFO["strftime"]\fP. The default value is equivalent to the output of \*(FIdate\*(FR(1). .ti -.2i \*(FCsystime()\fP .br 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 .\" --- Built-in Bit Manipulation Functions .ES .fi \*(CD\*(GK provides the following functions for doing bitwise operations. .sp .5 .fi .in +.2i .ti -.2i \*(FCand(\*(FIv1\*(FC, \*(FIv2\*(FC)\*(FR .br Return the bitwise AND of the values provided by \*(FIv1\*(FR and \*(FIv2\*(FR. .ti -.2i \*(FCcompl(\*(FIval\*(FC)\*(FR .br Return the bitwise complement of \*(FIval\*(FR. .ti -.2i \*(FClshift(\*(FIval\*(FC, \*(FIcount\*(FC)\*(FR .br Return the value of \*(FIval\*(FR, shifted left by \*(FIcount\*(FR bits. .ti -.2i \*(FCor(\*(FIv1\*(FC, \*(FIv2\*(FC)\*(FR .br Return the bitwise OR of the values provided by \*(FIv1\*(FR and \*(FIv2\*(FR. .ti -.2i \*(FCrshift(\*(FIval\*(FC, \*(FIcount\*(FC)\*(FR .br Return the value of \*(FIval\*(FR, shifted right by \*(FIcount\*(FR bits. .ti -.2i \*(FCxor(\*(FIv1\*(FC, \*(FIv2\*(FC)\*(FR .br 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" .sp .6 .\" --- Extensions .ES .fi .in +.2i .ti -.2i \*(CD\*(FCextension(\*(FIlib\*(FC, \*(FIfunc\*(FC)\*(FR .br Dynamically load the shared library \*(FIlib\*(FR and call \*(FIfunc\*(FR in it to initialize the library. This adds new built-in functions to \*(GK. It returns the value returned by \*(FIfunc\*(FR.\*(CB .in -.2i .EB "\s+2\f(HBDYNAMIC EXTENSIONS (\*(GK\f(HB)\*(FR\s0" .BT .\" --- 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 provides the following functions for runtime message translation. .in +.2i .sp .5 .ti -.2i \*(FCbindtextdomain(\*(FIdirectory \*(FR[\*(FC, \*(FIdomain\*(FR]\*(FC)\*(FR .br 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). 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), \*(FCbindtextdomain()\*(FR returns the current binding for the given \*(FIdomain\*(FR. .ti -.2i \*(FCdcgettext(\*(FIstring \*(FR[\*(FC, \*(FIdomain \*(FR[\*(FC, \*(FIcategory\*(FR]]\*(FC)\*(FR .br 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. .sp .5 If you supply a value for \*(FIcategory\*(FR, it must be a string equal to one of the known locale categories. You must also supply a text domain. Use \*(FCTEXTDOMAIN\*(FR to use the current domain. .ti -.2i \*(FCdcngettext(\*(FIstring1\*(FC, \*(FIstring2\*(FC, \*(FInumber\*(FR [\*(FC, \*(FIdom \*(FR[\*(FC, \*(FIcat\*(FR]]\*(FC)\*(FR .br 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. 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. You must also supply a text domain. Use \*(FCTEXTDOMAIN\*(FR to use the current domain.\*(CB .in -.2i .EB "\s+2\f(HBINTERNATIONALIZATION (\*(GK\f(HB)\*(FR\s0" .sp .5 .\" --- FTP/HTTP Information .ES .nf \*(CDHost: \*(FCftp.gnu.org\*(FR 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 .4 \*(FChttp://www.cs.princeton.edu/~bwk/btl.mirror/ awk.tar.gz\fP .in +.2i .fi \*(NK. This version requires an ANSI C compiler; GCC (the GNU Compiler Collection) works well. .in -.2i .nf .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 Host: \*(FCinvisible-island.net\*(FR File: \*(FC/mawk/mawk.tar.gz\fP .in +.2i .fi 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, 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 are preserved on all copies. .sp .5 Permission is granted to copy and distribute modified versions of this reference card under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. .sp .5 Permission is granted to copy and distribute translations of this reference card into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.\*(CX .EB "\s+2\f(HBCOPYING PERMISSIONS\*(FR\s0" .\" Need the BT here to get the final page number .ig .ES \*(CX .sp 10 .EB "\s+2\f(HBNOTES\*(FR\s0" .. .BT gawk-4.0.1+dfsg.orig/doc/README.card0000644000175000017500000000144711463242060015706 0ustar schotschotMon Dec 9 12:45:48 EST 1996 The AWK reference card included here requires a modern version of troff (ditroff). GNU Troff (groff) is known to work. If your troff is able to produce Postscript but does not know how to properly use the macros from `colors' file then try to uncomment in Makefile the defintion which sets AWKCARD to awkcard.nc (no colors). This will definitely require changes to the TROFF macro and you have to ensure that the tbl preprocessor is called. For example, the following modifications on NeXT: TROFF = tbl SEDME = ptroff -t | sed -e \ "s/^level0 restore/level0 restore flashme 100 72 moveto\ (Copyright `date`, FSF, Inc. (all)) show/" \ -e "s/^\/level0 save def/\/level0 save def 30 -48 translate/" will produce a correctly formatted, albeit monochromatic, reference card. gawk-4.0.1+dfsg.orig/doc/texinfo.tex0000644000175000017500000115671111734665352016340 0ustar schotschot% 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{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, 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 % published by the Free Software Foundation, either version 3 of the % License, or (at your option) any later version. % % This texinfo.tex file 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, when this file is read by TeX when processing % a Texinfo source document, you may use the result without % restriction. (This has been our intent since Texinfo was invented.) % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % http://www.gnu.org/software/texinfo/ (the Texinfo home page), or % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org). % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \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'}% 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. \newlinechar = `^^J % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{l.\the\inputlineno:\space} \fi % 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\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi % Since the category of space is not known, we have to be careful. \chardef\spacecat = 10 \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. % \def\gobble#1{} % The following is used inside several \edef's. \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces spell-ing spell-ings stand-alone strong-est time-stamp time-stamps which-ever white-space wide-spread wrap-around } % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \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, % since that produces some useless output on the terminal. We also make % some effort to order the tracing commands to reduce output in the log % file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\thisisundefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \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. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Output a mark which sets \thischapter, \thissection and \thiscolor. % We dump everything together because we only have one kind of mark. % This works because we only use \botmark / \topmark, not \firstmark. % % A mark contains a subexpression of the \ifcase ... \fi construct. % \get*marks macros below extract the needed part using \ifcase. % % Another complication is to let the user choose whether \thischapter % (\thissection) refers to the chapter (section) in effect at the top % of a page, or that at the bottom of a page. The solution is % described on page 260 of The TeXbook. It involves outputting two % marks for the sectioning macros, one before the section break, and % one after. I won't pretend I can describe this better than DEK... \def\domark{% \toks0=\expandafter{\lastchapterdefs}% \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 \noexpand\or \the\toks4 \the\toks6 \noexpand\else \the\toks8 }% } % \topmark doesn't work for the very first chapter (after the title % page or the contents), so we use \firstmark there -- this gets us % the mark with the chapter defs, unless the user sneaks in, e.g., % @setcolor (or @url, or @link, etc.) between @contents and the very % first @chapter. \def\gettopheadingmarks{% \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi } \def\getbottomheadingmarks{\ifcase1\botmark\fi} \def\getcolormarks{\ifcase2\topmark\fi} % Avoid "undefined control sequence" errors. \def\lastchapterdefs{} \def\lastsectiondefs{} \def\prevchapterdefs{} \def\prevsectiondefs{} \def\lastcolordefs{} % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 24pt \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1\relax \unvbox#1\relax \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% \def\argtorun{#2}% \begingroup \obeylines \spaceisspace #1% \parseargline\empty% Insert the \empty token, see \finishparsearg below. } {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. \argremovecomment #1\comment\ArgTerm% }% } % First remove any @comment, then any @c comment. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo % This space token undergoes the same procedure and is eventually removed % by \finishparsearg. % \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: \let\temp\finishparsearg \else \let\temp\argcheckspaces \fi % Put the space token in: \temp#1 #3\ArgTerm } % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \argtorun. % (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} % \parseargdef\foo{...} % is roughly equivalent to % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} % % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my % favourite TeX trick. --kasal, 16nov03 \def\parseargdef#1{% \expandafter \doparseargdef \csname\string#1\endcsname #1% } \def\doparseargdef#1#2{% \def#2{\parsearg#1}% \def#1##1% } % Several utility definitions with active space: { \obeyspaces \gdef\obeyedspace{ } % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % \gdef\sepspaces{\obeyspaces\let =\tie} % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\leavevmode \penalty \@M \ ). \gdef\unsepspaces{\let =\space} } \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} % Define the framework for environments in texinfo.tex. It's used like this: % % \envdef\foo{...} % \def\Efoo{...} % % It's the responsibility of \envdef to insert \begingroup before the % actual body; @end closes the group after calling \Efoo. \envdef also % defines \thisenv, so the current environment is known; @end checks % whether the environment name matches. The \checkenv macro can also be % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they % are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty % ... but they get defined via ``\envdef\foo{...}'': \long\def\envdef#1#2{\def#1{\startenvironment#1#2}} \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} % Check whether we're in the right environment: \def\checkenv#1{% \def\temp{#1}% \ifx\thisenv\temp \else \badenverr \fi } % Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty outside of any environment% \else in environment \expandafter\string#1% \fi } % @end foo executes the definition of \Efoo. % But first, it executes a specialized version of \checkenv % \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal. \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} % 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 % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. \def\.{.\spacefactor=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. \def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. % \def\onword{on} \def\offword{off} % \parseargdef\frenchspacing{% \def\temp{#1}% \ifx\temp\onword \plainfrenchspacing \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% \fi\fi } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % % Another complication is that the group might be very large. This can % cause the glue on the previous page to be unduly stretched, because it % does not have much material. In this case, it's better to add an % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). % \newbox\groupbox \def\vfilllimit{0.7} % \envdef\group{% \ifnum\catcode`\^^M=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi \startsavinginserts % \setbox\groupbox = \vtop\bgroup % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % The \vtop produces a box with normal height and large depth; thus, TeX puts % \baselineskip glue before it, and (when the next line of text is done) % \lineskip glue after it. Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% % To get correct interline space between the last line of the group % and the first line afterwards, we have to propagate \prevdepth. \endgraf % Not \par, as it may have been set to \lisppar. \global\dimen1 = \prevdepth \egroup % End the \vtop. % \dimen0 is the vertical size of the group's box. \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox % \dimen2 is how much space is left on the page (more or less). \dimen2 = \pageheight \advance\dimen2 by -\pagetotal % if the group doesn't fit on the current page, and it's a big big % group, force a page break. \ifdim \dimen0 > \dimen2 \ifdim \pagetotal < \vfilllimit\pageheight \page \fi \fi \box\groupbox \prevdepth = \dimen1 \checkinserts } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break (and is undocumented). \let\br = \par % @page forces the start of a new page. % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} % This defn is used inside nofill environments such as @example. \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @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'. Not documented, written for gawk manual. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \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} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \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 % definitions, etc. \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \catcode`-=\other \catcode`\`=\other \catcode`\'=\other } \def\pushthisfilestack{% \expandafter\pushthisfilestackX\popthisfilestack\StackTerm } \def\pushthisfilestackX{% \expandafter\pushthisfilestackY\thisfile\StackTerm } \def\pushthisfilestackY #1\StackTerm #2\StackTerm {% \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% } \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} \def\thisfile{} % @center line % outputs that line, centered. % \parseargdef\center{% \ifhmode \let\next\centerH \else \let\next\centerV \fi \next{\hfil \ignorespaces#1\unskip \hfil}% } \def\centerH#1{% {% \hfil\break \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{#1}% \break }% } \def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} % @sp n outputs n lines of vertical space \parseargdef\sp{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % NCHARS can also be the word `asis' or `none'. % We cannot feasibly implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \parseargdef\paragraphindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \parseargdef\exampleindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @firstparagraphindent WORD % If WORD is `none', then suppress indentation of the first paragraph % after a section heading. If WORD is `insert', then do indent at such % paragraphs. % % The paragraph indentation is suppressed or not by calling % \suppressfirstparagraphindent, which the sectioning commands do. % We switch the definition of this back and forth according to WORD. % By default, we suppress indentation. % \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} \def\insertword{insert} % \parseargdef\firstparagraphindent{% \def\temp{#1}% \ifx\temp\noneword \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent \else\ifx\temp\insertword \let\suppressfirstparagraphindent = \relax \else \errhelp = \EMsimple \errmessage{Unknown @firstparagraphindent option `\temp'}% \fi\fi } % Here is how we actually suppress indentation. Redefine \everypar to % \kern backwards by \parindent, and then reset itself to empty. % % We also make \indent itself not actually do anything until the next % paragraph. % \gdef\dosuppressfirstparagraphindent{% \gdef\indent{% \restorefirstparagraphindent \indent }% \gdef\noindent{% \restorefirstparagraphindent \noindent }% \global\everypar = {% \kern -\parindent \restorefirstparagraphindent }% } \gdef\restorefirstparagraphindent{% \global \let \indent = \ptexindent \global \let \noindent = \ptexnoindent \global \everypar = {}% } % @refill is a no-op. \let\refill=\relax % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate (before @setfilename). % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \fixbackslash % Turn off hack to swallow `\input texinfo'. \iflinks \tryauxfile % Open the new aux file. TeX will close it automatically at exit. \immediate\openout\auxfile=\jobname.aux \fi % \openindices needs to do some work in any case. \openindices \let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. \openin 1 texinfo.cnf \ifeof 1 \else \input texinfo.cnf \fi \closein 1 % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \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 being undefined. \ifx\pdfoutput\thisisundefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % PDF uses PostScript string constants for the names of xref targets, % 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. % % 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 with PDF output, and none of those formats could be found. (.eps cannot be supported due to the design of the PDF format; use regular TeX (DVI output) for that.)} \ifpdf % % 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 rg #1 RG}} % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } % \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt \line{\pdfsetcolor{\maincolor}\the\footline}% } % \def\makeheadline{% \vbox to 0pt{% \vskip-22.5pt \line{% \vbox to8.5pt{}% % Extract \thiscolor definition from the marks. \getcolormarks % Typeset the headline with \maincolor, then restore the color. \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% }% \vss }% \nointerlineskip } % % \pdfcatalog{/PageMode /UseOutlines} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % % 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.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{JPG}% \fi \else \gdef\pdfimgext{jpeg}% \fi \else \gdef\pdfimgext{jpg}% \fi \else \gdef\pdfimgext{png}% \fi \else \gdef\pdfimgext{PDF}% \fi \else \gdef\pdfimgext{pdf}% \fi \closein 1 \endgroup % % without \immediate, ancient pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi \ifdim \wd0 >0pt width \imagewidth \fi \ifdim \wd2 >0pt height \imageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} % \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive \makevalueexpandable \def\pdfdestname{#1}% \txiescapepdf\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % % by default, use a color that is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. \def\urlcolor{\rgbDarkRed} \def\linkcolor{\rgbDarkRed} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % % #1 is the section text, which is what will be displayed in the % outline by the pdf viewer. #2 is the pdf expression for the number % of subentries (or empty, for subsubsections). #3 is the node text, % which might be empty if this toc entry had no corresponding node. % #4 is the page number % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % 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. \edef\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else \txiescapepdf\pdfoutlinedest \fi % % Also escape PDF chars in the display string. \edef\pdfoutlinetext{#1}% \txiescapepdf\pdfoutlinetext % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup % 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}% \def\thissubsecnum{0}% }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% \def\thissubsecnum{0}% }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% \def\thissubsecnum{##2}% }% \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% \def\thischapnum{0}% \def\thissecnum{0}% \def\thissubsecnum{0}% % % use \def rather than \let here because we redefine \chapentry et % al. a second time, below. \def\appentry{\numchapentry}% \def\appsecentry{\numsecentry}% \def\appsubsecentry{\numsubsecentry}% \def\appsubsubsecentry{\numsubsubsecentry}% \def\unnchapentry{\numchapentry}% \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% \readdatafile{toc}% % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of % subentries, which we calculated on our first read of the .toc above. % % We use the node names as the destinations. \def\numchapentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% \def\numsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% \def\numsubsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% \def\numsubsubsecentry##1##2##3##4{% count is always zero \dopdfoutline{##1}{}{##3}{##4}}% % % PDF outlines are displayed using system fonts, instead of % document fonts. Therefore we cannot use special characters, % since the encoding is unknown. For example, the eogonek from % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % % 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 \else\let\nextsp\skipspaces \ifx\p\space\else\addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \fi \nextsp} \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi % make a live url in pdf output. \def\pdfurl#1{% \begingroup % it seems we really need yet another set of dummies; have not % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable % do we want to go so far as to use \indexnofonts instead of just % special-casing \var here? \def\var##1{##1}% % \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS|\relax \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\setcolor = \gobble \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput \message{fonts,} % Change the current font style to #1, remembering it in \curfontstyle. % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in % italics, not bold italics. % \def\setfontstyle#1{% \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. \csname ten#1\endcsname % change the current font } % Select #1 fonts with the current style. % \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} \def\rm{\fam=0 \setfontstyle{rm}} \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} % Unfortunately, we have to override this for titles and the like, since % in those cases "rm" is bold. Sigh. \def\rmisbold{\rm\def\curfontstyle{bf}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam \def\sf{\fam=\sffam \setfontstyle{sf}} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} % Default leading. \newdimen\textleading \textleading = 13.2pt % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % PDF CMaps. See also LaTeX's t1.cmap. % % do nothing with this by default. \expandafter\let\csname cmapOT1\endcsname\gobble \expandafter\let\csname cmapOT1IT\endcsname\gobble \expandafter\let\csname cmapOT1TT\endcsname\gobble % 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\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 %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1-0) %%Title: (TeX-OT1-0 TeX OT1 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1) /Supplement 0 >> def /CMapName /TeX-OT1-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <23> <26> <0023> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 40 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1IT \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 %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1IT-0) %%Title: (TeX-OT1IT-0 TeX OT1IT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1IT) /Supplement 0 >> def /CMapName /TeX-OT1IT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <25> <26> <0025> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 42 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <23> <0023> <24> <00A3> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1IT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1TT \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 %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1TT-0) %%Title: (TeX-OT1TT-0 TeX OT1TT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1TT) /Supplement 0 >> def /CMapName /TeX-OT1TT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 5 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <21> <26> <0021> <28> <5F> <0028> <61> <7E> <0061> endbfrange 32 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <2191> <0C> <2193> <0D> <0027> <0E> <00A1> <0F> <00BF> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <20> <2423> <27> <2019> <60> <2018> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1TT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% \fi\fi % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). % #3 is the font's design size, #4 is a scale factor, #5 is the CMap % encoding (currently only OT1, OT1IT and OT1TT are allowed, pass % empty to omit). \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble % emacs-page end of cmaps % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\thisisundefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} % Definitions for a main text size of 11pt. This is the default in % Texinfo. % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1095} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} \setfont\chaprm\rmbshape{12}{\magstep2}{OT1} \setfont\chapit\itbshape{10}{\magstep3}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep3}{OT1} \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} \setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 \def\chapecsize{1728} % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1}{OT1} \setfont\secit\itbshape{10}{\magstep2}{OT1IT} \setfont\secsl\slbshape{10}{\magstep2}{OT1} \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 \def\sececsize{1440} % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} \setfont\ssecit\itbshape{10}{1315}{OT1IT} \setfont\ssecsl\slbshape{10}{1315}{OT1} \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 \def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} \setfont\reducedrm\rmshape{10}{1000}{OT1} \setfont\reducedtt\ttshape{10}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{1000}{OT1} \setfont\reducedit\itshape{10}{1000}{OT1IT} \setfont\reducedsl\slshape{10}{1000}{OT1} \setfont\reducedsf\sfshape{10}{1000}{OT1} \setfont\reducedsc\scshape{10}{1000}{OT1} \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 \def\reducedecsize{1000} \textleading = 13.2pt % line spacing for 11pt CM \textfonts % reset the current fonts \rm } % end of 11pt text font size definitions % Definitions to make the main text be 10pt Computer Modern, with % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. % \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} \edef\mainmagstep{1000} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1000} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter fonts (14.4pt). \def\chapnominalsize{14pt} \setfont\chaprm\rmbshape{12}{\magstep1}{OT1} \setfont\chapit\itbshape{10}{\magstep2}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep2}{OT1} \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\chapsf\sfbshape{12}{\magstep1}{OT1} \let\chapbf\chaprm \setfont\chapsc\scbshape{10}{\magstep2}{OT1} \font\chapi=cmmi12 scaled \magstep1 \font\chapsy=cmsy10 scaled \magstep2 \def\chapecsize{1440} % Section fonts (12pt). \def\secnominalsize{12pt} \setfont\secrm\rmbshape{12}{1000}{OT1} \setfont\secit\itbshape{10}{\magstep1}{OT1IT} \setfont\secsl\slbshape{10}{\magstep1}{OT1} \setfont\sectt\ttbshape{12}{1000}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} \font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} % Subsection fonts (10pt). \def\ssecnominalsize{10pt} \setfont\ssecrm\rmbshape{10}{1000}{OT1} \setfont\ssecit\itbshape{10}{1000}{OT1IT} \setfont\ssecsl\slbshape{10}{1000}{OT1} \setfont\ssectt\ttbshape{10}{1000}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} \setfont\ssecsf\sfbshape{10}{1000}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1000}{OT1} \font\sseci=cmmi10 \font\ssecsy=cmsy10 \def\ssececsize{1000} % Reduced fonts for @acro in text (9pt). \def\reducednominalsize{9pt} \setfont\reducedrm\rmshape{9}{1000}{OT1} \setfont\reducedtt\ttshape{9}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{900}{OT1} \setfont\reducedit\itshape{9}{1000}{OT1IT} \setfont\reducedsl\slshape{9}{1000}{OT1} \setfont\reducedsf\sfshape{9}{1000}{OT1} \setfont\reducedsc\scshape{10}{900}{OT1} \setfont\reducedttsl\ttslshape{10}{900}{OT1TT} \font\reducedi=cmmi9 \font\reducedsy=cmsy9 \def\reducedecsize{0900} \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 % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % \def\xiword{11} \def\xword{10} \def\xwordpt{10pt} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% %\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. % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi \else \errhelp=\EMsimple \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} \fi\fi \endgroup } % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts except % in the main text, we don't bother to reset \scriptfont and % \scriptscriptfont (which would also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf \textfont\ttfam=\tentt \textfont\sffam=\tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this because \STYLE needs to also set the % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire % \tenSTYLE to set the current font. % % Each font-changing command also sets the names \lsize (one size lower) % and \lllsize (three sizes lower). These relative commands are used in % the LaTeX logo and acronyms. % % This all needs generalizing, badly. % \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \def\curfontsize{text}% \def\lsize{reduced}\def\lllsize{smaller}% \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{27pt}} \def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \def\curfontsize{chap}% \def\lsize{sec}\def\lllsize{text}% \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \def\curfontsize{ssec}% \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts \def\reducedfonts{% \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy \let\tenttsl=\reducedttsl \def\curfontsize{reduced}% \def\lsize{small}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \def\curfontsize{small}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \def\curfontsize{smaller}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000}{OT1} \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000}{OT1} \setfont\shortconttt\ttshape{12}{1000}{OT1TT} % Define these just so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 % If we use \scriptfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi \message{markup,} % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost % style and the set of \ifmarkupSTYLE switches for all styles % currently in effect. \newif\ifmarkupvar \newif\ifmarkupsamp \newif\ifmarkupkey %\newif\ifmarkupfile % @file == @samp. %\newif\ifmarkupoption % @option == @samp. \newif\ifmarkupcode \newif\ifmarkupkbd %\newif\ifmarkupenv % @env == @code. %\newif\ifmarkupcommand % @command == @code. \newif\ifmarkuptex % @tex (and part of @math, for now). \newif\ifmarkupexample \newif\ifmarkupverb \newif\ifmarkupverbatim \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } \let\markupstylesetup\empty \def\defmarkupstylesetup#1{% \expandafter\def\expandafter\markupstylesetup \expandafter{\markupstylesetup #1}% \def#1% } % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% \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 \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } { \catcode`\'=\active \catcode`\`=\active \gdef\markupsetuplqdefault{\let`\lq} \gdef\markupsetuprqdefault{\let'\rq} \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} \gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} } \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\markupsetuplqkbd \markupsetnoligaturesquoteleft % 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 \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax '% \else \char'15 \fi \else \char'15 \fi } % % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. % \def\codequoteleft{% \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax % [Knuth] pp. 380,381,391 % \relax disables Spanish ligatures ?` and !` of \tt font. \relax`% \else \char'22 \fi \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 % Font commands. % #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} % 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}} % @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \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 \let\dfn=\smartslanted \let\emph=\smartitalic % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b % @sansserif, explicit sans. \def\sansserif#1{{\sf #1}} % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. % \catcode`@=11 \def\plainfrenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m \def\endofsentencespacefactor{1000}% for @. and friends } \def\plainnonfrenchspacing{% \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other \def\endofsentencespacefactor{3000}% default % @t, explicit typewriter. \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } % @samp. \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} % definition of @key that produces a lozenge. Doesn't adjust to text size. %\setfont\keyrm\rmshape{8}{1000}{OT1} %\font\keysy=cmsy9 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% % \vbox{\hrule\kern-0.4pt % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% % \kern-0.4pt\hrule}% % \kern-.06em\raise0.4pt\hbox{\angleright}}}} % definition of @key with no lozenge. If the current font is already % monospace, don't change it; that way, we respect @kbdinputstyle. But % if it isn't monospace, then use \tt. % \def\key#1{{\setupmarkupstyle{key}% \nohyphenation \ifmonospace\else\tt\fi #1}\null} % ctrl is no longer a Texinfo command. \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @file, @option are the same as @samp. \let\file=\samp \let\option=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \plainfrenchspacing #1% }% \null % reset spacefactor to 1000 } % We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup \setupmarkupstyle{code}% % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash \let_\codeunder \else \let-\realdash \let_\realunder \fi \codex } } \def\codex #1{\tclose{#1}\endgroup} \def\realdash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}% } % An additional complication: the above will allow breaks after, e.g., % each of the four underscores in __typeof__. This is undesirable in % some manuals, especially if they don't have long identifiers in % general. @allowcodebreaks provides a way to control this. % \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} \def\keywordfalse{false} \parseargdef\allowcodebreaks{% \def\txiarg{#1}% \ifx\txiarg\keywordtrue \allowcodebreakstrue \else\ifx\txiarg\keywordfalse \allowcodebreaksfalse \else \errhelp = \EMsimple \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}} % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \parseargdef\kbdinputstyle{% \def\txiarg{#1}% \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is `distinct'. \kbdinputstyle distinct \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. \let\indicateurl=\code \let\env=\code \let\command=\code % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} % @clickstyle @arrow (by default) \parseargdef\clickstyle{\def\click{#1}} \def\click{\arrow} % 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\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 \null % reset \spacefactor=1000 } % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. % \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 } % @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 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 } % 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{% \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 } % 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 } % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, they should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} % The @error{} command. % Adapted from the TeXbook's \boxit. % \newbox\errorbox % {\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 \putworderror\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{% \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % \def\error{\leavevmode\lower.7ex\copy\errorbox} % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} % @euro{} comes from a separate font, depending on the current style. % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. % % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted % % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. % % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. % % \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } % Glyphs from the EC fonts. We don't use \let for the aliases, because % sometimes we redefine the original macro, and the alias should reflect % the redefinition. % % Use LaTeX names for the Icelandic letters. \def\DH{{\ecfont \char"D0}} % Eth \def\dh{{\ecfont \char"F0}} % eth \def\TH{{\ecfont \char"DE}} % Thorn \def\th{{\ecfont \char"FE}} % thorn % \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} \def\guillemotright{\guillemetright} \def\guilsinglleft{{\ecfont \char"0E}} \def\guilsinglright{{\ecfont \char"0F}} \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % % This positioning is not perfect (see the ogonek LaTeX package), but % we have the precomposed glyphs for the most common cases. We put the % tests to use those glyphs in the single \ogonek macro so we have fewer % dummy definitions to worry about for index entries, etc. % % ogonek is also used with other letters in Lithuanian (IOU), but using % the precomposed glyphs for those is not so easy since they aren't in % the same EC font. \def\ogonek#1{{% \def\temp{#1}% \ifx\temp\macrocharA\Aogonek \else\ifx\temp\macrochara\aogonek \else\ifx\temp\macrocharE\Eogonek \else\ifx\temp\macrochare\eogonek \else \ecfont \setbox0=\hbox{#1}% \ifdim\ht0=1ex\accent"0C #1% \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% \fi \fi\fi\fi\fi }% } \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} % % Use the ec* fonts (cm-super in outline format) for non-CM glyphs. \def\ecfont{% % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% \ifx\curfontstyle\bfstylename % bold: \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize \else % regular: \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize \fi \thisecfont } % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% \hfil\crcr\Orb}}% }$% } % @textdegree - the normal degrees sign. % \def\textdegree{$^\circ$} % Laurent Siebenmann reports \Orb undefined with: % 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\thisisundefined \def\Orb{\mathhexbox20D} \fi % Quotes. \chardef\quotedblleft="5C \chardef\quotedblright=`\" \chardef\quoteleft=`\` \chardef\quoteright=`\' \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \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. \begingroup \parindent=0pt \textfonts % Leave some space at the very top of the page. \vglue\titlepagetopglue % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \let\page = \oldpage \page \null }% } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % Need this before the \...aftertitlepage checks so that if they are % in effect the toc pages will come out with page numbers. \HEADINGSon % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } % Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \parseargdef\title{% \checkenv\titlepage \leftline{\titlefonts\rmisbold #1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt } \parseargdef\subtitle{% \checkenv\titlepage {\subtitlefont \rightline{#1}}% } % @author should come last, but may come many times. % It can also be used inside @quotation. % \parseargdef\author{% \def\temp{\quotation}% \ifx\thisenv\temp \def\quotationauthor{#1}% printed in \Equotation. \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi {\secfonts\rmisbold \leftline{#1}}% \fi } % Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make TeX use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} \def\evenheadingyyy #1\|#2\|#3\|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddheading{\parsearg\oddheadingxxx} \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} \def\oddheadingyyy #1\|#2\|#3\|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \def\evenfooting{\parsearg\evenfootingxxx} \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} \def\evenfootingyyy #1\|#2\|#3\|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddfooting{\parsearg\oddfootingxxx} \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} \def\oddfootingyyy #1\|#2\|#3\|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -12pt \global\advance\vsize by -12pt } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @evenheadingmarks top \thischapter <- chapter at the top of a page % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page % % The same set of arguments for: % % @oddheadingmarks % @evenfootingmarks % @oddfootingmarks % @everyheadingmarks % @everyfootingmarks \def\evenheadingmarks{\headingmarks{even}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}} \def\evenfootingmarks{\headingmarks{even}{footing}} \def\oddfootingmarks{\headingmarks{odd}{footing}} \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} \headingmarks{odd}{heading}{#1} } \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} \headingmarks{odd}{footing}{#1} } % #1 = even/odd, #2 = heading/footing, #3 = top/bottom. \def\headingmarks#1#2#3 {% \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname \global\expandafter\let\csname get#1#2marks\endcsname \temp } \everyheadingmarks bottom \everyfootingmarks bottom % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \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 % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % 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\thisisundefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg{\gdef\thistitle}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @ftable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemindicate{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil\relax \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. However, if % what follows is an environment such as @example, there will be no % \parskip glue; then the negative vskip we just inserted would % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a list environment}} \def\itemx{\errmessage{@itemx while not in a list environment}} % @table, @ftable, @vtable. \envdef\table{% \let\itemindex\gobble \tablecheck{table}% } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% \tablecheck{ftable}% } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% \tablecheck{vtable}% } \def\tablecheck#1{% \ifnum \the\catcode`\^^M=\active \endgroup \errmessage{This command won't work in this context; perhaps the problem is that we are \inenvironment\thisenv}% \def\next{\doignore{#1}}% \else \let\next\tablex \fi \next } \def\tablex#1{% \def\itemindicate{#1}% \parsearg\tabley } \def\tabley#1{% {% \makevalueexpandable \edef\temp{\noexpand\tablez #1\space\space\space}% \expandafter }\temp \endtablez } \def\tablez #1 #2 #3 #4\endtablez{% \aboveenvbreak \ifnum 0#1>0 \advance \leftskip by #1\mil \fi \ifnum 0#2>0 \tableindent=#2\mil \fi \ifnum 0#3>0 \advance \rightskip by #3\mil \fi \itemmax=\tableindent \advance \itemmax by -\itemmargin \advance \leftskip by \tableindent \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi \let\item = \internalBitem \let\itemx = \internalBitemx } \def\Etable{\endgraf\afterenvbreak} \let\Eftable\Etable \let\Evtable\Etable \let\Eitemize\Etable \let\Eenumerate\Etable % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \envdef\itemize{\parsearg\doitemize} \def\doitemize#1{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi % % Try typesetting the item mark that if the document erroneously says % something like @itemize @samp (intending @table), there's an error % right away at the @itemize. It's not the best error message in the % world, but it's better than leaving it to the @item. This means if % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% \setbox0 = \hbox{\itemcontents}% % % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi % \let\item=\itemizeitem } % Definition of @item while inside @itemize and @enumerate. % \def\itemizeitem{% \advance\itemno by 1 % for enumerations {\let\par=\endgraf \smallbreak}% reasonable place to break {% % If the document has an @itemize directly after a section title, a % \nobreak will be last on the list, and \sectionheading will have % done a \vskip-\parskip. In that case, we don't want to zero % parskip, or the item text will crash with the heading. On the % other hand, when there is normal text preceding the item (as there % usually is), we do want to zero parskip, or there would be too much % space. In that case, we won't have a \nobreak before. At least % that's the theory. \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% % \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \envparseargdef\enumerate{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call \doitemize, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \doitemize{#1.}\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab do not need to be on their own lines, but it will not hurt % if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the @columnfraction, usually a decimal number like .5, but might % be just 1. We just use it, whatever it is. % \def\pickupwholefraction#1 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % multitable-only commands. % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group % of an alignment entry. \everycr resets \everytab so we don't have to % undo it ourselves. \def\headitemfont{\b}% for people to use in the template row; not changeable \def\headitem{% \checkenv\multitable \crcr \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until % we again encounter the problem the 1sp was intended to solve. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% % @multitable ... @end multitable definitions: % \newtoks\everytab % insert after every tab. % \envdef\multitable{% \vskip\parskip \startsavinginserts % % @item within a multitable starts a normal row. % We use \def instead of \let so that if one of the multitable entries % contains an @itemize, we don't choke on the \item (seen as \crcr aka % \endtemplate) expanding \doitemize. \def\item{\crcr}% % \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 % \everycr = {% \noalign{% \global\everytab={}% \global\colcount=0 % Reset the column counter. % Check for saved footnotes, etc. \checkinserts % Keeps underfull box messages off when table breaks over pages. %\filbreak % Maybe so, but it also creates really weird page breaks when the % table breaks over pages. Wouldn't \vfil be better? Wait until the % problem manifests itself, so it can be fixed for real --karl. }% }% % \parsearg\domultitable } \def\domultitable#1{% % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup &% \global\advance\colcount by 1 \multistrut \vtop{% % Use the current \colcount to find the correct column width: \hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively % marking characters. \noindent\ignorespaces##\unskip\multistrut }\cr } \def\Emultitable{% \crcr \egroup % end the \halign \global\setpercentfalse } \def\setmultitablespacing{% \def\multistrut{\strut}% just use the standard line spacing % % Compute \multitablelinespace (if not defined by user) for use in % \multitableparskip calculation. We used define \multistrut based on % this, but (ironically) that caused the spacing to be off. % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \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. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \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. \fi} \message{conditionals,} % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, % @ifnotxml always succeed. They currently do nothing; we don't % attempt to check whether the conditionals are properly nested. But we % have to remember that they are conditionals, so that @end doesn't % attempt to close an environment group. % \def\makecond#1{% \expandafter\let\csname #1\endcsname = \relax \expandafter\let\csname iscond.#1\endcsname = 1 } \makecond{iftex} \makecond{ifnotdocbook} \makecond{ifnothtml} \makecond{ifnotinfo} \makecond{ifnotplaintext} \makecond{ifnotxml} % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescription{\doignore{documentdescription}} \def\docbook{\doignore{docbook}} \def\html{\doignore{html}} \def\ifdocbook{\doignore{ifdocbook}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} \def\ifplaintext{\doignore{ifplaintext}} \def\ifxml{\doignore{ifxml}} \def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} % Ignore text until a line `@end #1', keeping track of nested conditionals. % % A count to remember the depth of nesting. \newcount\doignorecount \def\doignore#1{\begingroup % Scan in ``verbatim'' mode: \obeylines \catcode`\@ = \other \catcode`\{ = \other \catcode`\} = \other % % Make sure that spaces turn into tokens that match what \doignoretext wants. \spaceisspace % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \dodoignore{#1}% } { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % % Define a command to find the next `@end #1'. \long\def\doignoretext##1^^M@end #1{% \doignoretextyyy##1^^M@#1\_STOP_}% % % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. \doignoretext ^^M% }% } \def\doignoreyyy#1{% \def\temp{#1}% \ifx\temp\empty % Nothing found. \let\next\doignoretextzzz \else % Found a nested condition, ... \advance\doignorecount by 1 \let\next\doignoretextyyy % ..., look for another. % If we're here, #1 ends with ^^M\ifinfo (for example). \fi \next #1% the token \_STOP_ is present just after this macro. } % We have to swallow the remaining "\_STOP_". % \def\doignoretextzzz#1{% \ifnum\doignorecount = 0 % We have just found the outermost @end. \let\next\enddoignore \else % Still inside a nested condition. \advance\doignorecount by -1 \let\next\doignoretext % Look for the next @end. \fi \next } % Finish off ignored text. { \obeylines% % Ignore anything after the last `@end #1'; this matters in verbatim % environments, where otherwise the newline after an ignored conditional % would result in a blank line in the output. \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% } % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. % We rely on the fact that \parsearg sets \catcode`\ =10. % \parseargdef\set{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% {% \makevalueexpandable \def\temp{#2}% \edef\next{\gdef\makecsname{SET#1}}% \ifx\temp\empty \next{}% \else \setzzz#2\endsetzzz \fi }% } % Remove the trailing space \setxxx inserted. \def\setzzz#1 \endsetzzz{\next{#1}} % @clear VAR clears (i.e., unsets) the variable VAR. % \parseargdef\clear{% {% \makevalueexpandable \global\expandafter\let\csname SET#1\endcsname=\relax }% } % @value{foo} gets the text saved in variable foo. \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { \catcode`\- = \active \catcode`\_ = \active % \gdef\makevalueexpandable{% \let\value = \expandablevalue % We don't want these characters active, ... \catcode`\-=\other \catcode`\_=\other % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. \let-\realdash \let_\normalunderscore } } % We have this subroutine so that we can handle at least some @value's % properly in indexes (we call \makevalueexpandable in \indexdummies). % The command has to be fully expandable (if the variable is set), since % the result winds up in the index file. This means that if the % variable's value contains other Texinfo commands, it's almost certain % it will fail (although perhaps we could fix that with sufficient work % to do a one-level expansion on the result, instead of complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % % To get special treatment of `@end ifset,' call \makeond and the redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} \def\doifset#1#2{% {% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname SET#2\endcsname\relax #1% If not set, redefine \next. \fi \expandafter }\next } \def\ifsetfail{\doignore{ifset}} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the % above code: if the variable is not set, do nothing, if it is set, % then redefine \next to \ifclearfail. % \makecond{ifclear} \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within macros and \if's. \edef\newwrite{\makecsname{ptexnewwrite}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \relax % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} % Take care of Texinfo commands that can appear in an index entry. % Since there are some commands we want to expand, and others we don't, % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % % 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 % causes processing to be prematurely terminated. This is, % apparently, because \indexsorttmp is fully expanded, and \endinput % is an expandable command. The redefinition below makes \endinput % disappear altogether for that purpose -- although logging shows that % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} % @findex xyz % @end macro % ... % @funindex commtest % % The above is not enough to reproduce the bug, but it gives the flavor. % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} % % So: \let\endinput = \empty % % Do the redefinitions. \commondummies } % For the aux and toc files, @ is the escape character. So we want to % redefine everything using @ as the escape character (instead of % \realbackslash, still used for index files). When everything uses @, % this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % Do the redefinitions. \commondummies \otherbackslash } % Called from \indexdummies and \atdummies. % \def\commondummies{% % % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control words, % not control letters, because the \space would be incorrect for % control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the % space. % % These can be used both for control words that take an argument and % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % \def\definedummyword ##1{\def##1{\string##1\space}}% \def\definedummyletter##1{\def##1{\string##1}}% \let\definedummyaccent\definedummyletter % \commondummiesnofonts % \definedummyletter\_% \definedummyletter\-% % % Non-English letters. \definedummyword\AA \definedummyword\AE \definedummyword\DH \definedummyword\L \definedummyword\O \definedummyword\OE \definedummyword\TH \definedummyword\aa \definedummyword\ae \definedummyword\dh \definedummyword\exclamdown \definedummyword\l \definedummyword\o \definedummyword\oe \definedummyword\ordf \definedummyword\ordm \definedummyword\questiondown \definedummyword\ss \definedummyword\th % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf \definedummyword\gtr \definedummyword\hat \definedummyword\less \definedummyword\sf \definedummyword\sl \definedummyword\tclose \definedummyword\tt % \definedummyword\LaTeX \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\leq \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print \definedummyword\quotedblbase \definedummyword\quotedblleft \definedummyword\quotedblright \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase \definedummyword\result \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. \macrolist % \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % \def\commondummiesnofonts{% % Control letters and accents. \definedummyletter\!% \definedummyaccent\"% \definedummyaccent\'% \definedummyletter\*% \definedummyaccent\,% \definedummyletter\.% \definedummyletter\/% \definedummyletter\:% \definedummyaccent\=% \definedummyletter\?% \definedummyaccent\^% \definedummyaccent\`% \definedummyaccent\~% \definedummyword\u \definedummyword\v \definedummyword\H \definedummyword\dotaccent \definedummyword\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent \definedummyword\udotaccent \definedummyword\dotless % % Texinfo font commands. \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 \definedummyword\option \definedummyword\pxref \definedummyword\ref \definedummyword\samp \definedummyword\strong \definedummyword\tie \definedummyword\uref \definedummyword\url \definedummyword\var \definedummyword\verb \definedummyword\w \definedummyword\xref } % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % \def\indexnofonts{% % Accent commands should become @asis. \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% % All control words become @asis by default; overrides below. \let\definedummyword\definedummyaccent % \commondummiesnofonts % % Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |, etc. % Likewise with the other plain tex font commands. %\let\tt=\asis % \def\ { }% \def\@{@}% \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}% \def\AE{AE}% \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\TH{ZZZ}% \def\aa{aa}% \def\ae{ae}% \def\dh{dzz}% \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% \def\ordf{a}% \def\ordm{o}% \def\o{o}% \def\questiondown{?}% \def\ss{ss}% \def\th{zzz}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % 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\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% \def\expansion{==>}% \def\geq{>=}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% \def\leq{<=}% \def\minus{-}% \def\point{.}% \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% \def\quotedblright{"}% \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% \def\registeredsymbol{R}% \def\result{=>}% \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. % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. % \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)? % Most index entries go through here, but \dosubind is the general case. % #1 is the index name, #2 is the entry text. \def\doind#1#2{\dosubind{#1}{#2}{}} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % empty if called from \doind, as we usually are (the main exception % is with most defuns, which call us directly). % \def\dosubind#1#2#3{% \iflinks {% % Store the main index entry text (including the third arg). \toks0 = {#2}% % If third arg is present, precede it with a space. \def\thirdarg{#3}% \ifx\thirdarg\empty \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % \edef\writeto{\csname#1indfile\endcsname}% % \safewhatsit\dosubindwrite }% \fi } % Write the entry in \toks0 to the index file: % \def\dosubindwrite{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % % Process the index entry with all font commands turned off, to % get the string to sort by. {\indexnofonts \edef\temp{\the\toks0}% need full expansion \xdef\indexsorttmp{\temp}% }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\writeto{% \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% }% \temp } % Take care of unwanted page breaks/skips around a whatsit: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write or \pdfdest will make \lastskip zero. The result is that % sequences like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % % But wait, there is a catch there: % We'll have to check whether \lastskip is zero skip. \ifdim is not % sufficient for this purpose, as it ignores stretch and shrink parts % of the skip. The only way seems to be to check the textual % representation of the skip. % % The following is almost like \def\zeroskipmacro{0.0pt} except that % the ``p'' and ``t'' characters have catcode \other, not 11 (letter). % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % \newskip\whatsitskip \newcount\whatsitpenalty % % ..., ready, GO: % \def\safewhatsit#1{% \ifhmode #1% \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else \vskip-\whatsitskip \fi % #1% % \ifx\lastskipmacro\zeroskipmacro % If \lastskip was zero, perhaps the last item was a penalty, and % perhaps it was >=10000, e.g., a \nobreak. In that case, we want % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: % % @deffn deffn-whatever % @vindex index-whatever % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\whatsitskip \fi \fi } % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \parseargdef\printindex{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\backslashcurfont}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \nobreak \vskip 0pt plus 3\baselineskip \penalty 0 \vskip 0pt plus -3\baselineskip % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% % Do our best not to break after the initial. \nobreak \vskip .33\baselineskip plus .1\baselineskip }} % \entry typesets a paragraph consisting of the text (#1), dot leaders, and % then page number (#2) flushed to the right margin. It is used for index % and table of contents entries. The paragraph is indented by \leftskip. % % A straightforward implementation would start like this: % \def\entry#1#2{... % 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{% \begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % A bit of stretch before each entry for the benefit of balancing % 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 \aftergroup\finishentry % And now comes the text of the entry. } \def\finishentry#1{% % #1 is the page number. % % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \setbox\boxA = \hbox{#1}% \ifdim\wd\boxA = 0pt \ % \else % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#1.% \ \the\toksA \else \ #1% \fi \fi \par \endgroup } % Like plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } % The double-column output routine for all double-column pages except % the last. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% % The following penalty ensures that the page builder is exercised % _before_ we change the output routine. This is necessary in the % following situation: % % The last section of the index consists only of a single entry. % Before this section, \pagetotal is less than \pagegoal, so no % break occurs before the last section starts. However, the last % section, consisting of \initial and the single \entry, does not % fit on the page and has to be broken off. Without the following % penalty the page builder will not be exercised until \eject % below, and by that time we'll already have changed the output % routine to the \balancecolumns version, so the next-to-last % double-column page will be processed with \balancecolumns, which % is wrong: The two columns will go to the main vertical list, with % the broken-off section in the recent contributions. As soon as % the output routine finishes, TeX starts reconsidering the page % break. The two columns and the broken-off section both fit on the % page, because the two columns now take up only half of the page % goal. When TeX sees \eject from below which follows the final % section, it invokes the new output routine that we've set after % \balancecolumns below; \onepageout will try to fit the two columns % and the final section into the vbox of \pageheight (see % \pagebody), causing an overfull box. % % Note that glue won't work here, because glue does not exercise the % page builder, unlike penalties (see The TeXbook, pp. 280-281). \penalty0 % \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. % 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 % chapters, we're in trouble anyway, I'm sure.) \newcount\unnumberedno \unnumberedno = 10000 \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % % \def\appendixletter{\char\the\appendixno} % We do the following ugly conditional instead of the above simple % construct for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. % \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines these (using marks) as the number+name, number % and name of the chapter. Page headings and footings can use % these. @section does likewise. \def\thischapter{} \def\thischapternum{} \def\thischaptername{} \def\thissection{} \def\thissectionnum{} \def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % we only have subsub. \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. % 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. \def\chapheadtype{N} % Choose a heading macro % #1 is heading type % #2 is heading level % #3 is text for heading \def\genhead#1#2#3{% % Compute the abs. sec. level: \absseclevel=#2 \advance\absseclevel by \secbase % Make sure \absseclevel doesn't fall outside the range: \ifnum \absseclevel < 0 \absseclevel = 0 \else \ifnum \absseclevel > 3 \absseclevel = 3 \fi \fi % The heading type: \def\headtype{#1}% \if \headtype U% \ifnum \absseclevel < \unnlevel \chardef\unnlevel = \absseclevel \fi \else % Check for appendix sections: \ifnum \absseclevel = 0 \edef\chapheadtype{\headtype}% \else \if \headtype A\if \chapheadtype N% \errmessage{@appendix... within a non-appendix chapter}% \fi\fi \fi % Check for numbered within unnumbered: \ifnum \absseclevel > \unnlevel \def\headtype{U}% \else \chardef\unnlevel = 3 \fi \fi % Now print the heading: \if \headtype U% \ifcase\absseclevel \unnumberedzzz{#3}% \or \unnumberedseczzz{#3}% \or \unnumberedsubseczzz{#3}% \or \unnumberedsubsubseczzz{#3}% \fi \else \if \headtype A% \ifcase\absseclevel \appendixzzz{#3}% \or \appendixsectionzzz{#3}% \or \appendixsubseczzz{#3}% \or \appendixsubsubseczzz{#3}% \fi \else \ifcase\absseclevel \chapterzzz{#3}% \or \seczzz{#3}% \or \numberedsubseczzz{#3}% \or \numberedsubsubseczzz{#3}% \fi \fi \fi \suppressfirstparagraphindent } % an interface: \def\numhead{\genhead N} \def\apphead{\genhead A} \def\unnmhead{\genhead U} % @chapter, @appendix, @unnumbered. Increment top-level counter, reset % all lower-level sectioning counters to zero. % % Also set \chaplevelprefix, which we prepend to @float sequence numbers % (e.g., figures), q.v. By default (before any chapter), that is empty. \let\chaplevelprefix = \empty % \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz#1{% % section resetting is \global in case the chapter is in a group, such % as an @include file. \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\chapno by 1 % % Used for \float. \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % % \putwordChapter can contain complex things in translations. \toks0=\expandafter{\putwordChapter}% \message{\the\toks0 \space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% % % So @section and the like are numbered underneath this chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz % \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % % \putwordAppendix can contain complex things in translations. \toks0=\expandafter{\putwordAppendix}% \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } % 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 % % Since an unnumbered has no number, no prefix for figures. \global\let\chaplevelprefix = \empty \resetallfloatnos % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}% \message{(\the\toks0)}% % \chapmacro{#1}{Ynothing}{\the\unnumberedno}% % \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\parseargdef\centerchap{% % Well, we could do the following in a group, but that would break % an assumption that \chapmacro is called at the outermost level. % Thus we are safer this way: --kasal, 24feb04 \let\centerparametersmaybe = \centerparameters \unnmhead0{#1}% \let\centerparametersmaybe = \relax } % @top is like @unnumbered. \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}% } % 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 % 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. % % 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}% } % 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}% } % normally calls unnumberedsubseczzz: \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. % % 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}% } % 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}% } % normally unnumberedsubsubseczzz: \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% } % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \let\section = \numberedsec \let\subsection = \numberedsubsec \let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading % NOTE on use of \vbox for chapter headings, section headings, and such: % 1) We use \vbox rather than the earlier \line to permit % overlong headings to fold. % 2) \hyphenpenalty is set to 10000 because hyphenation in a % heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz } \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\ptexraggedright \rmisbold #1\hfill}}% \bigskip \par\penalty 200\relax \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. % Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} % 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 % get the headings for the next chapter, which is wrong. But we don't % care -- we just disable all headings on the filler page. \def\chapoddpage{% \chappager \ifodd\pageno \else \begingroup \headingsoff \null \chappager \endgroup \fi } \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{% \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon % Chapter opening. % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. % % To test against our argument. \def\Ynothingkeyword{Ynothing} \def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} % \def\chapmacro#1#2#3{% % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% \gdef\thissection{}}% % \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{\thischaptername}}% \else\ifx\temptype\Yomitfromtockeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{}}% \else\ifx\temptype\Yappendixkeyword \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% % \noexpand\putwordAppendix avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \else \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% % \noexpand\putwordChapter avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordChapter{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert the chapter heading break. \pchapsepmacro % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \domark % {% \chapfonts \rmisbold % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. \gdef\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the % \donoderef, because we include the current node name in the toc % entry, and \donoderef resets it to empty. \writetocentry{\toctype}{#1}{#3}% % % For pdftex, we have to write out the node definition (aka, make % the pdfdest) after any page break, but before the actual text has % been typeset. If the destination for the pdf outline is after the % text, then jumping from the outline may wind up with the text not % being visible, for instance under high magnification. \donoderef{#2}% % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerparameters{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt } % I don't think this chapter style is supported any more, so I'm not % updating it with the new noderef stuff. We'll see. --karl, 11aug03. % \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\ptexraggedright \rmisbold #1\hfill}}\bigskip \par\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. These macros combine the section number parts and % call the generic \sectionheading to do the printing. % \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip{-1000}} % Subsection titles. \newskip\subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} % Subsubsection titles. \def\subsubsecheadingskip{\subsecheadingskip} \def\subsubsecheadingbreak{\subsecheadingbreak} % Print any size, any type, section title. % % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the % section number. % \def\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% \checkenv{}% should not be in an environment. % % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % \def\sectionlevel{#2}% \def\temptype{#3}% % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword \ifx\sectionlevel\seckeyword \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% \gdef\thissection{\thissectionname}}% \fi \else\ifx\temptype\Yomitfromtockeyword % Don't redefine \thissection. \else\ifx\temptype\Yappendixkeyword \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \else \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % % Go into vertical mode. Usually we'll already be there, but we % don't want the following whatsit to end up in a preceding paragraph % if the document didn't happen to have a blank line. \par % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert space above the heading. \csname #2headingbreak\endcsname % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chapmacro. \donoderef{#3}% % % Interline glue will be inserted when the vbox is completed. % That glue will be a valid breakpoint for the page, since it'll be % preceded by a whatsit (usually from the \donoderef, or from the % \writetocentry if there was no node). We don't want to allow that % break, since then the whatsits could end up on page n while the % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. \nobreak % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% % Add extra space after the heading -- half of whatever came above it. % Don't allow stretch, though. \kern .5 \csname #2headingskip\endcsname % % Do not let the kern be a potential breakpoint, as it would be if it % was followed by glue. \nobreak % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) \vskip-\parskip % % 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 } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. % % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} % We append the current node name (if any) and page number as additional % arguments for the \{chap,sec,...}entry macros which will eventually % read this. The node name is used in the pdf outlines as the % destination to jump to. % % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. % But if #1 is `omit', then we don't do anything. This is used for the % table of contents chapter openings themselves. % \newif\iftocfileopened \def\omitkeyword{omit}% % \def\writetocentry#1#2#3{% \edef\writetoctype{#1}% \ifx\writetoctype\omitkeyword \else \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi % \iflinks {\atdummies \edef\temp{% \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% \temp }% \fi \fi % % Tell \shipout to create a pdf destination on each page, if we're % writing pdf. These are used in the table of contents. We can't % just write one on every page because the title pages are numbered % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. \ifpdf \global\pdfmakepagedesttrue \fi } % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. % \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active \catcode`\<=\active \catcode`\>=\active \catcode`\\=\active \catcode`\^=\active \catcode`\_=\active \catcode`\|=\active \catcode`\~=\active } % Read the toc file, which is essentially Texinfo input. \def\readtocfile{% \setupdatafile \activecatcodes \input \tocreadfilename } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Prepare to read what we've written to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. % \def\tocreadfilename{\jobname.toc} % Normal (long) toc. % \def\contents{% \startcontents{\putwordTOC}% \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \ifeof 1 \else \pdfmakeoutlines \fi \closein 1 \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\partentry = \shortpartentry \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\numsecentry##1##2##3##4{} \let\appsecentry = \numsecentry \let\unnsecentry = \numsecentry \let\numsubsecentry = \numsecentry \let\appsubsecentry = \numsecentry \let\unnsubsecentry = \numsecentry \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \closein 1 \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } \let\shortcontents = \summarycontents % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g., `A' for an appendix, or `3' for a chapter. % \def\shortchaplabel#1{% % This space should be enough, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % But use \hss just in case. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) % % We'd like to right-justify chapter numbers, but that looks strange % with appendix letters. And right-justifying numbers and % left-justifying letters looks strange when there is less than 10 % chapters. Have to read the whole toc once to know how many chapters % there are before deciding ... \hbox to 1em{#1\hss}% } % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % 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}} % % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3#4{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% } % Appendices, in the main contents. % Need the word Appendix, and a fixed-size box. % \def\appendixbox#1{% % We use M since it's probably the widest letter. \setbox0 = \hbox{\putwordAppendix{} M}% \hbox to \wd0{\putwordAppendix{} #1\hss}} % \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} % Unnumbered chapters. \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} % Sections. \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} \let\appsecentry=\numsecentry \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} \let\appsubsecentry=\numsubsecentry \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} % And subsubsections. \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} \let\appsubsubsecentry=\numsubsubsecentry \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} % This parameter controls the indentation of the various levels. % Same as \defaultparindent. \newdimen\tocindent \tocindent = 15pt % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % We use the same \entry macro as for the index entries. \let\tocentry = \entry % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \def\subsecentryfonts{\textfonts} \def\subsubsecentryfonts{\textfonts} \message{environments,} % @foo ... @end foo. % @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 @ character. \envdef\tex{% \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other \catcode`\`=\other \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 \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\indent=\ptexindent \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext \expandafter \let\csname top\endcsname=\ptextop % outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% } % There is no need to define \Etex. % Define @lisp ... @end lisp. % @lisp environment forms a group so it can rebind things, % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz and % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... \ifnum\lastpenalty<10000 \penalty-50 \fi \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will % also clear it, so that its embedded environments do the narrowing again. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \envdef\cartouche{% \ifhmode\par\fi % can't be in the midst of a paragraph. \startsavinginserts \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt % we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \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 \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \kern3pt \hsize=\cartinner \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \comment % For explanation, see the end of def\group. } \def\Ecartouche{% \ifhmode\par\fi \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \checkinserts } % This macro is called at the beginning of all the @example variants, % inside a group. \newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt % Turn off paragraph indentation but redefine \indent to emulate % the normal \indent. \nonfillparindent=\parindent \parindent = 0pt \let\indent\nonfillindent % \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \else \let\nonarrowing = \relax \fi \let\exdent=\nofillexdent } \begingroup \obeyspaces % We want to swallow spaces (but not other tokens) after the fake % @indent in our nonfill-environments, where spaces are normally % active and set to @tie, resulting in them not being ignored after % @indent. \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% \gdef\nonfillindentcheck{% \ifx\temp % \expandafter\nonfillindentgobble% \else% \leavevmode\nonfillindentbox% \fi% }% \endgroup \def\nonfillindentgobble#1{\nonfillindent} \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: % @example, @display, @format, @lisp % \def\smallword{small} \def\nosmallword{nosmall} \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword % end paragraph for sake of leading, in case document has no blank % line. This is redundant with what happens in \aboveenvbreak, but % we need to do it before changing the fonts, and it's inconvenient % to change the fonts afterward. \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % 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 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. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvdef{lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenvdef{display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenvdef{format}{% \let\nonarrowing = t% \nonfillstart \gobble } % @flushleft: same as @format, but doesn't obey \SETdispenvsize. \envdef\flushleft{% \let\nonarrowing = t% \nonfillstart \gobble } \let\Eflushleft = \afterenvbreak % @flushright. % \envdef\flushright{% \let\nonarrowing = t% \nonfillstart \advance\leftskip by 0pt plus 1fill\relax \gobble } \let\Eflushright = \afterenvbreak % @raggedright does more-or-less normal line breaking but no right % justification. From plain.tex. \envdef\raggedright{% \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax } \let\Eraggedright\par \envdef\raggedleft{% \parindent=0pt \leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedleft\par \envdef\raggedcenter{% \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedcenter\par % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % 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 % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing \else \let\nonarrowing = \relax \fi \parsearg\quotationlabel } % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par \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{% \def\temp{#1}% \ifx\temp\empty \else {\bf #1: }% \fi } % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p.344; only we need to do the other characters Texinfo sets % active too. Otherwise, they get lost as the first character on a % verbatim line. \def\dospecials{% \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% % Don't do the quotes -- if we do, @set txicodequoteundirected and % @set txicodequotebacktick will not have effect on @verb and % @verbatim, and ?` and !` ligatures won't get disabled. %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \setupmarkupstyle{verb}% \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion. \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % % 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 \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 % start the verbatim environment. \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart \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: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] % \begingroup \catcode`\ =\active \obeylines % % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% % We really want {...\end verbatim} in the body of the macro, but % without the active space; thus we have to use \xdef and \gobble. \endgroup % \envdef\verbatim{% \setupverbatim\doverbatim } \let\Everbatim = \afterenvbreak % @verbatiminclude FILE - insert text of file in verbatim environment. % \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % \def\doverbatiminclude#1{% {% \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% \input #1 \afterenvbreak }% } % @copying ... @end copying. % Save the text away for @insertcopying later. % % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is very desirable. % \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} % \def\insertcopying{% \begingroup \parindent = 0pt % paragraph indentation looks wrong on title page \scanexp\copyingtext \endgroup } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \defunpenalty=10003 % Will keep this @deffn together with the % following @def command, see below. \else % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check specifically for penalty 10002, inserted % by \printdefunline, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % % 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. \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. \medskip % preceded by discardable penalty, so not a breakpoint \fi % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } \def\dodefunx#1{% % First, check whether we are in the right environment: \checkenv#1% % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% } \def\gobbledefun#1\startdefun{} % \printdefunline \deffnheader{text} % \def\printdefunline#1#2{% \begingroup % call \deffnheader: #1#2 \endheader % common ending: \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil\relax \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts \endgroup } \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; % the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun \edef\temp{\noexpand\domakedefun \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% \temp } % \domakedefun \deffn \deffnx \deffnheader % % Define \deffn and \deffnx, without parameters. % \deffnheader has to be defined explicitly. % \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% } \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{}} % @deffn category class name args \makedefun{defop}#1 {\defopon{#1\ \putwordon}} % \defopon {category on}class name args \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deffngeneral {subind}category name args % \def\deffngeneral#1#2 #3 #4\endheader{% % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. \dosubind{fn}{\code{#3}}{#1}% \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } % Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} % @deftypeop category class type name args \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} % \deftypeopon {category on}class type name args \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deftypefngeneral {subind}category type name args % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% \doingtypefntrue \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } % Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} % @deftypecv category class type var args \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} % \deftypecvof {category of}class type var args \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } % \deftypecvgeneral {subind}category type var args % \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% \dosubind{vr}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } % Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } % @defcv category class var args \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } % Types: % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% \defname{#1}{}{#2}\defunargs{#3\unskip}% } % Remaining @defun-like shortcuts: \makedefun{defun}{\deffnheader{\putwordDeffunc} } \makedefun{defmac}{\deffnheader{\putwordDefmac} } \makedefun{defspec}{\deffnheader{\putwordDefspec} } \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } \makedefun{defvar}{\defvrheader{\putwordDefvar} } \makedefun{defopt}{\defvrheader{\putwordDefopt} } \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } \makedefun{defmethod}{\defopon\putwordMethodon} \makedefun{deftypemethod}{\deftypeopon\putwordMethodon} \makedefun{defivar}{\defcvof\putwordInstanceVariableof} \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} % \defname, which formats the name of the @def (not the args). % #1 is the category, such as "Function". % #2 is the return type, if any. % #3 is the function name. % % 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 % % 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. 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 % % 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 % \hsize has to be shortened this way: \kern\leftskip % Intentionally do not respect \rightskip, since we need the space. }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \exdentamount=\defbodyindent {% % defun fonts. We use typewriter by default (used to be bold) because: % . we're printing identifiers, they should be in tt in principle. % . in languages with many accents, such as Czech or French, it's % common to leave accents off identifiers. The result looks ok in % tt, but exceedingly strange in rm. % . we don't want -- and --- to be treated as ligatures. % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt \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 % \boldbrax % arguments will be output next, if any. } % Print arguments in slanted roman (not ttsl), inconsistently with using % tt for the name. This is because literal text is sometimes needed in % the argument list (groff manual), and ttsl and tt are not very % distinguishable. Prevent hyphenation at `-' chars. % \def\defunargs#1{% % use sl by default (not ttsl), % tt for the names. \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. Let's try @var for that. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } % We want ()&[] to print specially on the defun line. % \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\[=\active \catcode`\]=\active \catcode`\&=\active } % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. { \activeparens \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \global\let& = \& \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } \newcount\parencount % If we encounter &foo, then turn on ()-hacking afterwards \newif\ifampseen \def\amprm#1 {\ampseentrue{\bf\ }} \def\parenfont{% \ifampseen % At the first level, print parens in roman, % otherwise use the default font. \ifnum \parencount=1 \rm \fi \else % The \sf parens (in \boldbrax) actually are a little bolder than % the contained text. This is especially needed for [ and ] . \sf \fi } \def\infirstlevel#1{% \ifampseen \ifnum\parencount=1 #1% \fi \fi } \def\bfafterword#1 {#1 \bf} \def\opnr{% \global\advance\parencount by 1 {\parenfont(}% \infirstlevel \bfafterword } \def\clnr{% {\parenfont)}% \infirstlevel \sl \global\advance\parencount by -1 } \newcount\brackcount \def\lbrb{% \global\advance\brackcount by 1 {\bf[}% } \def\rbrb{% {\bf]}% \global\advance\brackcount by -1 } \def\checkparencounts{% \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } % these should not use \errmessage; the glibc manual, at least, actually % has such constructs (when documenting function pointers). \def\badparencount{% \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% \message{Warning: unbalanced square brackets in @def...}% \global\brackcount=0 } \message{macros,} % @macro. % 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\thisisundefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \input \jobname.tmp } \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 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}}% \temp } \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? % List of all defined macros in the form % \definedummyword\macro1\definedummyword\macro2... % Currently is also contains all @aliases; the list can be split % if there is a need. \def\macrolist{} % Add the macro to \macrolist \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} \def\addtomacrolistxxx#1{% \toks0 = \expandafter{\macrolist\definedummyword#1}% \xdef\macrolist{\the\toks0}% } % Utility routines. % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). % \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname \csname#2\endcsname } % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % 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 \ % 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 % body, and then making it the \newlinechar in \scanmacro. % \def\scanctxt{% used as subroutine \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } \def\scanargctxt{% used for copying and captions, not macros. \scanctxt \catcode`\\=\other \catcode`\^^M=\other } \def\macrobodyctxt{% used for @macro definitions \scanctxt \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } \def\macroargctxt{% used when scanning invocations \scanctxt \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 \ifx\argl\empty % no arguments \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}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \parseargdef\unmacro{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% \ifx #1\relax % remove this \else \noexpand\definedummyword \noexpand#1% \fi } % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \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 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 % 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. % % 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 \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 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 \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \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 % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \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). % \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \macnamexxx} % @alias. % We need some trickery to remove the optional spaces around the equal % 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{% {% \expandafter\let\obeyedspace=\empty \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% }% \next } \message{cross references,} \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \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 % cross-references. The @node line might or might not have commas, and % might or might not have spaces before the first comma, like: % @node foo , bar , ... % We don't want such trailing spaces in the node name. % \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} % % also remove a trailing comma, in case of something like this: % @node Help-Cross, , , Cross-refs \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\empty % Write a cross-reference definition for the current node. #1 is the % type (Ynumbered, Yappendix, Ynothing). % \def\donoderef#1{% \ifx\lastnode\empty\else \setref{\lastnode}{#1}% \global\let\lastnode=\empty \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister % \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: % 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. % 3) NAME-pg - the page number. % % This is called from \donoderef, \anchor, and \dofloat. In the case of % floats, there is an additional part, which is not written here: % 4) NAME-lof - the text as it should appear in a @listoffloats. % \def\setref#1#2{% \pdfmkdest{#1}% \iflinks {% \atdummies % preserve commands, but don't expand them \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \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 % manual. All but the node name can be omitted. % \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\printedrefname{\ignorespaces #3}% \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 % Not auto section-title: use node name inside the square brackets. \def\printedrefname{\ignorespaces #1}% \else % 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 (should) know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% \fi% \fi \fi \fi % % Make link in pdf output. \ifpdf {\indexnofonts \turnoffactive % This expands tokens, so do it after making catcode changes, so _ % etc. don't get their TeX definitions. \getfilename{#4}% % \edef\pdfxrefdest{#1}% \txiescapepdf\pdfxrefdest % \leavevmode \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 goto file{\the\filename.pdf} name{\pdfxrefdest}% \else goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\linkcolor}% \fi % % Float references are printed completely differently: "Figure 1.2" % instead of "[somenode], p.3". We distinguish them by the % LABEL-title being set to a magic string. {% % Have to otherify everything special to allow the \csname to % include an _ in the xref name, etc. \indexnofonts \turnoffactive \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd\printedrefnamebox = 0pt \refx{#1-snt}{}% \else \printedrefname \fi % % if the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". \ifdim \wd\printedmanualbox > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. % % 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 % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\turnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % output the `[mynode]' via the macro below so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi \fi \endlink \endgroup} % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly % one that Bob is working on :). % \def\xrefprintnodename#1{[#1]} % Things referred to by \setref. % \def\Ynothing{} \def\Yomitfromtoc{} \def\Ynumbered{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 \putwordSection@tie \the\chapno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno \else \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } \def\Yappendix{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno \else \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. % \def\refx#1#2{% {% \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs {\toks0 = {#1}% avoid expansion of possibly-complex value \message{\linenumber Undefined cross reference `\the\toks0'.}}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. Usually it's % just a \def (we prepend XR to the control sequence name to avoid % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% {% The node name might contain 8-bit characters, which in our current % implementation are changed to commands like @'e. Don't let these % mess up the control sequence name. \indexnofonts \turnoffactive \xdef\safexrefname{#1}% }% % \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname % % Is this the first time we've seen this float type? \expandafter\ifx\floatlist\relax \toks0 = {\do}% yes, so just \do \else % had it before, so preserve previous elements in list. \toks0 = \expandafter{\floatlist\do}% \fi % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 {\safexrefname}}% \fi } % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } \def\setupdatafile{% \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\^=\other % % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % % This is to support \ in node names and titles, since the \ % characters end up in a \csname. It's easier than % leaving it active and making its active definition an actual \ % character. What I don't understand is why it works in the *value* % of the xrdef. Seems like it should be a catcode12 \, and that % should not typeset properly. But it works, so I'm moving on for % now. --karl, 15jan04. \catcode`\\=\other % % Make the characters 128-255 be printing characters. {% \count1=128 \def\loop{% \catcode\count1=\other \advance\count1 by 1 \ifnum \count1<256 \loop \fi }% }% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 } \def\readdatafile#1{% \begingroup \setupdatafile \input\jobname.#1 \endgroup} \message{insertions,} % including footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for Info output only. \let\footnotestyle=\comment {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \let\indent=\ptexindent \let\noindent=\ptexnoindent \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \dofootnote }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset (and anything else that uses % \parseargline) fails inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \gdef\dofootnote{% \insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Because we use hanging indentation in footnotes, a @noindent appears % to exdent this text, so make it be a no-op. makeinfo does not use % hanging indentation so @noindent can still be needed within footnote % text after an @example or the like (not that this is good style). \let\noindent = \relax % % Hang the footnote text off the number. Use \everypar in case the % footnote extends for more than one paragraph. \everypar = {\hang}% \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % 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 % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. % \def\startsavinginserts{% \ifx \insert\ptexinsert \let\insert\saveinsert \else \let\checkinserts\relax \fi } % This \insert replacement works for both \insert\footins{foo} and % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. % \def\saveinsert#1{% \edef\next{\noexpand\savetobox \makeSAVEname#1}% \afterassignment\next % swallow the left brace \let\temp = } \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} \def\placesaveins#1{% \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname {\box#1}% } % eat @SAVE -- beware, all of them have catcode \other: { \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) \gdef\gobblesave @SAVE{} } % initialization: \def\newsaveins #1{% \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% \next } \def\newsaveinsX #1{% \csname newbox\endcsname #1% \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts \checksaveins #1}% } % initialize: \let\checkinserts\empty \newsaveins\footins \newsaveins\margin % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi \closein 1 % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\thisiundefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #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 stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names % If the image is by itself, center it. \ifvmode \imagevmodetrue \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \fi % % Leave vertical mode so that indentation from an enclosing % environment such as @quotation is respected. On the other hand, if % it's at the top level, we don't want the normal paragraph indentation. \noindent % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \epsfbox{#1.eps}% \fi % \ifimagevmode \medskip \fi % space after the standalone image \endgroup} % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, % etc. We don't actually implement floating yet, we always include the % float "here". But it seemed the best name for the future. % \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} % There may be a space before second and/or third parameter; delete it. \def\eatcommaspace#1, {#1,} % #1 is the optional FLOATTYPE, the text label for this float, typically % "Figure", "Table", "Example", etc. Can't contain commas. If omitted, % this float will not be numbered and cannot be referred to. % % #2 is the optional xref label. Also must be present for the float to % be referable. % % #3 is the optional positioning argument; for now, it is ignored. It % will somehow specify the positions allowed to float to (here, top, bottom). % % We keep a separate counter for each FLOATTYPE, which we reset at each % chapter-level command. \let\resetallfloatnos=\empty % \def\dofloat#1,#2,#3,#4\finish{% \let\thiscaption=\empty \let\thisshortcaption=\empty % % don't lose footnotes inside @float. % % BEWARE: when the floats start float, we have to issue warning whenever an % insert appears inside a float which could possibly float. --kasal, 26may04 % \startsavinginserts % % We can't be used inside a paragraph. \par % \vtop\bgroup \def\floattype{#1}% \def\floatlabel{#2}% \def\floatloc{#3}% we do nothing with this yet. % \ifx\floattype\empty \let\safefloattype=\empty \else {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% \fi % % If label is given but no type, we handle that as the empty type. \ifx\floatlabel\empty \else % We want each FLOATTYPE to be numbered separately (Figure 1, % Table 1, Figure 2, ...). (And if no label, no number.) % \expandafter\getfloatno\csname\safefloattype floatno\endcsname \global\advance\floatno by 1 % {% % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi % % start with \parskip glue, I guess. \vskip\parskip % % Don't suppress indentation if a float happens to start a section. \restorefirstparagraphindent } % we have these possibilities: % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap % @float Foo,lbl & no caption: Foo 1.1 % @float Foo & @caption{Cap}: Foo: Cap % @float Foo & no caption: Foo % @float ,lbl & Caption{Cap}: 1.1: Cap % @float ,lbl & no caption: 1.1 % @float & @caption{Cap}: Cap % @float & no caption: % \def\Efloat{% \let\floatident = \empty % % In all cases, if we have a float type, it comes first. \ifx\floattype\empty \else \def\floatident{\floattype}\fi % % If we have an xref label, the number comes next. \ifx\floatlabel\empty \else \ifx\floattype\empty \else % if also had float type, need tie first. \appendtomacro\floatident{\tie}% \fi % the number. \appendtomacro\floatident{\chaplevelprefix\the\floatno}% \fi % % Start the printed caption with what we've constructed in % \floatident, but keep it separate; we need \floatident again. \let\captionline = \floatident % \ifx\thiscaption\empty \else \ifx\floatident\empty \else \appendtomacro\captionline{: }% had ident, so need a colon between \fi % % caption text. \appendtomacro\captionline{\scanexp\thiscaption}% \fi % % If we have anything to print, print it, with space before. % Eventually this needs to become an \insert. \ifx\captionline\empty \else \vskip.5\parskip \captionline % % Space below caption. \vskip\parskip \fi % % If have an xref label, write the list of floats info. Do this % after the caption, to avoid chance of it being a breakpoint. \ifx\floatlabel\empty \else % Write the text that goes in the lof to the aux file as % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% \atdummies % % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux file. \scanexp{% \xdef\noexpand\gtemp{% \ifx\thisshortcaption\empty \thiscaption \else \thisshortcaption \fi }% }% \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident \ifx\gtemp\empty \else : \gtemp \fi}}% }% \fi \egroup % end of \vtop % % place the captured inserts % % BEWARE: when the floats start floating, we have to issue warning % whenever an insert appears inside a float which could possibly % float. --kasal, 26may04 % \checkinserts } % Append the tokens #2 to the definition of macro #1, not expanding either. % \def\appendtomacro#1#2{% \expandafter\def\expandafter#1\expandafter{#1#2}% } % @caption, @shortcaption % \def\caption{\docaption\thiscaption} \def\shortcaption{\docaption\thisshortcaption} \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} \def\defcaption#1#2{\egroup \def#1{#2}} % The parameter is the control sequence identifying the counter we are % going to use. Create it if it doesn't exist and assign it to \floatno. \def\getfloatno#1{% \ifx#1\relax % Haven't seen this figure type before. \csname newcount\endcsname #1% % % Remember to reset this floatno at the next chap. \expandafter\gdef\expandafter\resetallfloatnos \expandafter{\resetallfloatnos #1=0 }% \fi \let\floatno#1% } % \setref calls this to get the XREFLABEL-snt value. We want an @xref % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we % first read the @float command. % \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% % Magic string used for the XREFLABEL-title value, so \xrefX can % distinguish floats from other xref types. \def\floatmagic{!!float!!} % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic % \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % % #1 is (maybe) the \floatmagic string. If so, #2 will be the % (safe) float type for this float. We set \iffloattype to #2. % \def\doiffloat#1=#2=#3\finish{% \def\temp{#1}% \def\iffloattype{#2}% \ifx\temp\floatmagic } % @listoffloats FLOATTYPE - print a list of floats like a table of contents. % \parseargdef\listoffloats{% \def\floattype{#1}% floattype {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% % % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax \ifhavexrefs % if the user said @listoffloats foo but never @float foo. \message{\linenumber No `\safefloattype' floats to list.}% \fi \else \begingroup \leftskip=\tocindent % indent these entries like a toc \let\do=\listoffloatsdo \csname floatlist\safefloattype\endcsname \endgroup \fi } % This is called on each entry in a list of floats. We're passed the % xref label, in the form LABEL-title, which is how we save it in the % aux file. We strip off the -title and look up \XRLABEL-lof, which % has the text we're supposed to typeset here. % % Figures without xref labels will not be included in the list (since % they won't appear in the aux file). % \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} \def\listoffloatsdoentry#1-title\finish{{% % Can't fully expand XR#1-lof because it can contain anything. Just % pass the control sequence. On the other hand, XR#1-pg is just the % page number, and we want to fully expand that so we can get a link % in pdf output. \toksA = \expandafter{\csname XR#1-lof\endcsname}% % % use the same \entry macro we use to generate the TOC and index. \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% \writeentry }} \message{localization,} % For single-language documents, @documentlanguage is usually given very % early, just after @documentencoding. Single argument is the language % (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active \globaldefs=1 \parseargdef\documentlanguage{\begingroup \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. \openin 1 txi-#1.tex \ifeof 1 \documentlanguagetrywithoutunderscore{#1_\finish}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX \endgroup} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. % \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } }% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? Putting it in the current directory should work if nowhere else does.} % This macro is called from txi-??.tex files; the first argument is the % \language name to set (without the "\lang@" prefix), the second and % third args are \{left,right}hyphenmin. % % The language names to pass are determined when the format is built. % See the etex.log file created at that time, e.g., % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. % % With TeX Live 2008, etex now includes hyphenation patterns for all % available languages. This means we can support hyphenation in % Texinfo, at least to some extent. (This still doesn't solve the % accented characters problem.) % \catcode`@=11 \def\txisetlanguage#1#2#3{% % do not set the language if the name is undefined in the current TeX. \expandafter\ifx\csname lang@#1\endcsname \relax \message{no patterns for #1}% \else \global\language = \csname lang@#1\endcsname \fi % but there is no harm in adjusting the hyphenmin values regardless. \global\lefthyphenmin = #2\relax \global\righthyphenmin = #3\relax } % Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% \count255=128 \loop\ifnum\count255<256 \global\catcode\count255=#1\relax \advance\count255 by 1 \repeat } \def\setnonasciicharscatcodenonglobal#1{% \count255=128 \loop\ifnum\count255<256 \catcode\count255=#1\relax \advance\count255 by 1 \repeat } % @documentencoding sets the definition of non-ASCII characters % according to the specified encoding. % \parseargdef\documentencoding{% % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % % Supported encodings: names converted to tokens in order to be able % to compare them with \ifx. \def\ascii{\csname US-ASCII.enc\endcsname}% \def\latnine{\csname ISO-8859-15.enc\endcsname}% \def\latone{\csname ISO-8859-1.enc\endcsname}% \def\lattwo{\csname ISO-8859-2.enc\endcsname}% \def\utfeight{\csname UTF-8.enc\endcsname}% % \ifx \declaredencoding \ascii \asciichardefs % \else \ifx \declaredencoding \lattwo \setnonasciicharscatcode\active \lattwochardefs % \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % \else \ifx \declaredencoding \latnine \setnonasciicharscatcode\active \latninechardefs % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active \utfeightchardefs % \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight \fi % latnine \fi % latone \fi % lattwo \fi % ascii } % A message to be logged when using a character that isn't available % the default font encoding (OT1). % \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} % First, make active non-ASCII characters in order for them to be % correctly categorized when TeX reads the replacement text of % macros containing the character definitions. \setnonasciicharscatcode\active % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% \gdef^^a0{\tie} \gdef^^a1{\exclamdown} \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\copyright} \gdef^^aa{\ordf} \gdef^^ab{\guillemetleft} \gdef^^ac{$\lnot$} \gdef^^ad{\-} \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} \gdef^^b1{$\pm$} \gdef^^b2{$^2$} \gdef^^b3{$^3$} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} % \gdef^^b7{$^.$} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} % \gdef^^bb{\guillemetright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} \gdef^^bf{\questiondown} % \gdef^^c0{\`A} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} \gdef^^c9{\'E} \gdef^^ca{\^E} \gdef^^cb{\"E} \gdef^^cc{\`I} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\"I} % \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\~O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\O} \gdef^^d9{\`U} \gdef^^da{\'U} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\~a} \gdef^^e4{\"a} \gdef^^e5{\ringaccent a} \gdef^^e6{\ae} \gdef^^e7{\cedilla c} \gdef^^e8{\`e} \gdef^^e9{\'e} \gdef^^ea{\^e} \gdef^^eb{\"e} \gdef^^ec{\`{\dotless i}} \gdef^^ed{\'{\dotless i}} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\~o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\o} \gdef^^f9{\`u} \gdef^^fa{\'u} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\th} \gdef^^ff{\"y} } % Latin9 (ISO-8859-15) encoding character definitions. \def\latninechardefs{% % Encoding is almost identical to Latin1. \latonechardefs % \gdef^^a4{\euro} \gdef^^a6{\v S} \gdef^^a8{\v s} \gdef^^b4{\v Z} \gdef^^b8{\v z} \gdef^^bc{\OE} \gdef^^bd{\oe} \gdef^^be{\"Y} } % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{\tie} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\v L} \gdef^^a6{\'S} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\v S} \gdef^^aa{\cedilla S} \gdef^^ab{\v T} \gdef^^ac{\'Z} \gdef^^ad{\-} \gdef^^ae{\v Z} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} \gdef^^b1{\ogonek{a}} \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} \gdef^^b6{\'s} \gdef^^b7{\v{}} \gdef^^b8{\cedilla\ } \gdef^^b9{\v s} \gdef^^ba{\cedilla s} \gdef^^bb{\v t} \gdef^^bc{\'z} \gdef^^bd{\H{}} \gdef^^be{\v z} \gdef^^bf{\dotaccent z} % \gdef^^c0{\'R} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\u A} \gdef^^c4{\"A} \gdef^^c5{\'L} \gdef^^c6{\'C} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\H O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\cedilla T} \gdef^^df{\ss} % \gdef^^e0{\'r} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\u a} \gdef^^e4{\"a} \gdef^^e5{\'l} \gdef^^e6{\'c} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'{\dotless{i}}} \gdef^^ee{\^{\dotless{i}}} \gdef^^ef{\v d} % \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\H o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\v r} \gdef^^f9{\ringaccent u} \gdef^^fa{\'u} \gdef^^fb{\H u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\cedilla t} \gdef^^ff{\dotaccent{}} } % UTF-8 character definitions. % % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. % \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz \gdef\UTFviiiTwoOctets#1#2{\expandafter \UTFviiiDefined\csname u8:#1\string #2\endcsname} % \gdef\UTFviiiThreeOctets#1#2#3{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} % \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} \gdef\UTFviiiDefined#1{% \ifx #1\relax \message{\linenumber Unicode char \string #1 not defined for Texinfo}% \else \expandafter #1% \fi } \begingroup \catcode`\~13 \catcode`\"12 \def\UTFviiiLoop{% \global\catcode\countUTFx\active \uccode`\~\countUTFx \uppercase\expandafter{\UTFviiiTmp}% \advance\countUTFx by 1 \ifnum\countUTFx < \countUTFy \expandafter\UTFviiiLoop \fi} \countUTFx = "C2 \countUTFy = "E0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiTwoOctets\string~}} \UTFviiiLoop \countUTFx = "E0 \countUTFy = "F0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiThreeOctets\string~}} \UTFviiiLoop \countUTFx = "F0 \countUTFy = "F4 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiFourOctets\string~}} \UTFviiiLoop \endgroup \begingroup \catcode`\"=12 \catcode`\<=12 \catcode`\.=12 \catcode`\,=12 \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% \csname u8:##1\string ##2\endcsname}% \def\UTFviiiThreeOctets##1##2##3{% \csname u8:##1\string ##2\string ##3\endcsname}% \def\UTFviiiFourOctets##1##2##3##4{% \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% \endgroup} \gdef\parseXMLCharref{% \ifnum\countUTFz < "A0\relax \errhelp = \EMsimple \errmessage{Cannot define Unicode char value < 00A0}% \else\ifnum\countUTFz < "800\relax \parseUTFviiiA,% \parseUTFviiiB C\UTFviiiTwoOctets.,% \else\ifnum\countUTFz < "10000\relax \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% \else \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiA!% \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% \fi\fi\fi } \gdef\parseUTFviiiA#1{% \countUTFx = \countUTFz \divide\countUTFz by 64 \countUTFy = \countUTFz \multiply\countUTFz by 64 \advance\countUTFx by -\countUTFz \advance\countUTFx by 128 \uccode `#1\countUTFx \countUTFz = \countUTFy} \gdef\parseUTFviiiB#1#2#3#4{% \advance\countUTFz by "#10\relax \uccode `#3\countUTFz \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A3}{\pounds} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} \DeclareUnicodeCharacter{00B4}{\'{ }} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} \DeclareUnicodeCharacter{00C1}{\'A} \DeclareUnicodeCharacter{00C2}{\^A} \DeclareUnicodeCharacter{00C3}{\~A} \DeclareUnicodeCharacter{00C4}{\"A} \DeclareUnicodeCharacter{00C5}{\AA} \DeclareUnicodeCharacter{00C6}{\AE} \DeclareUnicodeCharacter{00C7}{\cedilla{C}} \DeclareUnicodeCharacter{00C8}{\`E} \DeclareUnicodeCharacter{00C9}{\'E} \DeclareUnicodeCharacter{00CA}{\^E} \DeclareUnicodeCharacter{00CB}{\"E} \DeclareUnicodeCharacter{00CC}{\`I} \DeclareUnicodeCharacter{00CD}{\'I} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} \DeclareUnicodeCharacter{00E1}{\'a} \DeclareUnicodeCharacter{00E2}{\^a} \DeclareUnicodeCharacter{00E3}{\~a} \DeclareUnicodeCharacter{00E4}{\"a} \DeclareUnicodeCharacter{00E5}{\aa} \DeclareUnicodeCharacter{00E6}{\ae} \DeclareUnicodeCharacter{00E7}{\cedilla{c}} \DeclareUnicodeCharacter{00E8}{\`e} \DeclareUnicodeCharacter{00E9}{\'e} \DeclareUnicodeCharacter{00EA}{\^e} \DeclareUnicodeCharacter{00EB}{\"e} \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} \DeclareUnicodeCharacter{0104}{\ogonek{A}} \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} \DeclareUnicodeCharacter{0118}{\ogonek{E}} \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} \DeclareUnicodeCharacter{011D}{\^g} \DeclareUnicodeCharacter{011E}{\u{G}} \DeclareUnicodeCharacter{011F}{\u{g}} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} \DeclareUnicodeCharacter{0132}{IJ} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} \DeclareUnicodeCharacter{014F}{\u{o}} \DeclareUnicodeCharacter{0150}{\H{O}} \DeclareUnicodeCharacter{0151}{\H{o}} \DeclareUnicodeCharacter{0152}{\OE} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} \DeclareUnicodeCharacter{015B}{\'s} \DeclareUnicodeCharacter{015C}{\^S} \DeclareUnicodeCharacter{015D}{\^s} \DeclareUnicodeCharacter{015E}{\cedilla{S}} \DeclareUnicodeCharacter{015F}{\cedilla{s}} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} \DeclareUnicodeCharacter{0162}{\cedilla{t}} \DeclareUnicodeCharacter{0163}{\cedilla{T}} \DeclareUnicodeCharacter{0164}{\v{T}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} \DeclareUnicodeCharacter{016B}{\=u} \DeclareUnicodeCharacter{016C}{\u{U}} \DeclareUnicodeCharacter{016D}{\u{u}} \DeclareUnicodeCharacter{016E}{\ringaccent{U}} \DeclareUnicodeCharacter{016F}{\ringaccent{u}} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} \DeclareUnicodeCharacter{0177}{\^y} \DeclareUnicodeCharacter{0178}{\"Y} \DeclareUnicodeCharacter{0179}{\'Z} \DeclareUnicodeCharacter{017A}{\'z} \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} \DeclareUnicodeCharacter{01C6}{d\v{z}} \DeclareUnicodeCharacter{01C7}{LJ} \DeclareUnicodeCharacter{01C8}{Lj} \DeclareUnicodeCharacter{01C9}{lj} \DeclareUnicodeCharacter{01CA}{NJ} \DeclareUnicodeCharacter{01CB}{Nj} \DeclareUnicodeCharacter{01CC}{nj} \DeclareUnicodeCharacter{01CD}{\v{A}} \DeclareUnicodeCharacter{01CE}{\v{a}} \DeclareUnicodeCharacter{01CF}{\v{I}} \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} \DeclareUnicodeCharacter{01D1}{\v{O}} \DeclareUnicodeCharacter{01D2}{\v{o}} \DeclareUnicodeCharacter{01D3}{\v{U}} \DeclareUnicodeCharacter{01D4}{\v{u}} \DeclareUnicodeCharacter{01E2}{\={\AE}} \DeclareUnicodeCharacter{01E3}{\={\ae}} \DeclareUnicodeCharacter{01E6}{\v{G}} \DeclareUnicodeCharacter{01E7}{\v{g}} \DeclareUnicodeCharacter{01E8}{\v{K}} \DeclareUnicodeCharacter{01E9}{\v{k}} \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} \DeclareUnicodeCharacter{01F1}{DZ} \DeclareUnicodeCharacter{01F2}{Dz} \DeclareUnicodeCharacter{01F3}{dz} \DeclareUnicodeCharacter{01F4}{\'G} \DeclareUnicodeCharacter{01F5}{\'g} \DeclareUnicodeCharacter{01F8}{\`N} \DeclareUnicodeCharacter{01F9}{\`n} \DeclareUnicodeCharacter{01FC}{\'{\AE}} \DeclareUnicodeCharacter{01FD}{\'{\ae}} \DeclareUnicodeCharacter{01FE}{\'{\O}} \DeclareUnicodeCharacter{01FF}{\'{\o}} \DeclareUnicodeCharacter{021E}{\v{H}} \DeclareUnicodeCharacter{021F}{\v{h}} \DeclareUnicodeCharacter{0226}{\dotaccent{A}} \DeclareUnicodeCharacter{0227}{\dotaccent{a}} \DeclareUnicodeCharacter{0228}{\cedilla{E}} \DeclareUnicodeCharacter{0229}{\cedilla{e}} \DeclareUnicodeCharacter{022E}{\dotaccent{O}} \DeclareUnicodeCharacter{022F}{\dotaccent{o}} \DeclareUnicodeCharacter{0232}{\=Y} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} \DeclareUnicodeCharacter{02DB}{\ogonek{ }} \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} \DeclareUnicodeCharacter{1E20}{\=G} \DeclareUnicodeCharacter{1E21}{\=g} \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} \DeclareUnicodeCharacter{1E26}{\"H} \DeclareUnicodeCharacter{1E27}{\"h} \DeclareUnicodeCharacter{1E30}{\'K} \DeclareUnicodeCharacter{1E31}{\'k} \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} \DeclareUnicodeCharacter{1E3E}{\'M} \DeclareUnicodeCharacter{1E3F}{\'m} \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} \DeclareUnicodeCharacter{1E54}{\'P} \DeclareUnicodeCharacter{1E55}{\'p} \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} \DeclareUnicodeCharacter{1E7C}{\~V} \DeclareUnicodeCharacter{1E7D}{\~v} \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} \DeclareUnicodeCharacter{1E80}{\`W} \DeclareUnicodeCharacter{1E81}{\`w} \DeclareUnicodeCharacter{1E82}{\'W} \DeclareUnicodeCharacter{1E83}{\'w} \DeclareUnicodeCharacter{1E84}{\"W} \DeclareUnicodeCharacter{1E85}{\"w} \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} \DeclareUnicodeCharacter{1E8C}{\"X} \DeclareUnicodeCharacter{1E8D}{\"x} \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} \DeclareUnicodeCharacter{1E90}{\^Z} \DeclareUnicodeCharacter{1E91}{\^z} \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} \DeclareUnicodeCharacter{1E97}{\"t} \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} \DeclareUnicodeCharacter{1EBC}{\~E} \DeclareUnicodeCharacter{1EBD}{\~e} \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} \DeclareUnicodeCharacter{1EF2}{\`Y} \DeclareUnicodeCharacter{1EF3}{\`y} \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2018}{\quoteleft} \DeclareUnicodeCharacter{2019}{\quoteright} \DeclareUnicodeCharacter{201A}{\quotesinglbase} \DeclareUnicodeCharacter{201C}{\quotedblleft} \DeclareUnicodeCharacter{201D}{\quotedblright} \DeclareUnicodeCharacter{201E}{\quotedblbase} \DeclareUnicodeCharacter{2022}{\bullet} \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} \DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} \DeclareUnicodeCharacter{2212}{\minus} \DeclareUnicodeCharacter{2217}{\point} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. % \setnonasciicharscatcode \other \message{formatting,} \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be very finicky about underfull hboxes, either. \hbadness = 6666 % Following George Bush, get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; % 7) physical page height; 8) physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % \def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax % if we don't reset these, they will remain at "1 true in" of % whatever layout pdftex was dumped with. \pdfhorigin = 1 true in \pdfvorigin = 1 true in \fi % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. \internalpagesizes{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @smallerbook to reset parameters for 6x9 trim size. % (Just testing, parameters still in flux.) \def\smallerbook{{\globaldefs = 1 \parskip = 1.5pt plus 1pt \textleading = 12pt % \internalpagesizes{7.4in}{4.8in}% {-.2in}{-.4in}% {0pt}{14pt}% {9in}{6in}% % \lispnarrowing = 0.25in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .4cm }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then % do the same for \bindingoffset. You can set these for testing in % your texinfo source file like this: % @tex % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex \internalpagesizes{673.2pt}{160mm}% that's 51 lines {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % \internalpagesizes{160mm}{120mm}% {\voffset}{\hoffset}% {\bindingoffset}{8pt}% {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm }} % A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% {\voffset}{4.6mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% % % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} % Use @afourwide to print on A4 paper in landscape format. \def\afourwide{{\globaldefs = 1 \afourpaper \internalpagesizes{241mm}{165mm}% {\voffset}{-2.95mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% \globaldefs = 0 }} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \parseargdef\pagesizes{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % \dimen0 = #1\relax \advance\dimen0 by \voffset % \dimen2 = \hsize \advance\dimen2 by \normaloffset % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% {\bindingoffset}{44pt}% {\dimen0}{\dimen2}% }} % Set default to letter. % \letterpaper \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 \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, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} \let\realunder=_ % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have \everyjob (or @setfilename) turn them on. % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} % Used sometimes to turn off (effectively) the active characters even after % parsing them. \def\turnoffactive{% \normalturnoffactive \otherbackslash } \catcode`\@=0 % \backslashcurfont outputs one backslash character in current font, % as in \char`\\. \global\chardef\backslashcurfont=`\\ \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work % \realbackslash is an actual character `\' with catcode other, and % \doublebackslash is two of them (for the pdf outlines). {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % In texinfo, backslash is an active character; it prints the backslash % in fixed width font. \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. We switch back and forth between these. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. % @def@normalturnoffactive{% @let"=@normaldoublequote @let$=@normaldollar %$ font-lock fix @let+=@normalplus @let<=@normalless @let>=@normalgreater @let\=@normalbackslash @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let~=@normaltilde @markupsetuplqdefault @markupsetuprqdefault @unsepspaces } % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\' in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @ifx\@eatinput @let\ = @normalbackslash @fi @catcode`+=@active @catcode`@_=@active } % 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. % @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 @c don't make ` and ' active, @code will not get them as active chars. @c Do this last of all since we use ` in the previous @catcode assignments. @catcode`@'=@active @catcode`@`=@active @markupsetuplqdefault @markupsetuprqdefault @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @c vim:sw=2: @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore gawk-4.0.1+dfsg.orig/doc/macros0000644000175000017500000001612111463242060015320 0ustar schotschot.\" SSC Reference card macros .\" .\" Copyright (C) 1996, Specialized System Consultants Inc. (SSC) .\" .\" These macros are free software; you can redistribute them and/or modify .\" them 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. .\" .\" These macros are 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 .\" .\" Generic SSC "card" macros .\" based on lots of other macros .\" Last update: 4-25-91 ph .\" attempting to get margins in the boxes Aug 3 09:43:48 PDT 1994 .ll 3i \" length of text line .lt 3.2i \" length of title line .de BT \" bottom of page trap .sp |8.2i \" go to where we put footer .ie \\n(CL=1 \{\ . nr CL 2 .tl ''\\*(CD\\n+(PN'' \" footer is just page number . po 4i \" go to second column .TP \" print header if any \} .el \{\ . nr CL 1 .tl ''\\*(CD\\n+(PN'' \" footer is just page number . po .5i \" go to first column . bp \" force a new page (which will force header) . TP \} .. .de TP \" top of page .\" .sp |.2i .sp |0 .\" put page header stuff here .\" for example: .tl ''WOW!'' .\".sp .. .\" .wh 8.1i BT \" set bottom of column trap .nf \" don't fill lines .nh \" no hyphenation .nr CL 1 \" start with column = 1 .po .5i \" offset for first column .vs 9 \" line spacing .ps 8 \" point size .de ST \" set tabs to normal places .ta .2i .78i 1.2i 1.7i \" set tabs .. .ig From: bryang@chinet.chi.il.us (Bryan Glennon) Box macro. Do a .mk z where the box is to start, and a .eb where it is to end. Optional argument is a title to be centered within the top box line. Usage: .mk z Text, etc to be boxed... .eb "Optional title goes here" ~or~ .mk z Text, etc to be boxed... .eb Some explanation: The macro name is eb <.de eb>. First thing we do is to go up on line <.sp -1> and turn off fill mode <.nf>. Now it gets interesting: the .ie is the if/else construct. We check the number of arguments provided to the macro <\\n(.$> and if it is greater than 0 (meaning we have a title), we do the rest of the .ie line, as follows: \h'-.5n' - move left one-half of an n \L'|\\nzu-1' - draw a vertical line <\L> to the absolute position (|) given by \\nzu-1, which is the position set with the .mk command into register z <\\nz> in base units minus 1. \l'(\\n(.lu+1n-\w'\\$1'u/2u)\(ul' - Draw a horizontal line <\l> with length equal to the current line length <\\n(.l> in base units plus the space required for an 'n' <1n>, minus the width <\w> of the title string <\\$1> in base units divided by 2 >. Draw the line using the underline character, <\(ul>. \v'.3m'\|\\$1\|\v'-.3m' - Move down the page 3/10 of an m, <\v'.3m'>, output a 1/6 of an m space <\|>, output the title <\\$1>, another 1/6 of an m space <\|>, and then move up the page 3/10 of an m <\v'-.3m'>. \l'...\(ul' - Draw the second part of the line, just like the corresponding left half done before. \L'-|\\nzu+1' - Draw a verticle line <\L> going down the absolute distance <-|> from where the macro was given to where the start point was marked <\\nz> in base units plus one line <+1> \l'|0u-.5n\(ul' - Draw a horizontal line to the absolute position (|0) when the macro was invoked, minus half an n <-.5n> using the underline character <\(ul>. The .el beings the else part, which is identical to the above, except the string dosen't get printed. This makes the printing of the top line much easier: just draw a line <\l> with width equal to the current line plus the witdh of an n <\\n(.l+1n> using the underline character <.\(ul>. .. .de ES \" start "text in a box" .mk z .in +.5n .ll -.5n .sp 1.3 .. .de EB \" end "text in a box" -- optional box title as argument .sp -.6 .nf .in -.5n .ll +.5n .ie \\n(.$\ \L'|\\nzu'\ \l'(\\n(.lu-\w'\\$1'u)/2u-.33m\(ul'\ \v'.3m'\|\\$1\|\v'-.3m'\ \l'(\\n(.lu-\w'\\$1'u)/2u\(ul'\ \L'-|\\nzu'\ \l'|0u\(ul' .el \h'-.5n'\L'|\\nzu-1'\l'\\n(.lu+1n\(ul'\L'-|\\nzu+1'\l'|0u-.5n\(ul' .in 0 .. .de SL \" draw single line (works in non-fill mode only) .sp -.8 .ti 0 \l'\\n(.lu\(ul' .. .de Hl \" draw horizontal line .br .ti 0 \l'\\n(.lu-\\n(.iu' .br .. .de DL \" draw double line (works in non-fill mode only) .sp -.8 .ti 0 \l'\\n(.lu\(ul' .sp -.8 .ti 0 \l'\\n(.lu\(ul' .. .ST .nr PN 0 1 \" sets starting page number and auto-increment .\" must define page header (if any) before here .TP .ds 3) \|\v'3p'\s+5\z\(sq\s0\v'-3p'\h'1.25p'\v'-.5p'3\v'.5p'\h'2p' .\" old one .ds 2) \h'-1.5p'\v'1p'\s+4\z\(ci\s0\v'-1p'\h'3.25p'2 .ds 2) \|\v'-2.4p'\D'c.095id'\h'-5.15p'\v'2.4p'2\h'1.9p' .ds dC \v'1p'\s+5\(bu\s0\v'-1p'\" for development commands .ds tC \s+2\(dm\s0\" (for DWB) should be a triangle .ds tP \s+2\(dm\s0\" (for other text processing) should be a triangle .\" various trademark symbols .ds Tm \v'-0.5m'\s8TM\s0\v'0.5m' .ds Ts \v'-0.5m'\s4TM\s0\v'0.5m' .ig ++ .\" mount Serifa fonts .fp 5 SR .fp 6 SB .fp 4 Si .++ .\" other assorted junk .lg 0 .\" Fl requires extended version of troff .de Fl \" draw fat horizontal line .br .ti 0 .ruw 1.5p \l'\\n(.lu-\\n(.iu' .br .ruw .. .de Bx \" box for keys in text \\$3\&\|\&\c \s-3\(br\|\fH\v'.18n'\\$1\v'-.18n\fP\|\(br\l'|0\(rn'\l'|0\(ul'\&\s0\|\\$2 .. .de Fn \" function name - left justified, gray background .\" bold with gray for function name .ns .br \ .ns .br \!! gsave ( ) stringwidth neg 0 rmoveto \!! /Serifa-Bold findfont 8 scalefont setfont \!! (\\$1) dup stringwidth pop 6 gsave dup 0 exch rlineto neg exch 0 rlineto \!! 0 exch rlineto closepath .9 setgray fill grestore show \!! grestore .nf .rs .. .rs gawk-4.0.1+dfsg.orig/doc/igawk.10000644000175000017500000000221011463242060015267 0ustar schotschot.TH IGAWK 1 "Nov 3 1999" "Free Software Foundation" "Utility Commands" .SH NAME igawk \- gawk with include files .SH SYNOPSIS .B igawk [ all .I gawk options ] .B \-f .I program-file [ .B \-\^\- ] file .\^.\^. .br .B igawk [ all .I gawk options ] [ .B \-\^\- ] .I program-text file .\^.\^. .SH DESCRIPTION .I Igawk is a simple shell script that adds the ability to have ``include files'' to .IR gawk (1). .PP AWK programs for .I igawk are the same as for .IR gawk , except that, in addition, you may have lines like .RS .sp .ft B @include getopt.awk .ft R .sp .RE in your program to include the file .B getopt.awk from either the current directory or one of the other directories in the search path. .SH OPTIONS See .IR gawk (1) for a full description of the AWK language and the options that .I gawk supports. .SH EXAMPLES .nf .ft B cat << EOF > test.awk @include getopt.awk .sp BEGIN { while (getopt(ARGC, ARGV, "am:q") != \-1) \&.\^.\^. } EOF .sp igawk \-f test.awk .ft R .fi .SH SEE ALSO .IR gawk (1) .PP .IR "Effective AWK Programming" , Edition 1.0, published by the Free Software Foundation, 1995. .SH AUTHOR Arnold Robbins .RB ( arnold@skeeve.com ). gawk-4.0.1+dfsg.orig/doc/process-flow.eps0000644000175000017500000001237211511377120017251 0ustar schotschot%!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 gawk-4.0.1+dfsg.orig/doc/bc_notes0000644000175000017500000001740311463242060015634 0ustar schotschotOp 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. gawk-4.0.1+dfsg.orig/doc/process-flow.pdf0000644000175000017500000001463611511377120017240 0ustar schotschot%PDF-1.4 %Çì¢ 5 0 obj <> stream xœ­VMoG½÷¯è[ ’›®êïS¤ŠH`Êqµc4kÛR~}^M̰»FA²}Ø©7UïÕTWÕÌWm i+ÿíw·WÏÞ&}y§¼Iì9èoj¾¯ßþ®È³7¾hrL†‚Þ+Êœ œ %ãrÒ“bvl,ŸiøøLaAx&õY½S_!DÉ[Њޤ\L«‹ù–x’³É”¨‰ ›L’…·ÎØ4iAœ³& Ѓ~dg‚@d­]ígõ᩾Vž~~ÆêŠ \q&ò*øzƒÇ¸<•íÃBGÉ åOO‹égJͱD“ËJ’Np!«fî)±ñy•ñ¡Ä(23\[™SfÂA‘Oåø ÈQbë?“8 ¿Ú/‹Át .Ôš’ “Ï8KŸ³)ieGðf½S¡+Ç‚ ëôà$›%¦‹6s§²õ&ƇˆHIgü–!4Ì^žPpõ`ºÍÉÒƒŽlD•ôlö­Oθ2Wæãoˆ‹‡îçbÏšBÑ€Qž©iÊöTCô»úüïUØV«8„XV º&‡º~qiO!=ê4⓬f—ñäÙ­ÖøâÓµ»f¸vs-8!؆6¨§’=9NäPVVá#QI­)Ho{íB1ŒÚ!ˆ 2a dZŠvNz(,6IœbGBà+GEC‰sT΄­!oÇ&ÚLô³Ldˆ@C“Ã,F„Ƀ®™]Oâg §4  åÜéú3u½nÿd'’ÅàËê)ÉÌEìÀòN¶ŠâN!5è$ÉdaIΰ ÔÐÒ…>eld„úä9ƒÛ5Þ›ó„Ï}y”ú±èQ^‡YHS>Ô¼~oÝ^¢øT¯ÛÏn¯ÛàûL6^ Þ|Rõ» 8Y| €Êã%i‹ÞìÕÙ7·O6_a"“Þ¼Vg/¶÷Û'¿¨3¿_qãŒÍ/‹€¸êìω:& –>GÖ.âƒGîý}q7ߤL‚ö¿eªq¯®¯î¯¶ÓÕ¿Ûû«›kqcÌ#£éMvÞåÙéùt±½Öïÿ©,N†´ès’=˜«Ä_·7»‹»Yæå¦}G½Qÿ¼<Tendstream endobj 6 0 obj 866 endobj 4 0 obj <> /Contents 5 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 4 0 R ] /Count 1 >> endobj 1 0 obj <> endobj 7 0 obj <>endobj 10 0 obj <> endobj 11 0 obj <> endobj 8 0 obj <> endobj 9 0 obj <> endobj 12 0 obj <>stream xœmU{XSç>1$ß™EÖ‘¥4¢IÖµÖ+¢óFçæЩ`)‚rkA1Bj ”K!WHÂåÇE!BBˆ1h  TEiÕ"¶¶^ÛJk }VgÛmm©]¿C{žØíÙÛ?ç9ç|ß÷|ïï}ßßûcAs‹œ$Í“­H”çíÏ|/§ÂYÔ‚9ÔB6Ðy3f6qqìy̆à Îs„âk¿ÂŽ_bã“›ÅR6‹–”Jsr‹Å‹“÷-Y¶lùÿ¬ŠŠŠ(ûÏŠ8FR$ÍÉ/b^™¼ O’_ü{q4³[&“f‹sde¹EâýJŽíÝ/“o“ʤr…xqôñêÈÈU+˜ÇÚÝÒ¼%EâÇÈÅ»åQâ8q¢$§D¶¿ðW‚x*_ž]SXT¼cv¼j·$Aš,o"ˆ‰ââYâ%â9b‘D$K‰­D A¤+‰mÄ*b'±Žˆ'X„˜c8#‚q‰µŽÕ7'bN/±A¬ AŸqÖq<œ¿p“¹Ch9ªE?‘ëÉÈÓTuU mÔüK¬O&qÌ$»z†´ÁZ×dE&¢ë$ê5)U¤ç¶¡”Fu+øI|ÃÝÚäˆG¶CDKÄiU©MÛPÚ]+Œ¸ }•yyËË2ծ푱>­LªO*07z¨Õ=¬ÞØþ€¨,>ýTä2ZH‡¹‡âпþ qØÊ¯é_‹´rþäØ2z!Íyeû惇<ƒ ‘|´üÜ&¿>wí¶0dæ8gØ.¾1ÍžÙ3³”OË•ÜÑZG%Á¬«PÓ¿¥OÓ‹q¡¾Ýä€tØ-¾úF°BKé¤û”è|]ó-ýF'=MoE°Æ`ˆ¬"•x̉V×kZá#ïEx1VŒÿù¸ûb£ df¥f˜ú~ÕƒIö AíåW`GÁ5)Êu¥PêõÑ´öÔæ ˆ‚ ²ø¤ØxIÐs »öbâÕ%ßæÀ7gÇï“e[bvämAìqe $Èf“xÇ—øø¹+£ŠìA¡ïp›Ü¹“dX£óªŽ2œgðQ!WC?œÄ%Ÿ‡ñÌj!ßR× O62D³¹öéõ &’·H…͈÷JÚ\§mwH¼ zÕc8 $žûáçð“±_,Ý“Y˜œ)º‡LõÉŠ\m’J€—næ{/ûÏ~0²‰&ivÚæèŒD¿÷g®•ýÔT¿ÒúhšâbV¯îfñ!Z§Ýd&y2%îG˜„ú®]¾>Öÿü äM$]Ú~“fùé…@Ò]\Þ%úØh©€-Ìþé>þ‰–æ¡Ï¯—KÏ '’‡ÖM=÷Àú2Rò_Ò­2[gñ‰BðçŒGÿàb}4Én¢æóí –ºV YÊ3Et‚T£q—Žñž± moPµÁ— ß™ ÝG-fC‹°]Ób²éisôô)\ÒýùÅ1i¢‡È\¿·$G› d )0¸u.*Â¥u‡^¼†£n…ñ–ãø}~^ÀÑskj*ŒµµU 0¡^„ä9šKJ_ ߘ˜½Ç—=•.zûÕS¥Ž" 2ËS¤2›[)T«èÒ^!ËéH·ÉÚXÏàåÅYÀ^ÓÅã0õtWu„ß{÷í[Šú^ô‹hâ]y»út Oôœ½â•®î†à†Q*ØjÃf:~2Œ7…›³ñn.Â$×ZÛ`+LFƒ$)+½¼ŠäMé&£y>T×Õ4Ô¼›oÒoq×{³ÆF<£}Bm‹¢Pe(Á!u÷;"ü:âM}Ç ëœ r²0šfcr³V·¾šqÿ'Šj(·Ã]’J@p×n›ldÚå‚M™[õŒx!T‚áJâÛÔÓžÐËŸáÅ÷ÃxoP»ßã«4:³Èb£}X„÷!5÷ª=%þ,g+¶¤Å»J»<.wcí‘Ú&Q¥¶šÈnŸ{p¤;?Y¸ÑñªÊ,II©F ¯’¼”¸áÌñá¡ÎÑq!϶ïH‡b(ü$t¶ž`–蕟ñAf®PèŠ4ò ¹ò“gDƆüxÞðc„w(N/ëØ=6õ Žä§Çæ%¹ëŒ¾¿tû¾ß¦?d-i–w”u‚à¸ÛÙu9öÜú´”Òœ¢ÔLùvØHÒO}Ùo ¶Ÿð »=ÎnïòÓ¼“Ʀ:˜ØYGÝâϦ"Ø Ón43Ôõ9ÑÖ#;“QênÛle¨KGôk³õt9UϡӔÜOÍ6l%g—"xV£Ü`bÎéœèª.øŽ¤žG¸qöÇÎeŠ/5ßË¢Öáp~Y£!ÕT®U 4*iE ÓOB.vSK8mô·¨šžËéàZî¶µ]eú[È¥³K8jjbúVïª  þÝp@*Jϧº\µö;mv«½q  ®N‰ªíUm.%âIúšåSJ½IÉ=öÊÁ r6ñRþâˆg£v3˜´ßÄù>Œü,j9ÞÀOß”•¿ !«7ÿJÙ€±¯fœÄãÜÊë†ÞB_žÿåÎ} eiÆ‚ˆbjº³£¯?ÃÄi!=—ó[&NöÃ8xä¶5Œªo‚»ñ…@ };Ë1$ïàaþñGíq˜€·¬gßÁ} endstream endobj 13 0 obj <>stream 2011-01-06T17:25:03+02:00 2011-01-06T17:25:03+02:00 fig2dev Version 3.2 Patchlevel 5c process-flow.fig endstream endobj 2 0 obj <>endobj xref 0 14 0000000000 65535 f 0000001180 00000 n 0000005933 00000 n 0000001121 00000 n 0000000970 00000 n 0000000015 00000 n 0000000951 00000 n 0000001245 00000 n 0000001346 00000 n 0000001727 00000 n 0000001286 00000 n 0000001316 00000 n 0000002010 00000 n 0000004514 00000 n trailer << /Size 14 /Root 1 0 R /Info 2 0 R /ID [<7795783BB2DC1F89E46EADF75E242E86><7795783BB2DC1F89E46EADF75E242E86>] >> startxref 6125 %%EOF gawk-4.0.1+dfsg.orig/doc/no.colors0000644000175000017500000000244411463242060015753 0ustar schotschot.\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com .\" This file is for troff which does not know what to do .\" with literal Poscript and cannot use the macros from 'colors'. .\" .\" Copyright (C) 1996 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission .\" notice are preserved on all copies. .\" .\" Permission is granted to process this file through troff and print the .\" results, provided the printed document carries copying permission .\" notice identical to this one except for the removal of this paragraph .\" (this paragraph not being relevant to the printed reference card). .\" .\" Permission is granted to copy and distribute modified versions of this .\" reference card under the conditions for verbatim copying, provided that .\" the entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Permission is granted to copy and distribute translations of this .\" reference card into another language, under the above conditions for .\" modified versions, except that this permission notice may be stated in .\" a translation approved by the Foundation. .\" .ds CR .ds CG .ds CL .ds CB .ds CD .ds CX gawk-4.0.1+dfsg.orig/doc/statist.pdf0000644000175000017500000001230111463242060016273 0ustar schotschot%PDF-1.3 %Çì¢ 6 0 obj <> stream xœ–±ŽÜF †{=…:ûŠ(Ã!9ä×Ò¸±}]œÂp#Á-à³çõÃáÒ®F‡vÿ%Fú9œ”žÖ²ÁZÆ'~?\–§åç7´~úº@Yÿ]`ý{a¡µjY/KCqõ¸–Aìí%‚o—§üÎùóá²þò`÷¶¿@ëÃ_Ët„µÒ¦¢ö‹›Å/Ë˟ʆwÿ,¿>¬¯Ý*q¸» û»Æ-?#€¾õL¡Þ¤PkéY€!³3ÂnŸq³ð™ ôÍ¥ô­N÷ï¶ÏP0ü]†„Ý?ãæáÓþ\x“ð¿% •&áï2ü#ìþ7ÿŸöo¥Z+NÿÛ&‚5ü]†„Ý?ãæáóþ]·þtÛÞ×"*_åäåé­Gèä ÙªòÚ³ÿá BX»œÞ.ÃÜu¸»>mܬùäðçݾ6Õ°w9í]†½ë°w}Ú¾6ÚzÑÝþØ<ŠM²éîrº» w×áîú´;JÙÚ•û±÷ëð{輦ûœÈçO¾ndC'Ý¡üÀÕj®ë—çʪ6ÇŽyúùÝË Ü_ê»»õ¾lE­‘º"5öVëmdñÊ—~ƒûo±¡‘Øj+¯v¸{`ºÍ›ßB|ùt¢ä¬ŽÊ)Gn_ß_>?~\¯ž=z©¢­vÀ4¤©¯Ÿ €9ôA™‡f×]‡Ó:™¥­t­c½:¬¥Ú°·o×v†X-`ÀÖWŸdl$ úT©Ðe0à Pí ‘ÅïSÕØ9T¬l#œÙuÓ•°»&+‰§oOg\¹ÒÔ½­,àšÇ×–nãæºÕ±õ¹¾µ1ýfÎRú¡¹îkÄ,óZÓ:î©SzõzäÐ[Ëܰ”=g, ¹,rØrïVâž5±òÕ¬••³†ˆE²¶ˆ\²æˆ}? »ç!É~vÈòL‘þøà´–L9ŠS< E[gßïV„µ–õ»àÏ€Rø€rè[(í v(¥Ê¥ˆ¿–4t‚+¸þàz¡Ü^pû¸p.Â.ënð9¸Öé;¸4¯up©K‚‹Í_\” úU5Á¥ùˆwpÉFL‚K¤’à’€&¸Ô™\Å×®‘—y6Ï—Ãw€Ëã+ÁU=ÀUm .kÝÁe©%Áen-Áeœ0 p¼1\êX\jú.Q£—*I‚K…tWvpgSMp¹×\òºMp­“†¶÷¢qîÛhœ]÷û4»ÌÎÀ×޳›û;^ëà§û=µÕ½yzq~¼ ;i²„½C2F1Ù£"-™${åÿÿ¦zmŸÿ6D˜uendstream endobj 7 0 obj 1034 endobj 5 0 obj <> /Contents 6 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 5 0 R ] /Count 1 >> endobj 1 0 obj <> endobj 4 0 obj <> endobj 11 0 obj <> endobj 12 0 obj <> endobj 9 0 obj <> endobj 8 0 obj <>stream xœUT Tgž!d_±2ŽAÐLVN•§5øä¹ O……1šHxH"‚¯ÓjÕÂuëVeY\"¬«Õî ¬B+ + U)•BIŒUŠkWÚs‡þtÏN¬={öœ9ÿüÿ¹÷þ÷û¾{IÂÞŽ IrNdôï«ò Óêòµ†Œj›Ñw!ùvüBÞ€k*ûI%^H(+žÎªZà0âísà³aß[„ˆ$ JË7æäæe¤¥äî[b<<=½þgñ ”o/üõ‹|“VŸ‘–-_,lòµºœÜ,m¶aµ|£ð·N—±Cž¦+ÌM×ËÕVcs‹Wë´™ò ]FnnN¾Ü}£‡Ü×ÛÛg©°øFfdmߣ—Ç©³õr¥_§Îòs÷÷X!_ùÎÒÀeÞ> _‚ˆ!BˆÍD¡"6‘Ä\bÁÓ‰y„” 'b>!!œ‰ÙÄ‘ á$€EØ©Ä ÒƒT’ÛIlo÷H$mŠúìƒíÃì öb±Ø >*ÿ‡r¦Â% ßj0ñKL镎¨?hn˜¥Ì§m8›óTÖ&}¢Áå °šcú`SØanSl¦J#c®90w`Ÿ’ý¶sžƒgD®òö‹„Ù0ûÖ …³…ðï'KFEü)8Ä¢Á£ê2FW·x /^Šíñ:¼îéoÀ f÷eäVR†ä´0¶Vç4ìýäýOŠ[èÒöäxG÷¢w‡¡¢â"!ü†~Þ«Ÿ,3Ãa³ˆà%lñ«Ð[x–Y²F¹$ðšÞÊâL·Vå#íü¤¤]¶jËÎåË•-?VCûQ'ð¬žX(”è4rç{Sj½ë_¹Õ ýsö9T3¿±þRϽ+Ù›KeB*dä÷V’P;Rx£x)…ݧXÎ+„-(§Œb ä!ãä¦JˆÀk2‹]ùsÖeƒ 7¸÷îwDf(–2üå&–ù¬èðqtÌ%{ùyºž…6cv­r&]¦Ï}/«(¡N~Y{Ñ„è‡×r¹=(=ÿ@ø<ý@áñÌC‘yºdJ3^w£~¼ÛZÕÖ!û(þ¼¾ U ²Ò¿p…PåÙ—gÈÐmߟ„èí¥Ööš OÊ8Ë™³'.”Ñ’ÉBE1}6ÚG ×öH™¦^ÞÈNGà±3ô¨½«çö?´a2ü³Í`;v]фێüB‡ç[Z<‚ÕùÑI2ÝMuu( F)»·*i¦éÃkEAÕC8ÐïXn2kˆUÊð°Lìiª¦DÌü0ÞœºÂwsürÏäÆWG9…ØS;+2¯„ö¦ L,~ngkzóŠ‹Ãß=ÿió×Î YÕ‡]°ëZöü@f¡JêOTŸ>WY×PÝŽhÓõ”u‰…Yšýœþ=ÝqU1-ÑÉDˆ!¼+ᆥJ°¾Ý8â%–Ò픸&Áþüš@aE´pod^)ðÜbÁ ±8ÈA? ,â·E8à‡S±âeÐ2Àâ< ò [ü&,=ÃéìKvC¾Jˆp)½™²`×&¼a„ý’°Â¿N%@d6Ár3É;YE|îd";eGÅOÍQW›þ^!Ô5Ö±èíh•gPrÝ`¾€Ò™˜S9ÆÝÿÜr_7( äúr–€|ÙwxAâŽCYÛ¹ $†Fê—Ð]¦a㨉,yõBôc­û€^û&kÕÊÔ½ÂuX„gœ]{MY{[g²µùøKàÀÉçf‚7ç&h¹Xó»ïÑmT¯ùS(-txûMk´—oTĪ@UÏSKg—™“¼ž!‚˜^µTØêÈöç +ðÑìÒÏ©:ØûÀ2Þ”~ùèMŽÈa…ba‘2¯x~ËŒ÷5T_¹ç "vÄsüX^v«ŒyµJ³#ZáŒç½ð9È_XØÑX'Ã4œ6¦†„'¥®_ŸÔp¯§©á‡›í™W–θwVFÅùD}1<ÜyS˜I0 ïß'¡î°øðF8ü°XÜî'‘Õ†W+¬`+0ý(dB_×^íþì«J3ÁŒÂGênͪK aƸ,qÃv².ƒ¹÷šªÛ?çŠñú8ÏÅH…¶Õì¡a.¿‹}|;t¹¤*`E|ǘµóÎ .4A¢ ÄM°®®¯ó÷ñ&“-yUÃQTöΤ•Á jÅG1^°ä10pd{¾MþR¶³9úB¢öc×=q,NIYê±,ùÄCüõ±1î5#“Þ‚2}!ŸáKÙ©RËdbŒƒ“{àûh¥Ð§C êýw/É_‚Ù©‚`¾€zÛþ—·ÍßÌ_ë'y© ŸÍìÔ4êã[—kÌ7^¶9ý«íF2£}»ºV]›p6 ù °LMTžöÝÔ¢´…ú°ñ£‹gªªê??ߊèÁÎØµq»~¯Lã–'`÷•ÛÂŽ`ïù¼Ž’ªxc%¨*•U”iúð ÓfÎüæã™³â¿oÙÖ. endstream endobj 13 0 obj 1898 endobj 10 0 obj <> endobj 2 0 obj <>endobj xref 0 14 0000000000 65535 f 0000001358 00000 n 0000004905 00000 n 0000001299 00000 n 0000001406 00000 n 0000001139 00000 n 0000000015 00000 n 0000001119 00000 n 0000001878 00000 n 0000001537 00000 n 0000003882 00000 n 0000001475 00000 n 0000001505 00000 n 0000003861 00000 n trailer << /Size 14 /Root 1 0 R /Info 2 0 R >> startxref 4955 %%EOF gawk-4.0.1+dfsg.orig/doc/gawk.10000644000175000017500000024251311734665351015147 0ustar schotschot.ds PX \s-1POSIX\s+1 .ds UX \s-1UNIX\s+1 .ds AN \s-1ANSI\s+1 .ds GN \s-1GNU\s+1 .ds AK \s-1AWK\s+1 .ds EP \fIGAWK: Effective AWK Programming\fP .if !\n(.g \{\ . if !\w|\*(lq| \{\ . ds lq `` . if \w'\(lq' .ds lq "\(lq . \} . if !\w|\*(rq| \{\ . ds rq '' . if \w'\(rq' .ds rq "\(rq . \} .\} .TH GAWK 1 "Nov 10 2011" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS .B gawk [ \*(PX or \*(GN style options ] .B \-f .I program-file [ .B \-\^\- ] file .\|.\|. .br .B gawk [ \*(PX or \*(GN style options ] [ .B \-\^\- ] .I program-text file .\|.\|. .sp .B pgawk [ \*(PX or \*(GN style options ] .B \-f .I program-file [ .B \-\^\- ] file .\|.\|. .br .B pgawk [ \*(PX or \*(GN style options ] [ .B \-\^\- ] .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. It conforms to the definition of the language in 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. .I Gawk provides the additional features found in the current version of \*(UX .I awk 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 .IR gawk . It is identical in every way to .IR gawk , except that programs run more slowly, and it automatically produces an execution profile in the file .B awkprof.out when done. See the .B \-\^\-profile option, below. .PP .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 option. The debugger is documented in \*(EP. .SH OPTION FORMAT .PP .I Gawk 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 .IR Gawk - specific options are typically used in long-option form. Arguments to long options are either joined with the option by an .B = sign, with no intervening spaces, or they may be provided in the 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. 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" .TP .PD .BI \-\^\-field-separator " fs" Use .I fs for the input field separator (the value of the .B FS predefined variable). .TP .PD 0 \fB\-v\fI var\fB\^=\^\fIval\fR .TP .PD \fB\-\^\-assign \fIvar\fB\^=\^\fIval\fR Assign the value .I val to the variable .IR var , before execution of the program begins. Such variable values are available to the .B BEGIN block of an \*(AK program. .ig .TP .PD 0 .BI \-mf " NNN" .TP .PD .BI \-mr " NNN" Set various memory limits to the value .IR NNN . The .B f flag sets the maximum number of fields, and the .B r flag sets the maximum record size. These two flags and the .B \-m option are from an earlier version of the Bell Laboratories research version of \*(UX .IR awk . They are ignored by .IR gawk , since .I gawk has no pre-defined limits. (Current versions of the Bell Laboratories .I awk no longer accept them.) .. .TP .PD 0 .B \-b .TP .PD .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 \-c .TP .PD .B \-\^\-traditional Run in .I compatibility mode. In compatibility mode, .I gawk 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. See .BR "GNU EXTENSIONS" , below, for more information. .TP .PD 0 .B \-C .TP .PD .B \-\^\-copyright Print the short version of the \*(GN copyright information message on the standard output and exit successfully. .TP .PD 0 \fB\-d\fR[\fIfile\fR] .TP .PD \fB\-\^\-dump-variables\fR[\fB=\fIfile\fR] Print a sorted list of global variables, their types and final values to .IR file . If no .I file is provided, .I gawk uses a file named .B awkvars.out in the current directory. .sp .5 Having a list of all the global variables is a good way to look for typographical errors in your programs. You would also use this option if you have a large program with a lot of functions, and you want to be sure that your functions don't inadvertently use global variables that you meant to be local. (This is a particularly easy mistake to make with simple variable names like .BR i , .BR j , and so on.) .TP .PD 0 .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" Similar to .BR \-f , however, this is option is the last one processed. This should be used with .B #! scripts, particularly for CGI applications, to avoid passing in options or source code (!) on the command line from a URL. This option disables command-line variable assignments. .TP .PD 0 .B \-g .TP .PD .B \-\^\-gen\-pot Scan and parse the \*(AK program, and generate a \*(GN .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 \&.pot files. .TP .PD 0 .B \-h .TP .PD .B \-\^\-help Print a relatively short summary of the available options on the standard output. (Per the .IR "GNU Coding Standards" , these options cause an immediate, successful exit.) .TP .PD 0 .BR "\-L " [ \fIvalue\fR ] .TP .PD .BR \-\^\-lint [ =\fIvalue\fR ] Provide warnings about constructs that are dubious or non-portable to other \*(AK implementations. With an optional argument of .BR fatal , lint warnings become fatal errors. This may be drastic, but its use will certainly encourage the development of cleaner \*(AK programs. With an optional argument of .BR invalid , only warnings about things that are actually invalid are issued. (This is not fully implemented yet.) .TP .PD 0 .B \-n .TP .PD .B "\-\^\-non\-decimal\-data" Recognize octal and hexadecimal values in input data. .I "Use this option with great caution!" .TP .PD 0 .B \-N .TP .PD .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 .PD 0 .B "\-W nostalgia" .TP .PD .B \-\^\-nostalgia Provide a moment of nostalgia for long time .I awk users. .. .TP .PD 0 .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 This turns on .I compatibility mode, with the following additional restrictions: .RS .TP "\w'\(bu'u+1n" \(bu .B \ex escape sequences are not recognized. .TP \(bu Only space and tab act as field separators when .B FS is set to a single space, newline does not. .TP \(bu You cannot continue lines after .B ? and .BR : . .TP \(bu The synonym .B func for the keyword .B function is not recognized. .TP \(bu The operators .B ** and .B **= cannot be used in place of .B ^ and .BR ^= . .TP \(bu The .B fflush() function is not available. .RE .TP .PD 0 .B \-r .TP .PD .B \-\^\-re\-interval Enable the use of .I "interval expressions" in regular expression matching (see .BR "Regular Expressions" , below). Interval expressions were not traditionally available in the \*(AK language. The \*(PX standard added them, to make .I awk and .I egrep consistent with each other. They are enabled by default, but this option remains for use with .BR \-\^-traditional . .TP .PD 0 .B \-R .TP .PD .BI \-\^\-command " file" .I Dgawk only. Read stored debugger commands from .IR file . .TP .PD 0 .BI \-S .TP .PD .BI \-\^\-sandbox Runs .I gawk 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 \-V .TP .PD .B \-\^\-version Print version information for this particular copy of .I gawk on the standard output. This is useful mainly for knowing if the current copy of .I gawk on your system is up to date with respect to whatever the Free Software Foundation is distributing. This is also useful when reporting bugs. (Per the .IR "GNU Coding Standards" , these options cause an immediate, successful exit.) .TP .B \-\^\- Signal the end of options. This is useful to allow further arguments to the \*(AK program itself to start with a \*(lq\-\*(rq. This provides consistency with the argument parsing convention used by most other \*(PX programs. .PP In compatibility mode, any other options are flagged as invalid, but are otherwise ignored. In normal operation, as long as program text has been supplied, unknown options are passed on to the \*(AK program in the .B ARGV array for processing. This is particularly useful for running \*(AK programs via the \*(lq#!\*(rq executable interpreter mechanism. .SH AWK PROGRAM EXECUTION .PP An \*(AK program consists of a sequence of pattern-action statements 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 .RE .PP .I Gawk first reads the program source from the .IR program-file (s) if specified, from arguments to .BR \-\^\-source , or from the first non-option argument on the command line. The .B \-f and .B \-\^\-source options may be used multiple times on the command line. .I Gawk reads the program text as if all the .IR program-file s and command line source texts had been concatenated together. This is useful for building libraries of \*(AK functions, without having to include them in each new \*(AK 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 the .B \-f option. If this variable does not exist, the default path is \fB".:/usr/local/share/awk"\fR. (The actual directory may vary, depending upon how .I gawk was built and installed.) If a file name given to the .B \-f option contains a \*(lq/\*(rq character, no path search is performed. .PP .I Gawk executes \*(AK programs in the following order. First, all variable assignments specified via the .B \-v option are performed. Next, .I gawk compiles the program into an internal form. Then, .I gawk executes the code in the .B BEGIN block(s) (if any), and then proceeds to read each file named in the .B ARGV array (up to .BR ARGV[ARGC] ). If there are no files named on the command line, .I gawk reads the standard input. .PP If a filename on the command line has the form .IB var = val it is treated as a variable assignment. The variable .I var will be assigned the value .IR val . (This happens after any .B BEGIN block(s) have been run.) Command line variable assignment is most useful for dynamically assigning values to the variables \*(AK uses to control how input is broken into fields and records. It is also useful for controlling state if multiple passes are needed over a single data file. .PP If the value of a particular element of .B ARGV is empty (\fB""\fR), .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 .I pattern in the \*(AK program. For each pattern that the record matches, the associated .I action is executed. The patterns are tested in the order they occur in the program. .PP Finally, after all the input is exhausted, .I gawk 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, or both, depending upon how they are used. \*(AK also has one dimensional arrays; arrays with multiple dimensions may be simulated. Several pre-defined variables are set as a program runs; these are described as needed and summarized below. .SS Records Normally, records are separated by newline characters. You can control how records are separated by assigning values to the built-in variable .BR RS . If .B RS is any single character, that character separates records. Otherwise, .B RS is a regular expression. Text in the input that matches this regular expression separates the record. However, in compatibility mode, only the first character of its string value is used for separating records. If .B RS is set to the null string, then records are separated by blank lines. When .B RS is set to the null string, the newline character always acts as a field separator, in addition to whatever value .B FS may have. .SS Fields .PP As each input record is read, .I gawk splits the record into .IR fields , using the value of the .B FS variable as the field separator. If .B FS is a single character, fields are separated by that character. If .B FS is the null string, then each individual character becomes a separate field. Otherwise, .B FS is expected to be a full regular expression. In the special case that .B FS is a single space, fields are separated by runs of spaces and/or tabs and/or newlines. (But see the section .BR "POSIX COMPATIBILITY" , below). .BR NOTE : The value of .B IGNORECASE (see below) also affects how fields are split when .B FS is a regular expression, and how records are separated when .B RS is a regular expression. .PP If the .B FIELDWIDTHS variable is set to a space separated list of numbers, each field is expected to have fixed width, and .I gawk splits up the record using the specified widths. The value of .B FS is ignored. Assigning a new value to .B FS or .B FPAT overrides the use of .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 , .BR $2 , and so on. .B $0 is the whole record. Fields need not be referenced by constants: .RS .PP .ft B n = 5 .br print $n .ft R .RE .PP prints the fifth field in the input record. .PP The variable .B NF is set to the total number of fields in the input record. .PP References to non-existent fields (i.e. fields after .BR $NF ) produce the null-string. However, assigning to a non-existent field (e.g., .BR "$(NF+2) = 5" ) increases the value of .BR NF , creates any intervening fields with the null string as their value, and causes the value of .B $0 to be recomputed, with the fields being separated by the value of .BR OFS . References to negative numbered fields cause a fatal error. Decrementing .B NF causes the values of fields past the new value to be lost, and the value of .B $0 to be recomputed, with the fields being separated by the value of .BR OFS . .PP Assigning a value to an existing field causes the whole record to be rebuilt when .B $0 is referenced. Similarly, assigning a value to .B $0 causes the record to be resplit, creating new values for the fields. .SS Built-in Variables .PP .IR Gawk\^ "'s" built-in variables are: .PP .TP "\w'\fBFIELDWIDTHS\fR'u+1n" .B ARGC The number of command line arguments (does not include options to .IR gawk , or the program source). .TP .B ARGIND The index in .B ARGV of the current file being processed. .TP .B ARGV Array of command line arguments. The array is indexed from 0 to .B ARGC \- 1. Dynamically changing the contents of .B ARGV can control the files used for data. .TP .B BINMODE On non-POSIX systems, specifies use of \*(lqbinary\*(rq mode for all file I/O. Numeric values of 1, 2, or 3, specify that input files, output files, or all files, respectively, should use binary I/O. String values of \fB"r"\fR, or \fB"w"\fR specify that input files, or output files, respectively, should use binary I/O. String values of \fB"rw"\fR or \fB"wr"\fR specify that all files should use binary I/O. Any other string value is treated as \fB"rw"\fR, but generates a warning message. .TP .B CONVFMT The conversion format for numbers, \fB"%.6g"\fR, by default. .TP .B ENVIRON An array containing the values of the current environment. The array is indexed by the environment variables, each element being the value of that variable (e.g., \fBENVIRON["HOME"]\fP might be .BR /home/arnold ). Changing this array does not affect the environment seen by programs which .I gawk spawns via redirection or the .B system() function. .TP .B ERRNO If a system error occurs either doing a redirection for .BR getline , during a read for .BR getline , or during a .BR close() , then .B ERRNO will contain a string describing the error. The value is subject to translation in non-English locales. .TP .B FIELDWIDTHS 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. If no files are specified on the command line, the value of .B FILENAME is \*(lq\-\*(rq. However, .B FILENAME is undefined inside the .B BEGIN block (unless set by .BR getline ). .TP .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 , above. .TP .B IGNORECASE Controls the case-sensitivity of all regular expression and string operations. If .B IGNORECASE has a non-zero value, then string comparisons and pattern matching in rules, field splitting with .B FS and .BR FPAT , record separating with .BR RS , regular expression matching with .B ~ and .BR !~ , and the .BR gensub() , .BR gsub() , .BR index() , .BR match() , .BR patsplit() , .BR split() , and .B sub() built-in functions all ignore case when doing regular expression operations. .BR NOTE : Array subscripting is .I not affected. However, the .B asort() and .B asorti() functions are affected. .sp .5 Thus, if .B IGNORECASE is not equal to zero, .B /aB/ matches all of the strings \fB"ab"\fP, \fB"aB"\fP, \fB"Ab"\fP, and \fB"AB"\fP. As with all \*(AK variables, the initial value of .B IGNORECASE is zero, so all regular expression and string operations are normally case-sensitive. .TP .B LINT Provides dynamic control of the .B \-\^\-lint option from within an \*(AK program. When true, .I gawk prints lint warnings. When false, it does not. When assigned the string value \fB"fatal"\fP, lint warnings become fatal errors, exactly like .BR \-\^\-lint=fatal . Any other true value just prints warnings. .TP .B NF The number of fields in the current input record. .TP .B NR The total number of input records seen so far. .TP .B OFMT The output format for numbers, \fB"%.6g"\fR, by default. .TP .B OFS The output field separator, a space by default. .TP .B ORS The output record separator, by default a newline. .TP .B PROCINFO The elements of this array provide access to information about the running \*(AK program. On some systems, there may be elements in the array, \fB"group1"\fP through \fB"group\fIn\fB"\fR for some .IR n , which is the number of supplementary groups that the process has. Use the .B in operator to test for these elements. The following elements are guaranteed to be available: .RS .TP \w'\fBPROCINFO["version"]\fR'u+1n \fBPROCINFO["egid"]\fP the value of the .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) system call. .TP \fBPROCINFO["FS"]\fP \fB"FS"\fP if field splitting with .B FS 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 \fBPROCINFO["gid"]\fP the value of the .IR getgid (2) system call. .TP \fBPROCINFO["pgrpid"]\fP the process group ID of the current process. .TP \fBPROCINFO["pid"]\fP the process ID of the current process. .TP \fBPROCINFO["ppid"]\fP the parent process ID of the current process. .TP \fBPROCINFO["uid"]\fP the value of the .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 . .RE .TP .B RS The input record separator, by default a newline. .TP .B RT The record terminator. .I Gawk sets .B RT to the input text that matched the character or regular expression specified by .BR RS . .TP .B RSTART The index of the first character matched by .BR match() ; 0 if no match. (This implies that character indices start at one.) .TP .B RLENGTH The length of the string matched by .BR match() ; \-1 if no match. .TP .B SUBSEP The character used to separate multiple subscripts in array elements, by default \fB"\e034"\fR. .TP .B TEXTDOMAIN The text domain of the \*(AK program; used to find the localized translations for the program's strings. .SS Arrays .PP Arrays are subscripted with an expression between square brackets .RB ( [ " and " ] ). If the expression is an expression list .RI ( expr ", " expr " .\|.\|.)" then the array subscript is a string consisting of the concatenation of the (string) value of each expression, separated by the value of the .B SUBSEP variable. This facility is used to simulate multiply dimensioned arrays. For example: .PP .RS .ft B i = "A";\^ j = "B";\^ k = "C" .br x[i, j, k] = "hello, world\en" .ft R .RE .PP assigns the string \fB"hello, world\en"\fR to the element of the array .B x which is indexed by the string \fB"A\e034B\e034C"\fR. All arrays in \*(AK are associative, i.e. indexed by string values. .PP The special operator .B in may be used to test if an array has an index consisting of a particular value: .PP .RS .ft B .nf if (val in array) print array[val] .fi .ft .RE .PP If the array has multiple subscripts, use .BR "(i, j) in array" . .PP The .B in construct may also be used in a .B for loop to iterate over all the elements of an array. .PP An element may be deleted from an array using the .B delete statement. The .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 may be (floating point) numbers, or strings, or both. How the value of a variable is interpreted depends upon its context. 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. .PP 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. .PP When a string must be converted to a number, the conversion is accomplished using .IR strtod (3). A number is converted to a string by using the value of .B CONVFMT as a format string for .IR sprintf (3), with the numeric value of the variable as the argument. However, even though all numbers in \*(AK are floating-point, integral values are .I always converted as integers. Thus, given .PP .RS .ft B .nf CONVFMT = "%2.2f" a = 12 b = a "" .fi .ft R .RE .PP the variable .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), beware that locale settings may interfere with the way decimal numbers are treated: the decimal separator of the numbers you are feeding to .I gawk must conform to what your locale would expect, be it a comma (,) or a period (.). .PP .I Gawk performs comparisons 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 \*(lqnumeric string,\*(rq 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. .PP Note that string constants, such as \fB"57"\fP, are .I not numeric strings, they are string constants. The idea of \*(lqnumeric string\*(rq only applies to fields, .B getline input, .BR FILENAME , .B ARGV elements, .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" , and only user input, that looks numeric, should be treated that way. .PP Uninitialized variables have the numeric value 0 and the string value "" (the null, or empty, string). .SS Octal and Hexadecimal Constants You may use C-style octal and hexadecimal constants in your AWK program source code. For example, the octal value .B 011 is equal to decimal .BR 9 , and the hexadecimal value .B 0x11 is equal to decimal 17. .SS String Constants .PP String constants in \*(AK are sequences of characters enclosed between double quotes (like \fB"value"\fR). Within strings, certain .I "escape sequences" are recognized, as in C. These are: .PP .TP "\w'\fB\e\^\fIddd\fR'u+1n" .B \e\e A literal backslash. .TP .B \ea The \*(lqalert\*(rq character; usually the \s-1ASCII\s+1 \s-1BEL\s+1 character. .TP .B \eb backspace. .TP .B \ef form-feed. .TP .B \en newline. .TP .B \er carriage return. .TP .B \et horizontal tab. .TP .B \ev vertical tab. .TP .BI \ex "\^hex digits" The character represented by the string of hexadecimal digits following the .BR \ex . As in \*(AN C, all following hexadecimal digits are considered part of the escape sequence. (This feature should tell us something about language design by committee.) E.g., \fB"\ex1B"\fR is the \s-1ASCII\s+1 \s-1ESC\s+1 (escape) character. .TP .BI \e ddd The character represented by the 1-, 2-, or 3-digit sequence of octal digits. E.g., \fB"\e033"\fR is the \s-1ASCII\s+1 \s-1ESC\s+1 (escape) character. .TP .BI \e c The literal character .IR c\^ . .PP The escape sequences may also be used inside constant regular expressions (e.g., .B "/[\ \et\ef\en\er\ev]/" matches whitespace characters). .PP In compatibility mode, the characters represented by octal and hexadecimal escape sequences are treated literally when used in regular expression constants. Thus, .B /a\e52b/ is equivalent to .BR /a\e*b/ . .SH PATTERNS AND ACTIONS \*(AK is a line-oriented language. The pattern comes first, and then the action. Action statements are enclosed in .B { and .BR } . Either the pattern may be missing, or the action may be missing, but, of course, not both. If the pattern is missing, the action is executed for every single record of input. A missing action is equivalent to .RS .PP .B "{ print }" .RE .PP which prints the entire record. .PP 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 comma, .BR { , .BR ? , .BR : , .BR && , or .BR || . Lines ending in .B do or .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 is ignored. .PP Multiple statements may be put on one line by separating them with a \*(lq;\*(rq. 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. .SS Patterns \*(AK patterns may be one of the following: .PP .RS .nf .B BEGIN .B END .B BEGINFILE .B ENDFILE .BI / "regular expression" / .I "relational expression" .IB pattern " && " pattern .IB pattern " || " pattern .IB pattern " ? " pattern " : " pattern .BI ( pattern ) .BI ! " pattern" .IB pattern1 ", " pattern2 .fi .RE .PP .B BEGIN and .B END are two special kinds of patterns which are not tested against the input. The action parts of all .B BEGIN patterns are merged as if all the statements had been written in a single .B BEGIN block. They are executed before any of the input is read. Similarly, all the .B END blocks are merged, and executed when all the input is exhausted (or when an .B exit statement is executed). .B BEGIN and .B END patterns cannot be combined with other patterns in pattern expressions. .B BEGIN and .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 the regular expression. Regular expressions are the same as those in .IR egrep (1), and are summarized below. .PP A .I "relational expression" may use any of the operators defined below in the section on actions. These generally test whether certain fields match certain regular expressions. .PP The .BR && , .BR || , and .B ! operators are logical AND, logical OR, and logical NOT, respectively, as in C. They do short-circuit evaluation, also as in C, and are used for combining more primitive pattern expressions. As in most languages, parentheses may be used to change the order of evaluation. .PP The .B ?\^: operator is like the same operator in C. If the first pattern is true then the pattern used for testing is the second pattern, otherwise it is the third. Only one of the second and third patterns is evaluated. .PP The .IB pattern1 ", " pattern2 form of an expression is called a .IR "range pattern" . It matches all input records starting with a record that matches .IR pattern1 , and continuing until a record that matches .IR pattern2 , inclusive. It does not combine with any other sort of pattern expression. .SS Regular Expressions Regular expressions are the extended kind found in .IR egrep . They are composed of characters as follows: .TP "\w'\fB[^\fIabc.\|.\|.\fB]\fR'u+2n" .I c matches the non-metacharacter .IR c . .TP .I \ec matches the literal character .IR c . .TP .B . matches any character .I including newline. .TP .B ^ matches the beginning of a string. .TP .B $ matches the end of a string. .TP .BI [ abc.\|.\|. ] character list, matches any of the characters .IR abc.\|.\|. . .TP \fB[^\fIabc.\|.\|.\fB]\fR negated character list, matches any character except .IR abc.\|.\|. . .TP .IB r1 | r2 alternation: matches either .I r1 or .IR r2 . .TP .I r1r2 concatenation: matches .IR r1 , and then .IR r2 . .TP .IB r\^ + matches one or more .IR r\^ "'s." .TP .IB r * matches zero or more .IR r\^ "'s." .TP .IB r\^ ? matches zero or one .IR r\^ "'s." .TP .BI ( r ) grouping: matches .IR r . .TP .PD 0 .IB r { n } .TP .PD 0 .IB r { n ,} .TP .PD .IB r { n , m } One or two numbers inside braces denote an .IR "interval expression" . If there is one number in the braces, the preceding regular expression .I r is repeated .I n times. If there are two numbers separated by a comma, .I r is repeated .I n to .I m times. If there is one number followed by a comma, then .I r is repeated at least .I n times. .TP .B \ey matches the empty string at either the beginning or the end of a word. .TP .B \eB matches the empty string within a word. .TP .B \e< matches the empty string at the beginning of a word. .TP .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 .B \eW matches any character that is not word-constituent. .TP .B \e` matches the empty string at the beginning of a buffer (string). .TP .B \e' matches the empty string at the end of a buffer. .PP The escape sequences that are valid in string constants (see below) are also valid in regular expressions. .PP .I "Character classes" are a feature introduced in the \*(PX standard. A character class is a special notation for describing lists of characters that have a specific attribute, but where the actual characters themselves can vary from country to country and/or from character set to character set. For example, the notion of what is an alphabetic character differs in the USA and in France. .PP A character class is only valid in a regular expression .I inside the brackets of a character list. Character classes consist of .BR [: , a keyword denoting the class, and .BR :] . The character classes defined by the \*(PX standard are: .TP "\w'\fB[:alnum:]\fR'u+2n" .B [:alnum:] Alphanumeric characters. .TP .B [:alpha:] Alphabetic characters. .TP .B [:blank:] Space or tab characters. .TP .B [:cntrl:] Control characters. .TP .B [:digit:] Numeric characters. .TP .B [:graph:] Characters that are both printable and visible. (A space is printable, but not visible, while an .B a is both.) .TP .B [:lower:] Lowercase alphabetic characters. .TP .B [:print:] Printable characters (characters that are not control characters.) .TP .B [:punct:] Punctuation characters (characters that are not letter, digits, control characters, or space characters). .TP .B [:space:] Space characters (such as space, tab, and formfeed, to name a few). .TP .B [:upper:] Uppercase alphabetic characters. .TP .B [:xdigit:] Characters that are hexadecimal digits. .PP For example, before the \*(PX standard, to match alphanumeric characters, you would have had to write .BR /[A\-Za\-z0\-9]/ . If your character set had other alphabetic characters in it, this would not match them, and if your character set collated differently from \s-1ASCII\s+1, this might not even match the \s-1ASCII\s+1 alphanumeric characters. With the \*(PX character classes, you can write .BR /[[:alnum:]]/ , and this matches the alphabetic and numeric characters in your character set, no matter what it is. .PP Two additional special sequences can appear in character lists. These apply to non-\s-1ASCII\s+1 character sets, which can have single symbols (called .IR "collating elements" ) that are represented with more than one character, as well as several characters that are equivalent for .IR collating , or sorting, purposes. (E.g., in French, a plain \*(lqe\*(rq and a grave-accented \*(lqe\h'-\w:e:u'\`\*(rq are equivalent.) .TP Collating Symbols A collating symbol is a multi-character collating element enclosed in .B [. and .BR .] . For example, if .B ch is a collating element, then .B [[.ch.]] is a regular expression that matches this collating element, while .B [ch] is a regular expression that matches either .B c or .BR h . .TP Equivalence Classes An equivalence class is a locale-specific name for a list of characters that are equivalent. The name is enclosed in .B [= and .BR =] . For example, the name .B e might be used to represent all of \*(lqe,\*(rq \*(lqe\h'-\w:e:u'\',\*(rq and \*(lqe\h'-\w:e:u'\`.\*(rq In this case, .B [[=e=]] is a regular expression that matches any of .BR e , .BR "e\h'-\w:e:u'\'" , or .BR "e\h'-\w:e:u'\`" . .PP These features are very valuable in non-English speaking locales. The library functions that .I gawk uses for regular expression matching currently only recognize \*(PX character classes; they do not recognize collating symbols or equivalence classes. .PP The .BR \ey , .BR \eB , .BR \e< , .BR \e> , .BR \es , .BR \eS , .BR \ew , .BR \eW , .BR \e` , and .B \e' operators are specific to .IR gawk ; they are extensions based on facilities in the \*(GN regular expression libraries. .PP The various command line options control how .I gawk interprets characters in regular expressions. .TP No options In the default case, .I gawk provide all the facilities of \*(PX regular expressions and the \*(GN regular expression operators described above. .TP .B \-\^\-posix Only \*(PX regular expressions are supported, the \*(GN operators are not special. (E.g., .B \ew matches a literal .BR w ). .TP .B \-\^\-traditional Traditional Unix .I awk regular expressions are matched. The \*(GN operators 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 .B \-\^\-re\-interval Allow interval expressions in regular expressions, even if .B \-\^\-traditional has been provided. .SS Actions Action statements are enclosed in braces, .B { and .BR } . Action statements consist of the usual assignment, conditional, and looping statements found in most languages. The operators, control statements, and input/output statements available are patterned after those in C. .SS Operators .PP The operators in \*(AK, in order of decreasing precedence, are .PP .TP "\w'\fB*= /= %= ^=\fR'u+1n" .BR ( \&.\|.\|. ) Grouping .TP .B $ Field reference. .TP .B "++ \-\^\-" Increment and decrement, both prefix and postfix. .TP .B ^ Exponentiation (\fB**\fR may also be used, and \fB**=\fR for the assignment operator). .TP .B "+ \- !" Unary plus, unary minus, and logical negation. .TP .B "* / %" Multiplication, division, and modulus. .TP .B "+ \-" Addition and subtraction. .TP .I space String concatenation. .TP .B "| |&" Piped I/O for .BR getline , .BR print , and .BR printf . .TP .B "< > <= >= != ==" The regular relational operators. .TP .B "~ !~" Regular expression match, negated match. .BR NOTE : Do not use a constant regular expression .RB ( /foo/ ) on the left-hand side of a .B ~ or .BR !~ . Only use one on the right-hand side. The expression .BI "/foo/ ~ " exp has the same meaning as \fB(($0 ~ /foo/) ~ \fIexp\fB)\fR. This is usually .I not what was intended. .TP .B in Array membership. .TP .B && Logical AND. .TP .B || Logical OR. .TP .B ?: The C conditional expression. This has the form .IB expr1 " ? " expr2 " : " expr3\c \&. If .I expr1 is true, the value of the expression is .IR expr2 , otherwise it is .IR expr3 . Only one of .I expr2 and .I expr3 is evaluated. .TP .B "= += \-= *= /= %= ^=" Assignment. Both absolute assignment .BI ( var " = " value ) and operator-assignment (the other forms) are supported. .SS Control Statements .PP The control statements are as follows: .PP .RS .nf \fBif (\fIcondition\fB) \fIstatement\fR [ \fBelse\fI statement \fR] \fBwhile (\fIcondition\fB) \fIstatement \fR \fBdo \fIstatement \fBwhile (\fIcondition\fB)\fR \fBfor (\fIexpr1\fB; \fIexpr2\fB; \fIexpr3\fB) \fIstatement\fR \fBfor (\fIvar \fBin\fI array\fB) \fIstatement\fR \fBbreak\fR \fBcontinue\fR \fBdelete \fIarray\^\fB[\^\fIindex\^\fB]\fR \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" .PP The input/output statements are as follows: .PP .TP "\w'\fBprintf \fIfmt, expr-list\fR'u+1n" \fBclose(\fIfile \fR[\fB, \fIhow\fR]\fB)\fR Close file, pipe or co-process. The optional .I how should only be used when closing one end of a two-way pipe to a co-process. It must be a string value, either \fB"to"\fR or \fB"from"\fR. .TP .B getline Set .B $0 from next input record; set .BR NF , .BR NR , .BR FNR . .TP .BI "getline <" file Set .B $0 from next record of .IR file ; set .BR NF . .TP .BI getline " var" Set .I var from next input record; set .BR NR , .BR FNR . .TP .BI getline " var" " <" file Set .I var from next record of .IR file . .TP \fIcommand\fB | getline \fR[\fIvar\fR] Run .I command piping the output either into .B $0 or .IR var , as above. .TP \fIcommand\fB |& getline \fR[\fIvar\fR] Run .I command as a co-process piping the output either into .B $0 or .IR var , as above. Co-processes are a .I gawk extension. .RI ( command can also be a socket. See the subsection .BR "Special File Names" , below.) .TP .B next Stop processing the current input record. The next input record is read and processing starts over with the first pattern in the \*(AK program. If the end of the input data is reached, the .B END block(s), if any, are executed. .TP .B "nextfile" Stop processing the current input file. The next input record read comes from the next input file. .B FILENAME and .B ARGIND are updated, .B FNR is reset to 1, and processing starts over with the first pattern in the \*(AK program. If the end of the input data is reached, the .B END block(s), if any, are executed. .TP .B print Print the current record. The output record is terminated with the value of the .B ORS variable. .TP .BI print " expr-list" Print expressions. Each expression is separated by the value of the .B OFS variable. The output record is terminated with the value of the .B ORS variable. .TP .BI print " expr-list" " >" file Print expressions on .IR file . Each expression is separated by the value of the .B OFS variable. The output record is terminated with the value of the .B ORS variable. .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 .IR file . .TP .BI system( cmd-line ) Execute the command .IR cmd-line , and return the exit status. (This may not be available on non-\*(PX systems.) .TP \&\fBfflush(\fR[\fIfile\^\fR]\fB)\fR Flush any buffers associated with the open output file or pipe .IR file . If .I file is missing, then flush standard output. If .I file is the null string, then flush all open output files and pipes. .PP Additional output redirections are allowed for .B print and .BR printf . .TP .BI "print .\|.\|. >>" " file" Appends output to the .IR file . .TP .BI "print .\|.\|. |" " command" Writes on a pipe. .TP .BI "print .\|.\|. |&" " command" Sends data to a co-process or socket. (See also the subsection .BR "Special File Names" , below.) .PP The .B getline command returns 1 on success, 0 on end of file, and \-1 on an error. Upon an error, .B ERRNO contains a string describing the problem. .PP .BR NOTE : Failure in opening a two-way socket will result in a non-fatal error being returned to the calling function. If using a pipe, co-process, or socket to .BR getline , or from .B print or .B printf within a loop, you .I must use .B close() to create new instances of the command or socket. \*(AK does not automatically close pipes, sockets, or co-processes when they return EOF. .SS The \fIprintf\fP\^ Statement .PP The \*(AK versions of the .B printf statement and .B sprintf() function (see below) accept the following conversion specification formats: .TP "\w'\fB%g\fR, \fB%G\fR'u+2n" .B %c A single character. If the argument used for .B %c is numeric, it is treated as a character and printed. Otherwise, the argument is assumed to be a string, and the only first character of that string is printed. .TP .BR "%d" "," " %i" A decimal number (the integer part). .TP .BR %e , " %E" A floating point number of the form .BR [\-]d.dddddde[+\^\-]dd . The .B %E format uses .B E instead of .BR e . .TP .BR %f , " %F" A floating point number of the form .BR [\-]ddd.dddddd . If the system library supports it, .B %F is available as well. This is like .BR %f , but uses capital letters for special \*(lqnot a number\*(rq and \*(lqinfinity\*(rq values. If .B %F is not available, .I gawk uses .BR %f . .TP .BR %g , " %G" Use .B %e or .B %f conversion, whichever is shorter, with nonsignificant zeros suppressed. The .B %G format uses .B %E instead of .BR %e . .TP .B %o An unsigned octal number (also an integer). .TP .PD .B %u An unsigned decimal number (again, an integer). .TP .B %s A character string. .TP .BR %x , " %X" An unsigned hexadecimal number (an integer). The .B %X format uses .B ABCDEF instead of .BR abcdef . .TP .B %% A single .B % character; no argument is converted. .PP Optional, additional parameters may lie between the .B % and the control letter: .TP .IB count $ Use the .IR count "'th" argument at this point in the formatting. This is called a .I "positional specifier" and is intended primarily for use in translated versions of format strings, not in the original text of an AWK program. It is a .I gawk extension. .TP .B \- The expression should be left-justified within its field. .TP .I space For numeric conversions, prefix positive values with a space, and negative values with a minus sign. .TP .B + The plus sign, used before the width modifier (see below), says to always supply a sign for numeric conversions, even if the data to be formatted is positive. The .B + overrides the space modifier. .TP .B # Use an \*(lqalternate form\*(rq for certain control letters. For .BR %o , supply a leading zero. For .BR %x , and .BR %X , supply a leading .B 0x or .B 0X for a nonzero result. For .BR %e , .BR %E , .B %f and .BR %F , the result always contains a decimal point. For .BR %g , and .BR %G , trailing zeros are not removed from the result. .TP .B 0 A leading .B 0 (zero) acts as a flag, that indicates output should be padded with zeroes instead of spaces. This applies only to the numeric output formats. This flag only has an effect when the field width is wider than the value to be printed. .TP .I width The field should be padded to this width. The field is normally padded with spaces. If the .B 0 flag has been used, it is padded with zeroes. .TP .BI \&. prec A number that specifies the precision to use when printing. For the .BR %e , .BR %E , .B %f and .BR %F , formats, this specifies the number of digits you want printed to the right of the decimal point. For the .BR %g , and .B %G formats, it specifies the maximum number of significant digits. For the .BR %d , .BR %i , .BR %o , .BR %u , .BR %x , and .B %X formats, it specifies the minimum number of digits to print. For .BR %s , it specifies the maximum number of characters from the string that should be printed. .PP The dynamic .I width and .I prec capabilities of the \*(AN C .B printf() routines are supported. A .B * in place of either the .B width or .B prec specifications causes their values to be taken from the argument list to .B printf or .BR sprintf() . To use a positional specifier with a dynamic width or precision, supply the .IB count $ after the .B * in the format string. For example, \fB"%3$*2$.*1$s"\fP. .SS Special File Names .PP When doing I/O redirection from either .B print or .B printf into a file, or via .B getline from a file, .I gawk recognizes certain special filenames internally. These filenames allow access to open file descriptors inherited from .IR gawk\^ "'s" parent process (usually the shell). These file names may also be used on the command line to name data files. The filenames are: .TP "\w'\fB/dev/stdout\fR'u+1n" .B /dev/stdin The standard input. .TP .B /dev/stdout The standard output. .TP .B /dev/stderr The standard error output. .TP .BI /dev/fd/\^ n The file associated with the open file descriptor .IR n . .PP These are particularly useful for error messages. For example: .PP .RS .ft B print "You blew it!" > "/dev/stderr" .ft R .RE .PP whereas you would otherwise have to use .PP .RS .ft B print "You blew it!" | "cat 1>&2" .ft R .RE .PP The following special filenames may be used with the .B |& co-process operator for creating TCP/IP network connections: .TP .PD 0 .BI /inet/tcp/ lport / rhost / rport .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 .I rhost on remote port .IR rport . 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 .TP .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" ) Return the arctangent of .I y/x in radians. .TP .BI cos( expr ) Return the cosine of .IR expr , which is in radians. .TP .BI exp( expr ) The exponential function. .TP .BI int( expr ) Truncate to integer. .TP .BI log( expr ) The natural logarithm function. .TP .B rand() Return a random number .IR N , between 0 and 1, such that 0 \(<= \fIN\fP < 1. .TP .BI sin( expr ) Return the sine of .IR expr , which is in radians. .TP .BI sqrt( expr ) The square root function. .TP \&\fBsrand(\fR[\fIexpr\^\fR]\fB)\fR Use .I expr as the new seed for the random number generator. If no .I expr is provided, use the time of day. The return value is the previous seed for the random number generator. .SS String Functions .PP .I Gawk 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, \fIhow\fR] ]\fB)\fR Return the number of elements in the source array .IR s . Sort the contents of .I s using .IR gawk\^ "'s" normal rules for comparing values, and replace the indices of the sorted values .I s with sequential integers starting with 1. If the optional destination array .I d is specified, then first duplicate .I s into .IR d , and then sort .IR d , leaving the indices of the source array .I s 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, \fIhow\fR] ]\fB)\fR Return the number of elements in the source array .IR s . The behavior is the same as that of .BR asort() , except that the array .I indices are used for sorting, not the array values. When done, the array is indexed numerically, and the values are those of the original indices. The original values are lost; thus provide a second array if you wish to preserve the original. 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 .I t for matches of the regular expression .IR r . If .I h is a string beginning with .B g or .BR G , then replace all matches of .I r with .IR s . Otherwise, .I h is a number indicating which match of .I r to replace. If .I t is not supplied, use .B $0 instead. Within the replacement text .IR s , the sequence .BI \e n\fR, where .I n is a digit from 1 to 9, may be used to indicate just the text that matched the .IR n 'th parenthesized subexpression. The sequence .B \e0 represents the entire matched text, as does the character .BR & . Unlike .B sub() and .BR gsub() , the modified string is returned as the result of the function, and the original target string is .I not changed. .TP "\w'\fBsprintf(\^\fIfmt\fB\^, \fIexpr-list\^\fB)\fR'u+1n" \fBgsub(\fIr\fB, \fIs \fR[\fB, \fIt\fR]\fB)\fR For each substring matching the regular expression .I r in the string .IR t , substitute the string .IR s , and return the number of substitutions. If .I t is not supplied, use .BR $0 . An .B & in the replacement text is replaced with the text that was actually matched. Use .B \e& to get a literal .BR & . (This must be typed as \fB"\e\e&"\fP; see \*(EP for a fuller discussion of the rules for .BR & 's and backslashes in the replacement text of .BR sub() , .BR gsub() , and .BR gensub() .) .TP .BI index( s , " t" ) Return the index of the string .I t in the string .IR s , or 0 if .I t is not present. (This implies that character indices start at one.) .TP \fBlength(\fR[\fIs\fR]\fB) Return the length of the string .IR s , or the length of .B $0 if .I s is not supplied. 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 Return the position in .I s where the regular expression .I r occurs, or 0 if .I r is not present, and set the values of .B RSTART and .BR RLENGTH . Note that the argument order is the same as for the .B ~ operator: .IB str " ~" .IR re . .ft R If array .I a is provided, .I a is cleared and then elements 1 through .I n are filled with the portions of .I s that match the corresponding parenthesized subexpression in .IR r . The 0'th element of .I a contains the portion of .I s matched by the entire regular expression .IR r . Subscripts \fBa[\fIn\^\fB, "start"]\fR, and \fBa[\fIn\^\fB, "length"]\fR provide the starting index in the string and length respectively, of each matching substring. .TP \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 return the number of fields. If .I r is omitted, .B FS is used instead. The arrays .I a 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" ) Prints .I expr-list according to .IR fmt , and returns the resulting string. .TP .BI strtonum( str ) Examine .IR str , and return its numeric value. If .I str begins with a leading .BR 0 , .B strtonum() assumes that .I str is an octal number. If .I str begins with a leading .B 0x or .BR 0X , .B strtonum() 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 replace only the first matching substring. .TP \fBsubstr(\fIs\fB, \fIi \fR[\fB, \fIn\fR]\fB)\fR Return the at most .IR n -character substring of .I s starting at .IR i . If .I n is omitted, use the rest of .IR s . .TP .BI tolower( str ) Return a copy of the string .IR str , with all the uppercase characters in .I str translated to their corresponding lowercase counterparts. Non-alphabetic characters are left unchanged. .TP .BI toupper( str ) Return a copy of the string .IR str , with all the lowercase characters in .I str translated to their corresponding uppercase counterparts. Non-alphabetic characters are left unchanged. .PP .I Gawk is multibyte aware. This means that .BR index() , .BR length() , .B substr() and .B match() all work in terms of characters, not bytes. .SS Time Functions Since one of the primary uses of \*(AK programs is processing log files that contain time stamp information, .I gawk provides the following functions for obtaining time stamps and formatting them. .PP .TP "\w'\fBsystime()\fR'u+1n" \fBmktime(\fIdatespec\fB)\fR Turn .I datespec into a time stamp of the same form as returned by .BR systime() , and return the result. The .I datespec is a string of the form .IR "YYYY MM DD HH MM SS[ DST]" . The contents of the string are six or seven numbers representing respectively the full year including century, the month from 1 to 12, the day of the month from 1 to 31, the hour of the day from 0 to 23, the minute from 0 to 59, 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. The origin-zero Gregorian calendar is assumed, with year 0 preceding year 1 and year \-1 preceding year 0. The time is assumed to be in the local timezone. If the daylight saving flag is positive, the time is assumed to be daylight saving time; if zero, the time is assumed to be standard time; and if negative (the default), .B mktime() attempts to determine whether daylight saving time is in effect for the specified time. If .I datespec does not contain enough elements or if the resulting time is out of range, .B mktime() returns \-1. .TP \fBstrftime(\fR[\fIformat \fR[\fB, \fItimestamp\fR[\fB, \fIutc-flag\fR]]]\fB)\fR Format .I timestamp according to the specification in .IR format . If .I utc-flag is present and is non-zero or non-null, the result is in UTC, otherwise the result is in local time. The .I timestamp should be of the same form as returned by .BR systime() . If .I timestamp is missing, the current time of day is used. If .I format 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() 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 .I Gawk supplies the following bit manipulation functions. They work by converting double-precision floating point values to .B uintmax_t integers, doing the operation, and then converting the result back to floating point. The functions are: .TP "\w'\fBrshift(\fIval\fB, \fIcount\fB)\fR'u+2n" \fBand(\fIv1\fB, \fIv2\fB)\fR Return the bitwise AND of the values provided by .I v1 and .IR v2 . .TP \fBcompl(\fIval\fB)\fR Return the bitwise complement of .IR val . .TP \fBlshift(\fIval\fB, \fIcount\fB)\fR Return the value of .IR val , shifted left by .I count bits. .TP \fBor(\fIv1\fB, \fIv2\fB)\fR Return the bitwise OR of the values provided by .I v1 and .IR v2 . .TP \fBrshift(\fIval\fB, \fIcount\fB)\fR Return the value of .IR val , shifted right by .I count bits. .TP \fBxor(\fIv1\fB, \fIv2\fB)\fR Return the bitwise XOR of the values provided by .I v1 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 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 Specify the directory where .I gawk looks for the .B \&.mo files, in case they will not or cannot be placed in the ``standard'' locations (e.g., during testing). It returns the directory where .I domain is ``bound.'' .sp .5 The default .I domain is the value of .BR TEXTDOMAIN . If .I directory is the null string (\fB""\fR), then .B bindtextdomain() returns the current binding for the given .IR domain . .TP \fBdcgettext(\fIstring \fR[\fB, \fIdomain \fR[\fB, \fIcategory\fR]]\fB)\fR Return the translation of .I string in text domain .I domain for locale category .IR category . The default value for .I domain is the current value of .BR TEXTDOMAIN . The default value for .I category is \fB"LC_MESSAGES"\fR. .sp .5 If you supply a value for .IR category , it must be a string equal to one of the known locale categories described in \*(EP. You must also supply a text domain. Use .B TEXTDOMAIN if you want to use the current domain. .TP \fBdcngettext(\fIstring1 \fR, \fIstring2 \fR, \fInumber \fR[\fB, \fIdomain \fR[\fB, \fIcategory\fR]]\fB)\fR Return the plural form used for .I number of the translation of .I string1 and .I string2 in text domain .I domain for locale category .IR category . The default value for .I domain is the current value of .BR TEXTDOMAIN . The default value for .I category is \fB"LC_MESSAGES"\fR. .sp .5 If you supply a value for .IR category , it must be a string equal to one of the known locale categories described in \*(EP. You must also supply a text domain. Use .B TEXTDOMAIN if you want to use the current domain. .SH USER-DEFINED FUNCTIONS Functions in \*(AK are defined as follows: .PP .RS \fBfunction \fIname\fB(\fIparameter list\fB) { \fIstatements \fB}\fR .RE .PP Functions are executed when they are called from within expressions in either patterns or actions. Actual parameters supplied in the function call are used to instantiate the formal parameters declared in the function. Arrays are passed by reference, other variables are passed by value. .PP Since functions were not originally part of the \*(AK language, the provision for local variables is rather clumsy: They 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: .PP .RS .ft B .nf function f(p, q, a, b) # a and b are local { \&.\|.\|. } /abc/ { .\|.\|. ; f(1, 2) ; .\|.\|. } .fi .ft R .RE .PP The left parenthesis in a function call is required to immediately follow the function name, 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 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. .PP Use .BI return " expr" to return a value from a function. The return value is undefined if no 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, .I gawk warns about calls to undefined functions at parse time, instead of at run time. Calling an undefined function at run time is a fatal error. .PP The word .B func may be used in place of .BR function . .SH DYNAMICALLY LOADING NEW FUNCTIONS 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; see \*(EP for the details. .PP .TP 8 \fBextension(\fIobject\fB, \fIfunction\fB)\fR Dynamically link the shared object file named by .IR object , and invoke .I function in that object, to perform initialization. These should both be provided as strings. Return the value returned by .IR function . .PP 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. .B SIGUSR1 causes it to dump a profile and function call stack to the profile file, which is either .BR awkprof.out , or whatever file was named with the .B \-\^\-profile option. It then continues to run. .B SIGHUP causes .I pgawk to dump the profile and function call stack and then exit. .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 local natural language. Such strings are marked in the \*(AK program with a leading underscore (\*(lq_\*(rq). For example, .sp .RS .ft B gawk 'BEGIN { print "hello, world" }' .RE .sp .ft R always prints .BR "hello, world" . But, .sp .RS .ft B gawk 'BEGIN { print _"hello, world" }' .RE .sp .ft R might print .B "bonjour, monde" in France. .PP There are several steps involved in producing and running a localizable \*(AK program. .TP "\w'4.'u+2n" 1. Add a .B BEGIN action to assign a value to the .B TEXTDOMAIN variable to set the text domain to a name associated with your program: .sp .RS .ft B BEGIN { TEXTDOMAIN = "myprog" } .ft R .RE .sp This allows .I gawk to find the .B \&.mo file associated with your program. Without this step, .I gawk uses the .B messages text domain, which likely does not contain translations for your program. .TP 2. Mark all strings that should be translated with leading underscores. .TP 3. If necessary, use the .B dcgettext() and/or .B bindtextdomain() functions in your program, as appropriate. .TP 4. Run .B "gawk \-\^\-gen\-pot \-f myprog.awk > myprog.pot" to generate a .B \&.po file for your program. .TP 5. Provide appropriate translations, and build and install the corresponding .B \&.mo files. .PP The internationalization features are described in full detail in \*(EP. .SH POSIX COMPATIBILITY A primary goal for .I gawk is compatibility with the \*(PX standard, as well as with the latest version of \*(UX .IR awk . To this end, .I gawk incorporates the following user visible features which are not described in the \*(AK book, but are part of the Bell Laboratories version of .IR awk , and are in the \*(PX standard. .PP The book indicates that command line variable assignment happens when .I awk would otherwise open the argument as a file, which is after the .B BEGIN block is executed. However, in earlier implementations, when such an assignment appeared before any file names, the assignment would happen .I before the .B BEGIN block was run. Applications came to depend on this \*(lqfeature.\*(rq When .I awk was changed to match its documentation, the .B \-v option for assigning variables before program execution was added to accommodate applications that depended upon the old behavior. (This feature was agreed upon by both the Bell Laboratories and the \*(GN developers.) .PP When processing arguments, .I gawk uses the special option \*(lq\-\^\-\*(rq to signal the end of arguments. In compatibility mode, it warns about but otherwise ignores undefined options. In normal operation, such arguments are passed on to the \*(AK program for it to process. .PP The \*(AK book does not define the return value of .BR srand() . The \*(PX standard has it return the seed it was using, to allow keeping track of random number sequences. Therefore .B srand() in .I gawk also returns its current seed. .PP Other new features are: The use of multiple .B \-f options (from MKS .IR awk ); the .B ENVIRON array; the .BR \ea , and .B \ev escape sequences (done originally in .I gawk and fed back into the Bell Laboratories version); the .B tolower() and .B toupper() built-in functions (from the Bell Laboratories version); and the \*(AN C conversion specifications in .B printf (done first in the Bell Laboratories version). .SH HISTORICAL FEATURES There is one feature of historical \*(AK implementations that .I gawk supports: It is possible to call the .B length() built-in function not only with no argument, but even without parentheses! Thus, .RS .PP .ft B a = length # Holy Algol 60, Batman! .ft R .RE .PP is the same as either of .RS .PP .ft B a = length() .br a = length($0) .ft R .RE .PP Using this feature is poor practice, and .I gawk issues a warning about its use if .B \-\^\-lint is specified on the command line. .SH GNU EXTENSIONS .I Gawk has a number of extensions to \*(PX .IR awk . They are described in this section. All the extensions described here can be disabled by invoking .I gawk with the .B \-\^\-traditional or .B \-\^\-posix options. .PP The following features of .I gawk are not available in \*(PX .IR awk . .\" Environment vars and startup stuff .TP "\w'\(bu'u+1n" \(bu No path search is performed for files named via the .B \-f option. Therefore the .B AWKPATH environment variable is not special. .\" 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. (Disabled with .BR \-\^\-posix .) .TP \(bu The .B fflush() function. (Disabled with .BR \-\^\-posix .) .TP \(bu The ability to continue lines after .B ? and .BR : . (Disabled with .BR \-\^\-posix .) .TP \(bu Octal and hexadecimal constants in AWK programs. .\" Special variables .TP \(bu The .BR ARGIND , .BR BINMODE , .BR ERRNO , .BR LINT , .B RT and .B TEXTDOMAIN variables are not special. .TP \(bu The .B IGNORECASE variable and its side-effects are not available. .TP \(bu The .B FIELDWIDTHS variable and fixed-width field splitting. .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 .TP \(bu The use of .B RS as a regular expression. .TP \(bu The special file names available for I/O redirection are not recognized. .TP \(bu 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 The ability to split out individual characters using the null string as the value of .BR FS , and as the third argument to .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. .TP \(bu The optional third argument to the .B match() function. .TP \(bu The ability to use positional specifiers with .B printf and .BR sprintf() . .TP \(bu The ability to pass an array to .BR length() . .\" New keywords or changes to keywords .TP \(bu The use of .BI delete " array" to delete the entire contents of an array. .TP \(bu The use of .B "nextfile" to abandon processing of the current input file. .\" New functions .TP \(bu The .BR and() , .BR asort() , .BR asorti() , .BR bindtextdomain() , .BR compl() , .BR dcgettext() , .BR dcngettext() , .BR gensub() , .BR lshift() , .BR mktime() , .BR or() , .BR patsplit() , .BR rshift() , .BR strftime() , .BR strtonum() , .B systime() and .B xor() functions. .\" I18N stuff .TP \(bu Localizable strings. .\" Extending gawk .TP \(bu Adding new built-in functions dynamically with the .B extension() function. .PP The \*(AK book does not define the return value of the .B close() function. .IR Gawk\^ "'s" .B close() returns the value from .IR fclose (3), or .IR pclose (3), when closing an output file or pipe, respectively. It returns the process's exit status when closing an input pipe. The return value is \-1 if the named file, pipe or co-process was not opened with a redirection. .PP When .I gawk is invoked with the .B \-\^\-traditional option, if the .I fs argument to the .B \-F option is \*(lqt\*(rq, then .B FS is set to the tab character. Note that typing .B "gawk \-F\et \&.\|.\|." simply causes the shell to quote the \*(lqt,\*(rq and does not pass \*(lq\et\*(rq to the .B \-F option. Since this is a rather ugly special case, it is not the default behavior. This behavior also does not occur if .B \-\^\-posix has been specified. To really get a tab character as the field separator, it is best to use single quotes: .BR "gawk \-F'\et' \&.\|.\|." . .ig .PP If .I gawk was compiled for debugging, it accepts the following additional options: .TP .PD 0 .B \-Y .TP .PD .B \-\^\-parsedebug Turn on .IR yacc (1) or .IR bison (1) debugging output during program parsing. This option should only be of interest to the .I gawk maintainers, and may not even be compiled into .IR gawk . .. .SH ENVIRONMENT VARIABLES The .B AWKPATH environment variable can be used to provide a list of directories that .I gawk searches when looking for files named via the .B \-f and .B \-\^\-file options. .PP For socket communication, two special environment variables can be used to control the number of retries .RB ( GAWK_SOCK_RETRIES ), and the interval between retries .RB ( GAWK_MSEC_SLEEP ). The interval is in milliseconds. On systems that do not support .IR usleep (3), the value is rounded up to an integral number of seconds. .PP If .B POSIXLY_CORRECT exists in the environment, then .I gawk behaves exactly as if .B \-\^\-posix had been specified on the command line. If .B \-\^\-lint has been specified, .I gawk issues a warning message to this effect. .SH EXIT STATUS If the .B exit statement is used with a value, then .I gawk exits with the numeric value given to it. .PP Otherwise, if there were no problems during execution, .I gawk exits with the value of the C constant .BR EXIT_SUCCESS . This is usually zero. .PP If an error occurs, .I gawk exits with the value of the C constant .BR EXIT_FAILURE . This is usually one. .PP If .I gawk 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 VERSION INFORMATION This man page documents .IR gawk , version 4.0. .SH AUTHORS The original version of \*(UX .I awk was designed and implemented by Alfred Aho, Peter Weinberger, and Brian Kernighan of Bell Laboratories. Brian Kernighan continues to maintain and enhance it. .PP Paul Rubin and Jay Fenlason, of the Free Software Foundation, wrote .IR gawk , to be compatible with the original version of .I awk distributed in Seventh Edition \*(UX. John Woods contributed a number of bug fixes. David Trueman, with contributions from Arnold Robbins, made .I gawk compatible with the new version of \*(UX .IR awk . Arnold Robbins is the current maintainer. .PP The initial DOS port was done by Conrad Kwok and Scott Garfinkle. 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. 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. Dave Pitts provided the port to z/OS. .PP See the .I README file in the .I gawk distribution for up-to-date information about maintainers and which ports are currently supported. .SH BUG REPORTS If you find a bug in .IR gawk , please send electronic mail to .BR bug-gawk@gnu.org . Please include your operating system and its revision, the version of .I gawk (from .BR "gawk \-\^\-version" ), 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 you have the latest version of .IR gawk . Many bugs (usually subtle ones) are fixed at each release, and if yours is out of date, the problem may already have been solved. Second, please see if setting the environment variable .B LC_ALL to .B LC_ALL=C causes things to behave as you expect. If so, it's a locale issue, and may or may not really be a bug. Finally, please read this man page and the reference manual carefully to be sure that what you think is a bug really is, instead of just a quirk in the language. .PP Whatever you do, do .B NOT post a bug report in .BR comp.lang.awk . While the .I gawk developers occasionally read this newsgroup, posting bug reports there is an unreliable way to report bugs. Instead, please use the electronic mail addresses given above. .PP 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 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. We thank him. .SH COPYING PERMISSIONS Copyright \(co 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of this manual page provided the copyright notice and this permission notice are preserved on all copies. .ig Permission is granted to process this file through troff and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual page). .. .PP Permission is granted to copy and distribute modified versions of this manual page under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. .PP Permission is granted to copy and distribute translations of this manual page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation. gawk-4.0.1+dfsg.orig/doc/general-program.eps0000644000175000017500000001025211511377120017703 0ustar schotschot%!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 gawk-4.0.1+dfsg.orig/doc/general-program.fig0000644000175000017500000000133111511377120017657 0ustar schotschot#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 gawk-4.0.1+dfsg.orig/doc/ChangeLog.00000644000175000017500000010311011575462403016025 0ustar schotschotMon 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. gawk-4.0.1+dfsg.orig/doc/rflashlight-small.xpic0000644000175000017500000000054707166366262020440 0ustar schotschot#! /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 gawk-4.0.1+dfsg.orig/doc/general-program.pdf0000644000175000017500000001272411511377120017673 0ustar schotschot%PDF-1.4 %Çì¢ 5 0 obj <> stream xœ­TÁn1 ½ç+rìVª‰ØI®„ĉnGâ€8¬ºšu·ˆßÇÙM2Ó®ZUÍ!ã7Î{öËÄ÷ÖZWžºn'ófíî`D Äö9~·ë1 doY¸h'ƒ>ñö¬ÄgèÏJZ˜úÏÅQrI€Ñ]Ê‘ç1Rš:BÎg hƒ0ˆ„9Ö…c°[Ó½azÎtä¨"DÑèœz¡Ž·®©¶X9Ä{H¹#åYÿÓ4ï‘„€aælqU-'¤U6ÎH«½röÞªj‹·G—‚&{Ò,N:%²ºôQfµV0vDkÐcP¥€À!αþ sCt‡+.uDŒË”ªœ­ã¦:»Ä¢¶ -\blA/sCÄcÜ9{\U·¦!­²qFjí³õÖT[|ré4u÷;½¦xz¯Ëv²oÒI ¼×»7ÜšÓôÖu “.Îé0Læbýýð{|8¬†æ ³J`ÒÔá›ùrñnó°Y]‰„/>ííö›iõuøhÞuf]›¿¼#7ÿendstream endobj 6 0 obj 571 endobj 4 0 obj <> /Contents 5 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 4 0 R ] /Count 1 >> endobj 1 0 obj <> endobj 7 0 obj <>endobj 10 0 obj <> endobj 11 0 obj <> endobj 8 0 obj <> endobj 9 0 obj <> endobj 12 0 obj <>stream xœeTiP[×~²@ï‹iƒªbŒ-iº¸v½o5¤nbw&²2k€02 I,Z-$aq !„d6 ̾ı NŒ $vj;©kÒNÀ3q›Úí´nÚ¹yþÑGf:ýÑ™;wî½ç;ß=óÝû± c0Qiâ2Qå>¡¬¬@º±ßKÆ3Èí›ÈL ¤ë]ë'#w`‚næˆbBTÄÕí¸3¼‚ßGÆ`LCmïO’É«+ÄÅ%Uü]éÂÌÝ{öìýßÉ¡ÄÄD~aõ#üdQ¥¸XÊßI/”"‰L^&’VýŠŸD£%ñE~±¤Z^RÉ/(*m¤eHD—ù§Å±\.Sòw%íæ>xðÐ>z:vN\V¨¨äW9ÿœ,‘/à EÅ IAÅÿG0 Û"K®¨¬RˆRŠ…’2 KÁ~†ÇÒ°t,{;Â~ƒÁÎbç°hZ,‚|ÂØÍ¸µé'›Ú™¿d:#¶D|) ±rÈ+ÑäC<d >EO™ÈFæs¨ÜCq©øov¢óü߈‹b<£~ÈÓÉ8«‹{¨Tä»g^/ºÔ7©äÉækÀCâÙû˹Ñë—À§#×ÆÔ¾˜o_,Ĉe7‹HÒëNš ¶DÆpDÀ¿ÂË·ï.Ž} …§e+i¹O1F©@P½,öv5þ¥±½NÑøaΰË1õän­øw%}êPP› ¿š›%MÕ⢾=Ä‹FOÀCþÚÏøý*ÓNnãtÚÚ›;€èo¯½À£l8doé 2zð3¶,H‡fæmífƒ‹Û¥u™Ü@ôy¼Á°Ò/.V%¿Ãû3n¶f(Šu)ê¸h2ÎУ÷“ûýºž˜–QâƒXö^ô[ô§m¬cY,õƦ¦Fˆ3ÁZ×J°½…¢¥<þ„0+é|èâZïNéˆÊ[ ’¸ —eYb‰»GÍUö×÷êˆZê ›ew¶XézÙ‚vè´ôšhS0ÐØÿøÓ;æ*Ãoò(ìSY—¦q“ÃÁë CâýÜh4l˜'£B1nd¦Î®Æ²×ƒÌà°ïïDËÙd3qõ¦z£A”–ŸSÛH°×êŒ&£y\i¶Ø,ûþ-êCÖñ¡üÅ›ã}óa®Î¥¬¨1( î’&ð Màìµ°6¾Ç¡Ÿ|Õ«íŒy¸ŠNÓ·xÉÊ9Ž™•WçºÎCÏ©Ã8;\ƒ/_é0@6Aéq™µÚ:¹B¢/¢èòµiÛ‹¾¤vjñW:5GP­ø‰Y_ŒMtÜ™™Èœ-h±ÌùG]tÒR§„wÈ­}1·¿B»þË~xqöhpm/‹íUã¿kp ‰xù&Ç '„…}ø ›¦¾ -E*#v{Å/çþô)Ù®Ò6[«¸ôKSÒtÄbûQéDk|€j‚L²”ÜÊ™x WƦ²+[åNyk9ûO%D÷JyêêꓹTªS ”ú)Ur¦¼.+ž=Z˜žçŽ{C0˹ӧl§mk†µ¢ºÀ 8Ú›ìM6ðYÜMm0“žá@8è94÷jCe|¹6þÁtˆ?…uÅ©'‹¨È#©ƒ³½v÷ô¯}ÃY Ž\¨)ëâv—täAq^Z’÷vÁÝçtO:>òŸZ¾xtZ>^ÿ¹#²©œÒkT!jÛú™{¨# ø¦á}˜Ñ•Ц6ôd±ßSãœuüž ýë&ZÏ!þZ«Î Ÿ(¿mEõÔR$:Æbg½Ì!Ÿp‚.Ç$zåNþ¾leA±š›W^bÚc!h·‚‡ñ·U¦oÉic¹š;š@„œÚ\ÞËrÒµ:™nQu\ТwÂGù¼ÑšY#2œ®‰‹^÷Ñ nÇ<ãÉ*l ¦ü1Çms4»€h¯ÍáQmšóM4G…ϰj\0A ¬§ÝÞß;ãb¶§äMU†Ãùº:a# ­òàÂf– ÔŠÍ„»¯±Ð-OàQÅ8R4HæÁË­eV]7LÄ¡Bm.úøµÔ¬òÔtnõ‚8@¦Mp£5K-®KÓÄE«üd†¥ùYC›×¾7䈊ZëŽÚ‚aÿ:²ä endstream endobj 13 0 obj <>stream 2011-01-06T17:36:03+02:00 2011-01-06T17:36:03+02:00 fig2dev Version 3.2 Patchlevel 5c general-program.fig endstream endobj 2 0 obj <>endobj xref 0 14 0000000000 65535 f 0000000884 00000 n 0000004960 00000 n 0000000825 00000 n 0000000675 00000 n 0000000015 00000 n 0000000656 00000 n 0000000949 00000 n 0000001050 00000 n 0000001331 00000 n 0000000990 00000 n 0000001020 00000 n 0000001585 00000 n 0000003538 00000 n trailer << /Size 14 /Root 1 0 R /Info 2 0 R /ID [] >> startxref 5155 %%EOF gawk-4.0.1+dfsg.orig/doc/awkforai.txt0000644000175000017500000002053411463242060016460 0ustar schotschotDraft for ACM SIGPLAN Patterns (Language Trends) 1996 Why GAWK for AI? Ronald P. Loui Most people are surprised when I tell them what language we use in our undergraduate AI programming class. That's understandable. We use GAWK. GAWK, Gnu's version of Aho, Weinberger, and Kernighan's old pattern scanning language isn't even viewed as a programming language by most people. Like PERL and TCL, most prefer to view it as a "scripting language." It has no objects; it is not functional; it does no built-in logic programming. Their surprise turns to puzzlement when I confide that (a) while the students are allowed to use any language they want; (b) with a single exception, the best work consistently results from those working in GAWK. (footnote: The exception was a PASCAL programmer who is now an NSF graduate fellow getting a Ph.D. in mathematics at Harvard.) Programmers in C, C++, and LISP haven't even been close (we have not seen work in PROLOG or JAVA). Why GAWK? There are some quick answers that have to do with the pragmatics of undergraduate programming. Then there are more instructive answers that might be valuable to those who debate programming paradigms or to those who study the history of AI languages. And there are some deep philosophical answers that expose the nature of reasoning and symbolic AI. I think the answers, especially the last ones, can be even more surprising than the observed effectiveness of GAWK for AI. First it must be confessed that PERL programmers can cobble together AI projects well, too. Most of GAWK's attractiveness is reproduced in PERL, and the success of PERL forebodes some of the success of GAWK. Both are powerful string-processing languages that allow the programmer to exploit many of the features of a UNIX environment. Both provide powerful constructions for manipulating a wide variety of data in reasonably efficient ways. Both are interpreted, which can reduce development time. Both have short learning curves. The GAWK manual can be consumed in a single lab session and the language can be mastered by the next morning by the average student. GAWK's automatic initialization, implicit coercion, I/O support and lack of pointers forgive many of the mistakes that young programmers are likely to make. Those who have seen C but not mastered it are happy to see that GAWK retains some of the same sensibilities while adding what must be regarded as spoonsful of syntactic sugar. Some will argue that PERL has superior functionality, but for quick AI applications, the additional functionality is rarely missed. In fact, PERL's terse syntax is not friendly when regular expressions begin to proliferate and strings contain fragments of HTML, WWW addresses, or shell commands. PERL provides new ways of doing things, but not necessarily ways of doing new things. In the end, despite minor difference, both PERL and GAWK minimize programmer time. Neither really provides the programmer the setting in which to worry about minimizing run-time. There are further simple answers. Probably the best is the fact that increasingly, undergraduate AI programming is involving the Web. Oren Etzioni (University of Washington, Seattle) has for a while been arguing that the "softbot" is replacing the mechanical engineers' robot as the most glamorous AI testbed. If the artifact whose behavior needs to be controlled in an intelligent way is the software agent, then a language that is well-suited to controlling the software environment is the appropriate language. That would imply a scripting language. If the robot is KAREL, then the right language is "turn left; turn right." If the robot is Netscape, then the right language is something that can generate "netscape -remote 'openURL(http://cs.wustl.edu/~loui)'" with elan. Of course, there are deeper answers. Jon Bentley found two pearls in GAWK: its regular expressions and its associative arrays. GAWK asks the programmer to use the file system for data organization and the operating system for debugging tools and subroutine libraries. There is no issue of user-interface. This forces the programmer to return to the question of what the program does, not how it looks. There is no time spent programming a binsort when the data can be shipped to /bin/sort in no time. (footnote: I am reminded of my IBM colleague Ben Grosof's advice for Palo Alto: Don't worry about whether it's highway 101 or 280. Don't worry if you have to head south for an entrance to go north. Just get on the highway as quickly as possible.) There are some similarities between GAWK and LISP that are illuminating. Both provided a powerful uniform data structure (the associative array implemented as a hash table for GAWK and the S-expression, or list of lists, for LISP). Both were well-supported in their environments (GAWK being a child of UNIX, and LISP being the heart of lisp machines). Both have trivial syntax and find their power in the programmer's willingness to use the simple blocks to build a complex approach. Deeper still, is the nature of AI programming. AI is about functionality and exploratory programming. It is about bottom-up design and the building of ambitions as greater behaviors can be demonstrated. Woe be to the top-down AI programmer who finds that the bottom-level refinements, "this subroutine parses the sentence," cannot actually be implemented. Woe be to the programmer who perfects the data structures for that heapsort when the whole approach to the high-level problem needs to be rethought, and the code is sent to the junkheap the next day. AI programming requires high-level thinking. There have always been a few gifted programmers who can write high-level programs in assembly language. Most however need the ambient abstraction to have a higher floor. Now for the surprising philosophical answers. First, AI has discovered that brute-force combinatorics, as an approach to generating intelligent behavior, does not often provide the solution. Chess, neural nets, and genetic programming show the limits of brute computation. The alternative is clever program organization. (footnote: One might add that the former are the AI approaches that work, but that is easily dismissed: those are the AI approaches that work in general, precisely because cleverness is problem-specific.) So AI programmers always want to maximize the content of their program, not optimize the efficiency of an approach. They want minds, not insects. Instead of enumerating large search spaces, they define ways of reducing search, ways of bringing different knowledge to the task. A language that maximizes what the programmer can attempt rather than one that provides tremendous control over how to attempt it, will be the AI choice in the end. Second, inference is merely the expansion of notation. No matter whether the logic that underlies an AI program is fuzzy, probabilistic, deontic, defeasible, or deductive, the logic merely defines how strings can be transformed into other strings. A language that provides the best support for string processing in the end provides the best support for logic, for the exploration of various logics, and for most forms of symbolic processing that AI might choose to call "reasoning" instead of "logic." The implication is that PROLOG, which saves the AI programmer from having to write a unifier, saves perhaps two dozen lines of GAWK code at the expense of strongly biasing the logic and representational expressiveness of any approach. I view these last two points as news not only to the programming language community, but also to much of the AI community that has not reflected on the past decade's lessons. In the puny language, GAWK, which Aho, Weinberger, and Kernighan thought not much more important than grep or sed, I find lessons in AI's trends, AI's history, and the foundations of AI. What I have found not only surprising but also hopeful, is that when I have approached the AI people who still enjoy programming, some of them are not the least bit surprised. R. Loui (loui@ai.wustl.edu) is Associate Professor of Computer Science, at Washington University in St. Louis. He has published in AI Journal, Computational Intelligence, ACM SIGART, AI Magazine, AI and Law, the ACM Computing Surveys Symposium on AI, Cognitive Science, Minds and Machines, Journal of Philosophy, and is on this year's program committees for AAAI (National AI conference) and KR (Knowledge Representation and Reasoning). gawk-4.0.1+dfsg.orig/doc/cardfonts0000644000175000017500000000265311463242060016024 0ustar schotschot.\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com .\" cardfonts --- this file sets the fonts to use for the reference card .\" .\" Copyright (C) 1996 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission .\" notice are preserved on all copies. .\" .\" Permission is granted to process this file through troff and print the .\" results, provided the printed document carries copying permission .\" notice identical to this one except for the removal of this paragraph .\" (this paragraph not being relevant to the printed reference card). .\" .\" Permission is granted to copy and distribute modified versions of this .\" reference card under the conditions for verbatim copying, provided that .\" the entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Permission is granted to copy and distribute translations of this .\" reference card into another language, under the above conditions for .\" modified versions, except that this permission notice may be stated in .\" a translation approved by the Foundation. .\" .ig Strings for inline font change. FR - font roman FI - font italic FC - font courier .. .ds FR \fR .ds FI \fI .ds FC \f(CB .ds RN Times Roman .ds IN Times Italic .ds CN Courier Bold .ds AM \fIGAWK: Effective AWK Programming\fP gawk-4.0.1+dfsg.orig/doc/process-flow.fig0000644000175000017500000000236011511377120017223 0ustar schotschot#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 gawk-4.0.1+dfsg.orig/doc/colors0000644000175000017500000000313411463242060015335 0ustar schotschot.\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com .\" This file sets the colors to use. .\" .\" Copyright (C) 1996,97,99 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission .\" notice are preserved on all copies. .\" .\" Permission is granted to process this file through troff and print the .\" results, provided the printed document carries copying permission .\" notice identical to this one except for the removal of this paragraph .\" (this paragraph not being relevant to the printed reference card). .\" .\" Permission is granted to copy and distribute modified versions of this .\" reference card under the conditions for verbatim copying, provided that .\" the entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Permission is granted to copy and distribute translations of this .\" reference card into another language, under the above conditions for .\" modified versions, except that this permission notice may be stated in .\" a translation approved by the Foundation. .\" .ig Strings for inline color change. CR - color red CG - color green CL - color light blue CB - color blue CD - color dark, i.e. black CX - color boX, i.e. for the surrounding boxes (red for now) .. .ds CR \X'ps: exec 0 .96 .65 0 setcmykcolor' .ds CG \X'ps: exec 1.0 0 .51 .43 setcmykcolor' .ds CL \X'ps: exec .69 .34 0 0 setcmykcolor' .ds CB \X'ps: exec 1 .72 0 .06 setcmykcolor' .ds CD \X'ps: exec 1 1 1 1 setcmykcolor' .ds CX \*(CG gawk-4.0.1+dfsg.orig/doc/Makefile.in0000644000175000017500000006544011734667213016202 0ustar schotschot# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # doc/Makefile.am --- automake input file for gawk # # Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007, 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 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 # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog \ texinfo.tex 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/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) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = INFO_DEPS = $(srcdir)/gawk.info $(srcdir)/gawkinet.info am__TEXINFO_TEX_DIR = $(srcdir) DVIS = gawk.dvi gawkinet.dvi PDFS = gawk.pdf gawkinet.pdf PSS = gawk.ps gawkinet.ps HTMLS = gawk.html gawkinet.html TEXINFOS = gawk.texi gawkinet.texi TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBSIGSEGV = @LIBSIGSEGV@ LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LTLIBSIGSEGV = @LTLIBSIGSEGV@ MAKEINFO = @MAKEINFO@ --no-split --force MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ info_TEXINFOS = gawk.texi gawkinet.texi man_MANS = gawk.1 igawk.1 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-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 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/" SEDME2 = sed '/%%Page: 10 10/,/0 Cg EP/d' CARDSRC = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/colors awkcard.tr CARDSRC_N = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/no.colors awkcard.tr CARDFILES = $(CARDSRC) ad.block awkcard.in setter.outline # Use this if your troff can correctly handle macros from 'colors' file AWKCARD = awkcard.ps # Uncomment the following definition of AWKCARD if your troff can produce # Postscript but still has troubles with macros from 'colors'. As this # is not groff you will have to change TROFF macro as well. Do not forget # to ensure that awkcard.tr is processed by tbl. #AWKCARD = awkcard.nc # The following is patterned after the main Makefile.am. The point is to # make pgawk.1 a link to gawk.1 in the installed man directory. # We want hard links for install-data-hook, below LN = ln -f all: all-am .SUFFIXES: .SUFFIXES: .dvi .html .info .pdf .ps .texi $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): .texi.info: restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ $<; \ then \ rc=0; \ $(am__cd) $(srcdir); \ else \ rc=$$?; \ $(am__cd) $(srcdir) && \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; exit $$rc .texi.dvi: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) $< .texi.pdf: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2PDF) $< .texi.html: rm -rf $(@:.html=.htp) if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $(@:.html=.htp) $<; \ then \ rm -rf $@; \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ else \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ exit 1; \ fi $(srcdir)/gawk.info: gawk.texi gawk.dvi: gawk.texi gawk.pdf: gawk.texi gawk.html: gawk.texi $(srcdir)/gawkinet.info: gawkinet.texi gawkinet.dvi: gawkinet.texi gawkinet.pdf: gawkinet.texi gawkinet.html: gawkinet.texi .dvi.ps: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) -o $@ $< uninstall-dvi-am: @$(NORMAL_UNINSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ rm -f "$(DESTDIR)$(dvidir)/$$f"; \ done uninstall-html-am: @$(NORMAL_UNINSTALL) @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ done uninstall-info-am: @$(PRE_UNINSTALL) @if test -d '$(DESTDIR)$(infodir)' && \ (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done uninstall-pdf-am: @$(NORMAL_UNINSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ done uninstall-ps-am: @$(NORMAL_UNINSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ rm -f "$(DESTDIR)$(psdir)/$$f"; \ done dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f "$(distdir)/$$relfile" || \ cp -p $$file "$(distdir)/$$relfile"; \ else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf gawk.aux gawk.cp gawk.cps gawk.fn gawk.ky gawk.kys gawk.log gawk.pg \ gawk.pgs gawk.tmp gawk.toc gawk.tp gawk.tps gawk.vr \ gawkinet.aux gawkinet.cp gawkinet.cps gawkinet.fn \ gawkinet.ky gawkinet.kys gawkinet.log gawkinet.pg \ gawkinet.pgs gawkinet.tmp gawkinet.toc gawkinet.tp \ gawkinet.tps gawkinet.vr clean-aminfo: -test -z "gawk.dvi gawk.pdf gawk.ps gawk.html gawkinet.dvi gawkinet.pdf \ gawkinet.ps gawkinet.html" \ || rm -rf gawk.dvi gawk.pdf gawk.ps gawk.html gawkinet.dvi gawkinet.pdf \ gawkinet.ps gawkinet.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) $(MANS) installdirs: for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-aminfo clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: $(DVIS) html: html-am html-am: $(HTMLS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-info-am install-man @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ done install-exec-am: install-html: install-html-am install-html-am: $(HTMLS) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ if test -d "$$d$$p"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ list2="$$list2 $$d$$p"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done; } install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ echo "$$ifile"; \ else : ; fi; \ done; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done install-ps: install-ps-am install-ps-am: $(PSS) @$(NORMAL_INSTALL) test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-aminfo mostlyclean-generic pdf-am: $(PDFS) ps: ps-am ps-am: $(PSS) uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-man uninstall-pdf-am uninstall-ps-am @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-man: uninstall-man1 .MAKE: install-am install-data-am install-strip uninstall-am .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ dist-info distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-hook install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-aminfo \ maintainer-clean-generic mostlyclean mostlyclean-aminfo \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-dvi-am uninstall-hook uninstall-html-am \ uninstall-info-am uninstall-man uninstall-man1 \ uninstall-pdf-am uninstall-ps-am # Link gawk.1 to pgawk.1 install-data-hook: (cd $(DESTDIR)$(man1dir); \ $(LN) gawk.1 pgawk.1 2>/dev/null ; \ exit 0) # Undo the above when uninstalling uninstall-hook: cd $(DESTDIR)$(man1dir); rm -f pgawk.1 ; exit 0 postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD) pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf gawk.ps: gawk.dvi dvips -o gawk.ps gawk.dvi gawkinet.ps: gawkinet.dvi dvips -o gawkinet.ps gawkinet.dvi gawk.1.ps: gawk.1 -groff -man $(srcdir)/gawk.1 > gawk.1.ps 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 awkcard.ps: $(CARDFILES) $(TROFF) $(CARDSRC) | $(SEDME) | cat $(srcdir)/setter.outline - | $(SEDME2) > awkcard.ps 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: gawk-4.0.1+dfsg.orig/doc/rflashlight.eps0000644000175000017500000001003511463242060017127 0ustar schotschot%! %%Creator: arnold@skeeve (Aharon Robbins) %%Title: flashlight.small.xpic (xpic) %%CreationDate: Tue Oct 24 14:41:28 2000 %%Pages: 1 %%BoundingBox: 0 0 72 28.8 % (in inches) at 0 0, width 1, height 0.4 %%EndComments % Prolog for xpic to PostScript converter % Author: Mark Moraes % $Header: x2ps.pro,v 1.2 88/03/19 16:50:09 moraes Exp % %d D - change style SOLID, DOTTED, SHORT-DASH, LONG-DASH, DOT-DASH % %s F - change font to fontname % %d S - change size (font size in points) % (%s) rj %d t - text right just. (%d is TOPLINE, MIDLINE, BOTLINE) % (%s) lj %d t - text left just. (%d is TOPLINE, MIDLINE, BOTLINE) % (%s) ce %d t - text centered (%d is TOPLINE, MIDLINE, BOTLINE) % %d %d l - lineto % %d %d m - moveto % %d %d s - spline segment % x - flush line, spline % b - box % e - ellipse % %d ss - setscale % %d W - change linewidth % getpagesize - gets the values of PAGEHEIGHT and PAGEWIDTH % %d %d flip - translate by %d, PAGEHEIGHT - %d (this % transforms to X windows coordinates) save 50 dict begin /xpic exch def /StartXpic {newpath 0 0 moveto [] 0 setdash 0 setgray 1 setlinecap} def % Set defaults /fontname /Times-Roman def /ptsize 12 def % halign has the values for MIDLINE, TOPLINE, BOTLINE /halign 3 array def /s {rcurveto} def /x {stroke} def /l {lineto} def /m {moveto} def /b { /ury exch def /urx exch def /lly exch def /llx exch def llx lly moveto urx lly lineto urx ury lineto llx ury lineto llx lly lineto stroke } def /mtrx matrix def /e { /yc exch def /xc exch def /yrad exch def /xrad exch def xc xrad add yc moveto /savematrix mtrx currentmatrix def xc yc translate xrad yrad scale 0 0 1 0 360 arc savematrix setmatrix stroke } def % The next three take the text string, and moveto the right horiz. position % leaving the string on the stack. /lj {} def /rj {dup stringwidth pop neg 0 rmoveto} def /ce {dup stringwidth pop 2 div neg 0 rmoveto} def % And this is invoked after one of the three above, and % computes the vert. pos, and then displays the string. /t {halign exch get 0 exch rmoveto show newpath} def % Store an array of patterns in /styles - a pattern is an array consisting % of an array and an offset. Corresp to xpic patterns % solid, dotted, short-dashed, long-dashed, dot-dashed /styles [ [] 0 ] [ [1 3] 0 ] [ [4 4] 0 ] [ [8 4] 0 ] [ [1 4 4 4] 0 ] 5 array astore def % change style to arg. /D {stroke styles exch get aload pop setdash newpath} def /W {stroke 0.5 mul setlinewidth newpath} def % fontbox takes a fontname off the stack, and returns an array % containing the values of the bottom line of the bounding box, the % mid line of the bounding box, and the top line of the bounding box % of that font, taken from the baseline, scaled to a font of size 1 /fontbox { findfont dup /FontMatrix get /fm exch def /FontBBox get aload pop /ytop exch def pop /ybot exch def pop /ymid ytop ybot sub 2 div def 0 ybot fm dtransform exch pop % botline dup neg exch % midline - this works better than (ytop-ybot)/2! 0 ytop fm dtransform exch pop exch %topline % now in the order midline, topline, botline. 3 array astore } def % select font /F { dup /fontname exch def fontbox /thisfontbox exch def SF } def % set point size /S {/ptsize exch def SF} def % actually set font /SF { fontname findfont ptsize curscale div scalefont setfont thisfontbox aload pop 1 1 3 { pop ptsize mul curscale div neg 3 1 roll } for halign astore pop } def % sets the scale to 72 / n, where n is on the stack, and stores the value % in curscale for font scaling /curscale 1 def /getpagesize{newpath clippath pathbbox /pageheight exch def /pagewidth exch def pop pop newpath} def /flip{pageheight exch sub translate} def /ss {/curscale exch 72 exch div dup dup scale def} def /land {90 rotate} def StartXpic %%EndProlog 80 ss 0.5 W 0 D 8 16 24 16 e 24 32 m 48 24 l x 24 0 m 48 8 l x 48 24 m 0 0 0 -5.33333 0 -16 s x 48 24 80 8 b 0 8 m 0 8 l x 0 0 m 16 8 l x 0 16 m 16 16 l x 16 24 m 0 32 l x %%Trailer showpage % Trailer for xpic to PostScript converter % $Header: x2ps.tra,v 1.2 89/07/02 15:59:53 moraes Exp $ xpic end restore gawk-4.0.1+dfsg.orig/doc/statist.eps0000644000175000017500000003112011463242060016311 0ustar schotschot%!PS-Adobe-2.0 %%Creator: gnuplot 3.7 patchlevel 0.1 %%CreationDate: Sun Jan 7 14:23:12 2001 %%DocumentFonts: (atend) %%BoundingBox: 50 50 554 770 %%Orientation: Portrait %%Pages: (atend) %%EndComments /gnudict 256 dict def gnudict begin /Color true def /Solid false def /gnulinewidth 5.000 def /userlinewidth gnulinewidth def /vshift -46 def /dl {10 mul} def /hpt_ 31.5 def /vpt_ 31.5 def /hpt hpt_ def /vpt vpt_ def /M {moveto} bind def /L {lineto} bind def /R {rmoveto} bind def /V {rlineto} bind def /vpt2 vpt 2 mul def /hpt2 hpt 2 mul def /Lshow { currentpoint stroke M 0 vshift R show } def /Rshow { currentpoint stroke M dup stringwidth pop neg vshift R show } def /Cshow { currentpoint stroke M dup stringwidth pop -2 div vshift R show } def /UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def /DL { Color {setrgbcolor Solid {pop []} if 0 setdash } {pop pop pop Solid {pop []} if 0 setdash} ifelse } def /BL { stroke gnulinewidth 2 mul setlinewidth } def /AL { stroke gnulinewidth 2 div setlinewidth } def /UL { gnulinewidth mul /userlinewidth exch def } def /PL { stroke userlinewidth setlinewidth } def /LTb { BL [] 0 0 0 DL } def /LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def /LT0 { PL [] 1 0 0 DL } def /LT1 { PL [4 dl 2 dl] 0 1 0 DL } def /LT2 { PL [2 dl 3 dl] 0 0 1 DL } def /LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def /LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def /LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def /LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def /LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def /LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def /Pnt { stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore } def /Dia { stroke [] 0 setdash 2 copy vpt add M hpt neg vpt neg V hpt vpt neg V hpt vpt V hpt neg vpt V closepath stroke Pnt } def /Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V currentpoint stroke M hpt neg vpt neg R hpt2 0 V stroke } def /Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M 0 vpt2 neg V hpt2 0 V 0 vpt2 V hpt2 neg 0 V closepath stroke Pnt } def /Crs { stroke [] 0 setdash exch hpt sub exch vpt add M hpt2 vpt2 neg V currentpoint stroke M hpt2 neg 0 R hpt2 vpt2 V stroke } def /TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M hpt neg vpt -1.62 mul V hpt 2 mul 0 V hpt neg vpt 1.62 mul V closepath stroke Pnt } def /Star { 2 copy Pls Crs } def /BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M 0 vpt2 neg V hpt2 0 V 0 vpt2 V hpt2 neg 0 V closepath fill } def /TriUF { stroke [] 0 setdash vpt 1.12 mul add M hpt neg vpt -1.62 mul V hpt 2 mul 0 V hpt neg vpt 1.62 mul V closepath fill } def /TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M hpt neg vpt 1.62 mul V hpt 2 mul 0 V hpt neg vpt -1.62 mul V closepath stroke Pnt } def /TriDF { stroke [] 0 setdash vpt 1.12 mul sub M hpt neg vpt 1.62 mul V hpt 2 mul 0 V hpt neg vpt -1.62 mul V closepath fill} def /DiaF { stroke [] 0 setdash vpt add M hpt neg vpt neg V hpt vpt neg V hpt vpt V hpt neg vpt V closepath fill } def /Pent { stroke [] 0 setdash 2 copy gsave translate 0 hpt M 4 {72 rotate 0 hpt L} repeat closepath stroke grestore Pnt } def /PentF { stroke [] 0 setdash gsave translate 0 hpt M 4 {72 rotate 0 hpt L} repeat closepath fill grestore } def /Circle { stroke [] 0 setdash 2 copy hpt 0 360 arc stroke Pnt } def /CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def /C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def /C1 { BL [] 0 setdash 2 copy moveto 2 copy vpt 0 90 arc closepath fill vpt 0 360 arc closepath } bind def /C2 { BL [] 0 setdash 2 copy moveto 2 copy vpt 90 180 arc closepath fill vpt 0 360 arc closepath } bind def /C3 { BL [] 0 setdash 2 copy moveto 2 copy vpt 0 180 arc closepath fill vpt 0 360 arc closepath } bind def /C4 { BL [] 0 setdash 2 copy moveto 2 copy vpt 180 270 arc closepath fill vpt 0 360 arc closepath } bind def /C5 { BL [] 0 setdash 2 copy moveto 2 copy vpt 0 90 arc 2 copy moveto 2 copy vpt 180 270 arc closepath fill vpt 0 360 arc } bind def /C6 { BL [] 0 setdash 2 copy moveto 2 copy vpt 90 270 arc closepath fill vpt 0 360 arc closepath } bind def /C7 { BL [] 0 setdash 2 copy moveto 2 copy vpt 0 270 arc closepath fill vpt 0 360 arc closepath } bind def /C8 { BL [] 0 setdash 2 copy moveto 2 copy vpt 270 360 arc closepath fill vpt 0 360 arc closepath } bind def /C9 { BL [] 0 setdash 2 copy moveto 2 copy vpt 270 450 arc closepath fill vpt 0 360 arc closepath } bind def /C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill 2 copy moveto 2 copy vpt 90 180 arc closepath fill vpt 0 360 arc closepath } bind def /C11 { BL [] 0 setdash 2 copy moveto 2 copy vpt 0 180 arc closepath fill 2 copy moveto 2 copy vpt 270 360 arc closepath fill vpt 0 360 arc closepath } bind def /C12 { BL [] 0 setdash 2 copy moveto 2 copy vpt 180 360 arc closepath fill vpt 0 360 arc closepath } bind def /C13 { BL [] 0 setdash 2 copy moveto 2 copy vpt 0 90 arc closepath fill 2 copy moveto 2 copy vpt 180 360 arc closepath fill vpt 0 360 arc closepath } bind def /C14 { BL [] 0 setdash 2 copy moveto 2 copy vpt 90 360 arc closepath fill vpt 0 360 arc } bind def /C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill vpt 0 360 arc closepath } bind def /Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath } bind def /Square { dup Rec } bind def /Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def /S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def /S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def /S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def /S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def /S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def /S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def /S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def /S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill 2 copy vpt Square fill Bsquare } bind def /S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def /S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def /S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def /S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def /S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def /S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill 2 copy vpt Square fill Bsquare } bind def /S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def /S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def /D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def /D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def /D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def /D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def /D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def /D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def /D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def /D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def /D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def /D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def /D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def /D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def /D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def /D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def /D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def /D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def /DiaE { stroke [] 0 setdash vpt add M hpt neg vpt neg V hpt vpt neg V hpt vpt V hpt neg vpt V closepath stroke } def /BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M 0 vpt2 neg V hpt2 0 V 0 vpt2 V hpt2 neg 0 V closepath stroke } def /TriUE { stroke [] 0 setdash vpt 1.12 mul add M hpt neg vpt -1.62 mul V hpt 2 mul 0 V hpt neg vpt 1.62 mul V closepath stroke } def /TriDE { stroke [] 0 setdash vpt 1.12 mul sub M hpt neg vpt 1.62 mul V hpt 2 mul 0 V hpt neg vpt -1.62 mul V closepath stroke } def /PentE { stroke [] 0 setdash gsave translate 0 hpt M 4 {72 rotate 0 hpt L} repeat closepath stroke grestore } def /CircE { stroke [] 0 setdash hpt 0 360 arc stroke } def /Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def /DiaW { stroke [] 0 setdash vpt add M hpt neg vpt neg V hpt vpt neg V hpt vpt V hpt neg vpt V Opaque stroke } def /BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M 0 vpt2 neg V hpt2 0 V 0 vpt2 V hpt2 neg 0 V Opaque stroke } def /TriUW { stroke [] 0 setdash vpt 1.12 mul add M hpt neg vpt -1.62 mul V hpt 2 mul 0 V hpt neg vpt 1.62 mul V Opaque stroke } def /TriDW { stroke [] 0 setdash vpt 1.12 mul sub M hpt neg vpt 1.62 mul V hpt 2 mul 0 V hpt neg vpt -1.62 mul V Opaque stroke } def /PentW { stroke [] 0 setdash gsave translate 0 hpt M 4 {72 rotate 0 hpt L} repeat Opaque stroke grestore } def /CircW { stroke [] 0 setdash hpt 0 360 arc Opaque stroke } def /BoxFill { gsave Rec 1 setgray fill grestore } def end %%EndProlog %%Page: 1 1 gnudict begin gsave 50 50 translate 0.100 0.100 scale 0 setgray newpath (Helvetica) findfont 140 scalefont setfont 1.000 UL LTb 574 280 M 63 0 V 4165 0 R -63 0 V 490 280 M (-0.3) Rshow 574 1245 M 63 0 V 4165 0 R -63 0 V -4249 0 R (-0.2) Rshow 574 2209 M 63 0 V 4165 0 R -63 0 V -4249 0 R (-0.1) Rshow 574 3174 M 63 0 V 4165 0 R -63 0 V -4249 0 R (0) Rshow 574 4138 M 63 0 V 4165 0 R -63 0 V -4249 0 R (0.1) Rshow 574 5103 M 63 0 V 4165 0 R -63 0 V -4249 0 R (0.2) Rshow 574 6067 M 63 0 V 4165 0 R -63 0 V -4249 0 R (0.3) Rshow 574 7032 M 63 0 V 4165 0 R -63 0 V -4249 0 R (0.4) Rshow 574 280 M 0 63 V 0 6689 R 0 -63 V 574 140 M (-10) Cshow 1631 280 M 0 63 V 0 6689 R 0 -63 V 0 -6829 R (-5) Cshow 2688 280 M 0 63 V 0 6689 R 0 -63 V 0 -6829 R (0) Cshow 3745 280 M 0 63 V 0 6689 R 0 -63 V 0 -6829 R (5) Cshow 4802 280 M 0 63 V 0 6689 R 0 -63 V 0 -6829 R (10) Cshow 1.000 UL LTb 574 280 M 4228 0 V 0 6752 V -4228 0 V 574 280 L 2688 2209 M (p\(m1=m2\) =0.0863798346775753) Lshow 2688 1245 M (p\(v1=v2\) =0.31647637745891) Lshow 1.000 UL LT0 4151 6899 M (sample 1) Rshow 4235 6899 M 399 0 V 574 3174 M 43 0 V 42 0 V 43 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 43 0 V 42 1 V 43 2 V 43 4 V 42 8 V 43 13 V 43 24 V 42 41 V 43 65 V 43 101 V 43 146 V 42 205 V 43 271 V 43 340 V 42 404 V 43 450 V 43 470 V 43 452 V 42 390 V 43 288 V 43 153 V 42 0 V 43 -153 V 43 -288 V 42 -390 V 43 -452 V 43 -470 V 43 -450 V 42 -404 V 43 -340 V 43 -271 V 42 -205 V 43 -146 V 43 -101 V 43 -65 V 42 -41 V 43 -24 V 43 -13 V 42 -8 V 43 -4 V 43 -2 V 42 -1 V 43 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 43 0 V 42 0 V 43 0 V 1.000 UL LT1 4151 6759 M (sample 2) Rshow 4235 6759 M 399 0 V 574 3174 M 43 0 V 42 0 V 43 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 42 0 V 43 1 V 43 1 V 43 1 V 42 3 V 43 4 V 43 6 V 42 9 V 43 13 V 43 19 V 42 27 V 43 37 V 43 51 V 43 66 V 42 85 V 43 106 V 43 130 V 42 155 V 43 179 V 43 201 V 43 219 V 42 231 V 43 236 V 43 229 V 42 214 V 43 187 V 43 149 V 42 104 V 43 52 V 43 -3 V 43 -57 V 42 -109 V 43 -154 V 43 -189 V 42 -216 V 43 -231 V 43 -235 V 43 -231 V 42 -217 V 43 -199 V 43 -177 V 42 -152 V 43 -127 V 43 -104 V 42 -83 V 43 -65 V 43 -49 V 43 -36 V 42 -26 V 43 -19 V 43 -12 V 42 -9 V 43 -6 V 43 -3 V 43 -3 V 42 -1 V 43 -1 V 43 -1 V 42 0 V 43 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 42 0 V 43 0 V 43 0 V 43 0 V 42 0 V 43 0 V stroke grestore end showpage %%Trailer %%DocumentFonts: Helvetica %%Pages: 1 gawk-4.0.1+dfsg.orig/random.c0000644000175000017500000004464511463242060015004 0ustar schotschot/* * Copyright (c) 1983, 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. 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. */ /* * Per the statement at http://opensource.org/licenses/bsd-license.php, * * The advertising clause in the license appearing on BSD Unix files was * officially rescinded by the Director of the Office of Technology * Licensing of the University of California on July 22 1999. He states * that clause 3 is "hereby deleted in its entirety." * * I removed the advertising clause in the above copyright. * The above web site points to * ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change. * * Arnold Robbins * 15 September 2007 */ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95"; #endif /* LIBC_SCCS and not lint */ #ifdef HAVE_CONFIG_H /* gawk addition */ #include #endif #ifdef HAVE_FCNTL_H #include #endif #include #include #ifdef HAVE_UNISTD_H #include #endif #include "random.h" /* gawk addition */ #ifdef HAVE_SYS_TIME_H /* gawk addition */ #include #endif #if 0 #include __FBSDID("$FreeBSD: /repoman/r/ncvs/src/lib/libc/stdlib/random.c,v 1.24 2004/01/20 03:02:18 das Exp $"); #include "namespace.h" #include /* for srandomdev() */ #include /* for srandomdev() */ #include #include #include #include /* for srandomdev() */ #include "un-namespace.h" #endif /* * random.c: * * An improved random number generation package. In addition to the standard * rand()/srand() like interface, this package also has a special state info * interface. The initstate() routine is called with a seed, an array of * bytes, and a count of how many bytes are being passed in; this array is * then initialized to contain information for random number generation with * that much state information. Good sizes for the amount of state * information are 32, 64, 128, and 256 bytes. The state can be switched by * calling the setstate() routine with the same array as was initiallized * with initstate(). By default, the package runs with 128 bytes of state * information and generates far better random numbers than a linear * congruential generator. If the amount of state information is less than * 32 bytes, a simple linear congruential R.N.G. is used. * * Internally, the state information is treated as an array of uint32_t's; the * zeroeth element of the array is the type of R.N.G. being used (small * integer); the remainder of the array is the state information for the * R.N.G. Thus, 32 bytes of state information will give 7 ints worth of * state information, which will allow a degree seven polynomial. (Note: * the zeroeth word of state information also has some other information * stored in it -- see setstate() for details). * * The random number generation technique is a linear feedback shift register * approach, employing trinomials (since there are fewer terms to sum up that * way). In this approach, the least significant bit of all the numbers in * the state table will act as a linear feedback shift register, and will * have period 2^deg - 1 (where deg is the degree of the polynomial being * used, assuming that the polynomial is irreducible and primitive). The * higher order bits will have longer periods, since their values are also * influenced by pseudo-random carries out of the lower bits. The total * period of the generator is approximately deg*(2**deg - 1); thus doubling * the amount of state information has a vast influence on the period of the * generator. Note: the deg*(2**deg - 1) is an approximation only good for * large deg, when the period of the shift is the dominant factor. * With deg equal to seven, the period is actually much longer than the * 7*(2**7 - 1) predicted by this formula. * * Modified 28 December 1994 by Jacob S. Rosenberg. * The following changes have been made: * All references to the type u_int have been changed to unsigned long. * All references to type int have been changed to type long. Other * cleanups have been made as well. A warning for both initstate and * setstate has been inserted to the effect that on Sparc platforms * the 'arg_state' variable must be forced to begin on word boundaries. * This can be easily done by casting a long integer array to char *. * The overall logic has been left STRICTLY alone. This software was * tested on both a VAX and Sun SpacsStation with exactly the same * results. The new version and the original give IDENTICAL results. * The new version is somewhat faster than the original. As the * documentation says: "By default, the package runs with 128 bytes of * state information and generates far better random numbers than a linear * congruential generator. If the amount of state information is less than * 32 bytes, a simple linear congruential R.N.G. is used." For a buffer of * 128 bytes, this new version runs about 19 percent faster and for a 16 * byte buffer it is about 5 percent faster. */ /* * For each of the currently supported random number generators, we have a * break value on the amount of state information (you need at least this * many bytes of state info to support this random number generator), a degree * for the polynomial (actually a trinomial) that the R.N.G. is based on, and * the separation between the two lower order coefficients of the trinomial. */ #define TYPE_0 0 /* linear congruential */ #define BREAK_0 8 #define DEG_0 0 #define SEP_0 0 #define TYPE_1 1 /* x**7 + x**3 + 1 */ #define BREAK_1 32 #define DEG_1 7 #define SEP_1 3 #define TYPE_2 2 /* x**15 + x + 1 */ #define BREAK_2 64 #define DEG_2 15 #define SEP_2 1 #define TYPE_3 3 /* x**31 + x**3 + 1 */ #define BREAK_3 128 #define DEG_3 31 #define SEP_3 3 #define TYPE_4 4 /* x**63 + x + 1 */ #define BREAK_4 256 #define DEG_4 63 #define SEP_4 1 /* * Array versions of the above information to make code run faster -- * relies on fact that TYPE_i == i. */ #define MAX_TYPES 5 /* max number of types above */ #ifdef USE_WEAK_SEEDING #define NSHUFF 0 #else /* !USE_WEAK_SEEDING */ #define NSHUFF 50 /* to drop some "seed -> 1st value" linearity */ #endif /* !USE_WEAK_SEEDING */ static const int degrees[MAX_TYPES] = { DEG_0, DEG_1, DEG_2, DEG_3, DEG_4 }; static const int seps [MAX_TYPES] = { SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 }; /* * Initially, everything is set up as if from: * * initstate(1, randtbl, 128); * * Note that this initialization takes advantage of the fact that srandom() * advances the front and rear pointers 10*rand_deg times, and hence the * rear pointer which starts at 0 will also end up at zero; thus the zeroeth * element of the state information, which contains info about the current * position of the rear pointer is just * * MAX_TYPES * (rptr - state) + TYPE_3 == TYPE_3. */ static uint32_t randtbl[DEG_3 + 1] = { TYPE_3, #ifdef USE_WEAK_SEEDING /* Historic implementation compatibility */ /* The random sequences do not vary much with the seed */ 0x9a319039, 0x32d9c024, 0x9b663182, 0x5da1f342, 0xde3b81e0, 0xdf0a6fb5, 0xf103bc02, 0x48f340fb, 0x7449e56b, 0xbeb1dbb0, 0xab5c5918, 0x946554fd, 0x8c2e680f, 0xeb3d799f, 0xb11ee0b7, 0x2d436b86, 0xda672e2a, 0x1588ca88, 0xe369735d, 0x904f35f7, 0xd7158fd6, 0x6fa6f051, 0x616e6b96, 0xac94efdc, 0x36413f93, 0xc622c298, 0xf5a42ab8, 0x8a88d77b, 0xf5ad9d0e, 0x8999220b, 0x27fb47b9, #else /* !USE_WEAK_SEEDING */ 0x991539b1, 0x16a5bce3, 0x6774a4cd, 0x3e01511e, 0x4e508aaa, 0x61048c05, 0xf5500617, 0x846b7115, 0x6a19892c, 0x896a97af, 0xdb48f936, 0x14898454, 0x37ffd106, 0xb58bff9c, 0x59e17104, 0xcf918a49, 0x09378c83, 0x52c7a471, 0x8d293ea9, 0x1f4fc301, 0xc3db71be, 0x39b44e1c, 0xf8a44ef9, 0x4c8b80b1, 0x19edc328, 0x87bf4bdd, 0xc9b240e5, 0xe9ee4b1b, 0x4382aee7, 0x535b6b41, 0xf3bec5da #endif /* !USE_WEAK_SEEDING */ }; /* * fptr and rptr are two pointers into the state info, a front and a rear * pointer. These two pointers are always rand_sep places aparts, as they * cycle cyclically through the state information. (Yes, this does mean we * could get away with just one pointer, but the code for random() is more * efficient this way). The pointers are left positioned as they would be * from the call * * initstate(1, randtbl, 128); * * (The position of the rear pointer, rptr, is really 0 (as explained above * in the initialization of randtbl) because the state table pointer is set * to point to randtbl[1] (as explained below). */ static uint32_t *fptr = &randtbl[SEP_3 + 1]; static uint32_t *rptr = &randtbl[1]; /* * The following things are the pointer to the state information table, the * type of the current generator, the degree of the current polynomial being * used, and the separation between the two pointers. Note that for efficiency * of random(), we remember the first location of the state information, not * the zeroeth. Hence it is valid to access state[-1], which is used to * store the type of the R.N.G. Also, we remember the last location, since * this is more efficient than indexing every time to find the address of * the last element to see if the front and rear pointers have wrapped. */ static uint32_t *state = &randtbl[1]; static int rand_type = TYPE_3; static int rand_deg = DEG_3; static int rand_sep = SEP_3; static uint32_t *end_ptr = &randtbl[DEG_3 + 1]; static inline uint32_t good_rand(int32_t); static inline uint32_t good_rand (x) int32_t x; { #ifdef USE_WEAK_SEEDING /* * Historic implementation compatibility. * The random sequences do not vary much with the seed, * even with overflowing. */ return (1103515245 * x + 12345); #else /* !USE_WEAK_SEEDING */ /* * Compute x = (7^5 * x) mod (2^31 - 1) * wihout overflowing 31 bits: * (2^31 - 1) = 127773 * (7^5) + 2836 * From "Random number generators: good ones are hard to find", * Park and Miller, Communications of the ACM, vol. 31, no. 10, * October 1988, p. 1195. */ int32_t hi, lo; /* Can't be initialized with 0, so use another value. */ if (x == 0) x = 123459876; hi = x / 127773; lo = x % 127773; x = 16807 * lo - 2836 * hi; if (x < 0) x += 0x7fffffff; return (x); #endif /* !USE_WEAK_SEEDING */ } /* * srandom: * * Initialize the random number generator based on the given seed. If the * type is the trivial no-state-information type, just remember the seed. * Otherwise, initializes state[] based on the given "seed" via a linear * congruential generator. Then, the pointers are set to known locations * that are exactly rand_sep places apart. Lastly, it cycles the state * information a given number of times to get rid of any initial dependencies * introduced by the L.C.R.N.G. Note that the initialization of randtbl[] * for default usage relies on values produced by this routine. */ void srandom(x) unsigned long x; { int i, lim; state[0] = (uint32_t)x; if (rand_type == TYPE_0) lim = NSHUFF; else { for (i = 1; i < rand_deg; i++) state[i] = good_rand(state[i - 1]); fptr = &state[rand_sep]; rptr = &state[0]; lim = 10 * rand_deg; } for (i = 0; i < lim; i++) (void)random(); } #if 0 /* gawk doesn't use this */ /* * srandomdev: * * Many programs choose the seed value in a totally predictable manner. * This often causes problems. We seed the generator using the much more * secure random(4) interface. Note that this particular seeding * procedure can generate states which are impossible to reproduce by * calling srandom() with any value, since the succeeding terms in the * state buffer are no longer derived from the LC algorithm applied to * a fixed seed. */ void srandomdev() { int fd, done; size_t len; if (rand_type == TYPE_0) len = sizeof state[0]; else len = rand_deg * sizeof state[0]; done = 0; fd = open("/dev/random", O_RDONLY, 0); if (fd >= 0) { if (read(fd, (void *) state, len) == (ssize_t) len) done = 1; close(fd); } if (!done) { struct timeval tv; unsigned long junk; gettimeofday(&tv, NULL); srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk); return; } if (rand_type != TYPE_0) { fptr = &state[rand_sep]; rptr = &state[0]; } } #endif /* * initstate: * * Initialize the state information in the given array of n bytes for future * random number generation. Based on the number of bytes we are given, and * the break values for the different R.N.G.'s, we choose the best (largest) * one we can and set things up for it. srandom() is then called to * initialize the state information. * * Note that on return from srandom(), we set state[-1] to be the type * multiplexed with the current value of the rear pointer; this is so * successive calls to initstate() won't lose this information and will be * able to restart with setstate(). * * Note: the first thing we do is save the current state, if any, just like * setstate() so that it doesn't matter when initstate is called. * * Returns a pointer to the old state. * * Note: The Sparc platform requires that arg_state begin on an int * word boundary; otherwise a bus error will occur. Even so, lint will * complain about mis-alignment, but you should disregard these messages. */ char * initstate(seed, arg_state, n) unsigned long seed; /* seed for R.N.G. */ char *arg_state; /* pointer to state array */ long n; /* # bytes of state info */ { char *ostate = (char *)(&state[-1]); uint32_t *int_arg_state = (uint32_t *)arg_state; if (rand_type == TYPE_0) state[-1] = rand_type; else state[-1] = MAX_TYPES * (rptr - state) + rand_type; if (n < BREAK_0) { (void)fprintf(stderr, "random: not enough state (%ld bytes); ignored.\n", n); return(0); } if (n < BREAK_1) { rand_type = TYPE_0; rand_deg = DEG_0; rand_sep = SEP_0; } else if (n < BREAK_2) { rand_type = TYPE_1; rand_deg = DEG_1; rand_sep = SEP_1; } else if (n < BREAK_3) { rand_type = TYPE_2; rand_deg = DEG_2; rand_sep = SEP_2; } else if (n < BREAK_4) { rand_type = TYPE_3; rand_deg = DEG_3; rand_sep = SEP_3; } else { rand_type = TYPE_4; rand_deg = DEG_4; rand_sep = SEP_4; } state = int_arg_state + 1; /* first location */ end_ptr = &state[rand_deg]; /* must set end_ptr before srandom */ srandom(seed); if (rand_type == TYPE_0) int_arg_state[0] = rand_type; else int_arg_state[0] = MAX_TYPES * (rptr - state) + rand_type; return(ostate); } /* * setstate: * * Restore the state from the given state array. * * Note: it is important that we also remember the locations of the pointers * in the current state information, and restore the locations of the pointers * from the old state information. This is done by multiplexing the pointer * location into the zeroeth word of the state information. * * Note that due to the order in which things are done, it is OK to call * setstate() with the same state as the current state. * * Returns a pointer to the old state information. * * Note: The Sparc platform requires that arg_state begin on an int * word boundary; otherwise a bus error will occur. Even so, lint will * complain about mis-alignment, but you should disregard these messages. */ char * setstate(arg_state) char *arg_state; /* pointer to state array */ { uint32_t *new_state = (uint32_t *)arg_state; uint32_t type = new_state[0] % MAX_TYPES; uint32_t rear = new_state[0] / MAX_TYPES; char *ostate = (char *)(&state[-1]); if (rand_type == TYPE_0) state[-1] = rand_type; else state[-1] = MAX_TYPES * (rptr - state) + rand_type; switch(type) { case TYPE_0: case TYPE_1: case TYPE_2: case TYPE_3: case TYPE_4: rand_type = type; rand_deg = degrees[type]; rand_sep = seps[type]; break; default: (void)fprintf(stderr, "random: state info corrupted; not changed.\n"); } state = new_state + 1; if (rand_type != TYPE_0) { rptr = &state[rear]; fptr = &state[(rear + rand_sep) % rand_deg]; } end_ptr = &state[rand_deg]; /* set end_ptr too */ return(ostate); } /* * random: * * If we are using the trivial TYPE_0 R.N.G., just do the old linear * congruential bit. Otherwise, we do our fancy trinomial stuff, which is * the same in all the other cases due to all the global variables that have * been set up. The basic operation is to add the number at the rear pointer * into the one at the front pointer. Then both pointers are advanced to * the next location cyclically in the table. The value returned is the sum * generated, reduced to 31 bits by throwing away the "least random" low bit. * * Note: the code takes advantage of the fact that both the front and * rear pointers can't wrap on the same call by not testing the rear * pointer if the front one has wrapped. * * Returns a 31-bit random number. */ long random() { uint32_t i; uint32_t *f, *r; if (rand_type == TYPE_0) { i = state[0]; state[0] = i = (good_rand(i)) & 0x7fffffff; } else { /* * Use local variables rather than static variables for speed. */ f = fptr; r = rptr; *f += *r; i = (*f >> 1) & 0x7fffffff; /* chucking least random bit */ if (++f >= end_ptr) { f = state; ++r; } else if (++r >= end_ptr) { r = state; } fptr = f; rptr = r; } return((long)i); } gawk-4.0.1+dfsg.orig/awkgram.y0000644000175000017500000043055611734666010015211 0ustar schotschot/* * awkgram.y --- yacc/bison parser */ /* * 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. * * 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 */ %{ #ifdef GAWKDEBUG #define YYDEBUG 12 #endif #include "awk.h" #if defined(__STDC__) && __STDC__ < 1 /* VMS weirdness, maybe elsewhere */ #define signed /**/ #endif static void yyerror(const char *m, ...) ATTRIBUTE_PRINTF_1; 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(const char *name, enum defref how); static void check_funcs(void); static void free_bcpool(INSTRUCTION *pl); static ssize_t read_one_line(int fd, void *buffer, size_t count); static int one_line_close(int fd); 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 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 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 */ #define HASHSIZE 1021 /* this constant only used here */ NODE *variables[HASHSIZE]; static int var_count; /* total number of global variables */ extern char *source; extern int sourceline; 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 * uniform, but if it's seen, don't install the function. * e.g. * function split(x) { return x } * function x(a) { return a } * should only produce one error message, and not core dump. */ static char builtin_func[] = "@builtin"; #define YYSTYPE INSTRUCTION * %} %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 /* Lowest to highest */ %right ASSIGNOP ASSIGN SLASH_BEFORE_EQUAL %right '?' ':' %left LEX_OR %left LEX_AND %left LEX_GETLINE %nonassoc LEX_IN %left FUNC_CALL LEX_BUILTIN LEX_LENGTH %nonassoc ',' %left MATCHOP %nonassoc RELOP '<' '>' IO_IN IO_OUT %left CONCAT_OP %left YSTRING YNUMBER %left '+' '-' %left '*' '/' '%' %right '!' UNARY %right '^' %left INCREMENT DECREMENT %left '$' %left '(' ')' %% program : /* empty */ | program rule { rule = 0; yyerrok; } | program nls | program LEX_EOF { next_sourcefile(); } | program error { rule = 0; /* * If errors, give up, don't produce an infinite * stream of syntax error messages. */ /* yyerrok; */ } ; rule : pattern action { (void) append_rule($1, $2); } | pattern statement_term { 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) < 0) YYABORT; func_params = NULL; yyerrok; } | '@' LEX_INCLUDE source statement_term { want_source = FALSE; yyerrok; } ; source : FILENAME { 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 { INSTRUCTION *tp; 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_ln($1->source_line, _("old awk does not support multiple `BEGIN' or `END' rules")); $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_ln($1->source_line, _("old awk does not support multiple `BEGIN' or `END' rules")); $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 { if ($2 == NULL) $$ = list_create(instruction(Op_no_op)); else $$ = $2; } ; func_name : NAME { $$ = $1; } | FUNC_CALL { $$ = $1; } | lex_builtin { yyerror(_("`%s' is a built-in function, it cannot be redefined"), tokstart); $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 : LEX_BUILTIN | LEX_LENGTH ; function_prologue : LEX_FUNCTION { param_counter = 0; func_params = NULL; } func_name '(' opt_param_list r_paren opt_nls { NODE *t; $1->source_file = source; t = make_param($3->lextok); $3->lextok = NULL; bcfree($3); t->flags |= FUNC; t->rnode = func_params; func_params = t; $$ = $1; can_return = TRUE; /* check for duplicate parameter names */ if (dup_parms($1, t)) errcount++; } ; regexp /* * In this rule, want_regexp tells yylex that the next thing * is a regexp so it should read up to the closing slash. */ : a_slash { ++want_regexp; } REGEXP /* The terminating '/' is consumed by yylex(). */ { NODE *n, *exp; char *re; size_t len; re = $3->lextok; len = strlen(re); if (do_lint) { if (len == 0) 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_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; } $$ = $3; $$->opcode = Op_match_rec; $$->memory = n; } ; a_slash : '/' { bcfree($1); } | SLASH_BEFORE_EQUAL ; statements : /* empty */ { $$ = NULL; } | statements statement { if ($2 == NULL) $$ = $1; else { add_lint($2, LINT_no_effect); if ($1 == NULL) $$ = $2; else $$ = list_merge($1, $2); } yyerrok; } | statements error { $$ = NULL; } ; statement_term : nls | semi opt_nls ; statement : semi opt_nls { $$ = NULL; } | l_brace statements r_brace { $$ = $2; } | if_statement { 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 { /* * ----------------- * 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 { /* * ----------------- * 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] * * and treat it as if it were * * delete foo * * Check that the body is a `delete a[i]' statement, * and that both the loop var and array names match. */ NODE *arr = NULL; 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; } else goto regular_loop; } else { 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 { $$ = 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 { $$ = 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_CONTINUE statement_term { if (! continue_allowed) error_ln($1->source_line, _("`continue' is not allowed outside a loop")); $1->target_jmp = NULL; $$ = list_create($1); } | 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 { 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 { /* 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) yyerror(_("`return' used outside function context")); } 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 ; /* * A simple_stmt exists to satisfy a constraint in the POSIX * grammar allowing them to occur as the 1st and 3rd parts * in a `for (...;...;...)' loop. This is a historical oddity * inherited from Unix awk, not at all documented in the AK&W * awk book. We support it, as this was reported as a bug. * We don't bother to document it though. So there. */ simple_stmt : print { in_print = TRUE; in_parens = 0; } print_expression_list output_redir { /* * Optimization: plain `print' has no expression list, so $3 is null. * If $3 is NULL or is a bytecode list for $0 use Op_K_print_rec, * which is faster for these two cases. */ 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] */ 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 \"\"'")); } } $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 { /* ----------------- * [ 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 { 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; char *arr = $3->lextok; if (do_lint && ! warned) { warned = TRUE; 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 { $$ = optimize_assignment($1); } ; opt_simple_stmt : /* empty */ { $$ = NULL; } | simple_stmt { $$ = $1; } ; case_statements : /* empty */ { $$ = NULL; } | case_statements case_statement { if ($1 == NULL) $$ = list_create($2); else $$ = list_prepend($1, $2); } | case_statements error { $$ = NULL; } ; case_statement : LEX_CASE case_value colon opt_nls statements { 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 { 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; } | '-' YNUMBER %prec UNARY { $2->memory->numbr = -(force_number($2->memory)); bcfree($1); $$ = $2; } | '+' YNUMBER %prec UNARY { bcfree($1); $$ = $2; } | YSTRING { $$ = $1; } | regexp { $1->opcode = Op_push_re; $$ = $1; } ; print : LEX_PRINT { $$ = $1; } | LEX_PRINTF { $$ = $1; } ; /* * Note: ``print(x)'' is already parsed by the first rule, * so there is no good in covering it by the second one too. */ print_expression_list : opt_expression_list | '(' expression_list r_paren { $$ = $2; } ; output_redir : /* empty */ { in_print = FALSE; in_parens = 0; $$ = NULL; } | IO_OUT { in_print = FALSE; in_parens = 0; } common_exp { 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 { $$ = mk_condition($3, $1, $6, NULL, NULL); } | LEX_IF '(' exp r_paren opt_nls statement LEX_ELSE opt_nls statement { $$ = mk_condition($3, $1, $6, $7, $9); } ; nls : NEWLINE | nls NEWLINE ; opt_nls : /* empty */ | nls ; input_redir : /* empty */ { $$ = NULL; } | '<' simp_exp { bcfree($1); $$ = $2; } ; opt_param_list : /* empty */ | param_list ; param_list : NAME { append_param($1->lextok); $1->lextok = NULL; bcfree($1); } | param_list comma NAME { append_param($3->lextok); $3->lextok = NULL; bcfree($3); yyerrok; } | error { /* func_params = NULL; */ } | param_list error { /* func_params = NULL; */ } | param_list comma error { /* func_params = NULL; */ } ; /* optional expression, as in for loop */ opt_exp : /* empty */ { $$ = NULL; } | exp { $$ = $1; } ; opt_expression_list : /* empty */ { $$ = NULL; } | expression_list { $$ = $1; } ; expression_list : exp { $$ = mk_expression_list(NULL, $1); } | expression_list comma exp { $$ = mk_expression_list($1, $3); yyerrok; } | error { $$ = NULL; } | expression_list error { $$ = NULL; } | expression_list error exp { $$ = NULL; } | expression_list comma error { $$ = NULL; } ; /* Expressions, not including the comma operator. */ 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 { $$ = mk_boolean($1, $3, $2); } | exp LEX_OR exp { $$ = mk_boolean($1, $3, $2); } | exp MATCHOP exp { 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->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 { $$ = mk_condition($1, $2, $3, $4, $5); } | common_exp { $$ = $1; } ; assign_operator : ASSIGN { $$ = $1; } | ASSIGNOP { $$ = $1; } | SLASH_BEFORE_EQUAL ASSIGN /* `/=' */ { $2->opcode = Op_assign_quotient; $$ = $2; } ; relop_or_less : RELOP { $$ = $1; } | '<' { $$ = $1; } ; a_relop : relop_or_less { $$ = $1; } | '>' { $$ = $1; } ; common_exp : simp_exp { $$ = $1; } | simp_exp_nc { $$ = $1; } | common_exp simp_exp %prec CONCAT_OP { 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 { $$ = mk_binary($1, $3, $2); } | simp_exp '*' simp_exp { $$ = mk_binary($1, $3, $2); } | simp_exp '/' simp_exp { $$ = mk_binary($1, $3, $2); } | simp_exp '%' simp_exp { $$ = mk_binary($1, $3, $2); } | simp_exp '+' simp_exp { $$ = mk_binary($1, $3, $2); } | simp_exp '-' simp_exp { $$ = mk_binary($1, $3, $2); } | LEX_GETLINE opt_variable input_redir { /* * 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 { $2->opcode = Op_postincrement; $$ = mk_assignment($1, NULL, $2); } | variable DECREMENT { $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 right-hand side of a concatenation. */ simp_exp_nc : common_exp IO_IN LEX_GETLINE opt_variable { $$ = mk_getline($3, $4, $1, $2->redir_type); bcfree($2); } /* Binary operators in order of decreasing precedence. */ | simp_exp_nc '^' simp_exp { $$ = mk_binary($1, $3, $2); } | simp_exp_nc '*' simp_exp { $$ = mk_binary($1, $3, $2); } | simp_exp_nc '/' simp_exp { $$ = mk_binary($1, $3, $2); } | simp_exp_nc '%' simp_exp { $$ = mk_binary($1, $3, $2); } | simp_exp_nc '+' simp_exp { $$ = mk_binary($1, $3, $2); } | simp_exp_nc '-' simp_exp { $$ = mk_binary($1, $3, $2); } ; non_post_simp_exp : regexp { $$ = list_create($1); } | '!' simp_exp %prec UNARY { 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, $1); if ($$ == NULL) YYABORT; } | LEX_LENGTH '(' opt_expression_list r_paren { $$ = snode($3, $1); if ($$ == NULL) YYABORT; } | LEX_LENGTH { static short warned1 = FALSE; if (do_lint && ! warned1) { warned1 = TRUE; lintwarn_ln($1->source_line, _("call of `length' without parentheses is not portable")); } $$ = snode(NULL, $1); if ($$ == NULL) YYABORT; } | func_call | variable | INCREMENT variable { $1->opcode = Op_preincrement; $$ = mk_assignment($2, NULL, $1); } | DECREMENT variable { $1->opcode = Op_predecrement; $$ = mk_assignment($2, NULL, $1); } | YNUMBER { $$ = list_create($1); } | YSTRING { $$ = list_create($1); } | '-' simp_exp %prec UNARY { if ($2->lasti->opcode == Op_push_i && ($2->lasti->memory->flags & (STRCUR|STRING)) == 0) { $2->lasti->memory->numbr = -(force_number($2->lasti->memory)); $$ = $2; 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 */ $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; } | variable { $$ = $1; } ; 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 { 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; char *arr = $1->lextok; if ((n = lookup(arr)) != NULL && ! isarray(n)) yyerror(_("use of non-array as array")); $1->memory = variable(arr, Node_var_new); $1->opcode = Op_push_array; $$ = list_prepend($2, $1); } ; variable : simple_variable { 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 { $1->opcode = Op_postincrement; } | DECREMENT { $1->opcode = Op_postdecrement; } | /* empty */ { $$ = NULL; } ; l_brace : '{' opt_nls ; r_brace : '}' opt_nls { yyerrok; } ; r_paren : ')' { yyerrok; } ; opt_semi : /* empty */ | semi ; semi : ';' { yyerrok; } ; colon : ':' { $$ = $1; yyerrok; } ; comma : ',' opt_nls { yyerrok; } ; %% struct token { 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 */ # define NOT_OLD 0x0100 /* feature not in old awk */ # define NOT_POSIX 0x0200 /* feature not in POSIX */ # define GAWKX 0x0400 /* gawk extension */ # define RESX 0x0800 /* Bell Labs Research extension */ # 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(const void *l, const void *r) { struct token *lhs, *rhs; lhs = (struct token *) l; rhs = (struct token *) r; return strcmp(lhs->operator, rhs->operator); } #endif /* * Tokentab is sorted ASCII ascending order, so it can be binary searched. * See check_special(), which sorts the table on EBCDIC systems. * Function pointers come from declarations in awk.h. */ static const struct token tokentab[] = { {"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", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_adump}, #endif {"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", Op_builtin, LEX_BUILTIN, GAWKX|A(0), stopme}, #endif {"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}, }; #if MBS_SUPPORT /* Variable containing the current shift state. */ static mbstate_t cur_mbstate; /* Ring buffer containing current characters. */ #define MAX_CHAR_IN_RING_BUFFER 8 #define RING_BUFFER_SIZE (MAX_CHAR_IN_RING_BUFFER * MB_LEN_MAX) static char cur_char_ring[RING_BUFFER_SIZE]; /* Index for ring buffers. */ static int cur_ring_idx; /* This macro means that last nextc() return a singlebyte character or 1st byte of a multibyte character. */ #define nextc_is_1stbyte (cur_char_ring[cur_ring_idx] == 1) #else /* MBS_SUPPORT */ /* a dummy */ #define nextc_is_1stbyte 1 #endif /* MBS_SUPPORT */ /* getfname --- return name of a builtin function (for pretty printing) */ const char * getfname(NODE *(*fptr)(int)) { int i, j; j = sizeof(tokentab) / sizeof(tokentab[0]); /* linear search, no other way to do it */ for (i = 0; i < j; i++) if (tokentab[i].ptr == fptr) return tokentab[i].operator; return NULL; } /* print_included_from --- print `Included from ..' file names and locations */ 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 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; 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) { if (thisline == NULL) { cp = lexeme; if (*cp == '\n') { cp--; mesg = _("unexpected newline or end of string"); } for (; cp != lexptr_begin && *cp != '\n'; --cp) continue; if (*cp == '\n') cp++; thisline = cp; } /* NL isn't guaranteed */ bp = lexeme; while (bp < lexend && *bp && *bp != '\n') bp++; } else { thisline = end_of_file_line; bp = thisline + strlen(thisline); } /* * Saving and restoring *bp keeps valgrind happy, * since the guts of glibc uses strlen, even though * we're passing an explict precision. Sigh. * * 8/2003: We may not need this anymore. */ save = *bp; *bp = '\0'; msg("%.*s", (int) (bp - thisline), thisline); *bp = save; va_start(args, m); if (mesg == NULL) mesg = m; count = (bp - thisline) + strlen(mesg) + 2 + 1; emalloc(buf, char *, count, "yyerror"); bp = buf; if (lexptr != NULL) { scan = thisline; while (scan < lexeme) if (*scan++ == '\t') *bp++ = '\t'; else *bp++ = ' '; *bp++ = '^'; *bp++ = ' '; } strcpy(bp, mesg); err("", buf, args); va_end(args); efree(buf); } /* mk_program --- create a single list of instructions */ static INSTRUCTION * mk_program() { INSTRUCTION *cp, *tmp; #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] 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; 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); } 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) 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; error(_("can't open source file `%s' for reading (%s)"), in, strerror(errno)); errcount++; lexeof = TRUE; return sourcefile->src; } sourcefile->fd = fd; l = optimal_bufsize(fd, &sbuf); /* * Make sure that something silly like * AWKBUFSIZE=8 make check * works ok. */ #define A_DECENT_BUFFER_SIZE 128 if (l < A_DECENT_BUFFER_SIZE) l = A_DECENT_BUFFER_SIZE; #undef A_DECENT_BUFFER_SIZE sourcefile->bufsize = l; newfile = TRUE; emalloc(sourcefile->buf, char *, sourcefile->bufsize, "get_src_buf"); lexptr = lexptr_begin = lexeme = sourcefile->buf; savelen = 0; sourceline = 1; thisline = NULL; } else { /* * Here, we retain the current source line in the beginning of the buffer. */ int offset; for (scan = lexeme; scan > lexptr_begin; scan--) if (*scan == '\n') { scan++; break; } savelen = lexptr - scan; offset = lexptr - lexeme; if (savelen > 0) { /* * 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. */ 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; } } return sourcefile->buf; } /* tokadd --- add a character to the token buffer */ #define tokadd(x) (*tok++ = (x), tok == tokend ? tokexpand() : tok) /* tokexpand --- grow the token buffer */ static char * tokexpand() { static int toksize; int tokoffset; if (tokstart != NULL) { tokoffset = tok - tokstart; toksize *= 2; erealloc(tokstart, char *, toksize, "tokexpand"); tok = tokstart + tokoffset; } else { toksize = 60; emalloc(tokstart, char *, toksize, "tokexpand"); tok = tokstart; } tokend = tokstart + toksize; return tok; } /* nextc --- get the next input character */ #if MBS_SUPPORT static int nextc(void) { if (gawk_mb_cur_max > 1) { again: if (lexeof) return END_FILE; if (lexptr == NULL || lexptr >= lexend) { if (get_src_buf()) goto again; return END_SRC; } /* Update the buffer index. */ cur_ring_idx = (cur_ring_idx == RING_BUFFER_SIZE - 1)? 0 : cur_ring_idx + 1; /* Did we already check the current character? */ if (cur_char_ring[cur_ring_idx] == 0) { /* No, we need to check the next character on the buffer. */ 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); if (mbclen == 1 || mbclen == (size_t)-1 || mbclen == 0) { /* It is a singlebyte character, non-complete multibyte character or EOF. We treat it as a singlebyte character. */ cur_char_ring[work_ring_idx] = 1; break; } else if (mbclen == (size_t)-2) { /* It is not a complete multibyte character. */ cur_char_ring[work_ring_idx] = idx + 1; } else { /* mbclen > 1 */ cur_char_ring[work_ring_idx] = mbclen; break; } work_ring_idx = (work_ring_idx == RING_BUFFER_SIZE - 1)? 0 : work_ring_idx + 1; } cur_mbstate = tmp_state; /* Put a mark on the position on which we write next character. */ work_ring_idx = (work_ring_idx == RING_BUFFER_SIZE - 1)? 0 : work_ring_idx + 1; cur_char_ring[work_ring_idx] = 0; } return (int) (unsigned char) *lexptr++; } 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 */ int nextc() { do { if (lexeof) return END_FILE; if (lexptr && lexptr < lexend) return ((int) (unsigned char) *lexptr++); } while (get_src_buf()); return END_SRC; } #endif /* MBS_SUPPORT */ /* pushback --- push a character back on the input */ static inline void pushback(void) { #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 (! lexeof && lexptr && lexptr > lexptr_begin ? lexptr-- : lexptr); } /* allow_newline --- allow newline after &&, ||, ? and : */ static void allow_newline(void) { int c; for (;;) { c = nextc(); if (c == END_FILE) { pushback(); break; } if (c == '#') { while ((c = nextc()) != '\n' && c != END_FILE) continue; if (c == END_FILE) { pushback(); break; } } if (c == '\n') sourceline++; if (! isspace(c)) { pushback(); break; } } } /* 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) { 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; int inhex = FALSE; int intlstr = FALSE; #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 __EMX__ /* * added for OS/2's extproc feature of cmd.exe * (like #! in BSD sh) */ if (strncasecmp(lexptr, "extproc ", 8) == 0) { while (*lexptr && *lexptr != '\n') lexptr++; } #endif lexeme = lexptr; thisline = NULL; if (want_regexp) { int in_brack = 0; /* count brackets, [[:alnum:]] allowed */ /* * Counting brackets is non-trivial. [[] is ok, * and so is [\]], with a point being that /[/]/ as a regexp * constant has to work. * * Do not count [ or ] if either one is preceded by a \. * A `[' should be counted if * a) it is the first one so far (in_brack == 0) * b) it is the `[' in `[:' * A ']' should be counted if not preceded by a \, since * it is either closing `:]' or just a plain list. * According to POSIX, []] is how you put a ] into a set. * Try to handle that too. * * The code for \ handles \[ and \]. */ want_regexp = FALSE; tok = tokstart; for (;;) { c = nextc(); if (gawk_mb_cur_max == 1 || nextc_is_1stbyte) switch (c) { case '[': /* one day check for `.' and `=' too */ if (nextc() == ':' || in_brack == 0) in_brack++; pushback(); break; case ']': if (tokstart[0] == '[' && (tok == tokstart + 1 || (tok == tokstart + 2 && tokstart[1] == '^'))) /* do nothing */; else in_brack--; break; case '\\': if ((c = nextc()) == END_FILE) { pushback(); yyerror(_("unterminated regexp ends with `\\' at end of file")); goto end_regexp; /* kludge */ } else if (c == '\n') { sourceline++; continue; } else { tokadd('\\'); tokadd(c); continue; } break; case '/': /* end of the regexp */ if (in_brack > 0) break; end_regexp: yylval = GET_INSTRUCTION(Op_token); yylval->lextok = estrdup(tokstart, tok - tokstart); if (do_lint) { int peek = nextc(); pushback(); if (peek == 'i' || peek == 's') { if (source) lintwarn( _("%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"), source, sourceline, peek); else lintwarn( _("tawk regex modifier `/.../%c' doesn't work in gawk"), peek); } } return lasttok = REGEXP; case '\n': pushback(); yyerror(_("unterminated regexp")); goto end_regexp; /* kludge */ case END_FILE: pushback(); yyerror(_("unterminated regexp at end of file")); goto end_regexp; /* kludge */ } tokadd(c); } } retry: /* skipping \r is a hack, but windows is just too pervasive. sigh. */ while ((c = nextc()) == ' ' || c == '\t' || c == '\r') continue; lexeme = lexptr ? lexptr - 1 : lexptr; thisline = NULL; tok = tokstart; #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 == END_FILE) return lasttok = NEWLINE_EOF; } sourceline++; return lasttok = NEWLINE; case '@': return lasttok = '@'; case '\\': #ifdef RELAXED_CONTINUATION /* * This code puports to allow comments and/or whitespace * after the `\' at the end of a line used for continuation. * Use it at your own risk. We think it's a bad idea, which * is why it's not on by default. */ if (! do_traditional) { /* strip trailing white-space and/or comment */ while ((c = nextc()) == ' ' || c == '\t' || c == '\r') continue; if (c == '#') { static short warned = FALSE; if (do_lint && ! warned) { warned = TRUE; lintwarn( _("use of `\\ #...' line continuation is not portable")); } while ((c = nextc()) != '\n') if (c == END_FILE) break; } pushback(); } #endif /* RELAXED_CONTINUATION */ 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")); return lasttok = LEX_EOF; } break; case ':': case '?': yylval = GET_INSTRUCTION(Op_cond_exp); if (! do_posix) allow_newline(); return lasttok = c; /* * in_parens is undefined unless we are parsing a print * statement (in_print), but why bother with a check? */ case ')': in_parens--; return lasttok = c; case '(': in_parens++; return lasttok = c; case '$': yylval = GET_INSTRUCTION(Op_field_spec); return lasttok = c; case '{': if (++in_braces == 1) firstline = sourceline; case ';': case ',': case '[': return lasttok = c; case ']': 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 = 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 ^= */ static int did_warn_op = FALSE, did_warn_assgn = FALSE; if (nextc() == '=') { if (! did_warn_assgn) { did_warn_assgn = TRUE; if (do_lint) lintwarn(_("POSIX does not allow operator `**='")); if (do_lint_old) warning(_("old awk does not support operator `**='")); } yylval = GET_INSTRUCTION(Op_assign_exp); return ASSIGNOP; } else { pushback(); if (! did_warn_op) { did_warn_op = TRUE; if (do_lint) lintwarn(_("POSIX does not allow operator `**'")); 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 '/': if (nextc() == '=') { pushback(); return lasttok = SLASH_BEFORE_EQUAL; } pushback(); yylval = GET_INSTRUCTION(Op_quotient); return lasttok = '/'; case '%': if (nextc() == '=') { yylval = GET_INSTRUCTION(Op_assign_mod); return lasttok = ASSIGNOP; } pushback(); yylval = GET_INSTRUCTION(Op_mod); return lasttok = '%'; case '^': { static int did_warn_op = FALSE, did_warn_assgn = FALSE; if (nextc() == '=') { if (do_lint_old && ! did_warn_assgn) { did_warn_assgn = TRUE; warning(_("operator `^=' is not supported in old awk")); } yylval = GET_INSTRUCTION(Op_assign_exp); return lasttok = ASSIGNOP; } pushback(); if (do_lint_old && ! did_warn_op) { did_warn_op = TRUE; warning(_("operator `^' is not supported in old awk")); } yylval = GET_INSTRUCTION(Op_exp); return lasttok = '^'; } case '+': if ((c = nextc()) == '=') { yylval = GET_INSTRUCTION(Op_assign_plus); return lasttok = ASSIGNOP; } if (c == '+') { yylval = GET_INSTRUCTION(Op_symbol); return lasttok = INCREMENT; } pushback(); yylval = GET_INSTRUCTION(Op_plus); return lasttok = '+'; case '!': if ((c = nextc()) == '=') { yylval = GET_INSTRUCTION(Op_notequal); return lasttok = RELOP; } if (c == '~') { yylval = GET_INSTRUCTION(Op_nomatch); return lasttok = MATCHOP; } pushback(); yylval = GET_INSTRUCTION(Op_symbol); return lasttok = '!'; case '<': if (nextc() == '=') { yylval = GET_INSTRUCTION(Op_leq); return lasttok = RELOP; } yylval = GET_INSTRUCTION(Op_less); pushback(); return lasttok = '<'; case '=': if (nextc() == '=') { yylval = GET_INSTRUCTION(Op_equal); return lasttok = RELOP; } yylval = GET_INSTRUCTION(Op_assign); pushback(); return lasttok = ASSIGN; case '>': if ((c = nextc()) == '=') { yylval = GET_INSTRUCTION(Op_geq); return lasttok = RELOP; } else if (c == '>') { yylval = GET_INSTRUCTION(Op_symbol); yylval->redir_type = redirect_append; return lasttok = IO_OUT; } pushback(); if (in_print && in_parens == 0) { yylval = GET_INSTRUCTION(Op_symbol); yylval->redir_type = redirect_output; return lasttok = IO_OUT; } yylval = GET_INSTRUCTION(Op_greater); return lasttok = '>'; case '~': yylval = GET_INSTRUCTION(Op_match); return lasttok = MATCHOP; case '}': /* * Added did newline stuff. Easier than * hacking the grammar. */ if (did_newline) { did_newline = FALSE; if (--in_braces == 0) lastline = sourceline; return lasttok = c; } did_newline++; --lexptr; /* pick up } next time */ return lasttok = NEWLINE; case '"': string: esc_seen = FALSE; while ((c = nextc()) != '"') { if (c == '\n') { pushback(); yyerror(_("unterminated string")); return lasttok = LEX_EOF; } if ((gawk_mb_cur_max == 1 || nextc_is_1stbyte) && c == '\\') { c = nextc(); if (c == '\n') { sourceline++; continue; } esc_seen = TRUE; if (! want_source || c != '"') tokadd('\\'); } if (c == END_FILE) { pushback(); yyerror(_("unterminated string")); return lasttok = LEX_EOF; } tokadd(c); } 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->memory->flags |= INTLSTR; intlstr = FALSE; if (do_intl) dumpintlstr(yylval->memory->stptr, yylval->memory->stlen); } return lasttok = YSTRING; case '-': if ((c = nextc()) == '=') { yylval = GET_INSTRUCTION(Op_assign_minus); return lasttok = ASSIGNOP; } if (c == '-') { yylval = GET_INSTRUCTION(Op_symbol); return lasttok = DECREMENT; } pushback(); yylval = GET_INSTRUCTION(Op_minus); return lasttok = '-'; case '.': c = nextc(); pushback(); if (! isdigit(c)) return lasttok = '.'; else c = '.'; /* FALL THROUGH */ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': /* It's a number */ for (;;) { int gotnumber = FALSE; tokadd(c); switch (c) { case 'x': case 'X': if (do_traditional) goto done; if (tok == tokstart + 2) { int peek = nextc(); if (isxdigit(peek)) { inhex = TRUE; pushback(); /* following digit */ } else { pushback(); /* x or X */ goto done; } } break; case '.': /* period ends exponent part of floating point number */ if (seen_point || seen_e) { gotnumber = TRUE; break; } seen_point = TRUE; break; case 'e': case 'E': if (inhex) break; if (seen_e) { gotnumber = TRUE; break; } seen_e = TRUE; if ((c = nextc()) == '-' || c == '+') { int c2 = nextc(); if (isdigit(c2)) { tokadd(c); tokadd(c2); } else { pushback(); /* non-digit after + or - */ pushback(); /* + or - */ pushback(); /* e or E */ } } else if (! isdigit(c)) { pushback(); /* character after e or E */ pushback(); /* e or E */ } else { pushback(); /* digit */ } break; case 'a': case 'A': case 'b': case 'B': case 'c': case 'C': case 'D': case 'd': case 'f': case 'F': if (do_traditional || ! inhex) goto done; /* fall through */ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': break; default: done: gotnumber = TRUE; } if (gotnumber) break; c = nextc(); } pushback(); tokadd('\0'); yylval = GET_INSTRUCTION(Op_push_i); if (! do_traditional && isnondecimal(tokstart, FALSE)) { if (do_lint) { 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->memory = mk_number(nondec2awknum(tokstart, strlen(tokstart)), PERM|NUMCUR|NUMBER); } else yylval->memory = mk_number(atof(tokstart), PERM|NUMCUR|NUMBER); return lasttok = YNUMBER; case '&': if ((c = nextc()) == '&') { yylval = GET_INSTRUCTION(Op_and); allow_newline(); return lasttok = LEX_AND; } pushback(); yylval = GET_INSTRUCTION(Op_symbol); return lasttok = '&'; case '|': if ((c = nextc()) == '|') { yylval = GET_INSTRUCTION(Op_or); allow_newline(); return lasttok = LEX_OR; } else if (! do_traditional && c == '&') { 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 = GET_INSTRUCTION(Op_symbol); yylval->redir_type = redirect_pipe; return lasttok = IO_OUT; } else { 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); return lasttok = LEX_EOF; } /* * Lots of fog here. Consider: * * print "xyzzy"$_"foo" * * Without the check for ` lasttok != '$' ', this is parsed as * * print "xxyzz" $(_"foo") * * With the check, it is "correctly" parsed as three * string concatenations. Sigh. This seems to be * "more correct", but this is definitely one of those * occasions where the interactions are funny. */ if (! do_traditional && c == '_' && lasttok != '$') { if ((c = nextc()) == '"') { intlstr = TRUE; goto string; } pushback(); c = '_'; } /* it's some type of name-type-thing. Find its length. */ tok = tokstart; while (c != END_FILE && is_identchar(c)) { tokadd(c); c = nextc(); } tokadd('\0'); 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) && ! (warntab[mid] & GAWKX)) { lintwarn(_("`%s' is a gawk extension"), tokentab[mid].operator); warntab[mid] |= GAWKX; } if ((tokentab[mid].flags & RESX) && ! (warntab[mid] & RESX)) { lintwarn(_("`%s' is a Bell Labs extension"), tokentab[mid].operator); 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) && ! (warntab[mid] & NOT_OLD) ) { warning(_("`%s' is not supported in old awk"), tokentab[mid].operator); warntab[mid] |= NOT_OLD; } 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 { 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) { goto_warned = TRUE; lintwarn(_("`goto' considered harmful!\n")); } return lasttok = NAME; } #undef GET_INSTRUCTION #undef NEWLINE_EOF } /* mk_symbol --- allocates a symbol for the symbol table. */ NODE * mk_symbol(NODETYPE type, NODE *value) { NODE *r; 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 --- instructions for builtin functions. Checks for arg. count and supplies defaults where possible. */ static INSTRUCTION * snode(INSTRUCTION *subn, INSTRUCTION *r) { INSTRUCTION *arg; INSTRUCTION *ip; NODE *n; int nexp = 0; int args_allowed; int idx = r->builtin_idx; 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) { 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 (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; arg = subn->nexti->lasti->nexti; /* 2nd arg list */ (void) mk_rexp(arg); if (nexp == 3) { /* 3rd argument there */ if (do_lint && ! warned) { warned = TRUE; lintwarn(_("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_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) 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 && ! warned) { warned = TRUE; lintwarn(_("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->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->nexti->lasti->memory; if ((str->flags & INTLSTR) != 0) warning(_("use of dcgettext(_\"...\") is incorrect: remove leading underscore")); /* don't dump it, the lexer already did */ else dumpintlstr(str->stptr, str->stlen); } else if (do_intl /* --gen-po */ && r->builtin == do_dcngettext /* dcngettext(...) */ && 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->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 if (subn != NULL) { r->expr_count = count_expressions(&subn, FALSE); return list_append(subn, r); } r->expr_count = 0; return list_create(r); } /* append_param --- append PNAME to the list of parameters * for the current function. */ static void append_param(char *pname) { static NODE *savetail = NULL; NODE *p; 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(INSTRUCTION *fp, NODE *func) { NODE *np; const char *fname, **names; int count, i, j, dups; NODE *params; if (func == NULL) /* error earlier */ return TRUE; fname = func->param; count = func->param_cnt; params = func->rnode; if (count == 0) /* no args, no problem */ return FALSE; if (params == NULL) /* error earlier */ return TRUE; emalloc(names, const char **, count * sizeof(char *), "dup_parms"); i = 0; for (np = params; np != NULL; np = np->rnode) { if (np->param == NULL) { /* error earlier, give up, go home */ efree(names); return TRUE; } names[i++] = np->param; } dups = 0; for (i = 1; i < count; i++) { for (j = 0; j < i; j++) { if (strcmp(names[i], names[j]) == 0) { dups++; error_ln(fp->source_line, _("function `%s': parameter #%d, `%s', duplicates parameter #%d"), fname, i + 1, names[j], j+1); } } } efree(names); return (dups > 0 ? TRUE : FALSE); } /* parms_shadow --- check if parameters shadow globals */ static int parms_shadow(INSTRUCTION *pc, int *shadow) { 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 pcount = func->lnode->param_cnt; 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 < pcount; i++) { if (lookup(func->parmlist[i]) != NULL) { warning( _("function `%s': parameter `%s' shadows global variable"), fname, func->parmlist[i]); ret = TRUE; } } *shadow |= ret; return 0; } /* * 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_symbol(char *name, NODE *value) { NODE *hp; size_t len; int bucket; if (install_func) (*install_func)(name); var_count++; len = strlen(name); bucket = hash(name, len, (unsigned long) HASHSIZE, NULL); getnode(hp); hp->type = Node_hashnode; hp->hnext = variables[bucket]; variables[bucket] = hp; hp->hlength = len; hp->hvalue = value; hp->hname = name; hp->hvalue->vname = name; return hp->hvalue; } /* lookup --- find the most recent hash node for name installed by install_symbol */ NODE * lookup(const char *name) { 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 && strncmp(bucket->hname, name, len) == 0) return bucket->hvalue; return NULL; } /* sym_comp --- compare two symbol (variable or function) names */ static int sym_comp(const void *v1, const void *v2) { const NODE *const *npp1, *const *npp2; const NODE *n1, *n2; int minlen; npp1 = (const NODE *const *) v1; npp2 = (const NODE *const *) v2; n1 = *npp1; n2 = *npp2; if (n1->hlength > n2->hlength) minlen = n1->hlength; else minlen = n2->hlength; return strncmp(n1->hname, n2->hname, minlen); } /* valinfo --- dump var info */ void valinfo(NODE *n, int (*print_func)(FILE *, const char *, ...), FILE *fp) { 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) print_func(fp, "%.17g\n", n->numbr); else if (n->flags & STRCUR) { pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', FALSE); print_func(fp, "\n"); } else if (n->flags & NUMCUR) print_func(fp, "%.17g\n", n->numbr); else print_func(fp, "?? flags %s\n", flags2str(n->flags)); } /* get_varlist --- list of global variables */ NODE ** get_varlist() { int i, j; NODE **table; NODE *p; 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 *), 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; table = get_varlist(); for (i = 0; (p = table[i]) != NULL; i++) { if (p->hvalue->type == Node_func) continue; print_func(fp, "%.*s: ", (int) p->hlength, p->hname); if (p->hvalue->type == Node_var_array) print_func(fp, "array, %ld elements\n", p->hvalue->table_size); else if (p->hvalue->type == Node_var_new) print_func(fp, "untyped variable\n"); else if (p->hvalue->type == Node_var) valinfo(p->hvalue->var_value, print_func, fp); } efree(table); } /* 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)); } /* release_all_vars --- free all variable memory */ void release_all_vars() { int i; NODE *p, *next; for (i = 0; i < HASHSIZE; i++) { for (p = variables[i]; p != NULL; p = next) { next = p->hnext; if (p->hvalue->type == Node_func) continue; else if (p->hvalue->type == Node_var_array) assoc_clear(p->hvalue); else if (p->hvalue->type != Node_var_new) unref(p->hvalue->var_value); efree(p->hname); freenode(p->hvalue); freenode(p); } } } /* dump_funcs --- print all functions */ void dump_funcs() { if (func_count <= 0) return; (void) foreach_func((int (*)(INSTRUCTION *, void *)) pp_func, TRUE, (void *) 0); } /* shadow_funcs --- check all functions for parameters that shadow globals */ void shadow_funcs() { static int calls = 0; int shadow = FALSE; if (func_count <= 0) return; if (calls++ != 0) fatal(_("shadow_funcs() called twice!")); (void) foreach_func((int (*)(INSTRUCTION *, void *)) parms_shadow, TRUE, &shadow); /* End with fatal if the user requested it. */ if (shadow && lintfunc != warning) lintwarn(_("there were shadowed variables.")); } /* * 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 * as value. * * Extra work, build up and save a list of the parameter names in a table * and hang it off params->parmlist. This is used to set the `vname' field * of each function parameter during a function call. See eval.c. */ static int func_install(INSTRUCTION *func, INSTRUCTION *def) { 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) { 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 */ 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) { 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 = mk_symbol(Node_func, params); (void) install_symbol(fname, thisfunc); thisfunc->code_ptr = func; func->func_body = thisfunc; for (n = params->rnode; n != NULL; n = n->rnode) pcount++; if (pcount != 0) { 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(fname, FUNC_DEFINE); func_count++; /* used in profiler / pretty printer */ remove_params: /* remove params from symbol table */ pop_params(params->rnode); return 0; } /* remove_symbol --- remove a variable from the symbol table */ NODE * remove_symbol(char *name) { NODE *bucket, **save; size_t len; len = strlen(name); save = &(variables[hash(name, len, (unsigned long) HASHSIZE, NULL)]); for (bucket = *save; bucket != NULL; bucket = bucket->hnext) { if (len == bucket->hlength && strncmp(bucket->hname, name, len) == 0) { var_count--; *save = bucket->hnext; return bucket; } save = &(bucket->hnext); } return NULL; } /* pop_params --- remove list of function parameters from symbol table */ /* * pop parameters out of the symbol table. do this in reverse order to * avoid reading freed memory if there were duplicated parameters. */ static void pop_params(NODE *params) { NODE *hp; if (params == NULL) return; pop_params(params->rnode); hp = remove_symbol(params->param); if (hp != NULL) freenode(hp); } /* make_param --- make NAME into a function parameter */ static NODE * make_param(char *name) { NODE *r; getnode(r); r->type = Node_param_list; r->rnode = NULL; r->param_cnt = param_counter++; return (install_symbol(name, r)); } static struct fdesc { char *name; short used; short defined; struct fdesc *next; } *ftable[HASHSIZE]; /* func_use --- track uses and definitions of functions */ static void func_use(const char *name, enum defref how) { struct fdesc *fp; int len; int ind; len = strlen(name); ind = hash(name, len, HASHSIZE, NULL); for (fp = ftable[ind]; fp != NULL; fp = fp->next) { if (strcmp(fp->name, name) == 0) { if (how == FUNC_DEFINE) fp->defined++; else fp->used++; return; } } /* not in the table, fall through to allocate a new one */ emalloc(fp, struct fdesc *, sizeof(struct fdesc), "func_use"); memset(fp, '\0', sizeof(struct fdesc)); emalloc(fp->name, char *, len + 1, "func_use"); strcpy(fp->name, name); if (how == FUNC_DEFINE) fp->defined++; else fp->used++; fp->next = ftable[ind]; ftable[ind] = fp; } /* check_funcs --- verify functions that are called but not defined */ static void check_funcs() { 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 /* making this the default breaks old code. sigh. */ if (fp->defined == 0) { error( _("function `%s' called but never defined"), fp->name); errcount++; } #else if (do_lint && fp->defined == 0) lintwarn( _("function `%s' called but never defined"), fp->name); #endif if (do_lint && fp->used == 0) { 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; efree(fp->name); efree(fp); } ftable[i] = NULL; } } /* param_sanity --- look for parameters that are regexp constants */ static void param_sanity(INSTRUCTION *arglist) { 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; } /* 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); emalloc(dv, struct deferred_variable *, sizeof(*dv)+sl, "register_deferred_variable"); dv->load_func = load_func; dv->next = deferred_variables; memcpy(dv->name, name, sl+1); deferred_variables = dv; } /* variable --- make sure NAME is in the symbol table */ NODE * variable(char *name, NODETYPE type) { NODE *r; if ((r = lookup(name)) != NULL) { 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. */ if (type == Node_var) r = mk_symbol(type, Nnull_string); else r = mk_symbol(type, (NODE *) NULL); return install_symbol(name, r); } if (strcmp(name, dv->name) == 0) { r = (*dv->load_func)(); break; } } } efree(name); return r; } /* make_regnode --- make a regular expression node */ static NODE * make_regnode(int type, NODE *exp) { NODE *n; getnode(n); 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; } /* 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(OPCODE type) { switch (type) { 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 */ } return FALSE; } /* make_assignable --- make this operand an assignable one if posiible */ static INSTRUCTION * make_assignable(INSTRUCTION *ip) { 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 NULL; } /* stopme --- for debugging */ NODE * stopme(int nargs ATTRIBUTE_UNUSED) { return (NODE *) 0; } /* dumpintlstr --- write out an initial .po file entry for the string */ static void dumpintlstr(const char *str, size_t len) { char *cp; /* See the GNU gettext distribution for details on the file format */ if (source != NULL) { /* ala the gettext sources, remove leading `./'s */ for (cp = source; cp[0] == '.' && cp[1] == '/'; cp += 2) continue; printf("#: %s:%d\n", cp, sourceline); } printf("msgid "); pp_string_fp(fprintf, stdout, str, len, '"', TRUE); putchar('\n'); printf("msgstr \"\"\n\n"); fflush(stdout); } /* dumpintlstr2 --- write out an initial .po file entry for the string and its plural */ static void dumpintlstr2(const char *str1, size_t len1, const char *str2, size_t len2) { char *cp; /* See the GNU gettext distribution for details on the file format */ if (source != NULL) { /* ala the gettext sources, remove leading `./'s */ for (cp = source; cp[0] == '.' && cp[1] == '/'; cp += 2) continue; printf("#: %s:%d\n", cp, sourceline); } printf("msgid "); pp_string_fp(fprintf, stdout, str1, len1, '"', TRUE); putchar('\n'); printf("msgid_plural "); pp_string_fp(fprintf, stdout, str2, len2, '"', TRUE); putchar('\n'); printf("msgstr[0] \"\"\nmsgstr[1] \"\"\n\n"); fflush(stdout); } /* isarray --- can this type be subscripted? */ static int isarray(NODE *n) { switch (n->type) { case Node_var_new: case Node_var_array: return TRUE; case Node_param_list: return (n->flags & FUNC) == 0; case Node_array_ref: cant_happen(); break; default: break; /* keeps gcc -Wall happy */ } 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 check_special(const char *name) { int low, high, mid; int i; #if 'a' == 0x81 /* it's EBCDIC */ static int did_sort = FALSE; if (! did_sort) { 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) { mid = (low + high) / 2; i = *name - tokentab[mid].operator[0]; if (i == 0) i = strcmp(name, tokentab[mid].operator); if (i < 0) /* token < mid */ high = mid - 1; else if (i > 0) /* token > mid */ low = mid + 1; else { if ((do_traditional && (tokentab[mid].flags & GAWKX)) || (do_posix && (tokentab[mid].flags & NOT_POSIX))) return -1; return mid; } } return -1; } /* * This provides a private version of functions that act like VMS's * variable-length record filesystem, where there was a bug on * certain source files. */ static FILE *fp = NULL; /* read_one_line --- return one input line at a time. mainly for debugging. */ static ssize_t read_one_line(int fd, void *buffer, size_t count) { char buf[BUFSIZ]; /* Minor potential memory leak here. Too bad. */ if (fp == NULL) { fp = fdopen(fd, "r"); if (fp == NULL) { fprintf(stderr, "ugh. fdopen: %s\n", strerror(errno)); gawk_exit(EXIT_FAILURE); } } if (fgets(buf, sizeof buf, fp) == NULL) return 0; memcpy(buffer, buf, strlen(buf)); return strlen(buf); } /* one_line_close --- close the open file being read with read_one_line() */ static int one_line_close(int fd) { int ret; if (fp == NULL || fd != fileno(fp)) fatal("debugging read/close screwed up!"); ret = fclose(fp); fp = NULL; return ret; } gawk-4.0.1+dfsg.orig/pc/0000755000175000017500000000000011734667137013766 5ustar schotschotgawk-4.0.1+dfsg.orig/pc/ChangeLog0000644000175000017500000000644211734667137015546 0ustar schotschot2012-03-28 Arnold D. Robbins * 4.0.1: Release tar ball made. 2012-03-20 Arnold D. Robbins * Makefile.tst (printfbad3): New test. 2012-03-14 Eli Zaretskii * gawkmisc.pc (btowc): New version for DJGPP. 2012-03-01 Scott Deifik * Makefile.tst: Sync with mainline version. 2012-03-01 Eli Zaretskii * Makefile: Quiet confusing info messages from the linker when gawk is linked against readline as a shared library. 2012-02-22 Eli Zaretskii * Makefile.tst: Update CMP and CP definitions, add "Expect xxxx to fail with MinGW" messages as needed. 2012-02-15 Arnold D. Robbins * gawkmisc.pc (execvp): Modify signature, return -1 on error. 2012-02-11 Eli Zaretskii Fix dependencies in pc/Makefile. * Makefile ($(ALLOBJS) $(LIBOBJS) eval_p$O profile_p$O): Add eval_d$O, debug$O, and command$O. 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.sed: Comment out "#undef HAVE_LIBREADLINE", so that it could be #define'd on the compiler command line. 2012-02-10 Arnold D. Robbins * gawkmisc.pc (execvp): New function based on code from Eli Zaretskii to make dgawk's restarting the debugger work. 2012-01-27 Scott Deifik * Makefile.tst: Sync with mainline version. 2011-12-06 Scott Deifik * Makefile.tst: Sync with mainline version. Use testoutcmp.awk script. 2011-12-06 Arnold D. Robbins * testoutcmp.awk: Script to replace cmd for DJGPP. 2011-11-01 Scott Deifik * config.sed: Additional update. 2011-10-29 Eli Zaretskii * 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. 2011-10-27 Scott Deifik * Makefile.tst: Sync with mainline version. 2011-10-24 Eli Zaretskii * 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 . * popen.h (system) [__MINGW32__]: Redirect to os_system. * 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. * configpk.sed: * config.sed: * make-config.bat: New files, to produce pc/config.h from the top-level configh.in file. 2011-10-18 Juan Manuel Guerrero * Makefile: doc target to create all documentation files. 2011-09-30 Eli Zaretskii * config.h: Update packaging related versions. 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. gawk-4.0.1+dfsg.orig/pc/Makefile.tst0000644000175000017500000020213711734665352016241 0ustar schotschot# Makefile for GNU Awk test suite. # # Copyright (C) 1988-2012 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 # ============================================================================ # MS-DOS & OS/2 Notes: READ THEM! # ============================================================================ # As of version 2.91, efforts to make this makefile run in MS-DOS and OS/2 # have started in earnest. The following steps need to be followed in order # to run this makefile: # # 1. The first thing that you will need to do is to convert all of the # files ending in ".ok" in the test directory, all of the files ending # in ".good" (or ".goo") in the test/reg directory, and mmap8k.in from # having a linefeed to having carriage return/linefeed at the end of each # line. There are various public domain UNIX to DOS converters and any # should work. Alternatively, you can use diff instead of cmp--most # versions of diff don't care about how the lines end. # # 2. You will need an sh-compatible shell. Please refer to the "README.pc" # file in the README_d directory for information about obtaining a copy. # You will also need various UNIX utilities. At a minimum, you will # need: rm, tr, cmp (or diff, see above), cat, wc, and sh. # You should also have a UNIX-compatible date program. # # The makefile has only been tested with dmake 3.8 and DJGPP Make 3.74 or # later. After making all of these changes, typing "dmake check extra" # or "make check extra" (with DJGPP Make) should run successfully. # The Bash shell (compiled with djgpp) works very well with the # 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. # You will almost certainly need to change some of the values (MACROS) # defined on the next few lines. # This won't work unless you have "sh" and set SHELL equal to it (Make 3.74 # or later which comes with DJGPP will work with SHELL=/bin/sh if you have # sh.exe anywhere on your PATH). #SHELL = e:\bin\sh.exe SHELL = /bin/sh # Point to gawk AWK = ../gawk.exe # Also point to gawk but for DOS commands needing backslashes. We need # the forward slash version too or 'arrayparam' fails. AWK2 = '..\gawk.exe' AWKPROG = ../gawk.exe # 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 # mmap8k.in has CR/LFs or that you've used diff. # # The following comment is for users of OSs which support long file names # (such as Windows 95) for all versions of gawk (both 16 & 32-bit). # If you use a shell which doesn't support long filenames, temporary files # created by this makefile will be truncated by your shell. "_argarra" is an # example of this. If $(CMP) is a DJGPP-compiled program, then it will fail # because it looks for the long filename (eg. _argarray). To fix this, you # need to set LFN=n in your shell's environment. # NOTE: Setting LFN in the makefile most probably won't help you because LFN # needs to be an environment variable. #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 -u #CMP = gcmp # 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 MV = cmd.exe /c ren #MKDIR = mkdir #MKDIR = gmkdir #MKDIR = : && command -c mkdir MKDIR = command.com /c mkdir # Set your unix-style date function here #DATE = date DATE = gdate # MS-DOS and OS/2 use ; as a PATH delimiter PATH_SEPARATOR = ; # ============================================================================ # You shouldn't need to modify anything below this line. # ============================================================================ srcdir = . abs_builddir = . # Get rid of core files when cleaning and generated .ok file CLEANFILES = core core.* fmtspcl.ok # 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 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 \ 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 = \ 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 = 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 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc # List of the tests which should be run with --lint option: 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 # Message stuff is to make it a little easier to follow. # Make the pass-fail last and dependent on others to avoid # spurious errors if `make -j' in effect. check: msg \ printlang \ basic-msg-start basic basic-msg-end \ unix-msg-start unix-tests unix-msg-end \ extend-msg-start gawk-extensions extend-msg-end \ machine-msg-start machine-tests machine-msg-end \ charset-msg-start charset-tests charset-msg-end \ pass-fail basic: $(BASIC_TESTS) unix-tests: $(UNIX_TESTS) gawk-extensions: $(GAWK_EXT_TESTS) charset-tests: $(LOCALE_CHARSET_TESTS) extra: $(EXTRA_TESTS) inet inet: inetmesg $(INET_TESTS) machine-tests: $(MACHINE_TESTS) msg:: @echo "" @echo "Any output from $(CMP) is bad news, although some differences" @echo "in floating point values are probably benign -- in particular," @echo "some systems may omit a leading zero and the floating point" @echo "precision may lead to slightly different output in a few cases." printlang:: @$(AWK) -f $(srcdir)/printlang.awk basic-msg-start: @echo "======== Starting basic tests ========" basic-msg-end: @echo "======== Done with basic tests ========" unix-msg-start: @echo "======== Starting Unix tests ========" unix-msg-end: @echo "======== Done with Unix tests ========" extend-msg-start: @echo "======== Starting gawk extension tests ========" extend-msg-end: @echo "======== Done with gawk extension tests ========" machine-msg-start: @echo "======== Starting machine-specific tests ========" machine-msg-end: @echo "======== Done with machine-specific tests ========" charset-msg-start: @echo "======== Starting tests that can vary based on character set or locale support ========" charset-msg-end: @echo "======== Done with tests that can vary based on character set or locale support ========" lc_num1: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # This test is a PITA because increasingly, /tmp is getting # mounted noexec. So, we'll test it locally. Sigh. # # More PITA; some systems have medium short limits on #! paths, # so this can still fail poundbang:: @echo $@ @sed "s;/tmp/gawk;`pwd`/$(AWKPROG);" < $(srcdir)/poundbang.awk > ./_pbd.awk @chmod +x ./_pbd.awk @if ./_pbd.awk $(srcdir)/poundbang.awk > _`basename $@` ; \ then : ; \ else \ sed "s;/tmp/gawk;../$(AWKPROG);" < $(srcdir)/poundbang.awk > ./_pbd.awk ; \ chmod +x ./_pbd.awk ; \ LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} ./_pbd.awk $(srcdir)/poundbang.awk > _`basename $@`; \ fi @-$(CMP) $(srcdir)/poundbang.awk _`basename $@` && rm -f _`basename $@` _pbd.awk messages:: @echo $@ @$(AWK) -f $(srcdir)/messages.awk >out2 2>out3 @-$(CMP) $(srcdir)/out1.ok out1 && $(CMP) $(srcdir)/out2.ok out2 && $(CMP) $(srcdir)/out3.ok out3 && rm -f out1 out2 out3 argarray:: @echo $@ @case $(srcdir) in \ .) : ;; \ *) cp $(srcdir)/argarray.in . ;; \ esac @TEST=test echo just a test | $(AWK) -f $(srcdir)/argarray.awk ./argarray.in - >_$@ @case $(srcdir) in \ .) : ;; \ *) rm -f ./argarray.in ;; \ esac @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regtest:: @echo 'Some of the output from regtest is very system specific, do not' @echo 'be distressed if your output differs from that distributed.' @echo 'Manual inspection is called for.' AWK=$(AWKPROG) $(srcdir)/regtest.sh manyfiles:: @echo manyfiles @rm -rf junk @mkdir junk @$(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 _$@ compare:: @echo $@ @$(AWK) -f $(srcdir)/compare.awk 0 1 $(srcdir)/compare.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ inftest:: @echo $@ @echo This test is very machine specific... @echo Expect inftest to fail with DJGPP. @$(AWK) -f $(srcdir)/inftest.awk | sed "s/inf/Inf/g" >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline2:: @echo $@ @$(AWK) -f $(srcdir)/getline2.awk $(srcdir)/getline2.awk $(srcdir)/getline2.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ awkpath:: @echo $@ @AWKPATH="$(srcdir)$(PATH_SEPARATOR)$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ argtest:: @echo $@ @$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ badargs:: @echo $@ @-$(AWK) -f 2>&1 | grep -v patchlevel >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nonl:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1 @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strftime:: @echo This test could fail on slow machines or on a minute boundary, @echo so if it does, double check the actual results: @echo $@ # @GAWKLOCALE=C; export GAWKLOCALE; \ # TZ=GMT0; export TZ; \ # (LC_ALL=C date) | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk @GAWKLOCALE=C; export GAWKLOCALE; \ TZ=GMT0; export TZ; \ (LC_ALL=C $(DATE)) | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk @-$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 litoct:: @echo $@ @echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ devfd:: @echo $@ @echo Expect devfd to fail in MinGW @$(AWK) 1 /dev/fd/4 /dev/fd/5 4<$(srcdir)/devfd.in4 5<$(srcdir)/devfd.in5 >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fflush:: @echo $@ @$(srcdir)/fflush.sh >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ tweakfld:: @echo $@ @$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@ @rm -f errors.cleanup @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mmap8k:: @echo $@ @$(AWK) '{ print }' $(srcdir)/mmap8k.in >_$@ @-$(CMP) $(srcdir)/mmap8k.in _$@ && rm -f _$@ tradanch:: @echo $@ @$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # AIX /bin/sh exec's the last command in a list, therefore issue a ":" # command so that pid.sh is fork'ed as a child before being exec'ed. pid:: @echo pid @echo Expect pid to fail with DJGPP and MinGW. @AWKPATH=$(srcdir) AWK=$(AWKPROG) $(SHELL) $(srcdir)/pid.sh $$$$ > _`basename $@` ; : @-$(CMP) $(srcdir)/pid.ok _`basename $@` && rm -f _`basename $@` strftlng:: @echo $@ @TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ @if $(CMP) $(srcdir)/strftlng.ok _$@ >/dev/null 2>&1 ; then : ; else \ TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi @-$(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)/$@.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 fmtspcl: fmtspcl.ok @echo fmtspcl @echo Expect $@ to fail with MinGW @$(AWK) -f $(srcdir)/fmtspcl.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $@.ok _$@ && rm -f _$@ reint:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pipeio1:: @echo $@ @$(AWK) -f $(srcdir)/pipeio1.awk >_$@ @rm -f test1 test2 @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pipeio2:: @echo $@ @echo Expect pipeio2 to fail with MinGW @$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clobber:: @echo $@ @$(AWK) -f $(srcdir)/clobber.awk >_$@ @-$(CMP) $(srcdir)/clobber.ok seq && $(CMP) $(srcdir)/clobber.ok _$@ && rm -f _$@ @rm -f seq arynocls:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -v INPUT=$(srcdir)/arynocls.in -f arynocls.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlnbuf:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -f getlnbuf.awk $(srcdir)/getlnbuf.in > _$@ @-AWKPATH=$(srcdir) $(AWK) -f gtlnbufv.awk $(srcdir)/getlnbuf.in > _2$@ @-$(CMP) $(srcdir)/getlnbuf.ok _$@ && $(CMP) $(srcdir)/getlnbuf.ok _2$@ && rm -f _$@ _2$@ inetmesg:: @echo These tests only work if your system supports the services @echo "'discard'" at port 9 and "'daytimed'" at port 13. Check your @echo file /etc/services and do "'netstat -a'". inetechu:: @echo Expect inetechu to fail with DJGPP. @echo This test is for establishing UDP connections # @$(AWK) 'BEGIN {print "" |& "/inet/udp/0/127.0.0.1/9"}' @-$(AWK) 'BEGIN {print "" |& "/inet/udp/0/127.0.0.1/9"}' inetecht:: @echo Expect inetecht to fail with DJGPP. @echo This test is for establishing TCP connections # @$(AWK) 'BEGIN {print "" |& "/inet/tcp/0/127.0.0.1/9"}' @-$(AWK) 'BEGIN {print "" |& "/inet/tcp/0/127.0.0.1/9"}' inetdayu:: @echo Expect inetdayu to fail with DJGPP. @echo This test is for bidirectional UDP transmission # @$(AWK) 'BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13"; \ # "/inet/udp/0/127.0.0.1/13" |& getline; print $0}' @-$(AWK) 'BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13"; \ "/inet/udp/0/127.0.0.1/13" |& getline; print $0}' inetdayt:: @echo Expect inetdayt to fail with DJGPP. @echo This test is for bidirectional TCP transmission # @$(AWK) 'BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13"; \ # "/inet/tcp/0/127.0.0.1/13" |& getline; print $0}' @-$(AWK) 'BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13"; \ "/inet/tcp/0/127.0.0.1/13" |& getline; print $0}' redfilnm:: @echo $@ @$(AWK) -f $(srcdir)/redfilnm.awk srcdir=$(srcdir) $(srcdir)/redfilnm.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ leaddig:: @echo $@ @$(AWK) -v x=2E -f $(srcdir)/leaddig.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst3:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ space:: @echo $@ @$(AWK) -f ' ' $(srcdir)/space.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ # @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @-$(TESTOUTCMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printf0:: @echo $@ @$(AWK) --posix -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsnulbig:: @echo $@ @ : Suppose that block size for pipe is at most 128kB: @$(AWK) 'BEGIN { for (i = 1; i <= 128*64+1; i++) print "abcdefgh123456\n" }' 2>&1 | \ $(AWK) 'BEGIN { RS = ""; ORS = "\n\n" }; { print }' 2>&1 | \ $(AWK) '/^[^a]/; END{ print NR }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsnulbig2:: @echo $@ @$(AWK) 'BEGIN { ORS = ""; n = "\n"; for (i = 1; i <= 10; i++) n = (n n); \ for (i = 1; i <= 128; i++) print n; print "abc\n" }' 2>&1 | \ $(AWK) 'BEGIN { RS = ""; ORS = "\n\n" };{ print }' 2>&1 | \ $(AWK) '/^[^a]/; END { print NR }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ wideidx:: @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 _$@ wideidx2:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ widesub:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ widesub2:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ widesub3:: @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 _$@ widesub4:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ignrcas2:: @echo $@ @GAWKLOCALE=en_US ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subamp:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # This test makes sure gawk exits with a zero code. # Thus, unconditionally generate the exit code. exitval1:: @echo $@ @$(AWK) -f $(srcdir)/exitval1.awk >_$@ 2>&1; echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsspcoln:: @echo $@ @$(AWK) -f $(srcdir)/$@.awk 'FS=[ :]+' $(srcdir)/$@.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsstart1:: @echo $@ @$(AWK) -f $(srcdir)/$@.awk $(srcdir)/rsstart1.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsstart2:: @echo $@ @$(AWK) -f $(srcdir)/$@.awk $(srcdir)/rsstart1.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsstart3:: @echo $@ @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 >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nofile:: @echo $@ @$(AWK) '{}' no/such/file >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @sed "s/ (ENOENT)//" _$@ > _$@.2 @rm -f _$@ # @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @-$(CMP) $(srcdir)/$@.ok _$@.2 && rm -f _$@.2 binmode1:: @echo $@ @$(AWK) -v BINMODE=3 'BEGIN { print BINMODE }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subi18n:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; $(AWK) -f $(srcdir)/$@.awk > _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat4:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in > _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ devfd1:: @echo $@ @echo Expect devfd1 to fail in MinGW @$(AWK) -f $(srcdir)/$@.awk 4< $(srcdir)/devfd.in1 5< $(srcdir)/devfd.in2 >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # 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 _$@ mixed1:: @echo $@ @$(AWK) -f /dev/null --source 'BEGIN {return junk}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mtchi18n:: @echo $@ @GAWKLOCALE=ru_RU.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ reint2:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) --re-interval -f $@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ localenl:: @echo $@ @$(srcdir)/$@.sh >_$@ 2>/dev/null @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mbprintf1:: @echo $@ @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 _$@ mbprintf2:: @echo $@ @GAWKLOCALE=ja_JP.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mbprintf3:: @echo $@ @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mbfw1:: @echo $@ @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 _$@ gsubtst6:: @echo $@ @GAWKLOCALE=C ; $(AWK) -f $(srcdir)/$@.awk > _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mbstr1:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printfbad2: printfbad2.ok @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: @echo addcomma @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ anchgsub: @echo anchgsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayparm: @echo arrayparm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayprm2: @echo arrayprm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayprm3: @echo arrayprm3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayref: @echo arrayref @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrymem1: @echo arrymem1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref2: @echo arryref2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref3: @echo arryref3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref4: @echo arryref4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref5: @echo arryref5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arynasty: @echo arynasty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm1: @echo aryprm1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm2: @echo aryprm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm3: @echo aryprm3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm4: @echo aryprm4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm5: @echo aryprm5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm6: @echo aryprm6 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm7: @echo aryprm7 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm8: @echo aryprm8 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arysubnm: @echo arysubnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asgext: @echo asgext @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ back89: @echo back89 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ backgsub: @echo backgsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ childin: @echo childin @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ closebad: @echo closebad @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clsflnam: @echo clsflnam @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ compare2: @echo compare2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat1: @echo concat1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat2: @echo concat2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat3: @echo concat3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ convfmt: @echo convfmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ datanonl: @echo datanonl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ defref: @echo defref @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ delarprm: @echo delarprm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ delfunc: @echo delfunc @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ eofsplit: @echo eofsplit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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 _$@ fcall_exit: @echo fcall_exit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fcall_exit2: @echo fcall_exit2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fldchg: @echo fldchg @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fldchgnf: @echo fldchgnf @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnamedat: @echo fnamedat @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarray: @echo fnarray @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarray2: @echo fnarray2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnaryscl: @echo fnaryscl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnasgnm: @echo fnasgnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnmisc: @echo fnmisc @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fordel: @echo fordel @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ forref: @echo forref @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ forsimp: @echo forsimp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsbs: @echo fsbs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsrs: @echo fsrs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fstabplus: @echo fstabplus @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funsemnl: @echo funsemnl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funsmnam: @echo funsmnam @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funstack: @echo funstack @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline: @echo getline @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline3: @echo getline3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getnr2tm: @echo getnr2tm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubasgn: @echo gsubasgn @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtest: @echo gsubtest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst2: @echo gsubtst2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst4: @echo gsubtst4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst5: @echo gsubtst5 @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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 _$@ inputred: @echo inputred @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ intest: @echo intest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ intprec: @echo intprec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ iobug1: @echo iobug1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ leadnl: @echo leadnl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ longsub: @echo longsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ longwrds: @echo longwrds @AWKPATH=$(srcdir) $(AWK) -f $@.awk SORT=sort < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ # @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ manglprm: @echo manglprm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ math: @echo math @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ membug1: @echo membug1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ minusstr: @echo minusstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nasty: @echo nasty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nasty2: @echo nasty2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ negexp: @echo negexp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfldstr: @echo nfldstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfneg: @echo nfneg @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfset: @echo nfset @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlfldsep: @echo nlfldsep @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlinstr: @echo nlinstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlstrina: @echo nlstrina @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noeffect: @echo noeffect @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nofmtch: @echo nofmtch @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noloop1: @echo noloop1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noloop2: @echo noloop2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noparms: @echo noparms @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nulrsend: @echo nulrsend @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ numindex: @echo numindex @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ numsubstr: @echo numsubstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ octsub: @echo octsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmt: @echo ofmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmtfidl: @echo ofmtfidl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmts: @echo ofmts @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ onlynl: @echo onlynl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ opasnidx: @echo opasnidx @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ opasnslf: @echo opasnslf @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramdup: @echo paramdup @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramres: @echo paramres @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramtyp: @echo paramtyp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ parse1: @echo parse1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ parsefld: @echo parsefld @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ parseme: @echo parseme @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pcntplus: @echo pcntplus @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prdupval: @echo prdupval @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prec: @echo prec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printf1: @echo printf1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prmarscl: @echo prmarscl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prmreuse: @echo prmreuse @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prt1eval: @echo prt1eval @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prtoeval: @echo prtoeval @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regeq: @echo regeq @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ reparse: @echo reparse @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ resplit: @echo resplit @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rs: @echo rs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsnul1nl: @echo rsnul1nl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest1: @echo rstest1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest2: @echo rstest2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest3: @echo rstest3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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 _$@ rswhite: @echo rswhite @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ scalar: @echo scalar @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sclforin: @echo sclforin @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sclifin: @echo sclifin @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sortempty: @echo sortempty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitargv: @echo splitargv @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitarr: @echo splitarr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitdef: @echo splitdef @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitvar: @echo splitvar @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitwht: @echo splitwht @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strcat1: @echo strcat1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strnum1: @echo strnum1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strtod: @echo strtod @echo Expect strtod to fail with DJGPP. @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subsepnm: @echo subsepnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subslash: @echo subslash @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ substr: @echo substr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ swaplns: @echo swaplns @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ synerr1: @echo synerr1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ synerr2: @echo synerr2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit2: @echo uninit2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit3: @echo uninit3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit4: @echo uninit4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit5: @echo uninit5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninitialized: @echo uninitialized @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ unterm: @echo unterm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uparrfs: @echo uparrfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ wjposer1: @echo wjposer1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zero2: @echo zero2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zeroe0: @echo zeroe0 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zeroflag: @echo zeroflag @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlnhd: @echo getlnhd @echo Expect getlnhd to fail if pipe does not use a Unixy shell @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clos1way: @echo clos1way @echo Expect clos1way to fail with DJGPP and MinGW. @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funlen: @echo funlen @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fwtest: @echo fwtest @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fwtest2: @echo fwtest2 @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gensub2: @echo gensub2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlndir: @echo getlndir @echo Expect getlndir to fail with DJGPP and MinGW. @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnuops2: @echo gnuops2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnuops3: @echo gnuops3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnureops: @echo gnureops @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ icasefs: @echo icasefs @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ icasers: @echo icasers @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ igncdym: @echo igncdym @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ igncfs: @echo igncfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ignrcase: @echo ignrcase @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ lintold: @echo lintold @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ match2: @echo match2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ match3: @echo match3 @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 _$@ printfbad1: @echo printfbad1 @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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regx8bit: @echo regx8bit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest6: @echo rstest6 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ shadow: @echo shadow @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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 _$@ intformat: @echo intformat @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asort: @echo asort @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asorti: @echo asorti @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ 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 _$@ fnarydel: @echo fnarydel @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnparydl: @echo fnparydl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rebt8b2: @echo rebt8b2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sort1: @echo sort1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sprintfc: @echo sprintfc @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # end of file Maketests # Targets generated for other tests: $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests files=`cd "$(srcdir)" && echo *.awk *.in`; \ $(AWK) -f $(srcdir)/Gentests "$(srcdir)/Makefile.am" $$files > $(srcdir)/Maketests clean: rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ # An attempt to print something that can be grepped for in build logs pass-fail: @COUNT=`ls _* 2>/dev/null | wc -l` ; \ if test $$COUNT = 0 ; \ then echo ALL TESTS PASSED ; \ else echo $$COUNT TESTS FAILED ; \ fi # This target for my convenience to look at all the results diffout: for i in _* ; \ do \ if [ "$$i" != "_*" ]; then \ echo ============== $$i ============= ; \ if [ -r $${i#_}.ok ]; then \ diff -c $${i#_}.ok $$i ; \ else \ diff -c $(srcdir)/$${i#_}.ok $$i ; \ fi ; \ fi ; \ done | more # convenient way to scan valgrind results for errors valgrind-scan: @echo "Scanning valgrind log files for problems:" @$(AWK) '\ function show() {if (cmd) {printf "%s: %s\n",FILENAME,cmd; cmd = ""}; \ printf "\t%s\n",$$0}; \ {$$1 = ""}; \ /Prog and args are:/ {incmd = 1; cmd = ""; next}; \ incmd {if (NF == 1) incmd = 0; else {cmd = (cmd $$0); next}}; \ /ERROR SUMMARY:/ && !/: 0 errors from 0 contexts/ {show()}; \ /definitely lost:/ && !/: 0 bytes in 0 blocks/ {show()}; \ /possibly lost:/ && !/: 0 bytes in 0 blocks/ {show()}; \ / suppressed:/ && !/: 0 bytes in 0 blocks/ {show()}; \ ' log.[0-9]* # This target is for testing with electric fence. efence: for i in $$(ls _* | sed 's;_\(.*\);\1;') ; \ do \ bad=$$(wc -l < _$$i) \ ok=$$(wc -l < $$i.ok) ; \ if (( $$bad == $$ok + 2 )) ; \ then \ rm _$$i ; \ fi ; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gawk-4.0.1+dfsg.orig/pc/make-config.bat0000755000175000017500000000026411654051011016616 0ustar schotschot@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 gawk-4.0.1+dfsg.orig/pc/config.sed0000644000175000017500000001634411734665352015735 0ustar schotschot# -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 gawk-4.0.1+dfsg.orig/pc/install.awk0000644000175000017500000000370411463242060016123 0ustar schotschot# install.awk # awk script to handle "make install". Goal is to eliminate need for # extra utilities (such as sh, mkdir, and cp). This is a hack. function mkinstalldirs(dir, i, ii, j, jj, s, comp, mkdir) { gsub("/", "\\", dir); ii = split(dir, s, " ") print "@echo off" > install_bat print "@echo off" > install_cmd for (i = 1; i <= ii; i++) { jj = split(s[i], comp, "\\"); dir = comp[1]; for (j = 1; j <= jj; dir=dir "\\" comp[++j]) { if (substr(dir, length(dir)) == ":" || mkdir[dir]) continue; printf("if not exist %s\\*.* mkdir %s\n", dir, dir) > install_bat printf("if not exist %s\\* mkdir %s\n", dir, dir) > install_cmd mkdir[dir] = 1 } } close(install_bat); close(install_cmd) system(install) } function cp(s, j, n, comp) { gsub("/", "\\", s); n = split(s, comp, " "); print "@echo off" > install_bat print "@echo off" > install_cmd for (j = 1; j < n; j++) { printf("copy %s %s\n", comp[j], comp[n]) > install_cmd if (substr(comp[j], length(comp[j]), 1) == "*") comp[j] = comp[j] ".*" printf("copy %s %s\n", comp[j], comp[n]) > install_bat } close(install_bat); close(install_cmd) system(install) } BEGIN{ install = "installg" install_bat = install ".bat"; install_cmd = install ".cmd" igawk_cmd = prefix "/bin/igawk.cmd" igawk_bat = prefix "/bin/igawk.bat" igawk = "pc/awklib/igawk" # Make the bin directory mkinstalldirs(prefix "/bin"); # Create igawk.cmd for OS/2 printf("extproc sh %s/bin/igawk.cmd\nshift\n", prefix) > igawk_cmd while (getline < igawk) print $0 > igawk_cmd # Create igawk.bat for DOS printf("@sh %s/bin/igawk %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9", prefix) > igawk_bat # Do common cp(igawk " *awk.exe " prefix "/bin") mkinstalldirs(prefix "/lib/awk " prefix "/man/man1 " prefix "/info") cp("awklib/eg/lib/* pc/awklib/igawk.awk " prefix "/lib/awk"); cp("doc/*.1 " prefix "/man/man1"); cp("doc/gawk.info " prefix "/info"); cp("doc/gawkinet.info " prefix "/info"); } gawk-4.0.1+dfsg.orig/pc/Makefile0000644000175000017500000003073411734665352015432 0ustar schotschot# Makefile for gawk (GNU awk) Dec 2010 # # - 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/2K/XP/7] # Tested with GNU make on Windows, OS/2 and DOS. default: @echo "Enter $(MAK) target " @echo " where 'target' is chosen from " @echo " djgpp ... DOS 32-bit exe [GNU C, Delorie, v2] " @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 " 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] " # @echo " msc51bnd OS/2 and DOS exe [Microsoft C 5.1] " #======================= Configuration ================================== RSPFILE = gawk.rsp PRSPFILE = pgawk.rsp DRSPFILE = dgawk.rsp # # Choose method for passing arguments to the linker. # # If compiling under OS/2 or if make can pass long lines #LDRSP = $(GAWKOBJS) #LNKRSP = $(LDRSP) # # 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). # Define MAK to be your make command. #MAKE = dmake MAK = $(MAKE) $(MAKEFILE) #MAK = $(MAKE) #MAKEFILE = -f Makefile #MAK = make45 $(MAKEFILE) #------------------------------------------------------------------------ # Define the base directory for the install. "make install" will install # in bin, lib/awk, man, and info under $(prefix)/. Most likely, you should # edit config.h so that $(prefix)/lib/awk appears as part of DEFPATH. #prefix = prefix = c:/gnu pkgdatadir = $(prefix)/lib/awk # # Define the install method. Method 1 is Unix-like (and requires cat, # cp, mkdir, sed, and sh); method 2 uses gawk and batch files. install = 1 #------------------------------------------------------------------------ # To work around command-line length problems, this makefile assumes # that $($X) can be expanded. DO_LNK = $($(LNK)) DO_BIND= $($(BIND)) DO_PLNK = $($(PLNK)) DO_PBIND= $($(PBIND)) DO_DLNK = $($(DLNK)) DO_DBIND= $($(DBIND)) #======================================================================== # End of general configuration. Some platform-specific configuration # notes appear below. #======================================================================== #========================== DJGPP ======================================= #======================================================================== ifneq ($(DJGPP),) prefix = $(DJDIR) pkgdatadir = $(prefix)/share/awk 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 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 DLNK=DLDJG LF2=-lm \ BIND=BDJG PBIND='' DBIND='' #======================================================================== #========================== EMX ========================================= #======================================================================== # Link command for OS/2 versions. LEMX = $(CC) $(LF) -o $@ $(GAWKOBJS) gawk.def -lbsd $(LF2) # Link and bind for DOS and OS/2 versions. # emx-09 needs '-p' emx option here or in EMXOPT environ var. # The following works with 0.9a or newer LEMXBND = $(CC) $(LF) -o gawk $(LDRSP) gawk.def -lbsd $(LF2) BEMX = emxbind -bs gawk -p # The following works with 0.9c or newer #LEMXBND = $(CC) $(LF) -o a.out $(LDRSP) gawk.def -lbsd $(LF2) #BEMX = emxbind -bs -o $@ a.out -p #BEMX = emxbind -bs /emx/bin/emx.exe a.out $@ -p BEMXD = emxbind -b -o $@ a.out -p emx: $(MAK) all \ "CC=gcc -Zomf" O=.obj "CF=-O -DOS2" \ LNK=LEMX "LF=-s -Zcrtdll -Zstack 512" RSP= emxnt: $(MAK) all \ "CC=gcc -Zwin32 -Zcrtdll=rsxntcs" O=.o "CF=-O -DOS2" \ LNK=LEMX "LF=-s -Zstack 512" RSP= emxbnd: $(MAK) all \ CC=gcc O=.o "CF=-O -DOS2 -DMSDOS" OBJ=popen.o \ LNK=LEMXBND \ BIND=BEMX "P=|tr \" \" \"\n\"" emxbnd-debug: $(MAK) all \ CC=gcc O=.o "CF=-g -DOS2 -DMSDOS" OBJ=popen.o \ LNK=LEMXBND \ BIND=BEMXD "P=|tr \" \" \"\n\"" #======================================================================== #========================== MINGW32 ===================================== #======================================================================== 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 DLNK=DLMINGW32 \ LF="-gdwarf-2 -g3" LF2=-lmsvcp60 RSP= mingw32-readline: $(MAK) all \ 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 PBIND = EMPTY EMPTY= # bitwise operations (-DBITOPS) and non-decimal input data (-DNONDECDATA) are # undocumented in 3.0.3. They may be enabled in config.h, or added to CFLAGS. CFLAGS = $(CF) -DGAWK -I. -DHAVE_CONFIG_H $(DYN_FLAGS) # object files AWKOBJS1 = array$O builtin$O eval$O field$O floatcomp$O gawkmisc$O io$O main$O 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) # LIBOBJS # GNU and other stuff that gawk uses as library routines. LIBOBJS= getopt$O getopt1$O dfa$O regex$O random$O 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: .SUFFIXES: .c $O .c$O: $(CC) -c $(CFLAGS) $< # rules to build gawk all : gawk.exe pgawk.exe dgawk.exe gawk.exe:: $(GAWKOBJS) $(RSP) $(DO_LNK) $(DO_BIND) pgawk.exe:: $(PGAWKOBJS) $(PRSP) $(DO_PLNK) $(DO_PBIND) dgawk.exe:: $(DGAWKOBJS) $(DRSP) $(DO_DLNK) $(DO_DBIND) $(RSPFILE) : $(GAWKOBJS) echo $(AWKOBJS1)$P > $@ echo $(AWKOBJS2)$P >> $@ echo awkgram$O getid$O $(OBJ) $(LIBOBJS)$P >> $@ $(PRSPFILE) : $(PGAWKOBJS) echo $(PAWKOBJS1)$P > $@ echo $(PAWKOBJS2)$P >> $@ echo awkgram$O getid$O $(OBJ) $(LIBOBJS)$P >> $@ $(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 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 gawkmisc$O: pc/gawkmisc.pc getopt$O getopt1$O : getopt_int.h io$O: popen.h regex$O: regcomp.c regexec.c regex_internal.h eval_p$O: eval.c profile_p$O: profile.c # A bug in ndmake requires the following rule awkgram$O: awk.h awkgram.c $(CC) -c $(CFLAGS) awkgram.c awkgram.c: awkgram.y bison -o $@ awkgram.y alloca$O: alloca.c install: install$(install) install1: echo extproc sh $(prefix)/bin/igawk.cmd > igawk.cmd echo shift >> igawk.cmd cat pc/awklib/igawk >> igawk.cmd sed "s;igawk;$(prefix)/bin/igawk;" pc/awklib/igawk.bat > igawk.bat sh mkinstal.sh $(prefix)/bin sh mkinstal.sh $(pkgdatadir) $(prefix)/man/man1 $(prefix)/info cp *awk.exe igawk.bat igawk.cmd pc/awklib/igawk $(prefix)/bin cp awklib/eg/lib/* pc/awklib/igawk.awk $(pkgdatadir) cp doc/*.1 $(prefix)/man/man1 cp doc/gawk.info $(prefix)/info # install2 is equivalent to install1, but doesn't require cp, sed, etc. install2: gawk -v prefix=$(prefix) -f install.awk clean: 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 awklib/eg: doc/gawk.texi rm -fr awklib/eg sh -c "cd awklib && ../gawk -f extract.awk ../doc/gawk.texi" check: @echo "Running the tests requires several unix-like utilities. The" @echo "recommendation is to copy pc/Makefile.tst to test/Makefile. Under" @echo "DOS, it may be necessary to run make from the test directory." # The `-k' option to make should be unnecessary if using pc/Makefile.tst. sh -c "cd test && $(MAK) -k AWK=../gawk.exe" # sh -c "cd test && $(MAK) AWK=../gawk.exe bigtest extra" test: check # for those who have the necessary tools: TAGS: etags awk.h *.y custom.h *.c *.h 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 gawk-4.0.1+dfsg.orig/pc/configpk.sed0000644000175000017500000000102011654051011016227 0ustar schotschots/^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 gawk-4.0.1+dfsg.orig/pc/mkinstal.sh0000644000175000017500000000130211463242060016117 0ustar schotschot#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Last modified: 1994-03-25 # Public domain errstatus=0 for file in ${1+"$@"} ; do #set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` set fnord `echo "$file" | sed 's/\([^:]\)\//\1 /g'` shift pathcomp= for d in ${1+"$@"} ; do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" 1>&2 mkdir "$pathcomp" || errstatus=$? fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here gawk-4.0.1+dfsg.orig/pc/gawk.def0000644000175000017500000000010111463242060015346 0ustar schotschotNAME gawk WINDOWCOMPAT NEWFILES DESCRIPTION 'GNU awk for OS/2' gawk-4.0.1+dfsg.orig/pc/testoutcmp.awk0000644000175000017500000000275111734665352016703 0ustar schotschot# 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 } gawk-4.0.1+dfsg.orig/pc/config.h0000644000175000017500000003576011734665352015414 0ustar schotschot/* configh.in. Generated from configure.ac by autoheader. */ /* pc/config.h. Generated automatically by pc/config.sed. */ /* dynamic loading is possible */ #undef DYNAMIC /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Define to the type of elements in the array set by `getgroups'. Usually this is either `int' or `gid_t'. */ #define GETGROUPS_T gid_t /* 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 to 1 if you have the `btowc' function. */ #ifdef _WIN32 #define HAVE_BTOWC 1 #endif /* 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 #endif /* Define to 1 if you have the header file. */ #ifdef __MINGW32__ #define HAVE_INTTYPES_H 1 #endif /* Define if exists, doesn't clash with , and declares uintmax_t. */ #ifdef __MINGW32__ #define HAVE_INTTYPES_H_WITH_UINTMAX 1 #endif /* 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 #endif /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the `m' library (-lm). */ #define HAVE_LIBM 1 /* 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. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #ifdef __MINGW32__ #define HAVE_LOCALE_H 1 #endif /* Define if you have the 'long long' type. */ #ifdef __MINGW32__ #define HAVE_LONG_LONG 1 #endif /* Define to 1 if the system has the type `long long int'. */ #undef HAVE_LONG_LONG_INT /* Define to 1 if you have the `mbrlen' function. */ #ifdef __MINGW32__ #define HAVE_MBRLEN 1 #endif /* Define to 1 if mbrtowc and mbstate_t are properly declared. */ #ifdef __MINGW32__ #define HAVE_MBRTOWC 1 #endif /* Define to 1 if you have the header file. */ #undef HAVE_MCHECK_H /* Define to 1 if you have the `memcmp' function. */ #define HAVE_MEMCMP 1 /* Define to 1 if you have the `memcpy' function. */ #define HAVE_MEMCPY 1 /* Define to 1 if you have the `memcpy_ulong' function. */ #undef HAVE_MEMCPY_ULONG /* Define to 1 if you have the `memmove' function. */ #ifdef __MINGW32__ #define HAVE_MEMMOVE 1 #endif /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the `memset_ulong' function. */ #undef HAVE_MEMSET_ULONG /* Define to 1 if you have the `mkstemp' function. */ #ifdef DJGPP #define HAVE_MKSTEMP 1 #endif /* we have the mktime function */ #define HAVE_MKTIME 1 /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the `setenv' function. */ #if defined(__MINGW32__) || defined(__DJGPP__) #define HAVE_SETENV 1 #endif /* Define to 1 if you have the `setlocale' function. */ #ifdef __MINGW32__ #define HAVE_SETLOCALE 1 #endif /* 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 /* 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. */ #define HAVE_STDARG_H 1 /* Define to 1 if you have the header file. */ #ifdef __GNUC__ #define HAVE_STDDEF_H 1 #endif /* Define to 1 if you have the header file. */ #ifdef __MINGW32__ #define HAVE_STDINT_H 1 #endif /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_STDINT_H_WITH_UINTMAX /* Define to 1 if you have the header file. */ #ifdef __MINGW32__ #define HAVE_STDLIB_H 1 #endif /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strcoll' function. */ #undef HAVE_STRCOLL /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 /* 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 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 to 1 if you have the header file. */ #undef HAVE_STROPTS_H /* 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 to 1 if `st_blksize' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE /* Define to 1 if `tm_zone' is a member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE /* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ #undef HAVE_ST_BLKSIZE /* Define to 1 if you have the `system' function. */ #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. */ #ifndef __MINGW32__ #define HAVE_SYS_PARAM_H 1 #endif /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #ifdef __MINGW32__ #define HAVE_SYS_STAT_H 1 #endif /* Define to 1 if you have the header file. */ #if defined(DJGPP) || defined(__MINGW32__) #define HAVE_SYS_TIME_H 1 #endif /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H /* Define to 1 if 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 HAVE_TOWLOWER 1 #endif /* Define to 1 if you have the `towupper' function. */ #ifdef __MINGW32__ #define HAVE_TOWUPPER 1 #endif /* 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 /* Define to 1 if the system has the type `unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define to 1 if you have the `usleep' function. */ #if defined(DJGPP) || defined(__MINGW32__) #define HAVE_USLEEP 1 #endif /* Define to 1 if you have the `vprintf' function. */ #define HAVE_VPRINTF 1 /* Define to 1 if you have the header file. */ #ifdef __MINGW32__ #define HAVE_WCHAR_H 1 #endif /* Define to 1 if you have the `wcrtomb' function. */ #ifdef __MINGW32__ #define HAVE_WCRTOMB 1 #endif /* Define to 1 if you have the `wcscoll' function. */ #ifdef __MINGW32__ #define HAVE_WCSCOLL 1 #endif /* 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 /* systems should define this type here */ #ifdef __MINGW32__ #define HAVE_WCTYPE_T 1 #endif /* systems should define this type here */ #ifdef __MINGW32__ #define HAVE_WINT_T 1 #endif /* disable lint checks */ #undef NO_LINT /* Name of package */ #define PACKAGE "gawk" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "bug-gawk@gnu.org" /* Define to the full name of this package. */ #define PACKAGE_NAME "GNU Awk" /* Define to the full name and version of this package. */ #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 "4.0.0l" /* Define to 1 if *printf supports %F format */ #undef PRINTF_HAS_F_FORMAT /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void #if defined(DJGPP) || defined(__MINGW32__) #include #endif /* 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 /* The size of `unsigned long', as computed by sizeof. */ #if ULONG_MAX == 4294967295UL #define SIZEOF_UNSIGNED_LONG 4 #endif /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* some systems define this type here */ #undef TIME_T_IN_SYS_TYPES_H /* Define to 1 if you can safely include both and . */ #define TIME_WITH_SYS_TIME 1 /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* force use of our version of strftime */ #undef USE_INCLUDED_STRFTIME /* 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 /* 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 /* 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 /* Define to long or long long if and don't define. */ #ifdef DJGPP #define intmax_t long long #endif /* 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" #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 gawk-4.0.1+dfsg.orig/pc/ChangeLog.00000644000175000017500000005366711577702524015712 0ustar schotschotMon 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. gawk-4.0.1+dfsg.orig/pc/awklib/0000755000175000017500000000000011503212420015206 5ustar schotschotgawk-4.0.1+dfsg.orig/pc/awklib/igawk0000644000175000017500000000314011463242060016241 0ustar schotschot#! /bin/sh # igawk --- like gawk but do @include processing # Arnold Robbins, arnold@gnu.ai.mit.edu, Public Domain # July 1993 igs=${TMP:-/tmp}/igs$$ ige=${TMP:-/tmp}/ige$$ if [ "$1" = debug ] then set -x shift else # cleanup on exit, hangup, interrupt, quit, termination #trap 'rm -f $igs $ige' 0 1 2 3 15 trap 'rm -f $igs $ige' 0 2 15 fi while [ $# -ne 0 ] # loop over arguments do case $1 in --) shift; break;; -W) shift set -- -W"$@" continue;; -[vF]) opts="$opts $1 '$2'" shift;; -[vF]*) opts="$opts '$1'" ;; -f) echo @include "$2" >> $igs shift;; -f*) f=`echo "$1" | sed 's/-f//'` echo @include "$f" >> $igs ;; -?file=*) # -Wfile or --file f=`echo "$1" | sed 's/-.file=//'` echo @include "$f" >> $igs ;; -?file) # get arg, $2 echo @include "$2" >> $igs shift;; -?source=*) # -Wsource or --source t=`echo "$1" | sed 's/-.source=//'` echo "$t" >> $igs ;; -?source) # get arg, $2 echo "$2" >> $igs shift;; -?version) echo igawk: version 1.0 1>&2 gawk --version exit 0 ;; -[W-]*) opts="$opts '$1'" ;; *) break;; esac shift done if [ ! -s $igs ] then if [ -z "$1" ] then echo igawk: no program! 1>&2 exit 1 else echo "$1" > $igs shift fi fi # at this point, $igs has the program gawk -f igawk.awk $igs > $ige eval gawk -f '$ige' $opts -- "$@" exit $? gawk-4.0.1+dfsg.orig/pc/awklib/igawk.awk0000644000175000017500000000254511463242060017032 0ustar schotschot# igawk.awk # process @include directives function pathto(file, i, t, junk) { if (index(file, "/") != 0) return file for (i = 1; i <= ndirs; i++) { t = (pathlist[i] "/" file) if ((getline junk < t) > 0) { # found it close(t) return t } } return "" } BEGIN { path = ENVIRON["AWKPATH"] ndirs = split(path, pathlist, ";") for (i = 1; i <= ndirs; i++) { if (pathlist[i] == "") pathlist[i] = "." } stackptr = 0 input[stackptr] = ARGV[1] # ARGV[1] is first file for (; stackptr >= 0; stackptr--) { while ((getline < input[stackptr]) > 0) { if (tolower($1) != "@include") { print continue } fpath = pathto($2) if (fpath == "") { printf("igawk:%s:%d: cannot find %s\n", input[stackptr], FNR, $2) > "/dev/stderr" continue } if (! (fpath in processed)) { processed[fpath] = input[stackptr] input[++stackptr] = fpath # push onto stack } else print $2, "included in", input[stackptr], "already included in", processed[fpath] > "/dev/stderr" } close(input[stackptr]) } } gawk-4.0.1+dfsg.orig/pc/awklib/igawk.bat0000644000175000017500000000004411463242060017006 0ustar schotschot@sh igawk %1 %2 %3 %4 %5 %6 %7 %8 %9gawk-4.0.1+dfsg.orig/pc/getid.c0000644000175000017500000000067211503174476015224 0ustar schotschot#ifdef __MINGW32__ #include 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); } #endif /* __MINGW32__ */ int getpgrp(void) { return (0); } #if defined(__DJGPP__) || defined(__MINGW32__) int getppid(void) { return (0); } #endif /* __DJGPP__ || __MINGW32__ */ gawk-4.0.1+dfsg.orig/pc/popen.c0000644000175000017500000001215211512147404015234 0ustar schotschot#include #include #include #include #include #ifndef _NFILE #define _NFILE 40 #endif static char template[] = "piXXXXXX"; static struct { char *command; char *name; char pmode[4]; } pipes[_NFILE]; /* * For systems where system() and popen() do not follow SHELL: * 1. Write command to temp file. Temp filename must have slashes * compatible with SHELL (if set) or COMSPEC. * 2. Convert slashes in SHELL (if present) to be compatible with COMSPEC. * Currently, only MSC (running under DOS) and MINGW versions are managed. */ #if defined(__MINGW32__) static int unixshell(char *p) { static char *shell[] = {"sh", "bash", "csh", "tcsh", "sh32", "sh16", "ksh", NULL}; char **shellp = shell, *s, *q; if (p == NULL) return (0); s = p = strdup(p); 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); do { if (strcmp(*shellp, p) == 0) break; } while (*++shellp); free(s); return(*shellp ? 1 : 0); } static char * slashify(char *p, char *s) { if (unixshell(s)) while (s = strchr(p, '\\')) *s = '/'; else while (s = strchr(p, '/')) *s = '\\'; return(p); } static char * scriptify(const char *command) { FILE *fp; char *cmd, *name, *s, *p; int i; if((name = tempnam(".", "pip")) == NULL) return(NULL); p = getenv("COMSPEC"); s = getenv("SHELL"); cmd = malloc(strlen(name) + (s ? strlen(s) : 0) + 9); *cmd = '\0'; if (s) { slashify(strcpy(cmd, s), p); p = s; } slashify(name, p); if (! (i = unixshell(p))) { char *p = (char *) realloc(name, strlen(name) + 5); if (p == NULL) { free(cmd); return NULL; } name = p; strcat(name, ".bat"); } if (s) sprintf(cmd + strlen(cmd), " %cc ", unixshell(s) ? '-' : '/'); strcpy(p = cmd + strlen(cmd), name); free(name); 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)) { free(cmd); cmd = NULL; } } else { free(cmd); cmd = NULL; } if (fp) fclose(fp); return(cmd); } static void unlink_and_free(char *cmd) { char *s; if (s = strrchr(cmd, ' ')) s++; else s = cmd; unlink(s); free(cmd); } int os_system(const char *cmd) { char *s; int i; char *cmd1; if ((cmd1 = scriptify(cmd)) == NULL) return(1); if (s = getenv("SHELL")) i = spawnlp(P_WAIT, s, s, cmd1 + strlen(s), NULL); else i = system(cmd1); unlink_and_free(cmd1); return(i); } #else /* !__MINGW32__ */ #define os_system(cmd) system(cmd) #endif FILE * os_popen(const char *command, char *mode ) { FILE *current; char *name; int cur; char curmode[4]; #if defined(__MINGW32__) char *cmd; #endif if (*mode != 'r' && *mode != 'w') return NULL; strncpy(curmode, mode, 3); curmode[3] = '\0'; #if defined(__MINGW32__) current = popen(cmd = scriptify(command), mode); cur = fileno(current); strcpy(pipes[cur].pmode, curmode); pipes[cur].command = cmd; return(current); #endif /* ** 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 == 'r') { FILE *fp; if ((cur = dup(fileno(stdout))) == -1) return NULL; *curmode = 'w'; if ((current = freopen(name, curmode, stdout)) == NULL) return NULL; os_system(command); if (dup2(cur, fileno(stdout)) == -1) return NULL; close(cur); *curmode = 'r'; if ((current = fopen(name, curmode)) == NULL) return NULL; } else { if ((current = fopen(name, curmode)) == NULL) return NULL; } cur = fileno(current); pipes[cur].name = name; strcpy(pipes[cur].pmode, curmode); pipes[cur].command = strdup(command); return current; } int os_pclose( FILE * current) { int cur = fileno(current); int fd, rval; #if defined(__MINGW32__) rval = pclose(current); *pipes[cur].pmode = '\0'; unlink_and_free(pipes[cur].command); return rval; #endif /* ** check for an open file. */ switch (*pipes[cur].pmode) { case 'r': /* ** input pipes are just files we're done with. */ rval = fclose(current); unlink(pipes[cur].name); break; case 'w': /* ** output pipes are temporary files we have ** to cram down the throats of programs. */ fclose(current); rval = -1; if ((fd = dup(fileno(stdin))) != -1) { char *mode = pipes[cur].pmode; *mode = 'r'; if (current = freopen(pipes[cur].name, mode, stdin)) { rval = os_system(pipes[cur].command); fclose(current); if (dup2(fd, fileno(stdin)) == -1) rval = -1; close(fd); } } unlink(pipes[cur].name); break; default: return -1; } /* ** clean up current pipe. */ *pipes[cur].pmode = '\0'; free(pipes[cur].name); free(pipes[cur].command); return rval; } gawk-4.0.1+dfsg.orig/pc/popen.h0000644000175000017500000000066511654051011015242 0ustar schotschot/* ** popen.h -- prototypes for pipe functions */ #if !defined (__DJGPP__) # 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 * ); # ifdef __MINGW32__ # define system(c) os_system(c) extern int os_system( const char * ); # endif /* __MINGW32__ */ #endif /* !__DJGPP__ */ gawk-4.0.1+dfsg.orig/pc/gawkmisc.pc0000644000175000017500000003443011734665352016120 0ustar schotschot/* * gawkmisc.c --- miscellaneous gawk routines that are OS specific. */ /* * 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. * * 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 = ';'; # ifdef DEFPATH char *defpath = DEFPATH; # else char *defpath = ".;c:\\lib\\awk;c:\\gnu\\lib\\awk"; # endif #ifdef __EMX__ #include static int _os2_is_abs_path(const char *dirname); static char* _os2_unixroot(const char *path); static const char* _os2_unixroot_path(const char *path); #endif /* 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... */ /* OS/2 allows / for directory separator too */ if ((q = strrchr(p, '\\')) != NULL) p = q + 1; if ((q = strrchr(p, '/')) != NULL && (p == NULL || q > p)) /* support mixed d:\foo/bar\gawk.exe */ p = q + 1; if ((q = strchr(p, '.')) != NULL) *q = '\0'; return strlwr(p); } /* * memcpy_long() & memset_ulong() are 32-bit replacements for MSC which * has a 16-bit size_t. */ char * memcpy_ulong (dest, src, l) register char *dest; register const char *src; register unsigned long l; { register char *ret = dest; while (l--) *dest++ = *src++; return ret; } void * memset_ulong(dest, val, l) void *dest; register int val; register unsigned long l; { register char *ret = dest; register char *d = dest; while (l--) *d++ = val; return ((void *) ret); } /* os_arg_fixup --- fixup the command line */ void os_arg_fixup(argcp, argvp) int *argcp; char ***argvp; { #ifdef __EMX__ # ifdef initialize_main initialize_main(argcp, argvp); # else _wildcard(argcp, argvp); _response(argcp, argvp); # endif setvbuf(stdout, NULL, _IOLBF, BUFSIZ); defpath = (char*) _os2_unixroot_path(defpath); #endif /* __EMX__ */ return; } /* os_devopen --- open special per-OS devices */ int os_devopen(name, flag) const char *name; int flag; { #ifdef __EMX__ /* do not use open(name, flag) here !!! */ return -1; #else if (strcmp(name, "/dev/null") == 0) return open("NUL", flag); /* FIXME: */ /* else if (strcmp(name, "/dev/tty") == 0) * return open("???", flag); */ return -1; #endif } /* 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)); /* * DOS doesn't have the file system block size in the * stat structure. So we have to make some sort of reasonable * guess. We use stdio's BUFSIZ, since that is what it was * meant for in the first place. */ #define DEFBLKSIZE 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; { #ifdef __EMX__ return (strpbrk(file, "/\\") != NULL || (toupper(file[0]) >= 'A' && toupper(file[0]) <= 'Z' && file[1] == ':')); #else for (; *file; file++) { switch (*file) { case '/': case '\\': case ':': return 1; } } return 0; #endif } /* isdirpunct --- return true if char is a directory separator */ int isdirpunct(c) int c; { return (strchr(":\\/", c) != NULL); } /* 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 ! defined(_MSC_VER) && ! defined(__MINGW32__) # if (defined(__DJGPP__) && (__DJGPP__ > 2 || __DJGPP_MINOR__ >= 4)) || defined __EMX__ if (fd <= 2) /* sanity */ return; if (fcntl(fd, F_SETFD, 1) < 0) warning("%s %s `%s': could not set close-on-exec: %s", what, dir, name, strerror(errno)); # endif #endif } /* 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() { #ifdef __EMX__ long uid, euid; uid = getuid(); euid = geteuid(); return (euid == 0 && euid != uid); #else return 0; #endif } /* os_setbinmode --- set binary mode on file */ #ifdef __DJGPP__ #include #endif static int orig_tty_mode = -1; int os_setbinmode(fd, mode) int fd, mode; { int prev_mode = setmode(fd, mode); #ifdef __DJGPP__ if ((mode & O_BINARY) != 0) __djgpp_set_ctrl_c(1); /* allow to interrupt with Ctrl-C */ #endif /* Save the original tty mode as we found it. */ if (orig_tty_mode == -1 && fd >= 0 && fd <= 2) orig_tty_mode = prev_mode; return prev_mode; } /* os_restore_mode --- restore the original mode of the console device */ void os_restore_mode (fd) int fd; { if (orig_tty_mode != -1) { setmode(fd, orig_tty_mode); } } /* 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 # define PATH_SEPARATOR ';' # endif /* result is 0 if dirname is no absolute path, 1 otherwise */ static int _os2_is_abs_path(const char *dirname) { int result = 0; if (dirname != NULL && dirname[0] != '\0') { /* if dirname contains a valid drive letter like "c:" */ if (((dirname[0] >= 'A' && dirname[0] <= 'Z') || (dirname[0] >= 'a' && dirname[0] <= 'z')) && dirname[1] == ':') dirname += 2; /* remove the drive letter */ if (dirname[0] == '/' || dirname[0] == '\\') result = 1; /* asbolute path */ } return result; } /* path is assumed to be a list of directories separated by PATH_SEPARATOR. This function determines if the first directory of path is on the drive specified by the environment variable UNIXROOT. If it is the case, NULL is returned, otherwise a new directory name is allocated using the drive letter from UNIXROOT and returned as result. If the first directory is a relative path NULL is returned, too. The new directory name is allocated by malloc(). Example (UNIXROOT is set to "e:"): "c:/usr/share" -> "e:/usr/share" "e:/usr/share" -> NULL (already on the $UNIXROOT drive) "/usr/share" -> "e:/usr/share" "." -> NULL (not an absolute path) "usr/share" -> NULL (not an absolute path) "c:usr/share" -> NULL (not an absolute path) "c:/usr/share;d:/etc" -> "e:/usr/share" (only the first directory in path is used) */ static char* _os2_unixroot(const char *path) { static const char *unixroot = NULL; static int unixroot_init = 0; char *result = NULL; if (unixroot_init == 0) { /* get $UNIXROOT only one time */ unixroot = getenv("UNIXROOT"); /* check whether unixroot is valid (must be "x:") */ if (unixroot != NULL) { int drive = toupper(unixroot[0]); if (drive < 'A' || drive > 'Z' || unixroot[1] != ':' || unixroot[2] != '\0') unixroot = NULL; /* unixroot not valid */ } unixroot_init = 1; /* initialized */ } /* note: if unixroot != NULL then it contains a valid drive letter */ if (unixroot != NULL && _os2_is_abs_path(path)) { /* dirname is an absolute path and unixroot is a drive letter, "c:" for example */ size_t old_path_len = strlen(path); /* end points to the first ';' in path or to NULL */ const char *end = strchr(path, PATH_SEPARATOR); /* dir_len is the length of the first directory in path */ size_t dir_len = (end) ? end - path : old_path_len; if (toupper(unixroot[0]) != toupper(path[0]) || path[1] != ':') { /* the first directory of path does not start with the string $UNIXROOT */ if (path[1] == ':') { /* if there is a drive letter remove it */ dir_len -= 2; path += 2; } result = malloc(dir_len + 3); if (result) { /* do nothing if we are out of memory */ result[0] = unixroot[0]; result[1] = unixroot[1]; memcpy(result + 2, path, dir_len); result[dir_len + 2] = '\0'; } } } return result; } /* path is assumed to be a list of directories separated by PATH_SEPARATOR. Every directory is processed. _os2_unixroot() is used to find out whether these directories are on the drive specified by the environment variable UNIXROOT. If this is not the case the same directory on the UNIXROOT drive is added to the end of path. If path is a valid path this function returns a valid path, too. Example ($UNIXROOT is set to "e:"): ".;c:/usr/local;d:/usr/local;d:/etc;e:/etc" -> ".;c:/usr/local;d:/usr/local;d:/etc;e:/etc;e:/usr/local;e:/usr/local;e:/etc" */ static const char* _os2_unixroot_path(const char *path) { char *result = NULL; const char *p = path; unsigned dir_count = 1; if (path == NULL || path[0] == '\0') return NULL; /* empty path */ /* save number of path components in dir_count */ while(*p) { if (*p++ == PATH_SEPARATOR && *p != '\0' && *p != PATH_SEPARATOR) dir_count += 1; } { const char *list[dir_count]; /* list of char pointers */ size_t dir_len[dir_count]; /* the according directory length */ size_t old_path_len = strlen(path); /* the old path length */ size_t total_len; unsigned i = 0; if (path[old_path_len - 1] == PATH_SEPARATOR) /* last character is ';' */ old_path_len--; list[0] = p = path; /* first directory */ while(*p) { if (*p++ == PATH_SEPARATOR && *p != '\0' && *p != PATH_SEPARATOR) list[++i] = p; } /* now list[i] contains the ith directory of path (no 0-terminated strings!!!) */ /* determine the total length for the new path */ total_len = old_path_len; for(i = 0; i < dir_count; i++) { list[i] = _os2_unixroot(list[i]); if (list[i] != NULL) { dir_len[i] = strlen(list[i]); total_len += dir_len[i] + 1; /* one character for ';' or '\0' */ } else dir_len[i] = 0; } /* now list[] contains the according directories on the UNIXROOT drive or NULL total_len contains the total length for the new path */ result = malloc(total_len + 1); if (result) { /* copy the old path and the new directories into the new path */ char *q = result; memcpy(q, path, old_path_len); q += old_path_len; for(i = 0; i < dir_count; i++) { if (dir_len[i] != 0) { *q++ = PATH_SEPARATOR; memcpy(q, list[i], dir_len[i]); q += dir_len[i]; } } *q = '\0'; /* terminating '\0' */ } for(i = 0; i < dir_count; i++) free((void*) list[i]); } 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__ */ gawk-4.0.1+dfsg.orig/protos.h0000644000175000017500000001040111532364226015044 0ustar schotschot/* * protos.h -- function prototypes for when the headers don't have them. */ /* * Copyright (C) 1991 - 2002, 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 */ #ifndef STDC_HEADERS #define aptr_t void * /* arbitrary pointer type */ 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(aptr_t); extern char *getenv(const char *); #if ! defined(HAVE_STRING_H) && ! defined(HAVE_STRINGS_H) 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(int); #else extern char *strerror(int,...); #endif #if ! defined(__GNU_LIBRARY__) extern size_t strftime(char *, size_t, const char *, const struct tm *); #endif 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 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 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 #ifndef HAVE_STRTOUL extern unsigned long int strtoul(const char *, char **endptr, int base); #endif #ifndef HAVE_TZSET extern void tzset(); #endif #ifndef HAVE_MKTIME extern time_t mktime(struct tm *tp); #endif #ifndef HAVE_SNPRINTF extern int snprintf(char *restrict buf, size_t len, const char *restrict fmt, ...); #endif #ifndef HAVE_USLEEP extern int usleep(unsigned int); #endif #ifndef HAVE_SETENV extern int setenv(const char *, const char *, int); extern int unsetenv(const char *); #endif #if !defined(HAVE_STRCOLL) extern int strcoll(const char *, const char *); #endif gawk-4.0.1+dfsg.orig/LIMITATIONS0000644000175000017500000000157311463242060015070 0ustar schotschot Copyright (C) 2005, 2006 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. This file describes limits of gawk on a Unix system (although it is variable even then). Non-Unix systems may have other limits. # of fields in a record: MAX_LONG Length of input record: MAX_INT Length of output record: unlimited Size of a field: MAX_INT Size of a printf string: MAX_INT Size of a literal string: MAX_INT Characters in a character class: 2^(# of bits per byte) # of file redirections: unlimited # of pipe redirections: min(# of processes per user, # of open files) double-precision floating point Length of source line: unlimited Number of input records in one file: MAX_LONG Number of input records total: MAX_LONG gawk-4.0.1+dfsg.orig/POSIX.STD0000644000175000017500000000322111545163101014616 0ustar schotschot 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. -------------------------------------------------------------------------- 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. 1. POSIX leaves undefined what happens for something like 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. gawk-4.0.1+dfsg.orig/command.y0000644000175000017500000011340411734666123015171 0ustar schotschot/* * 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 gawk-4.0.1+dfsg.orig/regcomp.c0000644000175000017500000033462611734665352015177 0ustar schotschot/* Extended regular expression matching and search library. 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 . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax); static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap); static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset); #endif /* RE_ENABLE_I18N */ static void free_workarea_compile (regex_t *preg); static reg_errcode_t create_initial_state (re_dfa_t *dfa); #ifdef RE_ENABLE_I18N static void optimize_utf8 (re_dfa_t *dfa); #endif static reg_errcode_t analyze (regex_t *preg); static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra); static reg_errcode_t postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra); static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node); static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node); static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node); static reg_errcode_t calc_first (void *extra, bin_tree_t *node); static reg_errcode_t calc_next (void *extra, bin_tree_t *node); static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node); static int duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint); static int search_duplicated_node (const re_dfa_t *dfa, int org_node, unsigned int constraint); static reg_errcode_t calc_eclosure (re_dfa_t *dfa); static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root); static reg_errcode_t calc_inveclosure (re_dfa_t *dfa); static int fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax); static int peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) internal_function; static bin_tree_t *parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err); static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err); static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err); static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err); static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err); static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, int accept_hyphen); static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token); #ifdef RE_ENABLE_I18N static reg_errcode_t build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, int *equiv_class_alloc, const unsigned char *name); static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, int *char_class_alloc, const char *class_name, reg_syntax_t syntax); #else /* not RE_ENABLE_I18N */ static reg_errcode_t build_equiv_class (bitset_t sbcset, const unsigned char *name); static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, const char *class_name, reg_syntax_t syntax); #endif /* not RE_ENABLE_I18N */ static bin_tree_t *build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const char *class_name, const char *extra, int non_match, reg_errcode_t *err); static bin_tree_t *create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type); static bin_tree_t *create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token); static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa); static void free_token (re_token_t *node); static reg_errcode_t free_tree (void *extra, bin_tree_t *node); static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node); /* This table gives an error message for each of the error codes listed in regex.h. Obviously the order here has to be same as there. POSIX doesn't require that we do anything for REG_NOERROR, but why not be nice? */ const char __re_error_msgid[] attribute_hidden = { #define REG_NOERROR_IDX 0 gettext_noop ("Success") /* REG_NOERROR */ "\0" #define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success") gettext_noop ("No match") /* REG_NOMATCH */ "\0" #define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match") gettext_noop ("Invalid regular expression") /* REG_BADPAT */ "\0" #define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression") gettext_noop ("Invalid collation character") /* REG_ECOLLATE */ "\0" #define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character") gettext_noop ("Invalid character class name") /* REG_ECTYPE */ "\0" #define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name") gettext_noop ("Trailing backslash") /* REG_EESCAPE */ "\0" #define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash") gettext_noop ("Invalid back reference") /* REG_ESUBREG */ "\0" #define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference") gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */ "\0" #define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^") gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */ "\0" #define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(") gettext_noop ("Unmatched \\{") /* REG_EBRACE */ "\0" #define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{") gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */ "\0" #define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}") gettext_noop ("Invalid range end") /* REG_ERANGE */ "\0" #define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end") gettext_noop ("Memory exhausted") /* REG_ESPACE */ "\0" #define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted") gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */ "\0" #define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression") gettext_noop ("Premature end of regular expression") /* REG_EEND */ "\0" #define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression") gettext_noop ("Regular expression too big") /* REG_ESIZE */ "\0" #define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big") gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */ }; const size_t __re_error_msgid_idx[] attribute_hidden = { REG_NOERROR_IDX, REG_NOMATCH_IDX, REG_BADPAT_IDX, REG_ECOLLATE_IDX, REG_ECTYPE_IDX, REG_EESCAPE_IDX, REG_ESUBREG_IDX, REG_EBRACK_IDX, REG_EPAREN_IDX, REG_EBRACE_IDX, REG_BADBR_IDX, REG_ERANGE_IDX, REG_ESPACE_IDX, REG_BADRPT_IDX, REG_EEND_IDX, REG_ESIZE_IDX, REG_ERPAREN_IDX }; /* Entry points for GNU code. */ #ifdef ZOS_USS /* For ZOS USS we must define btowc */ wchar_t btowc (int c) { wchar_t wtmp[2]; char tmp[2]; mbstate_t mbs; memset(& mbs, 0, sizeof(mbs)); tmp[0] = c; tmp[1] = 0; mbrtowc (wtmp, tmp, 1, & mbs); return wtmp[0]; } #endif /* re_compile_pattern is the GNU regular expression compiler: it compiles PATTERN (of length LENGTH) and puts the result in BUFP. Returns 0 if the pattern was valid, otherwise an error string. Assumes the `allocated' (and perhaps `buffer') and `translate' fields are set in BUFP on entry. */ const char * re_compile_pattern (pattern, length, bufp) const char *pattern; size_t length; struct re_pattern_buffer *bufp; { reg_errcode_t ret; /* And GNU code determines whether or not to get register information by passing null for the REGS argument to re_match, etc., not by setting no_sub, unless RE_NO_SUB is set. */ bufp->no_sub = !!(re_syntax_options & RE_NO_SUB); /* Match anchors at newline. */ bufp->newline_anchor = 1; ret = re_compile_internal (bufp, pattern, length, re_syntax_options); if (!ret) return NULL; return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } #ifdef _LIBC weak_alias (__re_compile_pattern, re_compile_pattern) #endif /* Set by `re_set_syntax' to the current regexp syntax to recognize. Can also be assigned to arbitrarily: each pattern buffer stores its own syntax, so it can be changed between regex compilations. */ /* This has no initializer because initialized variables in Emacs become read-only after dumping. */ reg_syntax_t re_syntax_options; /* Specify the precise syntax of regexps for compilation. This provides for compatibility for various utilities which historically have different, incompatible syntaxes. The argument SYNTAX is a bit mask comprised of the various bits defined in regex.h. We return the old syntax. */ reg_syntax_t re_set_syntax (syntax) reg_syntax_t syntax; { reg_syntax_t ret = re_syntax_options; re_syntax_options = syntax; return ret; } #ifdef _LIBC weak_alias (__re_set_syntax, re_set_syntax) #endif int re_compile_fastmap (bufp) struct re_pattern_buffer *bufp; { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; char *fastmap = bufp->fastmap; memset (fastmap, '\0', sizeof (char) * SBC_MAX); re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); if (dfa->init_state != dfa->init_state_word) re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap); if (dfa->init_state != dfa->init_state_nl) re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); if (dfa->init_state != dfa->init_state_begbuf) re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); bufp->fastmap_accurate = 1; return 0; } #ifdef _LIBC weak_alias (__re_compile_fastmap, re_compile_fastmap) #endif static inline void __attribute ((always_inline)) re_set_fastmap (char *fastmap, int icase, int ch) { fastmap[ch] = 1; if (icase) fastmap[tolower (ch)] = 1; } /* Helper function for re_compile_fastmap. Compile fastmap for the initial_state INIT_STATE. */ static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap) { volatile re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; int node_cnt; int icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) { int node = init_state->nodes.elems[node_cnt]; re_token_type_t type = dfa->nodes[node].type; if (type == CHARACTER) { re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); #ifdef RE_ENABLE_I18N if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { unsigned char *buf = re_malloc (unsigned char, dfa->mb_cur_max), *p; wchar_t wc; mbstate_t state; p = buf; *p++ = dfa->nodes[node].opr.c; while (++node < dfa->nodes_len && dfa->nodes[node].type == CHARACTER && dfa->nodes[node].mb_partial) *p++ = dfa->nodes[node].opr.c; memset (&state, '\0', sizeof (state)); if (__mbrtowc (&wc, (const char *) buf, p - buf, &state) == p - buf && (__wcrtomb ((char *) buf, towlower (wc), &state) != (size_t) -1)) re_set_fastmap (fastmap, 0, buf[0]); re_free (buf); } #endif } else if (type == SIMPLE_BRACKET) { int i, ch; for (i = 0, ch = 0; i < BITSET_WORDS; ++i) { int j; bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (w & ((bitset_word_t) 1 << j)) re_set_fastmap (fastmap, icase, ch); } } #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET) { re_charset_t *cset = dfa->nodes[node].opr.mbcset; int i; # ifdef _LIBC /* See if we have to try all bytes which start multiple collation elements. e.g. In da_DK, we want to catch 'a' since "aa" is a valid collation element, and don't catch 'b' since 'b' is the only collation element which starts from 'b' (and it is caught by SIMPLE_BRACKET). */ if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0 && (cset->ncoll_syms || cset->nranges)) { const int32_t *table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); for (i = 0; i < SBC_MAX; ++i) if (table[i] < 0) re_set_fastmap (fastmap, icase, i); } # endif /* _LIBC */ /* See if we have to start the match at all multibyte characters, i.e. where we would not find an invalid sequence. This only applies to multibyte character sets; for single byte character sets, the SIMPLE_BRACKET again suffices. */ if (dfa->mb_cur_max > 1 && (cset->nchar_classes || cset->non_match || cset->nranges # ifdef _LIBC || cset->nequiv_classes # endif /* _LIBC */ )) { unsigned char c = 0; do { mbstate_t mbs; memset (&mbs, 0, sizeof (mbs)); if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2) re_set_fastmap (fastmap, false, (int) c); } while (++c != 0); } else { /* ... Else catch all bytes which can start the mbchars. */ for (i = 0; i < cset->nmbchars; ++i) { char buf[256]; mbstate_t state; memset (&state, '\0', sizeof (state)); if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) re_set_fastmap (fastmap, icase, *(unsigned char *) buf); if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) != (size_t) -1) re_set_fastmap (fastmap, false, *(unsigned char *) buf); } } } } #endif /* RE_ENABLE_I18N */ else if (type == OP_PERIOD #ifdef RE_ENABLE_I18N || type == OP_UTF8_PERIOD #endif /* RE_ENABLE_I18N */ || type == END_OF_RE) { memset (fastmap, '\1', sizeof (char) * SBC_MAX); if (type == END_OF_RE) bufp->can_be_null = 1; return; } } } /* Entry point for POSIX code. */ /* regcomp takes a regular expression as a string and compiles it. PREG is a regex_t *. We do not expect any fields to be initialized, since POSIX says we shouldn't. Thus, we set `buffer' to the compiled pattern; `used' to the length of the compiled pattern; `syntax' to RE_SYNTAX_POSIX_EXTENDED if the REG_EXTENDED bit in CFLAGS is set; otherwise, to RE_SYNTAX_POSIX_BASIC; `newline_anchor' to REG_NEWLINE being set in CFLAGS; `fastmap' to an allocated space for the fastmap; `fastmap_accurate' to zero; `re_nsub' to the number of subexpressions in PATTERN. PATTERN is the address of the pattern string. CFLAGS is a series of bits which affect compilation. If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we use POSIX basic syntax. If REG_NEWLINE is set, then . and [^...] don't match newline. Also, regexec will try a match beginning after every newline. If REG_ICASE is set, then we considers upper- and lowercase versions of letters to be equivalent when matching. If REG_NOSUB is set, then when PREG is passed to regexec, that routine will report only success or failure, and nothing about the registers. It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for the return codes and their meanings.) */ int regcomp (preg, pattern, cflags) regex_t *__restrict preg; const char *__restrict pattern; int cflags; { reg_errcode_t ret; reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC); preg->buffer = NULL; preg->allocated = 0; preg->used = 0; /* Try to allocate space for the fastmap. */ preg->fastmap = re_malloc (char, SBC_MAX); if (BE (preg->fastmap == NULL, 0)) return REG_ESPACE; syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0; /* If REG_NEWLINE is set, newlines are treated differently. */ if (cflags & REG_NEWLINE) { /* REG_NEWLINE implies neither . nor [^...] match newline. */ syntax &= ~RE_DOT_NEWLINE; syntax |= RE_HAT_LISTS_NOT_NEWLINE; /* It also changes the matching behavior. */ preg->newline_anchor = 1; } else preg->newline_anchor = 0; preg->no_sub = !!(cflags & REG_NOSUB); preg->translate = NULL; ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); /* POSIX doesn't distinguish between an unmatched open-group and an unmatched close-group: both are REG_EPAREN. */ if (ret == REG_ERPAREN) ret = REG_EPAREN; /* We have already checked preg->fastmap != NULL. */ if (BE (ret == REG_NOERROR, 1)) /* Compute the fastmap now, since regexec cannot modify the pattern buffer. This function never fails in this implementation. */ (void) re_compile_fastmap (preg); else { /* Some error occurred while compiling the expression. */ re_free (preg->fastmap); preg->fastmap = NULL; } return (int) ret; } #ifdef _LIBC weak_alias (__regcomp, regcomp) #endif /* Returns a message corresponding to an error code, ERRCODE, returned from either regcomp or regexec. We don't use PREG here. */ size_t regerror (errcode, preg, errbuf, errbuf_size) int errcode; const regex_t *__restrict preg; char *__restrict errbuf; size_t errbuf_size; { const char *msg; size_t msg_size; if (BE (errcode < 0 || errcode >= (int) (sizeof (__re_error_msgid_idx) / sizeof (__re_error_msgid_idx[0])), 0)) /* Only error codes returned by the rest of the code should be passed to this routine. If we are given anything else, or if other regex code generates an invalid error code, then the program has a bug. Dump core so we can fix it. */ abort (); msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]); msg_size = strlen (msg) + 1; /* Includes the null. */ if (BE (errbuf_size != 0, 1)) { if (BE (msg_size > errbuf_size, 0)) { memcpy (errbuf, msg, errbuf_size - 1); errbuf[errbuf_size - 1] = 0; } else memcpy (errbuf, msg, msg_size); } return msg_size; } #ifdef _LIBC weak_alias (__regerror, regerror) #endif #ifdef RE_ENABLE_I18N /* This static array is used for the map to single-byte characters when UTF-8 is used. Otherwise we would allocate memory just to initialize it the same all the time. UTF-8 is the preferred encoding so this is a worthwhile optimization. */ #if __GNUC__ >= 3 static const bitset_t utf8_sb_map = { /* Set the first 128 bits. */ [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX }; #else /* ! (__GNUC__ >= 3) */ static bitset_t utf8_sb_map; #endif /* __GNUC__ >= 3 */ #endif /* RE_ENABLE_I18N */ static void free_dfa_content (re_dfa_t *dfa) { int i, j; if (dfa->nodes) for (i = 0; i < dfa->nodes_len; ++i) free_token (dfa->nodes + i); re_free (dfa->nexts); for (i = 0; i < dfa->nodes_len; ++i) { if (dfa->eclosures != NULL) re_node_set_free (dfa->eclosures + i); if (dfa->inveclosures != NULL) re_node_set_free (dfa->inveclosures + i); if (dfa->edests != NULL) re_node_set_free (dfa->edests + i); } re_free (dfa->edests); re_free (dfa->eclosures); re_free (dfa->inveclosures); re_free (dfa->nodes); if (dfa->state_table) for (i = 0; i <= dfa->state_hash_mask; ++i) { struct re_state_table_entry *entry = dfa->state_table + i; for (j = 0; j < entry->num; ++j) { re_dfastate_t *state = entry->array[j]; free_state (state); } re_free (entry->array); } re_free (dfa->state_table); #ifdef RE_ENABLE_I18N if (dfa->sb_char != utf8_sb_map) re_free (dfa->sb_char); #endif re_free (dfa->subexp_map); #ifdef DEBUG re_free (dfa->re_str); #endif re_free (dfa); } /* Free dynamically allocated space used by PREG. */ void regfree (preg) regex_t *preg; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; if (BE (dfa != NULL, 1)) free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; re_free (preg->fastmap); preg->fastmap = NULL; re_free (preg->translate); preg->translate = NULL; } #ifdef _LIBC weak_alias (__regfree, regfree) #endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC /* BSD has one and only one pattern buffer. */ static struct re_pattern_buffer re_comp_buf; char * # ifdef _LIBC /* Make these definitions weak in libc, so POSIX programs can redefine these names if they don't use our functions, and still use regcomp/regexec above without link errors. */ weak_function # endif re_comp (s) const char *s; { reg_errcode_t ret; char *fastmap; if (!s) { if (!re_comp_buf.buffer) return gettext ("No previous regular expression"); return 0; } if (re_comp_buf.buffer) { fastmap = re_comp_buf.fastmap; re_comp_buf.fastmap = NULL; __regfree (&re_comp_buf); memset (&re_comp_buf, '\0', sizeof (re_comp_buf)); re_comp_buf.fastmap = fastmap; } if (re_comp_buf.fastmap == NULL) { re_comp_buf.fastmap = (char *) malloc (SBC_MAX); if (re_comp_buf.fastmap == NULL) return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) REG_ESPACE]); } /* Since `re_exec' always passes NULL for the `regs' argument, we don't need to initialize the pattern buffer fields which affect it. */ /* Match anchors at newlines. */ re_comp_buf.newline_anchor = 1; ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); if (!ret) return NULL; /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */ return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } #ifdef _LIBC libc_freeres_fn (free_mem) { __regfree (&re_comp_buf); } #endif #endif /* _REGEX_RE_COMP */ /* Internal entry point. Compile the regular expression PATTERN, whose length is LENGTH. SYNTAX indicate regular expression's syntax. */ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax) { reg_errcode_t err = REG_NOERROR; re_dfa_t *dfa; re_string_t regexp; /* Initialize the pattern buffer. */ preg->fastmap_accurate = 0; preg->syntax = syntax; preg->not_bol = preg->not_eol = 0; preg->used = 0; preg->re_nsub = 0; preg->can_be_null = 0; preg->regs_allocated = REGS_UNALLOCATED; /* Initialize the dfa. */ dfa = (re_dfa_t *) preg->buffer; if (BE (preg->allocated < sizeof (re_dfa_t), 0)) { /* If zero allocated, but buffer is non-null, try to realloc enough space. This loses if buffer's address is bogus, but that is the user's responsibility. If ->buffer is NULL this is a simple allocation. */ dfa = re_realloc (preg->buffer, re_dfa_t, 1); if (dfa == NULL) return REG_ESPACE; preg->allocated = sizeof (re_dfa_t); preg->buffer = (unsigned char *) dfa; } preg->used = sizeof (re_dfa_t); err = init_dfa (dfa, length); if (BE (err != REG_NOERROR, 0)) { free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; return err; } #ifdef DEBUG /* Note: length+1 will not overflow since it is checked in init_dfa. */ dfa->re_str = re_malloc (char, length + 1); strncpy (dfa->re_str, pattern, length + 1); #endif __libc_lock_init (dfa->lock); err = re_string_construct (®exp, pattern, length, preg->translate, syntax & RE_ICASE, dfa); if (BE (err != REG_NOERROR, 0)) { re_compile_internal_free_return: free_workarea_compile (preg); re_string_destruct (®exp); free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; return err; } /* Parse the regular expression, and build a structure tree. */ preg->re_nsub = 0; dfa->str_tree = parse (®exp, preg, syntax, &err); if (BE (dfa->str_tree == NULL, 0)) goto re_compile_internal_free_return; /* Analyze the tree and create the nfa. */ err = analyze (preg); if (BE (err != REG_NOERROR, 0)) goto re_compile_internal_free_return; #ifdef RE_ENABLE_I18N /* If possible, do searching in single byte encoding to speed things up. */ if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL) optimize_utf8 (dfa); #endif /* Then create the initial state of the dfa. */ err = create_initial_state (dfa); /* Release work areas. */ free_workarea_compile (preg); re_string_destruct (®exp); if (BE (err != REG_NOERROR, 0)) { free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; } return err; } /* Initialize DFA. We use the length of the regular expression PAT_LEN as the initial length of some arrays. */ static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len) { unsigned int table_size; #ifndef _LIBC char *codeset_name; #endif memset (dfa, '\0', sizeof (re_dfa_t)); /* Force allocation of str_tree_storage the first time. */ dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; /* Avoid overflows. */ if (pat_len == SIZE_MAX) return REG_ESPACE; dfa->nodes_alloc = pat_len + 1; dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc); /* table_size = 2 ^ ceil(log pat_len) */ for (table_size = 1; ; table_size <<= 1) if (table_size > pat_len) break; dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); dfa->state_hash_mask = table_size - 1; dfa->mb_cur_max = MB_CUR_MAX; #ifdef _LIBC if (dfa->mb_cur_max == 6 && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0) dfa->is_utf8 = 1; dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII) != 0); #else # ifdef HAVE_LANGINFO_CODESET codeset_name = nl_langinfo (CODESET); # else codeset_name = getenv ("LC_ALL"); if (codeset_name == NULL || codeset_name[0] == '\0') codeset_name = getenv ("LC_CTYPE"); if (codeset_name == NULL || codeset_name[0] == '\0') codeset_name = getenv ("LANG"); if (codeset_name == NULL) codeset_name = ""; else if (strchr (codeset_name, '.') != NULL) codeset_name = strchr (codeset_name, '.') + 1; # endif /* strcasecmp isn't a standard interface. brute force check */ #if 0 if (strcasecmp (codeset_name, "UTF-8") == 0 || strcasecmp (codeset_name, "UTF8") == 0) dfa->is_utf8 = 1; #else if ( (codeset_name[0] == 'U' || codeset_name[0] == 'u') && (codeset_name[1] == 'T' || codeset_name[1] == 't') && (codeset_name[2] == 'F' || codeset_name[2] == 'f') && (codeset_name[3] == '-' ? codeset_name[4] == '8' && codeset_name[5] == '\0' : codeset_name[3] == '8' && codeset_name[4] == '\0')) dfa->is_utf8 = 1; #endif /* We check exhaustively in the loop below if this charset is a superset of ASCII. */ dfa->map_notascii = 0; #endif #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { if (dfa->is_utf8) { #if !defined(__GNUC__) || __GNUC__ < 3 static short utf8_sb_map_inited = 0; if (! utf8_sb_map_inited) { int i; utf8_sb_map_inited = 0; for (i = 0; i <= 0x80 / BITSET_WORD_BITS - 1; i++) utf8_sb_map[i] = BITSET_WORD_MAX; } #endif dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; } else { int i, j, ch; dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); if (BE (dfa->sb_char == NULL, 0)) return REG_ESPACE; /* Set the bits corresponding to single byte chars. */ for (i = 0, ch = 0; i < BITSET_WORDS; ++i) for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) { wint_t wch = __btowc (ch); if (wch != WEOF) dfa->sb_char[i] |= (bitset_word_t) 1 << j; # ifndef _LIBC if (isascii (ch) && wch != ch) dfa->map_notascii = 1; # endif } } } #endif if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0)) return REG_ESPACE; return REG_NOERROR; } /* Initialize WORD_CHAR table, which indicate which character is "word". In this case "word" means that it is the word construction character used by some operators like "\<", "\>", etc. */ static void internal_function init_word_char (re_dfa_t *dfa) { 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 == '_') dfa->word_char[i] |= (bitset_word_t) 1 << j; } /* Free the work area which are only used while compiling. */ static void free_workarea_compile (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_storage_t *storage, *next; for (storage = dfa->str_tree_storage; storage; storage = next) { next = storage->next; re_free (storage); } dfa->str_tree_storage = NULL; dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; dfa->str_tree = NULL; re_free (dfa->org_indices); dfa->org_indices = NULL; } /* Create initial states for all contexts. */ static reg_errcode_t create_initial_state (re_dfa_t *dfa) { int first, i; reg_errcode_t err; re_node_set init_nodes; /* Initial states have the epsilon closure of the node which is the first node of the regular expression. */ first = dfa->str_tree->first->node_idx; dfa->init_node = first; err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first); if (BE (err != REG_NOERROR, 0)) return err; /* The back-references which are in initial states can epsilon transit, since in this case all of the subexpressions can be null. Then we add epsilon closures of the nodes which are the next nodes of the back-references. */ if (dfa->nbackref > 0) for (i = 0; i < init_nodes.nelem; ++i) { int node_idx = init_nodes.elems[i]; re_token_type_t type = dfa->nodes[node_idx].type; int clexp_idx; if (type != OP_BACK_REF) continue; for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx) { re_token_t *clexp_node; clexp_node = dfa->nodes + init_nodes.elems[clexp_idx]; if (clexp_node->type == OP_CLOSE_SUBEXP && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx) break; } if (clexp_idx == init_nodes.nelem) continue; if (type == OP_BACK_REF) { int dest_idx = dfa->edests[node_idx].elems[0]; if (!re_node_set_contains (&init_nodes, dest_idx)) { reg_errcode_t err = re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx); if (err != REG_NOERROR) return err; i = 0; } } } /* It must be the first time to invoke acquire_state. */ dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0); /* We don't check ERR here, since the initial state must not be NULL. */ if (BE (dfa->init_state == NULL, 0)) return err; if (dfa->init_state->has_constraint) { dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_WORD); dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_NEWLINE); dfa->init_state_begbuf = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_NEWLINE | CONTEXT_BEGBUF); if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return err; } else dfa->init_state_word = dfa->init_state_nl = dfa->init_state_begbuf = dfa->init_state; re_node_set_free (&init_nodes); return REG_NOERROR; } #ifdef RE_ENABLE_I18N /* If it is possible to do searching in single byte encoding instead of UTF-8 to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change DFA nodes where needed. */ static void optimize_utf8 (re_dfa_t *dfa) { int node, i, mb_chars = 0, has_period = 0; for (node = 0; node < dfa->nodes_len; ++node) switch (dfa->nodes[node].type) { case CHARACTER: if (dfa->nodes[node].opr.c >= 0x80) mb_chars = 1; break; case ANCHOR: switch (dfa->nodes[node].opr.ctx_type) { case LINE_FIRST: case LINE_LAST: case BUF_FIRST: case BUF_LAST: break; default: /* Word anchors etc. cannot be handled. It's okay to test opr.ctx_type since constraints (for all DFA nodes) are created by ORing one or more opr.ctx_type values. */ return; } break; case OP_PERIOD: has_period = 1; break; case OP_BACK_REF: case OP_ALT: case END_OF_RE: case OP_DUP_ASTERISK: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: break; case COMPLEX_BRACKET: return; case SIMPLE_BRACKET: /* Just double check. The non-ASCII range starts at 0x80. */ assert (0x80 % BITSET_WORD_BITS == 0); for (i = 0x80 / BITSET_WORD_BITS; i < BITSET_WORDS; ++i) if (dfa->nodes[node].opr.sbcset[i]) return; break; default: abort (); } if (mb_chars || has_period) for (node = 0; node < dfa->nodes_len; ++node) { if (dfa->nodes[node].type == CHARACTER && dfa->nodes[node].opr.c >= 0x80) dfa->nodes[node].mb_partial = 0; else if (dfa->nodes[node].type == OP_PERIOD) dfa->nodes[node].type = OP_UTF8_PERIOD; } /* The search can be in single byte locale. */ dfa->mb_cur_max = 1; dfa->is_utf8 = 0; dfa->has_mb_node = dfa->nbackref > 0 || has_period; } #endif /* Analyze the structure tree, and calculate "first", "next", "edest", "eclosure", and "inveclosure". */ static reg_errcode_t analyze (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; reg_errcode_t ret; /* Allocate arrays. */ dfa->nexts = re_malloc (int, dfa->nodes_alloc); dfa->org_indices = re_malloc (int, dfa->nodes_alloc); dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc); dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc); if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL || dfa->eclosures == NULL, 0)) return REG_ESPACE; dfa->subexp_map = re_malloc (int, preg->re_nsub); if (dfa->subexp_map != NULL) { int i; for (i = 0; i < preg->re_nsub; i++) dfa->subexp_map[i] = i; preorder (dfa->str_tree, optimize_subexps, dfa); for (i = 0; i < preg->re_nsub; i++) if (dfa->subexp_map[i] != i) break; if (i == preg->re_nsub) { free (dfa->subexp_map); dfa->subexp_map = NULL; } } ret = postorder (dfa->str_tree, lower_subexps, preg); if (BE (ret != REG_NOERROR, 0)) return ret; ret = postorder (dfa->str_tree, calc_first, dfa); if (BE (ret != REG_NOERROR, 0)) return ret; preorder (dfa->str_tree, calc_next, dfa); ret = preorder (dfa->str_tree, link_nfa_nodes, dfa); if (BE (ret != REG_NOERROR, 0)) return ret; ret = calc_eclosure (dfa); if (BE (ret != REG_NOERROR, 0)) return ret; /* We only need this during the prune_impossible_nodes pass in regexec.c; skip it if p_i_n will not run, as calc_inveclosure can be quadratic. */ if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match) || dfa->nbackref) { dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len); if (BE (dfa->inveclosures == NULL, 0)) return REG_ESPACE; ret = calc_inveclosure (dfa); } return ret; } /* Our parse trees are very unbalanced, so we cannot use a stack to implement parse tree visits. Instead, we use parent pointers and some hairy code in these two functions. */ static reg_errcode_t postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node, *prev; for (node = root; ; ) { /* Descend down the tree, preferably to the left (or to the right if that's the only child). */ while (node->left || node->right) if (node->left) node = node->left; else node = node->right; do { reg_errcode_t err = fn (extra, node); if (BE (err != REG_NOERROR, 0)) return err; if (node->parent == NULL) return REG_NOERROR; prev = node; node = node->parent; } /* Go up while we have a node that is reached from the right. */ while (node->right == prev || node->right == NULL); node = node->right; } } static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node; for (node = root; ; ) { reg_errcode_t err = fn (extra, node); if (BE (err != REG_NOERROR, 0)) return err; /* Go to the left node, or up and to the right. */ if (node->left) node = node->left; else { bin_tree_t *prev = NULL; while (node->right == prev || node->right == NULL) { prev = node; node = node->parent; if (!node) return REG_NOERROR; } node = node->right; } } } /* Optimization pass: if a SUBEXP is entirely contained, strip it and tell re_search_internal to map the inner one's opr.idx to this one's. Adjust backreferences as well. Requires a preorder visit. */ static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; if (node->token.type == OP_BACK_REF && dfa->subexp_map) { int idx = node->token.opr.idx; node->token.opr.idx = dfa->subexp_map[idx]; dfa->used_bkref_map |= 1 << node->token.opr.idx; } else if (node->token.type == SUBEXP && node->left && node->left->token.type == SUBEXP) { int other_idx = node->left->token.opr.idx; node->left = node->left->left; if (node->left) node->left->parent = node; dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx]; if (other_idx < BITSET_WORD_BITS) dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx); } return REG_NOERROR; } /* Lowering pass: Turn each SUBEXP node into the appropriate concatenation of OP_OPEN_SUBEXP, the body of the SUBEXP (if any) and OP_CLOSE_SUBEXP. */ static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node) { regex_t *preg = (regex_t *) extra; reg_errcode_t err = REG_NOERROR; if (node->left && node->left->token.type == SUBEXP) { node->left = lower_subexp (&err, preg, node->left); if (node->left) node->left->parent = node; } if (node->right && node->right->token.type == SUBEXP) { node->right = lower_subexp (&err, preg, node->right); if (node->right) node->right->parent = node; } return err; } static bin_tree_t * lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *body = node->left; bin_tree_t *op, *cls, *tree1, *tree; if (preg->no_sub /* We do not optimize empty subexpressions, because otherwise we may have bad CONCAT nodes with NULL children. This is obviously not very common, so we do not lose much. An example that triggers this case is the sed "script" /\(\)/x. */ && node->left != NULL && (node->token.opr.idx >= BITSET_WORD_BITS || !(dfa->used_bkref_map & ((bitset_word_t) 1 << node->token.opr.idx)))) return node->left; /* Convert the SUBEXP node to the concatenation of an OP_OPEN_SUBEXP, the contents, and an OP_CLOSE_SUBEXP. */ op = create_tree (dfa, NULL, NULL, OP_OPEN_SUBEXP); cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP); tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls; tree = create_tree (dfa, op, tree1, CONCAT); if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0)) { *err = REG_ESPACE; return NULL; } op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx; op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp; return tree; } /* Pass 1 in building the NFA: compute FIRST and create unlinked automaton nodes. Requires a postorder visit. */ static reg_errcode_t calc_first (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; if (node->token.type == CONCAT) { node->first = node->left->first; node->node_idx = node->left->node_idx; } else { node->first = node; node->node_idx = re_dfa_add_node (dfa, node->token); if (BE (node->node_idx == -1, 0)) return REG_ESPACE; if (node->token.type == ANCHOR) dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type; } return REG_NOERROR; } /* Pass 2: compute NEXT on the tree. Preorder visit. */ static reg_errcode_t calc_next (void *extra, bin_tree_t *node) { switch (node->token.type) { case OP_DUP_ASTERISK: node->left->next = node; break; case CONCAT: node->left->next = node->right->first; node->right->next = node->next; break; default: if (node->left) node->left->next = node->next; if (node->right) node->right->next = node->next; break; } return REG_NOERROR; } /* Pass 3: link all DFA nodes to their NEXT node (any order will do). */ static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; int idx = node->node_idx; reg_errcode_t err = REG_NOERROR; switch (node->token.type) { case CONCAT: break; case END_OF_RE: assert (node->next == NULL); break; case OP_DUP_ASTERISK: case OP_ALT: { int left, right; dfa->has_plural_match = 1; if (node->left != NULL) left = node->left->first->node_idx; else left = node->next->node_idx; if (node->right != NULL) right = node->right->first->node_idx; else right = node->next->node_idx; assert (left > -1); assert (right > -1); err = re_node_set_init_2 (dfa->edests + idx, left, right); } break; case ANCHOR: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx); break; case OP_BACK_REF: dfa->nexts[idx] = node->next->node_idx; if (node->token.type == OP_BACK_REF) err = re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]); break; default: assert (!IS_EPSILON_NODE (node->token.type)); dfa->nexts[idx] = node->next->node_idx; break; } return err; } /* Duplicate the epsilon closure of the node ROOT_NODE. Note that duplicated nodes have constraint INIT_CONSTRAINT in addition to their own constraint. */ static reg_errcode_t internal_function duplicate_node_closure (re_dfa_t *dfa, int top_org_node, int top_clone_node, int root_node, unsigned int init_constraint) { int org_node, clone_node, ret; unsigned int constraint = init_constraint; for (org_node = top_org_node, clone_node = top_clone_node;;) { int org_dest, clone_dest; if (dfa->nodes[org_node].type == OP_BACK_REF) { /* If the back reference epsilon-transit, its destination must also have the constraint. Then duplicate the epsilon closure of the destination of the back reference, and store it in edests of the back reference. */ org_dest = dfa->nexts[org_node]; re_node_set_empty (dfa->edests + clone_node); clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == -1, 0)) return REG_ESPACE; dfa->nexts[clone_node] = dfa->nexts[org_node]; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; } else if (dfa->edests[org_node].nelem == 0) { /* In case of the node can't epsilon-transit, don't duplicate the destination and store the original destination as the destination of the node. */ dfa->nexts[clone_node] = dfa->nexts[org_node]; break; } else if (dfa->edests[org_node].nelem == 1) { /* In case of the node can epsilon-transit, and it has only one destination. */ org_dest = dfa->edests[org_node].elems[0]; re_node_set_empty (dfa->edests + clone_node); /* If the node is root_node itself, it means the epsilon clsoure has a loop. Then tie it to the destination of the root_node. */ if (org_node == root_node && clone_node != org_node) { ret = re_node_set_insert (dfa->edests + clone_node, org_dest); if (BE (ret < 0, 0)) return REG_ESPACE; break; } /* In case of the node has another constraint, add it. */ constraint |= dfa->nodes[org_node].constraint; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == -1, 0)) return REG_ESPACE; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; } else /* dfa->edests[org_node].nelem == 2 */ { /* In case of the node can epsilon-transit, and it has two destinations. In the bin_tree_t and DFA, that's '|' and '*'. */ org_dest = dfa->edests[org_node].elems[0]; re_node_set_empty (dfa->edests + clone_node); /* Search for a duplicated node which satisfies the constraint. */ clone_dest = search_duplicated_node (dfa, org_dest, constraint); if (clone_dest == -1) { /* There is no such duplicated node, create a new one. */ reg_errcode_t err; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == -1, 0)) return REG_ESPACE; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; err = duplicate_node_closure (dfa, org_dest, clone_dest, root_node, constraint); if (BE (err != REG_NOERROR, 0)) return err; } else { /* There is a duplicated node which satisfies the constraint, use it to avoid infinite loop. */ ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; } org_dest = dfa->edests[org_node].elems[1]; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == -1, 0)) return REG_ESPACE; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; } org_node = org_dest; clone_node = clone_dest; } return REG_NOERROR; } /* Search for a node which is duplicated from the node ORG_NODE, and satisfies the constraint CONSTRAINT. */ static int search_duplicated_node (const re_dfa_t *dfa, int org_node, unsigned int constraint) { int idx; for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx) { if (org_node == dfa->org_indices[idx] && constraint == dfa->nodes[idx].constraint) return idx; /* Found. */ } return -1; /* Not found. */ } /* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT. Return the index of the new node, or -1 if insufficient storage is available. */ static int duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint) { int dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]); if (BE (dup_idx != -1, 1)) { dfa->nodes[dup_idx].constraint = constraint; dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint; dfa->nodes[dup_idx].duplicated = 1; /* Store the index of the original node. */ dfa->org_indices[dup_idx] = org_idx; } return dup_idx; } static reg_errcode_t calc_inveclosure (re_dfa_t *dfa) { int src, idx, ret; for (idx = 0; idx < dfa->nodes_len; ++idx) re_node_set_init_empty (dfa->inveclosures + idx); for (src = 0; src < dfa->nodes_len; ++src) { int *elems = dfa->eclosures[src].elems; for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx) { ret = re_node_set_insert_last (dfa->inveclosures + elems[idx], src); if (BE (ret == -1, 0)) return REG_ESPACE; } } return REG_NOERROR; } /* Calculate "eclosure" for all the node in DFA. */ static reg_errcode_t calc_eclosure (re_dfa_t *dfa) { int node_idx, incomplete; #ifdef DEBUG assert (dfa->nodes_len > 0); #endif incomplete = 0; /* For each nodes, calculate epsilon closure. */ for (node_idx = 0; ; ++node_idx) { reg_errcode_t err; re_node_set eclosure_elem; if (node_idx == dfa->nodes_len) { if (!incomplete) break; incomplete = 0; node_idx = 0; } #ifdef DEBUG assert (dfa->eclosures[node_idx].nelem != -1); #endif /* If we have already calculated, skip it. */ if (dfa->eclosures[node_idx].nelem != 0) continue; /* Calculate epsilon closure of `node_idx'. */ err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, 1); if (BE (err != REG_NOERROR, 0)) return err; if (dfa->eclosures[node_idx].nelem == 0) { incomplete = 1; re_node_set_free (&eclosure_elem); } } return REG_NOERROR; } /* Calculate epsilon closure of NODE. */ static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root) { reg_errcode_t err; int i; re_node_set eclosure; int ret; int incomplete = 0; err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); if (BE (err != REG_NOERROR, 0)) return err; /* This indicates that we are calculating this node now. We reference this value to avoid infinite loop. */ dfa->eclosures[node].nelem = -1; /* If the current node has constraints, duplicate all nodes since they must inherit the constraints. */ if (dfa->nodes[node].constraint && dfa->edests[node].nelem && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) { err = duplicate_node_closure (dfa, node, node, node, dfa->nodes[node].constraint); if (BE (err != REG_NOERROR, 0)) return err; } /* Expand each epsilon destination nodes. */ if (IS_EPSILON_NODE(dfa->nodes[node].type)) for (i = 0; i < dfa->edests[node].nelem; ++i) { re_node_set eclosure_elem; int edest = dfa->edests[node].elems[i]; /* If calculating the epsilon closure of `edest' is in progress, return intermediate result. */ if (dfa->eclosures[edest].nelem == -1) { incomplete = 1; continue; } /* If we haven't calculated the epsilon closure of `edest' yet, calculate now. Otherwise use calculated epsilon closure. */ if (dfa->eclosures[edest].nelem == 0) { err = calc_eclosure_iter (&eclosure_elem, dfa, edest, 0); if (BE (err != REG_NOERROR, 0)) return err; } else eclosure_elem = dfa->eclosures[edest]; /* Merge the epsilon closure of `edest'. */ err = re_node_set_merge (&eclosure, &eclosure_elem); if (BE (err != REG_NOERROR, 0)) return err; /* If the epsilon closure of `edest' is incomplete, the epsilon closure of this node is also incomplete. */ if (dfa->eclosures[edest].nelem == 0) { incomplete = 1; re_node_set_free (&eclosure_elem); } } /* An epsilon closure includes itself. */ ret = re_node_set_insert (&eclosure, node); if (BE (ret < 0, 0)) return REG_ESPACE; if (incomplete && !root) dfa->eclosures[node].nelem = 0; else dfa->eclosures[node] = eclosure; *new_set = eclosure; return REG_NOERROR; } /* Functions for token which are used in the parser. */ /* Fetch a token from INPUT. We must not use this function inside bracket expressions. */ static void internal_function fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) { re_string_skip_bytes (input, peek_token (result, input, syntax)); } /* Peek a token from INPUT, and return the length of the token. We must not use this function inside bracket expressions. */ static int internal_function peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; if (re_string_eoi (input)) { token->type = END_OF_RE; return 0; } c = re_string_peek_byte (input, 0); token->opr.c = c; token->word_char = 0; #ifdef RE_ENABLE_I18N token->mb_partial = 0; if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; token->mb_partial = 1; return 1; } #endif if (c == '\\') { unsigned char c2; if (re_string_cur_idx (input) + 1 >= re_string_length (input)) { token->type = BACK_SLASH; return 1; } c2 = re_string_peek_byte_case (input, 1); token->opr.c = c2; token->type = CHARACTER; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input) + 1); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; } else #endif token->word_char = IS_WORD_CHAR (c2) != 0; switch (c2) { case '|': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (!(syntax & RE_NO_BK_REFS)) { token->type = OP_BACK_REF; token->opr.idx = c2 - '1'; } break; case '<': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_FIRST; } break; case '>': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_LAST; } break; case 'b': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_DELIM; } break; case 'B': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = NOT_WORD_DELIM; } break; case 'w': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_WORD; break; case 'W': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTWORD; break; case 's': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_SPACE; break; case 'S': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTSPACE; break; case '`': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = BUF_FIRST; } break; case '\'': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = BUF_LAST; } break; case '(': if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_OPEN_SUBEXP; break; case ')': if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_CLOSE_SUBEXP; break; case '+': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_CLOSE_DUP_NUM; break; default: break; } return 2; } token->type = CHARACTER; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; } else #endif token->word_char = IS_WORD_CHAR (token->opr.c); switch (c) { case '\n': if (syntax & RE_NEWLINE_ALT) token->type = OP_ALT; break; case '|': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '*': token->type = OP_DUP_ASTERISK; break; case '+': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_CLOSE_DUP_NUM; break; case '(': if (syntax & RE_NO_BK_PARENS) token->type = OP_OPEN_SUBEXP; break; case ')': if (syntax & RE_NO_BK_PARENS) token->type = OP_CLOSE_SUBEXP; break; case '[': token->type = OP_OPEN_BRACKET; break; case '.': token->type = OP_PERIOD; break; case '^': if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) && re_string_cur_idx (input) != 0) { char prev = re_string_peek_byte (input, -1); if (!(syntax & RE_NEWLINE_ALT) || prev != '\n') break; } token->type = ANCHOR; token->opr.ctx_type = LINE_FIRST; break; case '$': if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && re_string_cur_idx (input) + 1 != re_string_length (input)) { re_token_t next; re_string_skip_bytes (input, 1); peek_token (&next, input, syntax); re_string_skip_bytes (input, -1); if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP) break; } token->type = ANCHOR; token->opr.ctx_type = LINE_LAST; break; default: break; } return 1; } /* Peek a token from INPUT, and return the length of the token. We must not use this function out of bracket expressions. */ static int internal_function peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; if (re_string_eoi (input)) { token->type = END_OF_RE; return 0; } c = re_string_peek_byte (input, 0); token->opr.c = c; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; return 1; } #endif /* RE_ENABLE_I18N */ if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && re_string_cur_idx (input) + 1 < re_string_length (input)) { /* In this case, '\' escape a character. */ unsigned char c2; re_string_skip_bytes (input, 1); c2 = re_string_peek_byte (input, 0); token->opr.c = c2; token->type = CHARACTER; return 1; } if (c == '[') /* '[' is a special char in a bracket exps. */ { unsigned char c2; int token_len; if (re_string_cur_idx (input) + 1 < re_string_length (input)) c2 = re_string_peek_byte (input, 1); else c2 = 0; token->opr.c = c2; token_len = 2; switch (c2) { case '.': token->type = OP_OPEN_COLL_ELEM; break; case '=': token->type = OP_OPEN_EQUIV_CLASS; break; case ':': if (syntax & RE_CHAR_CLASSES) { token->type = OP_OPEN_CHAR_CLASS; break; } /* else fall through. */ default: token->type = CHARACTER; token->opr.c = c; token_len = 1; break; } return token_len; } switch (c) { case '-': token->type = OP_CHARSET_RANGE; break; case ']': token->type = OP_CLOSE_BRACKET; break; case '^': token->type = OP_NON_MATCH_LIST; break; default: token->type = CHARACTER; } return 1; } /* Functions for parser. */ /* Entry point of the parser. Parse the regular expression REGEXP and return the structure tree. If an error is occured, ERR is set by error code, and return NULL. This function build the following tree, from regular expression : CAT / \ / \ EOR CAT means concatenation. EOR means end of regular expression. */ static bin_tree_t * parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *eor, *root; re_token_t current_token; dfa->syntax = syntax; fetch_token (¤t_token, regexp, syntax | RE_CARET_ANCHORS_HERE); tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; eor = create_tree (dfa, NULL, NULL, END_OF_RE); if (tree != NULL) root = create_tree (dfa, tree, eor, CONCAT); else root = eor; if (BE (eor == NULL || root == NULL, 0)) { *err = REG_ESPACE; return NULL; } return root; } /* This function build the following tree, from regular expression |: ALT / \ / \ ALT means alternative, which represents the operator `|'. */ static bin_tree_t * parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *branch = NULL; tree = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type == OP_ALT) { fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); if (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { branch = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && branch == NULL, 0)) return NULL; } else branch = NULL; tree = create_tree (dfa, tree, branch, OP_ALT); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } return tree; } /* This function build the following tree, from regular expression : CAT / \ / \ CAT means concatenation. */ static bin_tree_t * parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) { bin_tree_t *tree, *exp; re_dfa_t *dfa = (re_dfa_t *) preg->buffer; tree = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { exp = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && exp == NULL, 0)) { if (tree != NULL) postorder (tree, free_tree, NULL); return NULL; } if (tree != NULL && exp != 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; /* Otherwise exp == NULL, we don't need to create new tree. */ } return tree; } /* This function build the following tree, from regular expression a*: * | a */ static bin_tree_t * parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; switch (token->type) { case CHARACTER: tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { while (!re_string_eoi (regexp) && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) { bin_tree_t *mbc_remain; fetch_token (token, regexp, syntax); mbc_remain = create_token_tree (dfa, NULL, NULL, token); tree = create_tree (dfa, tree, mbc_remain, CONCAT); if (BE (mbc_remain == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } } #endif break; case OP_OPEN_SUBEXP: tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_OPEN_BRACKET: tree = parse_bracket_exp (regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_BACK_REF: if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1)) { *err = REG_ESUBREG; return NULL; } dfa->used_bkref_map |= 1 << token->opr.idx; tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } ++dfa->nbackref; dfa->has_mb_node = 1; break; case OP_OPEN_DUP_NUM: if (syntax & RE_CONTEXT_INVALID_DUP) { *err = REG_BADRPT; return NULL; } /* FALLTHROUGH */ case OP_DUP_ASTERISK: case OP_DUP_PLUS: case OP_DUP_QUESTION: if (syntax & RE_CONTEXT_INVALID_OPS) { *err = REG_BADRPT; return NULL; } else if (syntax & RE_CONTEXT_INDEP_OPS) { fetch_token (token, regexp, syntax); return parse_expression (regexp, preg, token, syntax, nest, err); } /* else fall through */ case OP_CLOSE_SUBEXP: if ((token->type == OP_CLOSE_SUBEXP) && !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) { *err = REG_ERPAREN; return NULL; } /* else fall through */ case OP_CLOSE_DUP_NUM: /* We treat it as a normal character. */ /* Then we can these characters as normal characters. */ token->type = CHARACTER; /* mb_partial and word_char bits should be initialized already by peek_token. */ tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } break; case ANCHOR: if ((token->opr.ctx_type & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST)) && dfa->word_ops_used == 0) init_word_char (dfa); if (token->opr.ctx_type == WORD_DELIM || token->opr.ctx_type == NOT_WORD_DELIM) { bin_tree_t *tree_first, *tree_last; if (token->opr.ctx_type == WORD_DELIM) { token->opr.ctx_type = WORD_FIRST; tree_first = create_token_tree (dfa, NULL, NULL, token); token->opr.ctx_type = WORD_LAST; } else { token->opr.ctx_type = INSIDE_WORD; tree_first = create_token_tree (dfa, NULL, NULL, token); token->opr.ctx_type = INSIDE_NOTWORD; } tree_last = create_token_tree (dfa, NULL, NULL, token); tree = create_tree (dfa, tree_first, tree_last, OP_ALT); if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } else { tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } /* We must return here, since ANCHORs can't be followed by repetition operators. eg. RE"^*" is invalid or "", it must not be "". */ fetch_token (token, regexp, syntax); return tree; case OP_PERIOD: tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } if (dfa->mb_cur_max > 1) dfa->has_mb_node = 1; break; case OP_WORD: case OP_NOTWORD: tree = build_charclass_op (dfa, regexp->trans, "alnum", "_", token->type == OP_NOTWORD, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_SPACE: case OP_NOTSPACE: tree = build_charclass_op (dfa, regexp->trans, "space", "", token->type == OP_NOTSPACE, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_ALT: case END_OF_RE: return NULL; case BACK_SLASH: *err = REG_EESCAPE; return NULL; default: /* Must not happen? */ #ifdef DEBUG assert (0); #endif return NULL; } fetch_token (token, regexp, syntax); while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM) { tree = parse_dup_op (tree, regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; /* In BRE consecutive duplications are not allowed. */ if ((syntax & RE_CONTEXT_INVALID_DUP) && (token->type == OP_DUP_ASTERISK || token->type == OP_OPEN_DUP_NUM)) { *err = REG_BADRPT; return NULL; } } return tree; } /* This function build the following tree, from regular expression (): SUBEXP | */ static bin_tree_t * parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; size_t cur_nsub; cur_nsub = preg->re_nsub++; fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); /* The subexpression may be a null string. */ if (token->type == OP_CLOSE_SUBEXP) tree = NULL; else { tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0)) { if (tree != NULL) postorder (tree, free_tree, NULL); *err = REG_EPAREN; } if (BE (*err != REG_NOERROR, 0)) return NULL; } if (cur_nsub <= '9' - '1') dfa->completed_bkref_map |= 1 << cur_nsub; tree = create_tree (dfa, tree, NULL, SUBEXP); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } tree->token.opr.idx = cur_nsub; return tree; } /* This function parse repetition operators like "*", "+", "{1,3}" etc. */ static bin_tree_t * parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) { bin_tree_t *tree = NULL, *old_tree = NULL; int i, start, end, start_idx = re_string_cur_idx (regexp); #ifndef RE_TOKEN_INIT_BUG re_token_t start_token = *token; #else re_token_t start_token; memcpy ((void *) &start_token, (void *) token, sizeof start_token); #endif if (token->type == OP_OPEN_DUP_NUM) { end = 0; start = fetch_number (regexp, token, syntax); if (start == -1) { if (token->type == CHARACTER && token->opr.c == ',') start = 0; /* We treat "{,m}" as "{0,m}". */ else { *err = REG_BADBR; /* {} is invalid. */ return NULL; } } if (BE (start != -2, 1)) { /* We treat "{n}" as "{n,n}". */ end = ((token->type == OP_CLOSE_DUP_NUM) ? start : ((token->type == CHARACTER && token->opr.c == ',') ? fetch_number (regexp, token, syntax) : -2)); } if (BE (start == -2 || end == -2, 0)) { /* Invalid sequence. */ if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) { if (token->type == END_OF_RE) *err = REG_EBRACE; else *err = REG_BADBR; return NULL; } /* If the syntax bit is set, rollback. */ re_string_set_index (regexp, start_idx); *token = start_token; token->type = CHARACTER; /* mb_partial and word_char bits should be already initialized by peek_token. */ return elem; } if (BE ((end != -1 && start > end) || token->type != OP_CLOSE_DUP_NUM, 0)) { /* First number greater than second. */ *err = REG_BADBR; return NULL; } } else { start = (token->type == OP_DUP_PLUS) ? 1 : 0; end = (token->type == OP_DUP_QUESTION) ? 1 : -1; } fetch_token (token, regexp, syntax); if (BE (elem == NULL, 0)) return NULL; if (BE (start == 0 && end == 0, 0)) { postorder (elem, free_tree, NULL); return NULL; } /* Extract "{n,m}" to "...{0,}". */ if (BE (start > 0, 0)) { tree = elem; for (i = 2; i <= start; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); if (BE (elem == NULL || tree == NULL, 0)) goto parse_dup_op_espace; } if (start == end) return tree; /* Duplicate ELEM before it is marked optional. */ elem = duplicate_tree (elem, dfa); old_tree = tree; } else old_tree = NULL; if (elem->token.type == SUBEXP) postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx); tree = create_tree (dfa, elem, NULL, (end == -1 ? OP_DUP_ASTERISK : OP_ALT)); if (BE (tree == NULL, 0)) goto parse_dup_op_espace; /* This loop is actually executed only when end != -1, to rewrite {0,n} as ((...?)?)?... We have already created the start+1-th copy. */ for (i = start + 2; i <= end; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); if (BE (elem == NULL || tree == NULL, 0)) goto parse_dup_op_espace; tree = create_tree (dfa, tree, NULL, OP_ALT); if (BE (tree == NULL, 0)) goto parse_dup_op_espace; } if (old_tree) tree = create_tree (dfa, old_tree, tree, CONCAT); return tree; parse_dup_op_espace: *err = REG_ESPACE; return NULL; } /* Size of the names for collating symbol/equivalence_class/character_class. I'm not sure, but maybe enough. */ #define BRACKET_NAME_BUF_SIZE 32 #ifndef _LIBC /* Local function for parse_bracket_exp only used in case of NOT _LIBC. Build the range expression which starts from START_ELEM, and ends at END_ELEM. The result are written to MBCSET and SBCSET. RANGE_ALLOC is the allocated size of mbcset->range_starts, and mbcset->range_ends, is a pointer argument sinse we may update it. */ static reg_errcode_t internal_function # ifdef RE_ENABLE_I18N 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 (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, 0)) return REG_ERANGE; /* We can handle no multi character collating elements without libc support. */ if (BE ((start_elem->type == COLL_SYM && strlen ((char *) start_elem->opr.name) > 1) || (end_elem->type == COLL_SYM && strlen ((char *) end_elem->opr.name) > 1), 0)) return REG_ECOLLATE; # ifdef RE_ENABLE_I18N { wchar_t wc; wint_t start_wc; wint_t end_wc; start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] : 0)); end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); #ifdef GAWK /* * Fedora Core 2, maybe others, have broken `btowc' that returns -1 * for any value > 127. Sigh. Note that `start_ch' and `end_ch' are * unsigned, so we don't have sign extension problems. */ start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) ? start_ch : start_elem->opr.wch); end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) ? end_ch : end_elem->opr.wch); #else start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) ? __btowc (start_ch) : start_elem->opr.wch); end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) ? __btowc (end_ch) : end_elem->opr.wch); #endif if (start_wc == WEOF || end_wc == WEOF) return REG_ECOLLATE; 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. However, for !_LIBC we have no collation elements: if the character set is single byte, the single byte character set that we build below suffices. parse_bracket_exp passes no MBCSET if dfa->mb_cur_max == 1. */ if (mbcset) { /* Check the space of the arrays. */ if (BE (*range_alloc == mbcset->nranges, 0)) { /* There is not enough space, need realloc. */ wchar_t *new_array_start, *new_array_end; int new_nranges; /* +1 in case of mbcset->nranges is 0. */ new_nranges = 2 * mbcset->nranges + 1; /* Use realloc since mbcset->range_starts and mbcset->range_ends are NULL if *range_alloc == 0. */ new_array_start = re_realloc (mbcset->range_starts, wchar_t, new_nranges); new_array_end = re_realloc (mbcset->range_ends, wchar_t, new_nranges); if (BE (new_array_start == NULL || new_array_end == NULL, 0)) return REG_ESPACE; mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } mbcset->range_starts[mbcset->nranges] = start_wc; mbcset->range_ends[mbcset->nranges++] = end_wc; } /* Build the table for single byte characters. */ for (wc = 0; wc < SBC_MAX; ++wc) { if (start_wc <= wc && wc <= end_wc) bitset_set (sbcset, wc); } } # else /* not RE_ENABLE_I18N */ { unsigned int ch; start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] : 0)); end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); if (start_ch > end_ch) return REG_ERANGE; /* Build the table for single byte characters. */ for (ch = 0; ch < SBC_MAX; ++ch) if (start_ch <= ch && ch <= end_ch) bitset_set (sbcset, ch); } # endif /* not RE_ENABLE_I18N */ return REG_NOERROR; } #endif /* not _LIBC */ #ifndef _LIBC /* Helper function for parse_bracket_exp only used in case of NOT _LIBC.. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument since we may update it. */ static reg_errcode_t internal_function # ifdef RE_ENABLE_I18N build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, int *coll_sym_alloc, const unsigned char *name) # else /* not RE_ENABLE_I18N */ build_collating_symbol (bitset_t sbcset, const unsigned char *name) # endif /* not RE_ENABLE_I18N */ { size_t name_len = strlen ((const char *) name); if (BE (name_len != 1, 0)) return REG_ECOLLATE; else { bitset_set (sbcset, name[0]); return REG_NOERROR; } } #endif /* not _LIBC */ /* This function parse bracket expression like "[abc]", "[a-c]", "[[.a-a.]]" etc. */ static bin_tree_t * parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) { #ifdef _LIBC const unsigned char *collseqmb; const char *collseqwc; uint32_t nrules; int32_t table_size; const int32_t *symb_table; const unsigned char *extra; /* Local function for parse_bracket_exp used in _LIBC environement. Seek the collating symbol entry correspondings to NAME. Return the index of the symbol in the SYMB_TABLE. */ auto inline int32_t __attribute ((always_inline)) seek_collating_symbol_entry (name, name_len) const unsigned char *name; size_t name_len; { int32_t hash = elem_hash ((const char *) name, name_len); int32_t elem = hash % table_size; if (symb_table[2 * elem] != 0) { int32_t second = hash % (table_size - 2) + 1; do { /* First compare the hashing value. */ if (symb_table[2 * elem] == hash /* Compare the length of the name. */ && name_len == extra[symb_table[2 * elem + 1]] /* Compare the name. */ && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], name_len) == 0) { /* Yep, this is the entry. */ break; } /* Next entry. */ elem += second; } while (symb_table[2 * elem] != 0); } return elem; } /* Local function for parse_bracket_exp used in _LIBC environment. Look up the collation sequence value of BR_ELEM. Return the value if succeeded, UINT_MAX otherwise. */ auto inline unsigned int __attribute ((always_inline)) lookup_collation_sequence_value (br_elem) bracket_elem_t *br_elem; { if (br_elem->type == SB_CHAR) { /* if (MB_CUR_MAX == 1) */ if (nrules == 0) return collseqmb[br_elem->opr.ch]; else { wint_t wc = __btowc (br_elem->opr.ch); return __collseq_table_lookup (collseqwc, wc); } } else if (br_elem->type == MB_CHAR) { if (nrules != 0) return __collseq_table_lookup (collseqwc, br_elem->opr.wch); } else if (br_elem->type == COLL_SYM) { size_t sym_name_len = strlen ((char *) br_elem->opr.name); if (nrules != 0) { int32_t elem, idx; elem = seek_collating_symbol_entry (br_elem->opr.name, sym_name_len); if (symb_table[2 * elem] != 0) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; /* Skip the byte sequence of the collating element. */ idx += 1 + extra[idx]; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; /* Skip the multibyte collation sequence value. */ idx += sizeof (unsigned int); /* Skip the wide char sequence of the collating element. */ idx += sizeof (unsigned int) * (1 + *(unsigned int *) (extra + idx)); /* Return the collation sequence value. */ return *(unsigned int *) (extra + idx); } else if (symb_table[2 * elem] == 0 && sym_name_len == 1) { /* No valid character. Match it as a single byte character. */ return collseqmb[br_elem->opr.name[0]]; } } else if (sym_name_len == 1) return collseqmb[br_elem->opr.name[0]]; } return UINT_MAX; } /* Local function for parse_bracket_exp used in _LIBC environement. Build the range expression which starts from START_ELEM, and ends at END_ELEM. The result are written to MBCSET and SBCSET. RANGE_ALLOC is the allocated size of mbcset->range_starts, and mbcset->range_ends, is a pointer argument sinse we may update it. */ auto inline reg_errcode_t __attribute ((always_inline)) build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) re_charset_t *mbcset; int *range_alloc; bitset_t sbcset; bracket_elem_t *start_elem, *end_elem; { unsigned int ch; uint32_t start_collseq; uint32_t end_collseq; /* Equivalence Classes and Character Classes can't be a range start/end. */ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0)) return REG_ERANGE; start_collseq = lookup_collation_sequence_value (start_elem); end_collseq = lookup_collation_sequence_value (end_elem); /* Check start/end collation sequence values. */ if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0)) return REG_ECOLLATE; if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. However, if we have no collation elements, and the character set is single byte, the single byte character set that we build below suffices. */ if (nrules > 0 || dfa->mb_cur_max > 1) { /* Check the space of the arrays. */ if (BE (*range_alloc == mbcset->nranges, 0)) { /* There is not enough space, need realloc. */ uint32_t *new_array_start; uint32_t *new_array_end; int new_nranges; /* +1 in case of mbcset->nranges is 0. */ new_nranges = 2 * mbcset->nranges + 1; new_array_start = re_realloc (mbcset->range_starts, uint32_t, new_nranges); new_array_end = re_realloc (mbcset->range_ends, uint32_t, new_nranges); if (BE (new_array_start == NULL || new_array_end == NULL, 0)) return REG_ESPACE; mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } mbcset->range_starts[mbcset->nranges] = start_collseq; mbcset->range_ends[mbcset->nranges++] = end_collseq; } /* Build the table for single byte characters. */ for (ch = 0; ch < SBC_MAX; ch++) { uint32_t ch_collseq; /* if (MB_CUR_MAX == 1) */ if (nrules == 0) ch_collseq = collseqmb[ch]; else ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) bitset_set (sbcset, ch); } return REG_NOERROR; } /* Local function for parse_bracket_exp used in _LIBC environement. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument sinse we may update it. */ auto inline reg_errcode_t __attribute ((always_inline)) build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) re_charset_t *mbcset; int *coll_sym_alloc; bitset_t sbcset; const unsigned char *name; { int32_t elem, idx; size_t name_len = strlen ((const char *) name); if (nrules != 0) { elem = seek_collating_symbol_entry (name, name_len); if (symb_table[2 * elem] != 0) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; } else if (symb_table[2 * elem] == 0 && name_len == 1) { /* No valid character, treat it as a normal character. */ bitset_set (sbcset, name[0]); return REG_NOERROR; } else return REG_ECOLLATE; /* Got valid collation sequence, add it as a new entry. */ /* Check the space of the arrays. */ if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->ncoll_syms is 0. */ int new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; /* Use realloc since mbcset->coll_syms is NULL if *alloc == 0. */ int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t, new_coll_sym_alloc); if (BE (new_coll_syms == NULL, 0)) return REG_ESPACE; mbcset->coll_syms = new_coll_syms; *coll_sym_alloc = new_coll_sym_alloc; } mbcset->coll_syms[mbcset->ncoll_syms++] = idx; return REG_NOERROR; } else { if (BE (name_len != 1, 0)) return REG_ECOLLATE; else { bitset_set (sbcset, name[0]); return REG_NOERROR; } } } #endif re_token_t br_token; re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; int coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; int equiv_class_alloc = 0, char_class_alloc = 0; #endif /* not RE_ENABLE_I18N */ int non_match = 0; bin_tree_t *work_tree; int token_len; int first_round = 1; #ifdef _LIBC collseqmb = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules) { /* if (MB_CUR_MAX > 1) */ collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); } #endif sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N if (BE (sbcset == NULL || mbcset == NULL, 0)) #else if (BE (sbcset == NULL, 0)) #endif /* RE_ENABLE_I18N */ { re_free (sbcset); #ifdef RE_ENABLE_I18N re_free (mbcset); #endif *err = REG_ESPACE; return NULL; } token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } if (token->type == OP_NON_MATCH_LIST) { #ifdef RE_ENABLE_I18N mbcset->non_match = 1; #endif /* not RE_ENABLE_I18N */ non_match = 1; if (syntax & RE_HAT_LISTS_NOT_NEWLINE) bitset_set (sbcset, '\n'); re_string_skip_bytes (regexp, token_len); /* Skip a token. */ token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } } /* We treat the first ']' as a normal character. */ if (token->type == OP_CLOSE_BRACKET) token->type = CHARACTER; while (1) { bracket_elem_t start_elem, end_elem; unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE]; unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE]; reg_errcode_t ret; int token_len2 = 0, is_range_exp = 0; re_token_t token2; start_elem.opr.name = start_name_buf; ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, syntax, first_round); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } first_round = 0; /* Get information about the next token. We need it in any case. */ token_len = peek_token_bracket (token, regexp, syntax); /* Do not check for ranges if we know they are not allowed. */ if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS) { if (BE (token->type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token->type == OP_CHARSET_RANGE) { re_string_skip_bytes (regexp, token_len); /* Skip '-'. */ token_len2 = peek_token_bracket (&token2, regexp, syntax); if (BE (token2.type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token2.type == OP_CLOSE_BRACKET) { /* We treat the last '-' as a normal character. */ re_string_skip_bytes (regexp, -token_len); token->type = CHARACTER; } else is_range_exp = 1; } } if (is_range_exp == 1) { end_elem.opr.name = end_name_buf; ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, dfa, syntax, 1); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } token_len = peek_token_bracket (token, regexp, syntax); #ifdef _LIBC *err = build_range_exp (syntax, sbcset, mbcset, &range_alloc, &start_elem, &end_elem); #else # ifdef RE_ENABLE_I18N *err = build_range_exp (syntax, sbcset, dfa->mb_cur_max > 1 ? mbcset : NULL, &range_alloc, &start_elem, &end_elem); # else *err = build_range_exp (syntax, sbcset, &start_elem, &end_elem); # endif #endif /* RE_ENABLE_I18N */ if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; } else { switch (start_elem.type) { case SB_CHAR: bitset_set (sbcset, start_elem.opr.ch); break; #ifdef RE_ENABLE_I18N case MB_CHAR: /* Check whether the array has enough space. */ if (BE (mbchar_alloc == mbcset->nmbchars, 0)) { wchar_t *new_mbchars; /* Not enough, realloc it. */ /* +1 in case of mbcset->nmbchars is 0. */ mbchar_alloc = 2 * mbcset->nmbchars + 1; /* Use realloc since array is NULL if *alloc == 0. */ new_mbchars = re_realloc (mbcset->mbchars, wchar_t, mbchar_alloc); if (BE (new_mbchars == NULL, 0)) goto parse_bracket_exp_espace; mbcset->mbchars = new_mbchars; } mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; break; #endif /* RE_ENABLE_I18N */ case EQUIV_CLASS: *err = build_equiv_class (sbcset, #ifdef RE_ENABLE_I18N mbcset, &equiv_class_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case COLL_SYM: *err = build_collating_symbol (sbcset, #ifdef RE_ENABLE_I18N mbcset, &coll_sym_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case CHAR_CLASS: *err = build_charclass (regexp->trans, sbcset, #ifdef RE_ENABLE_I18N mbcset, &char_class_alloc, #endif /* RE_ENABLE_I18N */ (const char *) start_elem.opr.name, syntax); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; default: assert (0); break; } } if (BE (token->type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token->type == OP_CLOSE_BRACKET) break; } re_string_skip_bytes (regexp, token_len); /* Skip a token. */ /* If it is non-matching list. */ if (non_match) bitset_not (sbcset); #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes || mbcset->non_match))) { bin_tree_t *mbc_tree; int sbc_idx; /* Build a tree for complex bracket. */ dfa->has_mb_node = 1; br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (mbc_tree == NULL, 0)) goto parse_bracket_exp_espace; for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx) if (sbcset[sbc_idx]) break; /* If there are no bits set in sbcset, there is no point of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */ if (sbc_idx < BITSET_WORDS) { /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; /* Then join them by ALT node. */ work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; } else { re_free (sbcset); work_tree = mbc_tree; } } else #endif /* not RE_ENABLE_I18N */ { #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; } return work_tree; parse_bracket_exp_espace: *err = REG_ESPACE; parse_bracket_exp_free_return: re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ return NULL; } /* Parse an element in the bracket expression. */ static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, int accept_hyphen) { #ifdef RE_ENABLE_I18N int cur_char_size; cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); if (cur_char_size > 1) { elem->type = MB_CHAR; elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp)); re_string_skip_bytes (regexp, cur_char_size); return REG_NOERROR; } #endif /* RE_ENABLE_I18N */ re_string_skip_bytes (regexp, token_len); /* Skip a token. */ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS || token->type == OP_OPEN_EQUIV_CLASS) return parse_bracket_symbol (elem, regexp, token); if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen) { /* A '-' must only appear as anything but a range indicator before the closing bracket. Everything else is an error. */ re_token_t token2; (void) peek_token_bracket (&token2, regexp, syntax); if (token2.type != OP_CLOSE_BRACKET) /* The actual error value is not standardized since this whole case is undefined. But ERANGE makes good sense. */ return REG_ERANGE; } elem->type = SB_CHAR; elem->opr.ch = token->opr.c; return REG_NOERROR; } /* Parse a bracket symbol in the bracket expression. Bracket symbols are such as [::], [..], and [==]. */ static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token) { unsigned char ch, delim = token->opr.c; int i = 0; if (re_string_eoi(regexp)) return REG_EBRACK; for (;; ++i) { if (i >= BRACKET_NAME_BUF_SIZE) return REG_EBRACK; if (token->type == OP_OPEN_CHAR_CLASS) ch = re_string_fetch_byte_case (regexp); else ch = re_string_fetch_byte (regexp); if (re_string_eoi(regexp)) return REG_EBRACK; if (ch == delim && re_string_peek_byte (regexp, 0) == ']') break; elem->opr.name[i] = ch; } re_string_skip_bytes (regexp, 1); elem->opr.name[i] = '\0'; switch (token->type) { case OP_OPEN_COLL_ELEM: elem->type = COLL_SYM; break; case OP_OPEN_EQUIV_CLASS: elem->type = EQUIV_CLASS; break; case OP_OPEN_CHAR_CLASS: elem->type = CHAR_CLASS; break; default: break; } return REG_NOERROR; } /* Helper function for parse_bracket_exp. Build the equivalence class which is represented by NAME. The result are written to MBCSET and SBCSET. EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes, is a pointer argument sinse we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, int *equiv_class_alloc, const unsigned char *name) #else /* not RE_ENABLE_I18N */ build_equiv_class (bitset_t sbcset, const unsigned char *name) #endif /* not RE_ENABLE_I18N */ { #ifdef _LIBC uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { const int32_t *table, *indirect; const unsigned char *weights, *extra, *cp; unsigned char char_buf[2]; int32_t idx1, idx2; unsigned int ch; size_t len; /* This #include defines a local function! */ # include /* Calculate the index for equivalence class. */ cp = name; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); idx1 = findidx (&cp, -1); if (BE (idx1 == 0 || *cp != '\0', 0)) /* This isn't a valid character. */ return REG_ECOLLATE; /* Build single byte matcing table for this equivalence class. */ char_buf[1] = (unsigned char) '\0'; len = weights[idx1 & 0xffffff]; for (ch = 0; ch < SBC_MAX; ++ch) { char_buf[0] = ch; cp = char_buf; idx2 = findidx (&cp, 1); /* idx2 = table[ch]; */ if (idx2 == 0) /* This isn't a valid character. */ continue; /* Compare only if the length matches and the collation rule index is the same. */ if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)) { int cnt = 0; while (cnt <= len && weights[(idx1 & 0xffffff) + 1 + cnt] == weights[(idx2 & 0xffffff) + 1 + cnt]) ++cnt; if (cnt > len) bitset_set (sbcset, ch); } } /* Check whether the array has enough space. */ if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nequiv_classes is 0. */ int new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; /* Use realloc since the array is NULL if *alloc == 0. */ int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes, int32_t, new_equiv_class_alloc); if (BE (new_equiv_classes == NULL, 0)) return REG_ESPACE; mbcset->equiv_classes = new_equiv_classes; *equiv_class_alloc = new_equiv_class_alloc; } mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; } else #endif /* _LIBC */ { if (BE (strlen ((const char *) name) != 1, 0)) return REG_ECOLLATE; bitset_set (sbcset, *name); } return REG_NOERROR; } /* Helper function for parse_bracket_exp. Build the character class which is represented by NAME. The result are written to MBCSET and SBCSET. CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes, is a pointer argument sinse we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, int *char_class_alloc, const char *class_name, reg_syntax_t syntax) #else /* not RE_ENABLE_I18N */ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, const char *class_name, reg_syntax_t syntax) #endif /* not RE_ENABLE_I18N */ { int i; /* In case of REG_ICASE "upper" and "lower" match the both of upper and lower cases. */ if ((syntax & RE_ICASE) && (strcmp (class_name, "upper") == 0 || strcmp (class_name, "lower") == 0)) class_name = "alpha"; #ifdef RE_ENABLE_I18N /* Check the space of the arrays. */ if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nchar_classes is 0. */ int new_char_class_alloc = 2 * mbcset->nchar_classes + 1; /* Use realloc since array is NULL if *alloc == 0. */ wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t, new_char_class_alloc); if (BE (new_char_classes == NULL, 0)) return REG_ESPACE; mbcset->char_classes = new_char_classes; *char_class_alloc = new_char_class_alloc; } mbcset->char_classes[mbcset->nchar_classes++] = __wctype (class_name); #endif /* RE_ENABLE_I18N */ #define BUILD_CHARCLASS_LOOP(ctype_func) \ do { \ if (BE (trans != NULL, 0)) \ { \ for (i = 0; i < SBC_MAX; ++i) \ if (ctype_func (i)) \ bitset_set (sbcset, trans[i]); \ } \ else \ { \ for (i = 0; i < SBC_MAX; ++i) \ if (ctype_func (i)) \ bitset_set (sbcset, i); \ } \ } while (0) if (strcmp (class_name, "alnum") == 0) BUILD_CHARCLASS_LOOP (isalnum); else if (strcmp (class_name, "cntrl") == 0) BUILD_CHARCLASS_LOOP (iscntrl); else if (strcmp (class_name, "lower") == 0) BUILD_CHARCLASS_LOOP (islower); else if (strcmp (class_name, "space") == 0) BUILD_CHARCLASS_LOOP (isspace); else if (strcmp (class_name, "alpha") == 0) BUILD_CHARCLASS_LOOP (isalpha); else if (strcmp (class_name, "digit") == 0) BUILD_CHARCLASS_LOOP (isdigit); else if (strcmp (class_name, "print") == 0) BUILD_CHARCLASS_LOOP (isprint); else if (strcmp (class_name, "upper") == 0) BUILD_CHARCLASS_LOOP (isupper); else if (strcmp (class_name, "blank") == 0) #ifndef GAWK BUILD_CHARCLASS_LOOP (isblank); #else /* see comments above */ BUILD_CHARCLASS_LOOP (is_blank); #endif else if (strcmp (class_name, "graph") == 0) BUILD_CHARCLASS_LOOP (isgraph); else if (strcmp (class_name, "punct") == 0) BUILD_CHARCLASS_LOOP (ispunct); else if (strcmp (class_name, "xdigit") == 0) BUILD_CHARCLASS_LOOP (isxdigit); else return REG_ECTYPE; return REG_NOERROR; } static bin_tree_t * build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const char *class_name, const char *extra, int non_match, reg_errcode_t *err) { re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; int alloc = 0; #endif /* not RE_ENABLE_I18N */ reg_errcode_t ret; re_token_t br_token; bin_tree_t *tree; sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N if (BE (sbcset == NULL || mbcset == NULL, 0)) #else /* not RE_ENABLE_I18N */ if (BE (sbcset == NULL, 0)) #endif /* not RE_ENABLE_I18N */ { *err = REG_ESPACE; return NULL; } if (non_match) { #ifdef RE_ENABLE_I18N mbcset->non_match = 1; #endif /* not RE_ENABLE_I18N */ } /* We don't care the syntax in this case. */ ret = build_charclass (trans, sbcset, #ifdef RE_ENABLE_I18N mbcset, &alloc, #endif /* RE_ENABLE_I18N */ class_name, 0); if (BE (ret != REG_NOERROR, 0)) { re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ *err = ret; return NULL; } /* \w match '_' also. */ for (; *extra; extra++) bitset_set (sbcset, *extra); /* If it is non-matching list. */ if (non_match) bitset_not (sbcset); #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); #endif /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (tree == NULL, 0)) goto build_word_op_espace; #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { bin_tree_t *mbc_tree; /* Build a tree for complex bracket. */ br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; dfa->has_mb_node = 1; mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (mbc_tree == NULL, 0)) goto build_word_op_espace; /* Then join them by ALT node. */ tree = create_tree (dfa, tree, mbc_tree, OP_ALT); if (BE (mbc_tree != NULL, 1)) return tree; } else { free_charset (mbcset); return tree; } #else /* not RE_ENABLE_I18N */ return tree; #endif /* not RE_ENABLE_I18N */ build_word_op_espace: re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ *err = REG_ESPACE; return NULL; } /* This is intended for the expressions like "a{1,3}". Fetch a number from `input', and return the number. Return -1, if the number field is empty like "{,1}". Return -2, If an error is occured. */ static int fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) { int num = -1; unsigned char c; while (1) { fetch_token (token, input, syntax); c = token->opr.c; if (BE (token->type == END_OF_RE, 0)) return -2; if (token->type == OP_CLOSE_DUP_NUM || c == ',') break; num = ((token->type != CHARACTER || c < '0' || '9' < c || num == -2) ? -2 : ((num == -1) ? c - '0' : num * 10 + c - '0')); num = (num > RE_DUP_MAX) ? -2 : num; } return num; } #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset) { re_free (cset->mbchars); # ifdef _LIBC re_free (cset->coll_syms); re_free (cset->equiv_classes); re_free (cset->range_starts); re_free (cset->range_ends); # endif re_free (cset->char_classes); re_free (cset); } #endif /* RE_ENABLE_I18N */ /* Functions for binary tree operation. */ /* Create a tree node. */ static bin_tree_t * create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type) { re_token_t t; t.type = type; return create_token_tree (dfa, left, right, &t); } static bin_tree_t * create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token) { bin_tree_t *tree; if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0)) { bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1); if (storage == NULL) return NULL; storage->next = dfa->str_tree_storage; dfa->str_tree_storage = storage; dfa->str_tree_storage_idx = 0; } tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++]; tree->parent = NULL; tree->left = left; tree->right = right; tree->token = *token; tree->token.duplicated = 0; tree->token.opt_subexp = 0; tree->first = NULL; tree->next = NULL; tree->node_idx = -1; if (left != NULL) left->parent = tree; if (right != NULL) right->parent = tree; return tree; } /* Mark the tree SRC as an optional subexpression. To be called from preorder or postorder. */ static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node) { int idx = (int) (long) extra; if (node->token.type == SUBEXP && node->token.opr.idx == idx) node->token.opt_subexp = 1; return REG_NOERROR; } /* Free the allocated memory inside NODE. */ static void free_token (re_token_t *node) { #ifdef RE_ENABLE_I18N if (node->type == COMPLEX_BRACKET && node->duplicated == 0) free_charset (node->opr.mbcset); else #endif /* RE_ENABLE_I18N */ if (node->type == SIMPLE_BRACKET && node->duplicated == 0) re_free (node->opr.sbcset); } /* Worker function for tree walking. Free the allocated memory inside NODE and its children. */ static reg_errcode_t free_tree (void *extra, bin_tree_t *node) { free_token (&node->token); return REG_NOERROR; } /* Duplicate the node SRC, and return new node. This is a preorder visit similar to the one implemented by the generic visitor, but we need more infrastructure to maintain two parallel trees --- so, it's easier to duplicate. */ static bin_tree_t * duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa) { const bin_tree_t *node; bin_tree_t *dup_root; bin_tree_t **p_new = &dup_root, *dup_node = root->parent; for (node = root; ; ) { /* Create a new tree and link it back to the current parent. */ *p_new = create_token_tree (dfa, NULL, NULL, &node->token); if (*p_new == NULL) return NULL; (*p_new)->parent = dup_node; (*p_new)->token.duplicated = 1; dup_node = *p_new; /* Go to the left node, or up and to the right. */ if (node->left) { node = node->left; p_new = &dup_node->left; } else { const bin_tree_t *prev = NULL; while (node->right == prev || node->right == NULL) { prev = node; node = node->parent; dup_node = dup_node->parent; if (!node) return dup_root; } node = node->right; p_new = &dup_node->right; } } } gawk-4.0.1+dfsg.orig/main.c0000644000175000017500000011361411734665352014457 0ustar schotschot/* * main.c -- Code generator and main program for gawk. */ /* * 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. * * 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 */ /* FIX THIS BEFORE EVERY RELEASE: */ #define UPDATE_YEAR 2012 #include "awk.h" #include "getopt.h" #ifdef HAVE_MCHECK_H #include #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(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(void *fault_address, int serious); static void catchstackoverflow(int emergency, stackoverflow_context_t scp); #endif 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; 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; long FNR; int BINMODE; int IGNORECASE; char *OFS; char *ORS; char *OFMT; char *TEXTDOMAIN; /* * CONVFMT is a convenience pointer for the current number to string format. * We must supply an initial value to avoid recursion problems of * set_CONVFMT -> fmt_index -> r_force_string: gets NULL CONVFMT * Fun, fun, fun, fun. */ char *CONVFMT = "%.6g"; NODE *Nnull_string; /* The global null string */ #if defined(HAVE_LOCALE_H) struct lconv loc; /* current locale */ static void init_locale(struct lconv *l); #endif /* defined(HAVE_LOCALE_H) */ /* The name the program was invoked under, for error messages */ const char *myname; /* A block of AWK code to be run */ INSTRUCTION *code_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 exit_val = EXIT_SUCCESS; /* exit value */ #if defined(YYDEBUG) || defined(GAWKDEBUG) extern int yydebug; #endif 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 */ static void add_preassign(enum assign_type type, char *val); #undef do_lint #undef do_lint_old int do_traditional = FALSE; /* no gnu extensions, add traditional weirdnesses */ int do_posix = FALSE; /* turn off gnu and unix extensions */ int do_lint = FALSE; /* provide warnings about questionable stuff */ int do_lint_old = FALSE; /* warn about stuff not in V7 awk */ 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, 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 = 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 */ #if MBS_SUPPORT int gawk_mb_cur_max; /* MB_CUR_MAX value, see comment in main() */ #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 GETGROUPS_T *groupset; /* current group set */ int ngroups; /* size of said set */ #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[] = { { "traditional", no_argument, & do_traditional, 1 }, { "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-pot", no_argument, & do_intl, 1 }, { "non-decimal-data", no_argument, & do_non_decimal_data, 1 }, { "profile", optional_argument, NULL, 'p' }, { "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, 'e' }, { "dump-variables", optional_argument, NULL, 'd' }, { "assign", required_argument, NULL, 'v' }, { "version", no_argument, NULL, 'V' }, { "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, 'Y' }, #endif { NULL, 0, NULL, '\0' } }; #ifdef NO_LINT #define do_lint 0 #define do_lint_old 0 #endif /* main --- process args, parse program, run it, clean up */ int main(int argc, char **argv) { /* * 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; int i; int c; char *scan, *src; char *extra_stack; /* do these checks early */ do_tidy_mem = (getenv("TIDYMEM") != NULL); #ifdef HAVE_MCHECK_H #ifdef HAVE_MTRACE if (do_tidy_mem) mtrace(); #endif /* HAVE_MTRACE */ #endif /* HAVE_MCHECK_H */ #if defined(LC_CTYPE) setlocale(LC_CTYPE, ""); #endif #if defined(LC_COLLATE) setlocale(LC_COLLATE, ""); #endif #if defined(LC_MESSAGES) setlocale(LC_MESSAGES, ""); #endif #if defined(LC_NUMERIC) && defined(HAVE_LOCALE_H) /* * Force the issue here. According to POSIX 2001, decimal * point is used for parsing source code and for command-line * assignments and the locale value for processing input, * number to string conversion, and printing output. * * 10/2005 --- see below also; we now only use the locale's * decimal point if do_posix in effect. * * 9/2007: * This is a mess. We need to get the locale's numeric info for * the thousands separator for the %'d flag. */ setlocale(LC_NUMERIC, ""); init_locale(& loc); setlocale(LC_NUMERIC, "C"); #endif #if defined(LC_TIME) setlocale(LC_TIME, ""); #endif #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 * this value once makes a speed difference. */ 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); (void) textdomain(PACKAGE); (void) signal(SIGFPE, catchsig); #ifdef SIGBUS (void) signal(SIGBUS, catchsig); #endif (void) sigsegv_install_handler(catchsegv); #define STACK_SIZE (16*1024) 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 */ if (argc < 2) usage(EXIT_FAILURE, stderr); /* Robustness: check that file descriptors 0, 1, 2 are open */ init_fds(); /* 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; optopt = 0, old_optind = optind) { if (do_posix) opterr = TRUE; switch (c) { case 'F': add_preassign(PRE_ASSIGN_FS, optarg); break; case 'E': disallow_var_assigns = TRUE; /* fall through */ case 'f': /* * 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((unsigned char) *scan)) scan++; 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': add_preassign(PRE_ASSIGN, optarg); break; case 'm': /* * BWK awk extension. * -mf nnn set # fields, gawk ignores * -mr nnn set record length, ditto * * 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'")); break; case 'b': do_binary = TRUE; break; case 'c': do_traditional = TRUE; break; case 'C': copyleft(); break; case 'd': do_dump_vars = TRUE; if (optarg != NULL && optarg[0] != '\0') varfile = optarg; break; 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) lintfunc = r_fatal; 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++; break; case 'p': do_profiling = TRUE; if (optarg != NULL) set_prof_file(optarg); else set_prof_file(DEFAULT_PROFILE); break; case 'P': do_posix = TRUE; 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 * instead of returning a letter. Do nothing, just * cycle around for the next one. */ break; case 'Y': case 'R': #if defined(YYDEBUG) || defined(GAWKDEBUG) if (c == 'Y') { yydebug = 2; break; } #endif if (c == 'R' && which_gawk == exe_debugging) { if (optarg[0] != '\0') command_file = optarg; break; } /* if not debugging or dgawk, fall through */ case '?': default: /* * 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 * argument. We care because if opterr is 0, then * getopt_long won't print the error message for us. */ if (! do_posix && (optopt == '\0' || strchr(optlist, optopt) == NULL)) { /* * can't just do optind--. In case of an * option with >= 2 letters, getopt_long * won't have incremented optind. */ optind = old_optind; stopped_early = TRUE; goto out; } else if (optopt != '\0') { /* Use POSIX required message format */ fprintf(stderr, _("%s: option requires an argument -- %c\n"), myname, optopt); usage(EXIT_FAILURE, stderr); } /* else let getopt print error message for us */ break; } if (c == 'E') /* --exec ends option processing */ break; } out: if (do_nostalgia) nostalgia(); /* check for POSIXLY_CORRECT environment variable */ if (! do_posix && getenv("POSIXLY_CORRECT") != NULL) { do_posix = TRUE; if (do_lint) lintwarn( _("environment variable `POSIXLY_CORRECT' set: turning on `--posix'")); } if (do_posix) { use_lc_numeric = TRUE; if (do_traditional) /* both on command line */ warning(_("`--posix' overrides `--traditional'")); else do_traditional = TRUE; /* * POSIX compliance also implies * no GNU extensions either. */ } if (do_traditional && do_non_decimal_data) { do_non_decimal_data = FALSE; warning(_("`--posix'/`--traditional' overrides `--non-decimal-data'")); } 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. */ if (! do_profiling) init_profiling(& do_profiling, DEFAULT_PROFILE); /* load group set */ init_groupset(); /* initialize the null string */ Nnull_string = make_string("", 0); Nnull_string->numbr = 0.0; Nnull_string->type = Node_val; Nnull_string->flags = (PERM|STRCUR|STRING|NUMCUR|NUMBER); /* * Tell the regex routines how they should work. * Do this before initializing variables, since * they could want to do a regexp compile. */ resetup(); (void) grow_stack(); /* Set up the special variables */ init_vars(); /* Set up the field variables */ init_fields(); /* Now process the pre-assignments */ for (i = 0; i <= numassigns; i++) { if (preassigns[i].type == PRE_ASSIGN) (void) arg_assign(preassigns[i].val, TRUE); else /* PRE_ASSIGN_FS */ cmdline_fs(preassigns[i].val); efree(preassigns[i].val); } if (preassigns != NULL) efree(preassigns); if ((BINMODE & 1) != 0) if (os_setbinmode(fileno(stdin), O_BINARY) == -1) fatal(_("can't set binary mode on stdin (%s)"), strerror(errno)); if ((BINMODE & 2) != 0) { if (os_setbinmode(fileno(stdout), O_BINARY) == -1) fatal(_("can't set binary mode on stdout (%s)"), strerror(errno)); if (os_setbinmode(fileno(stderr), O_BINARY) == -1) fatal(_("can't set binary mode on stderr (%s)"), strerror(errno)); } #ifdef GAWKDEBUG setbuf(stdout, (char *) NULL); /* make debugging easier */ #endif if (os_isatty(fileno(stdout))) output_is_tty = TRUE; /* No -f or --source options, use next arg */ if (srcfiles->next == srcfiles) { if (optind > argc - 1 || stopped_early) /* no args left or no program */ usage(EXIT_FAILURE, stderr); (void) add_srcfile(SRC_CMDLINE, argv[optind], srcfiles, NULL, NULL); optind++; } init_args(optind, argc, do_posix ? argv[0] : myname, argv); #if defined(LC_NUMERIC) /* * FRAGILE! CAREFUL! * Pre-initing the variables with arg_assign() can change the * locale. Force it to C before parsing the program. */ setlocale(LC_NUMERIC, "C"); #endif /* Read in the program */ if (parse_program(&code_block) != 0) exit(EXIT_FAILURE); if (do_intl) exit(EXIT_SUCCESS); 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) /* * See comment above about using locale's decimal point. * * 10/2005: * Bitter experience teaches us that most people the world over * use period as the decimal point, not whatever their locale * uses. Thus, only use the locale's decimal point if being * posixly anal-retentive. * * 7/2007: * Be a little bit kinder. Allow the --use-lc-numeric option * to also use the local decimal point. This avoids the draconian * strictness of POSIX mode if someone just wants to parse their * data using the local decimal point. */ if (use_lc_numeric) setlocale(LC_NUMERIC, ""); #endif interpret(code_block); if (do_profiling) { dump_prog(code_block); dump_funcs(); } if (do_dump_vars) dump_vars(varfile); 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_preassign --- add one element to preassigns */ static void add_preassign(enum assign_type type, char *val) { static long alloc_assigns; /* for how many are allocated */ #define INIT_SRC 4 ++numassigns; 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"); } preassigns[numassigns].type = type; preassigns[numassigns].val = estrdup(val, strlen(val)); #undef INIT_SRC } /* usage --- print usage information and exit */ 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); fprintf(fp, _("Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"), myname, quote, quote); /* GNU long options info. This is too many options. */ 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(_("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-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-Y\t\t--parsedebug\n"), fp); #endif /* This is one string to make things easier on translators. */ /* 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 */ fputs(_("\nTo report bugs, see node `Bugs' in `gawk.info', which is\n\ section `Reporting Problems and Bugs' in the printed version.\n\n"), fp); /* ditto */ fputs(_("gawk is a pattern scanning and processing language.\n\ By default it reads standard input and writes standard output.\n\n"), fp); /* ditto */ fputs(_("Examples:\n\tgawk '{ sum += $1 }; END { print sum }' file\n\ \tgawk -F: '{ print $1 }' /etc/passwd\n"), fp); fflush(fp); if (ferror(fp)) { if (fp == stdout) warning(_("error writing standard output (%s)"), strerror(errno)); exit(EXIT_FAILURE); } exit(exitval); } /* copyleft --- print out the short GNU copyright information */ static void copyleft() { static const char blurb_part1[] = N_("Copyright (C) 1989, 1991-%d Free Software Foundation.\n\ \n\ This program is free software; you can redistribute it and/or modify\n\ 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"); static const char blurb_part2[] = N_("This program is distributed in the hope that it will be useful,\n\ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\ GNU General Public License for more details.\n\ \n"); static const char blurb_part3[] = 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"); /* multiple blurbs are needed for some brain dead compilers. */ printf(_(blurb_part1), UPDATE_YEAR); /* Last update year */ fputs(_(blurb_part2), stdout); fputs(_(blurb_part3), stdout); fflush(stdout); if (ferror(stdout)) { warning(_("error writing standard output (%s)"), strerror(errno)); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); } /* cmdline_fs --- set FS from the command line */ static void cmdline_fs(char *str) { NODE **tmp; 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". */ if (str[0] == 't' && str[1] == '\0') { if (do_lint) lintwarn(_("-Ft does not set FS to tab in POSIX awk")); if (do_traditional && ! do_posix) str[0] = '\t'; } *tmp = make_str_node(str, strlen(str), SCAN); /* do process escapes */ set_FS(); } /* init_args --- set up ARGV from stuff on the command line */ static void init_args(int argc0, int argc, const char *argv0, char **argv) { int i, j; NODE **aptr; NODE *tmp; 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++, 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; } ARGC_node = install_symbol(estrdup("ARGC", 4), mk_symbol(Node_var, make_number((AWKNUM) j))); } /* * Set all the special variables to their initial values. * Note that some of the variables that have set_FOO routines should * *N*O*T* have those routines called upon initialization, and thus * they have NULL entries in that field. This is notably true of FS * and IGNORECASE. */ struct varinit { NODE **spec; const char *name; 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", 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 */ static void init_vars() { const struct varinit *vp; NODE *n; 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_symbol(estrdup(vp->name, strlen(vp->name)), n); if (vp->do_assign) (*(vp->assign))(); } /* Set up deferred variables (loaded only when accessed). */ if (! do_traditional) register_deferred_variable("PROCINFO", load_procinfo); register_deferred_variable("ENVIRON", load_environ); } /* load_environ --- populate the ENVIRON array */ static NODE * load_environ() { #if ! (defined(VMS) && defined(__DECC)) extern char **environ; #endif char *var, *val; NODE **aptr; int i; NODE *tmp; ENVIRON_node = install_symbol(estrdup("ENVIRON", 7), mk_symbol(Node_var_array, (NODE *) NULL)); for (i = 0; environ[i] != NULL; i++) { static char nullstr[] = ""; var = environ[i]; val = strchr(var, '='); if (val != NULL) *val++ = '\0'; else val = nullstr; 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; /* restore '=' so that system() gets a valid environment */ if (val != nullstr) *--val = '='; } /* * Put AWKPATH into ENVIRON if it's not there. * This allows querying it from within awk programs. */ 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. */ val = getenv("AWKPATH"); if (val == NULL) val = defpath; aptr = assoc_lookup(ENVIRON_node, tmp, FALSE); unref(*aptr); *aptr = make_string(val, strlen(val)); } unref(tmp); return ENVIRON_node; } /* load_procinfo --- populate the PROCINFO array */ static NODE * load_procinfo() { #if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 int i; char name[100]; #endif AWKNUM value; 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 */ #else #define getpgrp_arg() getpid() #endif value = getpgrp(getpgrp_arg()); 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. */ value = getpid(); update_PROCINFO_num("pid", value); value = getppid(); update_PROCINFO_num("ppid", value); value = getuid(); update_PROCINFO_num("uid", value); value = geteuid(); update_PROCINFO_num("euid", value); value = getgid(); update_PROCINFO_num("gid", value); value = getegid(); 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; } #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]; update_PROCINFO_num(name, value); } if (groupset) { efree(groupset); groupset = NULL; } #endif return PROCINFO_node; } /* is_std_var --- return true if a variable is a standard variable */ int is_std_var(const char *var) { const struct varinit *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; return TRUE; } } 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 arg_assign(char *arg, int initing) { char *cp, *cp2; int badvar; NODE *var; NODE *it; NODE **lhs; long save_FNR; if (! initing && disallow_var_assigns) return FALSE; /* --exec */ cp = strchr(arg, '='); if (cp == NULL) { if (! initing) return FALSE; /* This is file name, not assignment. */ fprintf(stderr, _("%s: `%s' argument to `-v' not in `var=value' form\n\n"), myname, arg); usage(EXIT_FAILURE, stderr); } *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((unsigned char) arg[0]) && arg[0] != '_') badvar = TRUE; else for (cp2 = arg+1; *cp2; cp2++) if (! isalnum((unsigned char) *cp2) && *cp2 != '_') { badvar = TRUE; break; } if (badvar) { if (initing) fatal(_("`%s' is not a legal variable name"), arg); if (do_lint) lintwarn(_("`%s' is not a variable name, looking for file `%s=%s'"), arg, arg, cp); } else { 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); } /* * BWK awk expands escapes inside assignments. * This makes sense, so we do it too. */ it = make_str_node(cp, strlen(cp), SCAN); it->flags |= MAYBE_NUM; #ifdef LC_NUMERIC /* * See comment above about locale decimal point. */ if (do_posix) setlocale(LC_NUMERIC, "C"); (void) force_number(it); if (do_posix) setlocale(LC_NUMERIC, ""); #endif /* LC_NUMERIC */ /* * 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; /* 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; } /* catchsig --- catch signals */ static RETSIGTYPE catchsig(int sig) { if (sig == SIGFPE) { fatal(_("floating point exception")); } else if (sig == SIGSEGV #ifdef SIGBUS || sig == SIGBUS #endif ) { set_loc(__FILE__, __LINE__); msg(_("fatal error: internal error")); /* fatal won't abort() if not compiled for debugging */ abort(); } else cant_happen(); /* NOTREACHED */ } #ifdef HAVE_LIBSIGSEGV /* catchsegv --- for use with libsigsegv */ static int catchsegv(void *fault_address, int serious) { set_loc(__FILE__, __LINE__); msg(_("fatal error: internal error: segfault")); abort(); /*NOTREACHED*/ return 0; } /* catchstackoverflow --- for use with libsigsegv */ static void catchstackoverflow(int emergency, stackoverflow_context_t scp) { set_loc(__FILE__, __LINE__); msg(_("fatal error: internal error: stack overflow")); abort(); /*NOTREACHED*/ return; } #endif /* HAVE_LIBSIGSEGV */ /* nostalgia --- print the famous error message and die */ static void nostalgia() { /* * N.B.: This string is not gettextized, on purpose. * So there. */ fprintf(stderr, "awk: bailing out near line 1\n"); fflush(stderr); abort(); } /* version --- print version message */ static void version() { printf("%s\n", version_string); /* * Per GNU coding standards, print copyright info, * then exit successfully, do nothing else. */ copyleft(); exit(EXIT_SUCCESS); } /* init_fds --- check for 0, 1, 2, open on /dev/null if possible */ static void init_fds() { struct stat sbuf; int fd; int newfd; char const *const opposite_mode[] = {"w", "r", "r"}; /* maybe no stderr, don't bother with error mesg */ for (fd = 0; fd <= 2; fd++) { if (fstat(fd, &sbuf) < 0) { #if MAKE_A_HEROIC_EFFORT if (do_lint) lintwarn(_("no pre-opened fd %d"), fd); #endif newfd = devopen("/dev/null", opposite_mode[fd]); /* turn off some compiler warnings "set but not used" */ newfd += 0; #ifdef MAKE_A_HEROIC_EFFORT if (do_lint && newfd < 0) lintwarn(_("could not pre-open /dev/null for fd %d"), fd); #endif } } } /* init_groupset --- initialize groupset */ static void init_groupset() { #if defined(HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 #ifdef GETGROUPS_NOT_STANDARD /* For systems that aren't standards conformant, use old way. */ ngroups = NGROUPS_MAX; #else /* * If called with 0 for both args, return value is * total number of groups. */ ngroups = getgroups(0, NULL); #endif /* If 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); /* 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. */ /* * On some operating systems, the pointers in the struct returned * by localeconv() can become dangling pointers after a call to * setlocale(). So we do a deep copy. * * Thanks to KIMURA Koichi . */ static void init_locale(struct lconv *l) { struct lconv *t; t = localeconv(); *l = *t; 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(); } } gawk-4.0.1+dfsg.orig/Makefile.in0000644000175000017500000010525111734667213015430 0ustar schotschot# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # Makefile.am --- automake input file for gawk # # Copyright (C) 2000-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 # VPATH = @srcdir@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ 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 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/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) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = array.$(OBJEXT) awkgram.$(OBJEXT) builtin.$(OBJEXT) \ dfa.$(OBJEXT) ext.$(OBJEXT) field.$(OBJEXT) \ floatcomp.$(OBJEXT) gawkmisc.$(OBJEXT) getopt.$(OBJEXT) \ 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) gawk_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_pgawk_OBJECTS = $(am__objects_1) eval_p.$(OBJEXT) \ profile_p.$(OBJEXT) pgawk_OBJECTS = $(am_pgawk_OBJECTS) pgawk_LDADD = $(LDADD) pgawk_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) YLWRAP = $(top_srcdir)/ylwrap 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 \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print # Directory for gawk's data files. Automake supplies datadir. pkgdatadir = $(datadir)/awk ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DDEFPATH=$(DEFPATH) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"$(datadir)/locale"' DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBSIGSEGV = @LIBSIGSEGV@ LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LTLIBSIGSEGV = @LTLIBSIGSEGV@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # This variable insures that aclocal runs # correctly after changing configure.ac ACLOCAL_AMFLAGS = -I m4 # This insures that make flags get passed down to child makes. AM_MAKEFLAGS = 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)' # Stuff to include in the dist that doesn't need it's own # Makefile.am files EXTRA_DIST = \ ChangeLog.0 \ COPYING \ FUTURES \ INSTALL \ LIMITATIONS \ NEWS \ NEWS.0 \ POSIX.STD \ PROBLEMS \ README_d \ bisonfix.awk \ config.guess \ config.rpath \ config.sub \ depcomp \ extension \ m4 \ missing \ missing_d \ po/README \ pc \ posix \ regcomp.c \ regex_internal.c \ regex_internal.h \ regexec.c \ 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. SUBDIRS = \ . \ awklib \ doc \ po \ test # sources for both gawk and pgawk base_sources = \ array.c \ awk.h \ awkgram.y \ builtin.c \ custom.h \ dfa.c \ dfa.h \ ext.c \ field.c \ floatcomp.c \ floatmagic.h \ gawkmisc.c \ getopt.c \ getopt.h \ getopt1.c \ getopt_int.h \ gettext.h \ io.c \ mbsupport.h \ main.c \ msg.c \ node.c \ protos.h \ random.c \ random.h \ re.c \ regex.c \ regex.h \ replace.c \ version.c \ xalloc.h 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)"' # Get rid of core files when cleaning CLEANFILES = core core.* MAINTAINERCLEANFILES = version.c # We want hard links for install-exec-hook, below LN = ln all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj .y am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/configh.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/configh.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files 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) pgawk$(EXEEXT): $(pgawk_OBJECTS) $(pgawk_DEPENDENCIES) @rm -f pgawk$(EXEEXT) $(LINK) $(pgawk_OBJECTS) $(pgawk_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floatcomp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gawkmisc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/profile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/profile_p.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/re.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/replace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .y.c: $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) configh.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) configh.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) configh.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) configh.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" 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) 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) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-recursive all-am: Makefile $(PROGRAMS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f awkgram.c -rm -f command.c -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \ ctags-recursive install-am install-exec-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am check-local clean \ clean-binPROGRAMS clean-generic ctags ctags-recursive dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar \ dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-exec-hook \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-binPROGRAMS # First, add a link from gawk to gawk-X.Y.Z. # Same for pgawk. # # For GNU systems where gawk is awk, add a link to awk. # (This is done universally, which may not always be right, but # there's no easy way to distinguish GNU from non-GNU systems.) install-exec-hook: (cd $(DESTDIR)$(bindir); \ $(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ $(LN) pgawk$(EXEEXT) pgawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ 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 ] && 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 # force there to be a gawk executable before running tests 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 $(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 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 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 diffout valgrind-scan: @cd test && $(MAKE) $(AM_MAKEFLAGS) $@ valgrind: cd test; rm -f log.[0-9]*; \ 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. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gawk-4.0.1+dfsg.orig/vms/0000755000175000017500000000000011734667100014157 5ustar schotschotgawk-4.0.1+dfsg.orig/vms/vms-conf.h0000644000175000017500000004413711734666663016106 0ustar schotschot#ifndef CONFIG_H #define CONFIG_H /* * config.h -- configuration definitions for gawk. * * For VMS (assumes V4.6 or later; tested on V7.3-1, V8.3. */ /* * 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. * * 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 */ /* switch statements are enabled in awk programs */ #undef ALLOW_SWITCH #if 0 /* no longer used */ /* Define to 1 if using alloca.c. */ #define C_ALLOCA 1 #else #define NO_ALLOCA /* vms/vms_fwrite.c needs this */ /* 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 */ #define STACK_DIRECTION (-1) #endif /*0*/ /* dynamic loading is possible */ #undef DYNAMIC /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Define to the type of elements in the array set by `getgroups'. Usually this is either `int' or `gid_t'. */ #define GETGROUPS_T int /* 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 to 1 if you have the `btowc' function. */ #undef HAVE_BTOWC /* 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. */ #undef HAVE_DECL_TZNAME /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* 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. */ #undef HAVE_ICONV /* Define if you have the 'intmax_t' type in or . */ #undef HAVE_INTMAX_T /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_INTTYPES_H_WITH_UINTMAX /* Define to 1 if you have the `isascii' function. */ #define HAVE_ISASCII 1 /* Define to 1 if you have the `iswctype' function. */ #define HAVE_ISWCTYPE 1 /* Define to 1 if you have the `iswlower' function. */ #define HAVE_ISWLOWER 1 /* Define to 1 if you have the `iswupper' function. */ #define HAVE_ISWUPPER 1 /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the 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 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 /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define if you have the 'long long' type. */ #undef HAVE_LONG_LONG /* Define to 1 if the system has the type `long long int'. */ #undef HAVE_LONG_LONG_INT /* 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 header file. */ #undef HAVE_MCHECK_H /* Define to 1 if you have the `memcmp' function. */ #define HAVE_MEMCMP 1 /* Define to 1 if you have the `memcpy' function. */ #define HAVE_MEMCPY 1 /* Define to 1 if you have the `memcpy_ulong' function. */ #undef HAVE_MEMCPY_ULONG /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the `memset_ulong' function. */ #undef HAVE_MEMSET_ULONG /* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP /* we have the mktime function */ #define HAVE_MKTIME 1 /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* 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 `setsid' function. */ #undef HAVE_SETSID /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* 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. */ #define HAVE_STDARG_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDDEF_H 1 /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_STDINT_H_WITH_UINTMAX /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* 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 /* Define to 1 if you have the `strftime' function. */ #undef HAVE_STRFTIME /* use the missing_d/strfime.c version */ /* Define to 1 if cpp supports the ANSI # stringizing operator. */ #ifdef VAXC #undef HAVE_STRINGIZE #else #define HAVE_STRINGIZE 1 #endif /* 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. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H /* Define to 1 if you have the `strtod' function. */ #define HAVE_STRTOD 1 /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 /* Define to 1 if `st_blksize' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE /* Define to 1 if `tm_zone' is a member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE /* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ #undef HAVE_ST_BLKSIZE /* Define to 1 if you have the `system' function. */ #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 /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H /* Define to 1 if you have the `tmpfile' function. */ #define HAVE_TMPFILE 1 /* Force snprintf.c to use tmpfile() instead of mkstemp(). */ #ifdef HAVE_MKSTEMP #undef HAVE_MKSTEMP #endif /* 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. */ #define HAVE_TOWLOWER 1 /* Define to 1 if you have the `towupper' function. */ #define HAVE_TOWUPPER 1 /* Define to 1 if you don't have `tm_zone' but do have the external array `tzname'. */ #define HAVE_TZNAME 1 /* (faked in vms/vms_misc.c) */ /* Define to 1 if you have the `tzset' function. */ #define HAVE_TZSET 1 /* (faked in vms/vms_misc.c) */ /* Define if you have the 'uintmax_t' type in or . */ #undef HAVE_UINTMAX_T /* Define to 1 if you have the header file. */ #ifdef __DECC #define HAVE_UNISTD_H 1 #else #undef HAVE_UNISTD_H #endif /* Define if you have the 'unsigned long long' type. */ #undef HAVE_UNSIGNED_LONG_LONG /* Define to 1 if the system has the type `unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define to 1 if you have the `usleep' function. */ #define HAVE_USLEEP 1 /* Define to 1 if you have the `vprintf' function. */ #define HAVE_VPRINTF 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 */ #undef HAVE_WINT_T /* disable fatal errors on directories */ #undef NO_DIRECTORY_FATAL /* disable lint checks */ #undef NO_LINT /* Name of package */ #define PACKAGE "gawk" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "bug-gawk@gnu.org" /* Define to the full name of this package. */ #define PACKAGE_NAME "GNU Awk" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "GNU Awk 3.1.8" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gawk" /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #define PACKAGE_VERSION "4.0.1" /* Define to 1 if *printf supports %F format */ #undef PRINTF_HAS_F_FORMAT /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void /* The size of a `unsigned int', as computed by sizeof. */ #define SIZEOF_UNSIGNED_INT 4 /* The size of a `unsigned long', as computed by sizeof. */ #define SIZEOF_UNSIGNED_LONG 4 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* some systems define this type here */ #undef TIME_T_IN_SYS_TYPES_H /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* force use of our version of strftime */ #define USE_INCLUDED_STRFTIME 1 /* Version number of package */ #define VERSION "4.0.1" /* Define to 1 if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* 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 /* Enable extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if doesn't define. */ #undef gid_t /* Define 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 #undef inline #endif /* Define to widest signed type if doesn't define. */ #define intmax_t long int /* Define to `int' if doesn't 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. */ #define restrict #if defined(__DECC) && (__DECC_VER >= 60400000) #undef restrict #endif /* Define to `unsigned' if doesn't 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. */ #define ssize_t int /* Define to `int' if doesn't define. */ #undef uid_t /* Define to unsigned long or unsigned long long if and don't define. */ #define uintmax_t unsigned long #if 0 #include "custom.h" /* overrides for stuff autoconf can't deal with */ #else /* Whether `time_t' is an unsigned type. */ #define TIME_T_UNSIGNED 1 /*******************************/ /* Gawk configuration options. */ /*******************************/ #define ALLOW_SWITCH 1 /* * DEFPATH * VMS: "/AWK_LIBRARY" => "AWK_LIBRARY:" * The default search path for the -f option of gawk. It is used * if the AWKPATH environment variable is undefined. * * Note: OK even if no AWK_LIBRARY logical name has been defined. */ #define DEFPATH ".,/AWK_LIBRARY" #define ENVSEP ',' /* * Extended source file access. */ #define DEFAULT_FILETYPE ".awk" /* * Pipe handling. */ #define PIPES_SIMULATED 1 /* * VAXCRTL is pre-ANSI and does some variations of numeric formatting * differently than gawk expects. */ #if defined(VAX) && !defined(__DECC) /* '0' format modifier for %e,%f,%g gives wrong results in many cases */ #define VAXCRTL /* %g format chooses %e format when should use %f */ #define GFMT_WORKAROUND 1 #endif /* * VAX C * * As of V3.2, VAX C is not yet ANSI-compliant. But it's close enough * for GAWK's purposes. Comment this out for VAX C V2.4 and earlier. * YYDEBUG definition is needed for combination of VAX C V2.x and Bison. */ #if defined(VAXC) && !defined(__STDC__) #define __STDC__ 0 #define NO_TOKEN_PASTING #define signed /*empty*/ #define inline /*empty*/ #ifndef __DECC /* DEC C does not support #pragma builtins even in VAXC mode */ #define VAXC_BUILTINS #endif /* #define YYDEBUG 0 */ #define NO_MBSUPPORT /* VAX C's preprocessor can't handle mbsupport.h */ #define RE_TOKEN_INIT_BUG /* regcomp.c */ #endif /* * DEC C * * Digital's ANSI complier. */ #ifdef __DECC /* DEC C implies DECC$SHR, which doesn't have the %g problem of VAXCRTL */ #undef GFMT_WORKAROUND /* DEC C V5.x introduces incompatibilities with prior porting efforts */ #define _DECC_V4_SOURCE #define __SOCKET_TYPEDEFS #if __VMS_VER >= 60200000 # undef __VMS_VER # define __VMS_VER 60100000 #endif #if __CRTL_VER >= 60200000 # if __CRTL_VER >= 70320000 # define CRTL_VER_V732 # define HAVE_SNPRINTF 1 # endif # if __CRTL_VER >= 70301000 # define CRTL_VER_V731 # endif # undef __CRTL_VER # define __CRTL_VER 60100000 #endif #if __DECC_VER >= 60400000 && !defined(DEBUG) /* disable "new feature in C99" diagnostics (for regex code); NEWC99 ought to suffice but doesn't (at least in V6.4) */ #pragma message disable (NEWC99,DESIGNATORUSE) #endif #endif /* __DECC */ /* * GNU C * * Versions of GCC (actually GAS) earlier than 1.38 don't produce the * right code for ``extern const'' constructs, and other usages of * const might not be right either. The old set of include files from * the gcc-vms distribution did not contain prototypes, and this could * provoke some const-related compiler warnings. If you've got an old * version of gcc for VMS, define 'const' out of existance, and by all * means obtain the most recent version! * * Note: old versions of GCC should also avoid defining STDC_HEADERS, * because most of the ANSI-C required header files are missing. */ #ifdef __GNUC__ /* #define const */ /* #undef STDC_HEADERS */ /* #undef HAVE_STDDEF_H */ #ifndef STDC_HEADERS #define alloca __builtin_alloca #define environ $$PsectAttributes_NOSHR$$environ /* awful GAS kludge */ #endif #undef REGEX_MALLOC /* use true alloca() in regex.c */ #endif /* EXIT_SUCCESS and EXIT_FAILURE normally come from */ #ifndef HAVE_STDLIB_H # define EXIT_SUCCESS 1 /* SYS$_NORMAL */ # define EXIT_FAILURE 0x10000002 /* STS$M_INHIB_MSG|STS$K_ERROR */ #endif /* EXIT_FATAL is specific to gawk, not part of Standard C */ #define EXIT_FATAL 0x10000004 /* STS$M_INHIB_MSG|STS$K_SEVERE */ #define IN_CONFIG_H #include "vms/redirect.h" #undef IN_CONFIG_H #endif /*"custom.h"*/ #endif /*CONFIG_H*/ gawk-4.0.1+dfsg.orig/vms/ChangeLog0000644000175000017500000000364111734667100015735 0ustar schotschot2012-03-28 Arnold D. Robbins * 4.0.1: Release tar ball made. 2012-03-28 Arnold D. Robbins * vms-conf.h: Update copyright year. 2012-03-21 Anders Wallin * vmstest.com: Make printfbad3 test work. 2012-03-20 Arnold D. Robbins * vmstest.com: Add printfbad3 test. 2012-02-10 Arnold D. Robbins * vmsbuild.com, descrip.mms, vms-conf.h: Update patch level. 2011-12-31 Arnold D. Robbins * vms_misc.c: [STREQ, STREQN]: Change use of macros to call strcmp, strncmp, directly. 2011-11-02 Pat Rankin * 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. * descrip.mms (replace.obj): Add dependencies for missing_d/*.c. * vmstest.com (unix_tests): Fix typo in spelling of rtlen01. 2011-10-30 Pat Rankin * vmstest.com (fpat3, fwtest3, getline5, gsubtst7, gsubtst8, pty1, rtlen, rtlen01, rtlenmb): New tests. (posix2008sub): Revised test. 2011-10-25 Anders Wallin * vmstest.com (posix2008sub): Added as specific test in order to use --posix option. 2011-06-24 Arnold D. Robbins * 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. 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. gawk-4.0.1+dfsg.orig/vms/vms_popen.c0000644000175000017500000003001511532364226016327 0ustar schotschot/* [.vms]vms_popen.c -- substitute routines for missing pipe calls. 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 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. */ #ifndef NO_VMS_PIPES #include "awk.h" /* really "../awk.h" */ #include #ifndef PIPES_SIMULATED FILE * popen( const char *command, const char *mode ) { fatal(" Cannot open pipe `%s' (not implemented)", command); /* NOT REACHED */ return 0; } int pclose( FILE *current ) { fatal(" Internal error ('pclose' not implemented)"); /* NOT REACHED */ return -1; } int fork( void ) { fatal(" Internal error ('fork' not implemented)"); /* NOT REACHED */ return -1; } #else /*PIPES_SIMULATED*/ /* * Simulate pipes using temporary files; hope that the user * doesn't expect pipe i/o to be interleaved with other i/o ;-}. * * This was initially based on the MSDOS version, but cannot * use a static array to hold pipe info, because there's no * fixed limit on the range of valid 'fileno's. Another * difference is that redirection is handled using LIB$SPAWN * rather than constructing a command for system() which uses * '<' or '>'. */ #include "vms.h" #include #include /* logical name definitions */ #ifndef STDC_HEADERS extern int strcmp(const char*, const char *); #endif extern char *mktemp(char *); 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 { char *command; char *name; pipemode pmode; } PIPE; static PIPE *pipes; static int pipes_lim = 0; #define psize(n) ((n) * sizeof(PIPE)) #define expand_pipes(k) do { PIPE *new_p; \ int new_p_lim = ((k) / _NFILE + 1) * _NFILE; \ emalloc(new_p, PIPE *, psize(new_p_lim), "expand_pipes"); \ if (pipes_lim > 0) \ memcpy(new_p, pipes, psize(pipes_lim)), free(pipes); \ memset(new_p + psize(pipes_lim), 0, psize(new_p_lim - pipes_lim)); \ pipes = new_p, pipes_lim = new_p_lim; } while(0) FILE * popen( const char *command, const char *mode ) { FILE *current; char *name; int cur; pipemode curmode; if (strcmp(mode, "r") == 0) curmode = reading; else if (strcmp(mode, "w") == 0) curmode = writing; else return NULL; /* make a name for the temporary file */ if ((name = mktemp(strdup("sys$scratch:gawk-pipe_XXXXXX.tmp"))) == 0) return NULL; if (curmode == reading) { /* an input pipe reads a temporary file created by the command */ vms_execute(command, (char *)0, name); /* 'command >tempfile' */ } if ((current = fopen(name, mode, "mbc=24", "mbf=2")) == NULL) { free(name); return NULL; } cur = fileno(current); if (cur >= pipes_lim) expand_pipes(cur); /* assert( cur >= 0 && cur < pipes_lim ); */ pipes[cur].name = name; pipes[cur].pmode = curmode; pipes[cur].command = strdup(command); return current; } int pclose( FILE *current ) { int rval, cur = fileno(current); /* assert( cur >= 0 && cur < pipes_lim ); */ if (pipes[cur].pmode == unopened) return -1; /* should never happen */ rval = fclose(current); /* close temp file; if reading, we're done */ if (pipes[cur].pmode == writing) { /* an output pipe feeds the temporary file to the other program */ rval = vms_execute(pipes[cur].command, pipes[cur].name, (char *)0); } /* clean up */ unlink(pipes[cur].name); /* get rid of the temporary file */ pipes[cur].pmode = unopened; free(pipes[cur].name), pipes[cur].name = 0; free(pipes[cur].command), pipes[cur].command = 0; return rval; } /* * Create a process and execute a command in it. This is essentially * the same as system() but allows us to specify SYS$INPUT (stdin) * and/or SYS$OUTPUT (stdout) for the process. * [With more work it could truly simulate a pipe using mailboxes.] */ int vms_execute( const char *command, const char *input, const char *output ) { Dsc cmd, in, out, *in_p, *out_p; U_Long sts, cmpltn_sts; cmd.len = strlen(cmd.adr = (char *)command); if (input) in.len = strlen(in.adr = (char *)input), in_p = ∈ else in_p = 0; if (output) out.len = strlen(out.adr = (char *)output), out_p = &out; else out_p = 0; push_logicals(); /* guard against user-mode definitions of sys$Xput */ sts = lib$spawn(&cmd, in_p, out_p, (U_Long *)0, (Dsc *)0, (U_Long *)0, &cmpltn_sts); pop_logicals(); /* restore environment */ if (vmswork(sts) && vmsfail(cmpltn_sts)) sts = cmpltn_sts; if (vmsfail(sts)) { errno = EVMSERR, vaxc$errno = sts; return -1; } else return 0; } /*----* This rigmarole is to guard against interference from the current environment. User-mode definitions of SYS$INPUT and/or SYS$OUTPUT will interact with spawned subprocesses--including LIB$SPAWN with explicit input and/or output arguments specified--if they were defined without the 'CONFINED' attribute. The definitions created in vms_args.c as part of command line I/O redirection happened to fall into this category :-(, but even though that's been fixed, there's still the possibility of the user doing something like |$ define/user sys$output foo.out prior to starting the program. Without ``/name_attr=confine'', that will really screw up pipe simulation, so we've got to work- around it here. This is true whether pipes are implemented via mailboxes or temporary files, as long as lib$spawn() is being used. push_logicals() calls save_translation() the first time it's invoked; the latter allocates some memory to hold a full logical name translation and uses $trnlnm to fill that in. Then if either sys$input or sys$output has a user-mode, non-confined translation, push_logicals() will delete the definition(s) using $dellnm. After the spawned command has returned, pop_logicals() is called; it calls restore_translation() for any deleted values; the latter uses $crllnm or $crelog to recreate the original definition. SYS$ERROR is currently ignored; perhaps it should receive the same treatment... *----*/ /* logical name table, and names of interest; these are all constant */ static const Descrip(lnmtable,"LNM$PROCESS_TABLE"); static const Descrip(sys_input,"SYS$INPUT"); static const Descrip(sys_output,"SYS$OUTPUT"); static const unsigned char acmode = PSL$C_USER; /* only care about user-mode */ /* macros for simplfying the code a bunch */ #define DelTrans(l) sys$dellnm(&lnmtable, (l), &acmode) #define GetTrans(l,i) sys$trnlnm((U_Long *)0, &lnmtable, (l), &acmode, (i)) #define SetTrans(l,i) sys$crelnm((U_Long *)0, &lnmtable, (l), &acmode, (i)) /* itemlist manipulation macros; separate versions for aggregate and scalar */ #define SetItmA(i,c,p,r) ((i).code = (c), (i).len = sizeof (p),\ (i).buffer = (p), (i).retlen = (U_Short *)(r)) #define SetItmS(i,c,p) ((i).code = (c), (i).len = sizeof *(p),\ (i).buffer = (p), (i).retlen = (U_Short *)0) #define EndItm0(i) ((i).code = (i).len = 0) /* translate things once, then hold the results here for multiple re-use */ static Itm *input_definition, *output_definition; static void push_logicals( void ) /* deassign sys$input and/or sys$output */ { static int init_done = 0; if (!init_done) { /* do logical name lookups one-time only */ input_definition = save_translation(&sys_input); output_definition = save_translation(&sys_output); init_done = 1; } if (input_definition) DelTrans(&sys_input); /* kill sys$input */ if (output_definition) DelTrans(&sys_output); /* and sys$output */ } static void pop_logicals( void ) /* redefine sys$input and/or sys$output */ { if (input_definition) restore_translation(&sys_input, input_definition); if (output_definition) restore_translation(&sys_output, output_definition); } static Itm * save_translation( const Dsc *logname ) { Itm trans[4], *itmlst; long trans_attr, max_trans_indx; /* 0-based translation index count */ unsigned char trans_acmode; /* translation's access mode */ unsigned itmlst_size; register int i, j; itmlst = 0; /* Want translation index count for non-confined, user-mode definition; unfortunately, $trnlnm does not provide that much control. Try to fetch several values of interest, then decide based on the result. */ SetItmS(trans[0], LNM$_MAX_INDEX, &max_trans_indx), max_trans_indx = -1; SetItmS(trans[1], LNM$_ACMODE, &trans_acmode), trans_acmode = 0; SetItmS(trans[2], LNM$_ATTRIBUTES, &trans_attr), trans_attr = 0; EndItm0(trans[3]); if (vmswork(GetTrans(logname, trans)) && max_trans_indx >= 0 && trans_acmode == PSL$C_USER && !(trans_attr & LNM$M_CONFINE)) { /* Now know that definition of interest exists; allocate and initialize an item list and associated buffers; use three entries for each translation. */ itmlst_size = (3 * (max_trans_indx + 1) + 1) * sizeof(Itm); emalloc(itmlst, Itm *, itmlst_size, "save_translation"); for (i = 0; i <= max_trans_indx; i++) { struct def { U_Long indx, attr; U_Short len; char str[LNM$C_NAMLENGTH], eos; } *wrk; emalloc(wrk, struct def *, sizeof (struct def), "save_translation"); wrk->indx = (U_Long)i; /* this one's an input value for $trnlnm */ SetItmS(itmlst[3*i+0], LNM$_INDEX, &wrk->indx); SetItmS(itmlst[3*i+1], LNM$_ATTRIBUTES, &wrk->attr), wrk->attr = 0; SetItmA(itmlst[3*i+2], LNM$_STRING, &wrk->str, &wrk->len), wrk->len = 0; } EndItm0(itmlst[3*i]); /* assert( i == max_trans_indx+1 ); */ /* Time to perform full logical name translation, then update item list for subsequent restoration. If there are any holes [don't know whether that's possible] collapse them out of the list; don't want them at restore time. */ if (vmswork(GetTrans(logname, itmlst))) { for (i = 0, j = -1; i <= max_trans_indx; i++) { U_Long *attr_p; attr_p = itmlst[3*i+1].buffer; /* copy (void *) to true type */ if (*attr_p & LNM$M_EXISTS) { *attr_p &= ~LNM$M_EXISTS; /* must clear this bit */ if (++j < i) itmlst[3*j+0] = itmlst[3*i+0], itmlst[3*j+1] = itmlst[3*i+1], itmlst[3*j+2] = itmlst[3*i+2]; if (itmlst[3*j+2].retlen) { /* fixup buffer length */ itmlst[3*j+2].len = *itmlst[3*j+2].retlen; itmlst[3*j+2].retlen = (U_Short *)0; } } } if (++j < i) EndItm0(itmlst[3*j]); } else /* should never happen; tolerate potential memory leak */ free(itmlst), itmlst = 0; /*('wrk' buffer(s) will become lost)*/ } return itmlst; } static void restore_translation( const Dsc *logname, const Itm *itemlist ) { Dsc trans_val; U_Long *attr_p; # define LOG_PROCESS_TABLE 2 /* */ # define LOG_USERMODE PSL$C_USER /* assert( itemlist[1].code == LNM$_ATTRIBUTES ); */ attr_p = itemlist[1].buffer; /* copy (void *) to (U_Long *) */ if (*attr_p & LNM$M_CRELOG) { /* check original creation method */ /* $crelog values can have only one translation; so it'll be the first string entry in the itemlist. */ /* assert( itemlist[2].code == LNM$_STRING ); */ trans_val.adr = itemlist[2].buffer; trans_val.len = itemlist[2].len; (void) sys$crelog(LOG_PROCESS_TABLE, logname, &trans_val, LOG_USERMODE); } else { /* $crelnm definition; itemlist could specify multiple translations, but has already been setup properly for use as-is. */ (void) SetTrans(logname, itemlist); } } #endif /*PIPES_SIMULATED*/ #endif /*!NO_VMS_PIPES*/ gawk-4.0.1+dfsg.orig/vms/gawk.cld0000644000175000017500000000775511563555270015616 0ustar schotschot! 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 ! image gawk !usage $ DEFINE GAWK disk:[directory]GAWK 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 variables, value(required,list) qualifier usage qualifier copyright qualifier version qualifier lint, value(list,type=lint_keywords) qualifier posix 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' keyword posix !equivalent to 'egrep' ! ! p1 = data file list (possibly including 'var=value' contructs) !note: parameter required; use 'sys$input:' to read data from 'stdin' ! /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 = obsolete ! /variables = list of 'var=value' items for assignment prior to BEGIN ! /posix = force POSIX compatability mode operation ! /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 ! /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 and quit; also shows copyright notice ! /copyright = show abbreviated edition of FSF's copyright notice and quit ! gawk-4.0.1+dfsg.orig/vms/vms_args.c0000644000175000017500000003711111520346411016137 0ustar schotschot/* vms_args.c -- command line parsing, to emulate shell i/o redirection. [ Escape sequence parsing now suppressed. ] 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 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]vms_arg_fixup - emulate shell's command line processing: handle * stdio redirection, backslash escape sequences, and file wildcard * expansion. Should be called immediately upon image startup. * * Pat Rankin, Nov'89 * rankin@pactechdata.com * * nfile - create 'nfile' as 'stdout' (stream-lf format) * >>ofile - append to 'ofile' for 'stdout'; create it if necessary * >&efile - point 'stderr' (SYS$ERROR) at 'efile', but don't open * >$vfile - create 'vfile' as 'stdout', using rms attributes * appropriate for a standard text file (variable length * records with implied carriage control) * >+vfile - create 'vfile' as 'stdout' in binary mode (using * variable length records with implied carriage control) * 2>&1 - special case: direct error messages into output file * 1>&2 - special case: direct output data to error destination * <- - error: stdin/stdout closure not implemented * | anything - error; pipes not implemented * & - error; background execution not implemented * * any\Xany - convert 'X' as appropriate; \000 will not work as * intended since subsequent processing will misinterpret * * any*any - perform wildcard directory lookup to find file(s) * any%any - " " ('%' is vms wildcard for '?' [ie, /./]) * any?any - treat like 'any%any' unless no files match * *, %, ? - if no file(s) match, leave original value in arg list * * * Notes: a redirection operator can have optional white space between it * and its filename; the operator itself *must* be preceded by white * space so that it starts a separate argument. '<' is ambiguous * since "file" is a valid VMS file specification; leading '<' is * assumed to be stdin--use "\file" to override. '>$' is local * kludge to force stdout to be created with text file RMS attributes * instead of stream format; file sharing is disabled for stdout * regardless. Multiple instances of stdin or stdout or stderr are * treated as fatal errors rather than using the first or last. If a * wildcard file specification is detected, it is expanded into a list * of filenames which match; if there are no matches, the original * file-spec is left in the argument list rather than having it expand * into thin air. No attempt is made to identify and make $(var) * environment substitutions--must draw the line somewhere! * * Oct'91, gawk 2.13.3 * Open '<' with full sharing allowed, so that we can read batch logs * and other open files. Create record-format output ('>$') with read * sharing permited, so that others can read our output file to check * progess. For stream output ('>' or '>>'), sharing is disallowed * (for performance reasons). * * Sep'94, gawk 2.15.6 [pr] * 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" */ #include "vms.h" #include void v_add_arg(int, const char *); static char *skipblanks(const char *); static void vms_expand_wildcards(const char *); static U_Long vms_define(const char *, const char *); static char *t_strstr(const char *, const char *); #define strstr t_strstr /* strstr() missing from vaxcrtl for V4.x */ static int v_argc, v_argz = 0; static char **v_argv; /* vms_arg_fixup() - scan argv[] for i/o redirection and wildcards and also */ /* rebuild it with those removed or expanded, respectively */ void vms_arg_fixup( int *pargc, char ***pargv ) { const char *f_in, *f_out, *f_err, *out_mode, *rms_rfm, *rms_shr, *rms_mrs; char **argv = *pargv; 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 */ #endif #ifndef NO_DCL_CMD for (i = 1; i < argc ; i++) /* check for dash or other non-VMS args */ if (strchr("->\\|", *argv[i])) break; /* found => (i < argc) */ if (i >= argc && (v_argc = vms_gawk()) > 0) { /* vms_gawk => dcl_parse */ /* if we successfully parsed the command, replace original argv[] */ argc = v_argc, argv = v_argv; v_argz = v_argc = 0, v_argv = NULL; } #endif v_add_arg(v_argc = 0, argv[0]); /* store arg #0 (image name) */ f_in = f_out = f_err = NULL; /* stdio setup (no filenames yet) */ out_mode = "w"; /* default access for stdout */ rms_rfm = "rfm=stmlf"; /* stream_LF format */ rms_shr = "shr=nil"; /* no sharing (for '>' output file) */ rms_mrs = "mrs=0"; /* no maximum record size */ for (i = 1; i < argc; i++) { char *p, *fn; int is_arg; is_arg = 0; /* current arg does not begin with dash */ p = argv[i]; /* current arg */ switch (*p) { case '<': /* stdin */ /*[should try to determine whether this is really a directory spec using <>; for now, force user to quote them with '\<']*/ if ( f_in ) { fatal("multiple specification of '<' for stdin"); } else if (*++p == '<') { /* '<<' is not supported */ fatal("'<<' not available for stdin"); } else { p = skipblanks(p); fn = (*p ? p : argv[++i]); /* use next arg if necessary */ if (i >= argc || *fn == '-') fatal("invalid i/o redirection, null filespec after '<'"); else f_in = fn; /* save filename for stdin */ } break; case '>': { /* stdout or stderr */ /*[vms-specific kludge '>$' added to force stdout to be created as record-oriented text file instead of in stream-lf format]*/ int is_out = 1; /* assume stdout */ if (*++p == '>') /* '>>' => append */ out_mode = "a", p++; else if (*p == '&') /* '>&' => stderr */ is_out = 0, p++; else if (*p == '$') /* '>$' => kludge for record format */ rms_rfm = "rfm=var", rms_shr = "shr=get,upi", rms_mrs = "mrs=32767", p++; else if (*p == '+') /* '>+' => kludge for binary output */ out_mode = "wb", rms_rfm = "rfm=var", rms_mrs = "mrs=32767", p++; else /* '>' => create */ {} /* use default values initialized prior to loop */ p = skipblanks(p); fn = (*p ? p : argv[++i]); /* use next arg if necessary */ if (i >= argc || *fn == '-') { fatal("invalid i/o redirection, null filespec after '>'"); } else if (is_out) { if (out_to_err_redirect) fatal("conflicting specifications for stdout"); else if (f_out) fatal("multiple specification of '>' for stdout"); else f_out = fn; /* save filename for stdout */ } else { if (err_to_out_redirect) fatal("conflicting specifications for stderr"); else if (f_err) fatal("multiple specification of '>&' for stderr"); else f_err = fn; /* save filename for stderr */ } } break; case '2': /* check for ``2>&1'' special case'' */ if (strcmp(p, "2>&1") != 0) goto ordinary_arg; else if (f_err || out_to_err_redirect) fatal("conflicting specifications for stderr"); else { err_to_out_redirect = 1; f_err = "SYS$OUTPUT:"; } break; case '1': /* check for ``1>&2'' special case'' */ if (strcmp(p, "1>&2") != 0) goto ordinary_arg; else if (f_out || err_to_out_redirect) fatal("conflicting specifications for stdout"); else { out_to_err_redirect = 1; /* f_out = "SYS$ERROR:"; */ } break; case '|': /* pipe */ /* command pipelines are not supported */ fatal("command pipes not available ('|' encountered)"); break; case '&': /* background */ /*[we could probably spawn or fork ourself--maybe someday]*/ if (*(p+1) == '\0' && i == argc - 1) { fatal("background tasks not available ('&' encountered)"); break; } else { /* fall through */ ; /*NOBREAK*/ } case '-': /* argument */ is_arg = 1; /*(=> skip wildcard check)*/ default: /* other (filespec assumed) */ ordinary_arg: /* process escape sequences or expand wildcards */ v_add_arg(++v_argc, p); /* include this arg */ p = strchr(p, '\\'); /* look for backslash */ if (p != NULL) { /* does it have escape sequence(s)? */ #if 0 /* disable escape parsing; it's now done elsewhere within gawk */ register int c; char *q = v_argv[v_argc] + (p - argv[i]); do { c = *p++; if (c == '\\') c = parse_escape(&p); *q++ = (c >= 0 ? (char)c : '\\'); } while (*p != '\0'); *q = '\0'; #endif /*0*/ } else if (!is_arg && strchr(v_argv[v_argc], '=') == NULL) { vms_expand_wildcards(v_argv[v_argc]); } break; } /* end switch */ } /* loop */ /* * Now process any/all I/O options encountered above. */ /* must do stderr first, or vaxcrtl init might not see it */ /*[ catch 22: we'll also redirect errors encountered doing out ]*/ if (f_err) { /* define logical name but don't open file */ int len = strlen(f_err); if (len >= (sizeof "SYS$OUTPUT" - sizeof "") && strncasecmp(f_err, "SYS$OUTPUT:", len) == 0) err_to_out_redirect = 1; else (void) vms_define("SYS$ERROR", f_err); } /* do stdin before stdout, so if we bomb we won't make empty output file */ if (f_in) { /* [re]open file and define logical name */ if (freopen(f_in, "r", stdin, "ctx=rec", "shr=get,put,del,upd", "mrs=32767", "mbc=32", "mbf=2")) (void) vms_define("SYS$INPUT", f_in); else fatal("<%s (%s)", f_in, strerror(errno)); } if (f_out) { if (freopen(f_out, out_mode, stdout, rms_rfm, rms_shr, rms_mrs, "rat=cr", "mbc=32", "mbf=2")) (void) vms_define("SYS$OUTPUT", f_out); else fatal(">%s%s (%s)", (*out_mode == 'a' ? ">" : ""), f_out, strerror(errno)); } if (err_to_out_redirect) { /* special case for ``2>&1'' construct */ (void) dup2(1, 2); /* make file 2 (stderr) share file 1 (stdout) */ (void) vms_define("SYS$ERROR", "SYS$OUTPUT:"); } else if (out_to_err_redirect) { /* ``1>&2'' */ (void) dup2(2, 1); /* make file 1 (stdout) share file 2 (stderr) */ (void) vms_define("SYS$OUTPUT", "SYS$ERROR:"); } #ifndef NO_DCL_CMD /* if we replaced argv[] with our own, we can release it now */ if (argv != *pargv) free((void *)argv), argv = NULL; #endif *pargc = ++v_argc; /* increment to account for argv[0] */ *pargv = v_argv; return; } /* vms_expand_wildcards() - check a string for wildcard punctuation; */ /* if it has any, attempt a directory lookup */ /* and store resulting name(s) in argv array */ static void vms_expand_wildcards( const char *prospective_filespec ) { char *p, spec_buf[255+1], res_buf[255+1]; Dsc spec, result; void *context; register int len = strlen(prospective_filespec); if (len >= sizeof spec_buf) return; /* can't be valid--or at least we can't handle it */ strcpy(spec_buf, prospective_filespec); /* copy the arg */ p = strchr(spec_buf, '?'); if (p != NULL) /* change '?' single-char wildcard to '%' */ do *p++ = '%', p = strchr(p, '?'); while (p != NULL); else if (strchr(spec_buf, '*') == strchr(spec_buf, '%') /* => both NULL */ && strstr(spec_buf, "...") == NULL) return; /* no wildcards present; don't attempt file lookup */ spec.len = len, spec.adr = spec_buf; result.len = sizeof res_buf - 1, result.adr = res_buf; /* The filespec is already in v_argv[v_argc]; if we fail to match anything, we'll just leave it there (unlike most shells, where it would evaporate). */ len = -1; /* overload 'len' with flag value */ context = NULL; /* init */ while (vmswork(lib$find_file(&spec, &result, &context))) { for (len = sizeof(res_buf)-1; len > 0 && res_buf[len-1] == ' '; len--) ; res_buf[len] = '\0'; /* terminate after discarding trailing blanks */ v_add_arg(v_argc++, strdup(res_buf)); /* store result */ } (void)lib$find_file_end(&context); if (len >= 0) /* (still -1 => never entered loop) */ --v_argc; /* undo final post-increment */ return; } /* v_add_arg() - store string pointer in v_argv[]; expand array if necessary */ void v_add_arg( int idx, const char *val ) { #ifdef DEBUG_VMS fprintf(stderr, "v_add_arg: v_argv[%d] ", idx); #endif if (idx + 1 >= v_argz) { /* 'v_argz' is the current size of v_argv[] */ int old_size = v_argz; v_argz = idx + 10; /* increment by arbitrary amount */ if (old_size == 0) v_argv = (char **)malloc((unsigned)(v_argz * sizeof(char **))); else v_argv = (char **)realloc((char *)v_argv, (unsigned)(v_argz * sizeof(char **))); if (v_argv == NULL) { /* error */ fatal("%s: %s: can't allocate memory (%s)", "vms_args", "v_argv", strerror(errno)); } else { while (old_size < v_argz) v_argv[old_size++] = NULL; } } v_argv[idx] = (char *)val; #ifdef DEBUG_VMS fprintf(stderr, "= \"%s\"\n", val); #endif } /* skipblanks() - return a pointer to the first non-blank in the string */ static char * skipblanks( const char *ptr ) { if (ptr) while (*ptr == ' ' || *ptr == '\t') ptr++; return (char *)ptr; } /* vms_define() - assign a value to a logical name [define/process/user_mode] */ static U_Long vms_define( const char *log_name, const char *trans_val ) { Dsc log_dsc; static Descrip(lnmtable,"LNM$PROCESS_TABLE"); static U_Long attr = LNM$M_CONFINE; static Itm itemlist[] = { {0,LNM$_STRING,0,0}, {0,0} }; static unsigned char acmode = PSL$C_USER; unsigned len = strlen(log_name); /* avoid "define SYS$OUTPUT sys$output:" for redundant ">sys$output:" */ if (strncasecmp(log_name, trans_val, len) == 0 && (trans_val[len] == '\0' || trans_val[len] == ':')) return 0; log_dsc.adr = (char *)log_name; log_dsc.len = len; itemlist[0].buffer = (char *)trans_val; itemlist[0].len = strlen(trans_val); return sys$crelnm(&attr, &lnmtable, &log_dsc, &acmode, itemlist); } /* t_strstr -- strstr() substitute; search 'str' for 'sub' */ /* [strstr() was not present in VAXCRTL prior to VMS V5.0] */ static char *t_strstr ( const char *str, const char *sub ) { register const char *s0, *s1, *s2; /* special case: empty substring */ if (!*sub) return (char *)str; /* brute force method */ for (s0 = s1 = str; *s1; s1 = ++s0) { s2 = sub; while (*s1++ == *s2++) if (!*s2) return (char *)s0; /* full match */ } return (char *)0; /* not found */ } gawk-4.0.1+dfsg.orig/vms/vms_gawk.c0000644000175000017500000002632511563555270016155 0ustar schotschot/* vms_gawk.c -- parse GAWK command line using DCL syntax 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 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_gawk.c - routines to parse the command line as a native DCL command * 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 USAGE_PROG_RQRD 1 #define USAGE_FILE_RQRD 2 #define USAGE_BAD_COMBO 3 #define USAGE_RUN_CMD 4 #define STS$M_INHIB_MSG 0x10000000 #define Present(arg) vmswork(Cli_Present(arg)) #define Get_Value(arg,buf,siz) vmswork(Cli_Get_Value(arg,buf,siz)) #ifndef __ia64__ extern void gawk_cmd(); /* created with $ SET COMMAND/OBJECT */ #define GAWK_CMD ((const void *)gawk_cmd) #else /* linker on Itanium is much pickier about such things */ #pragma extern_model save #pragma extern_model strict_refdef /* (could use globalvalue rather than _refdef if we omit GAWK_CMD's `&') */ extern void *gawk_cmd; #pragma extern_model restore #define GAWK_CMD ((const void *)&gawk_cmd) #endif 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]; struct { char prefix[2]; /* for "-?" */ char buf[ARG_SIZ]; char suffix[1]; /* room for '\0' */ } arg; }; #define chk_option(qualifier,optname) \ if (Present(qualifier)) \ strcat(strcat(buf.arg.buf, W_cnt++ ? "," : ""), optname) /* vms_gawk() - parse GAWK command line using DCL and convert it into the */ /* appropriate "-arg" values for compatability with GNU code */ int vms_gawk() { U_Long sts; 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 */ 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"); if (CondVal(sts) == CondVal(CLI$_SYNTAX)) { native_dcl = 0; /* not invoked via a native command verb */ /* syntax error indicates that we weren't invoked as a native DCL command, so we'll now attempt to generate a command from the foreign command string and parse that. */ 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, CmdName); /* save "GAWK|DGAWK|PGAWK" as argv[0] */ else if (CondVal(sts) == CondVal(CLI$_INSFPRM)) /* 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 */ else if (CondVal(sts) == CondVal(CLI$_RUNUSED)) return vms_usage(USAGE_RUN_CMD); /* RUN GAWK won't work (no command line) */ #endif else return 0; /* forced to rely on original parsing */ if (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 (Present("OPTIMIZE")) *misc_argp++ = 'O'; W_cnt = 0, buf.arg.buf[0] = '\0'; strncpy(buf.arg.prefix, "-W", 2); 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)); #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)) v_add_arg(++argc, strdup(buf.value)); } if (Present("VARIABLES")) { /* variables to init prior to BEGIN */ strncpy(buf.arg.prefix, "-v", 2); 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, /commands -> 'text' */ v_add_arg(++argc, "--"); if (Get_Value("PROGRAM", buf.value, sizeof buf.value)) v_add_arg(++argc, strdup(buf.value)); } /* we know that "GAWK_P1" is present [data files and/or 'var=value'] */ while (Get_Value("GAWK_P1", buf.value, sizeof buf.value)) v_add_arg(++argc, strdup(buf.value)); if (Present("OUTPUT")) { /* let other parser treat this as 'stdout' */ strncpy(buf.arg.prefix, ">$", 2); if (Get_Value("OUTPUT", buf.arg.buf, sizeof buf.arg.buf)) v_add_arg(++argc, strdup(buf.value)); } return ++argc; /*(increment to account for arg[0])*/ } /* vms_usage() - display one or more messages and then terminate */ static int /* note: usually doesn't return */ vms_usage( int complaint ) { 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\ or %s /INPUT=awk_file /EXTRA_COMMANDS=\"program text\" data_file \n\ ", *options_txt = "\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)", *bad_combo = "invalid combination of qualifiers \n\ (/INPUT=awk_file and /COMMANDS=\"awk program\" are mutually exclusive)", *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", CmdName, "PROG_RQRD", no_prog); status = CLI$_VALREQ | STS$M_INHIB_MSG; break; case USAGE_FILE_RQRD: 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", 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", CmdName, "RUN_CMD", run_used); status = CLI$_NOOPTPRS | STS$M_INHIB_MSG; break; default: status = 1; break; } fprintf(stderr, usage_txt, CmdName, CmdName, CmdName, CmdName); fprintf(stderr, options_txt); fflush(stderr); errno = EVMSERR; vaxc$errno = status; _exit(status); /* NOTREACHED */ return 0; } gawk-4.0.1+dfsg.orig/vms/gawk.hlp0000644000175000017500000025055411567251350015630 0ustar schotschot! Gawk.Hlp ! Pat Rankin, Jun'90 ! revised, Jun'91 ! revised, Jul'92 ! revised, Jan'95 ! revised, Apr'97 ! revised, Jan'03 ! revised, May'11 ! Online help for GAWK. ! 1 GAWK GAWK is GNU awk, the Free Software Foundation's implementation of the awk programming language. awk is an interpretive language which can handle many data-reformatting jobs with just a few lines of code. It has powerful string manipulation and pattern matching capabilities built in. This version is compatible with POSIX 1003.2 awk. The VMS version of GAWK supports both the original UN*X-style command interface and a DCL interface. The only setup requirement for GAWK is to define it as a 'foreign' command: a DCL symbol with a value which begins with '$'. $ GAWK :== $disk:[directory]GAWK 2 GNU_syntax GAWK's UN*X-style interface uses the 'dash' convention for specifying options and uses spaces to separate multiple arguments. There are two main alternatives, depending on how the awk program is to be passed to GAWK. Both alternatives share most options. 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 program. However, GAWK is written in 'C' and the C Run-Time Library (VAXCRTL or DECC$SHR) converts unquoted text into *lowercase*. Therefore, the -Fval and -W options must be enclosed in quotes. 3 options -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 the awk source program. Here is a complete sample program: $ gawk -- "BEGIN {print ""\nHello, World!\n""}" This program would print a blank line (based on first "\n"), followed by a line reading "Hello, World!", followed by another blank line (since awk's 'print' statement includes the trailing 'newline'). On VMS, to include a quote character inside of a quoted string, two successive quotes ("") must be used. 3 data_files After all dash-options are examined, and after the program text if there were no occurrences of the -f option, remaining (space separated) command line arguments are considered to be data files for the awk program to process. If any of these actually contains an equals sign (=), then it is interpreted as a variable assignment instead of a data file. The syntax is 'variable_name=value'. For example, the command $ gawk -f myprog.awk infile.one flag=2 start=0 infile.two would read file 'infile.one' for the program in 'myprog.awk', then it would set 'flag' to 2 and 'start' to 0, and finally it would read file 'infile.two' for the program. Note that in a case like this, the two assignments actually occur after the first file has been processed, not at program startup when the command line is first scanned. 3 IO_redirection The command parsing in the VMS implementation of GAWK does some emulation of a UN*X-style shell, where certain characters on the command line have special meaning. In particular, the symbols '<', '>', '|', '*', and '?' receive special handling before the main part of the program has a chance to see them. The symbols '<' and '>' perform some file manipulation from the command line: nfile create 'nfile' as 'stdout' [SYS$OUTPUT], in stream-lf format >>ofile append to 'ofile' for 'stdout'; create it if necessary >&efile point 'stderr' [SYS$ERROR] at 'efile', but don't open it yet >$vfile create 'vfile' as 'stdout', using RMS attributes appropriate for a standard text file (variable length records with implied carriage control) >+bfile create 'bfile' as 'stdout' using binary mode 2>&1 route error messages into the regular output stream 1>&2 send output data to the error destination <- error; closure of stdin or stdout from cmd line not supported >>$vfile incorrect; would be interpreted as file "$vfile" in stream-lf format rather than as file "vfile" in RMS 'text' format | error; command line pipes not supported 3 wildcard_expansion The command parsing in the VMS implementation of GAWK does some emulation of a UN*X-style shell, where certain characters on the command line have special meaning. In particular, the symbols '<', '>', '*', '%', and '?' receive special handling before the main part of the program has a chance to see them. The symbols '*', '%' and '?' are used as wildcards in filenames. '*' and '%' have their usual VMS meanings of multiple character and single character wildcards, respectively, and '?' is also treated as a single character wildcard. Wildcard expansion only works for filenames specified in native VMS filename syntax (eg, "[-.sibling]*"), not for ones specified pseudo- Unix syntax (eg, "../sibling/*"). When a command line argument that should be a filename contains any of the wildcard characters, a directory lookup is attempted for files which match the specified pattern. If one or more matching files are found, those filenames are put into the command line in place of the original pattern. If no matching files are found, the original pattern is left in place. 2 DCL_syntax GAWK's DCL-style interface is more or less a standard DCL command, with one required parameter. Multiple values--when present--are separated by commas. There are two main alternatives, depending on how the awk program is to be passed to GAWK. Both alternatives share most options. Usage: GAWK /COMMANDS="awk program text" data_file[,data_file,...] or GAWK /INPUT=awk_file data_file[,"Var=value",data_file,...] ( or GAWK /INPUT=(awk_file1,awk_file2,...) data_file[,...] ) 3 Parameter data_file[,datafile,...] (data_file data_file ...) data_file[,"Var=value",...,data_file,...] (data_file Var=value &c) Data file(s) for the awk program to process. If any of these actually contains an equals sign (=), then it is interpreted as a variable assignment instead of a data file. The syntax is "variable_name=value". Quotes are required for non-file parameters. For example, the command $ gawk/input=myprog.awk infile.one,"flag=2","start=0",infile.two would read file 'infile.one' for the program in 'myprog.awk', then it would set 'flag' to 2 and 'start' to 0, and finally it would read file 'infile.two' for the program. Note that in a case like this, the two assignments actually occur after the first file has been processed, not at program startup when the command line is first scanned. Wildcard file lookups are attempted on data file specifications. See subtopic 'GAWK GNU_syntax wildcard_expansion' for details. At least one data_file parameter value is required. An exception is made if /usage, /version, or /copyright is specified *and* if GAWK is defined as a 'foreign' command rather than a 'native' DCL command. 3 Qualifiers /COMMANDS /COMMANDS="awk program text" (-- "awk program text") For short programs, it is possible to include the complete program on the command line. The quotes are required. Here is a complete sample program: $ gawk/commands="BEGIN {print ""\nHello, World!\n""}" NL: This program would print a blank line (based on first "\n"), followed by a line reading "Hello, World!", followed by another blank line (since awk's 'print' statement includes the trailing 'newline'). To include a quote character inside of a quoted string, two successive quotes ("") must be used. Either /COMMANDS or /INPUT (but not both) must be supplied. /INPUT /INPUT=(awk_file1,awk_file2) (-f awk_file1 -f awk_file2) Used to specify one or more files containing the source code of the awk program. If more than one file is used, separate them with commas and enclose the list in parentheses. Multiple source files are processed in order as if they had been concatenated together. 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") Assign a value to the built in variable FS (field separator). /VARIABLES /VARIABLES=("Var1=val1","Var2=val2",...) (-v Var1=val1 -v Var2=val2) Assign value(s) to the specified variable(s). /OPTIMIZE /[NO]OPTIMIZE (-"O" option) 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 (-"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[=(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 (-"Wversion" option) Print GAWK's version number and then terminate. Includes copyright notice. /COPYRIGHT /COPYRIGHT (-"Wcopyright" option) Print a brief version of GAWK's copyright notice and then terminate. /USAGE /USAGE (comparable to -"Whelp" option) Print a compact summary of the command line options. After the 'usage' message is printed, GAWK terminates regardless of any other command line options. /OUTPUT /OUTPUT=out_file (>$out_file) Write program output into 'out_file'. The default is SYS$OUTPUT. 2 awk_language An awk program consists of one or more pattern-action pairs, sometimes referred to as "rules". For each record of an input (data) file, the rules are checked sequentially. Any pattern which matches the input record triggers that rule's action. Actions are instructions which resemble statements in the 'C' programming language. Patterns come in several varieties, including field comparisons, regular expression matching, and special cases defined by reserved keywords. All awk keywords and variables are case-sensitive. Text matching is also sensitive to character case unless the builtin variable IGNORECASE is set to a non-zero value. 3 rules The syntax for a pattern-action 'rule' is simply PATTERN { ACTION } where the braces ({}) are required punctuation for the action. Semicolons (;) or 'newlines' (ie, having the text on a separate line) delimit multiple rules and also multiple actions within a given rule. Either the pattern or the action may be omitted; an empty pattern matches every record of the input file; a missing action (not an empty action inside of braces), is an implicit request to print the current record; an empty action (ie, {}) is legal but not very useful. 3 patterns There are several types of patterns available for awk rules. expression an 'expression' is something to be evaluated (perhaps a comparison or function call) which will be considered true if non-zero (for numeric results) or if non-null (for strings) /regular_expression/ slashes (/) delimit a regular expression which is used as a pattern pattern1, pattern2 a pair of patterns separated by a comma (,), which causes a range of records to trigger the associated action; the records which match the patterns are included in the range an omitted pattern (in this text, the string '' is displayed, but in an awk program, it would really be blank) matches every record BEGIN keyword for specifying a rule to be executed prior to 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) NF > 0 # comparison expression: matches non-null records $0 # implied comparison: also matches non-null records $2 > 1000 && sum <= 999999 # slightly more elaborate expression /x/ # regular expression matching any record with an 'x' in it /^ / # reg-expr matching records beginning with a space $1 == "start", $NF == "stop" # range pattern for input in which some data lines begin with 'start' and/or end with 'stop' in order to collect groups of records { sum += $1 } # null pattern: it's action (add field #1 to variable 'sum') would be executed for every record BEGIN { sum = 0 } # keyword 'BEGIN': perform this action before reading the input file (note: initialization to 0 is 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' statements and expressions. The action in a rule must be enclosed in braces ({}). Each action can contain more than one statement or expression to be executed, provided that they're separated by semicolons (;) and/or on separate lines. An omitted action is equivalent to { print $0 } which prints the current record. 3 operators Relational operators == compare for equality != compare for inequality <, <=, >, >= numerical or lexical comparison (less than, less or equal, greater than, greater or equal, respectively) ~ match against a regular expression !~ match against a regular expression, but accept failed matches instead of successful ones Arithmetic operators + addition - subtraction * multiplication / division % remainder ^, ** exponentiation ('**' is a synonym for '^', unless POSIX compatibility is specified, in which case it's invalid) Boolean operators (aka Logical operators) a value is considered false if it's 0 or a null string, it is true otherwise; the result of a boolean operation (and also of a comparison operation) will be 0 when false or 1 when true || or [expression (a || b) is true if either a is true or b is true or both a and b are true; it is false otherwise; b is not evaluated unless a is false (ie, short-circuit)] && and [expression (a && b) is true if both a and b are true; it is false otherwise; b is only evaluated if a is true] ! not [expression (!a) is true if a is false, false otherwise] in array membership; the keyword 'in' tests whether the value on the left represents a current subscript in the array named on the right Conditional operator ? : the conditional operator takes three operands; the first is an expression to evaluate, the second is the expression to use if the first was true, the third is the expression to use if it was false [simple example (a < b ? b : a) gives the maximum of a and b] Assignment operators = store the value on the right into the variable or array slot on the left [expression (a = b) stores the value of b in a] +=, -=, *=, /=, %=, ^=, **= perform the indicated arithmetic operation using the current value of the variable or array element of the left side and the expression on the right side, then store the result in the left side ++ increment by 1 [expression (++a) gets the current value of a and adds 1 to it, stores that back in a, and returns the new value; expression (a++) gets the current value of a, adds 1 to it, stores that back in a, but returns the original value of a] -- decrement by 1 (analogous to increment) String operators there is no explicit operator for string concatenation; two values and/or variables side-by-side are implicitly concatenated into a string (numeric values are first converted into their string equivalents) Conversion between numeric and string values there is no explicit operator for conversion; adding 0 to a string with force it to be converted to a number (the numeric value will be 0 if the string does not represent an integer or floating point number); the reverse, converting a number into a string, is done by concatenating a null string ("") to it [the expression (5.75 "") evaluates to "5.75"] Field 'operator' $ prefixing a number or variable with a dollar sign ($) causes the appropriate record field to be returned [($2) gives the second field of the record, ($NF) gives the last field (since the builtin variable NF is set to the number of fields in the current record)] Array subscript operator , multi-dimensional arrays are simulated by using comma (,) separated array indices; the actual index is generated by replacing commas with the value of builtin SUBSEP, then concatenating the expression into a string index [comma is also used to separate arguments in function calls and user-defined function definitions] [comma is *also* used to indicate a range pattern in an awk rule] Escape 'operator' \ In quoted character strings, the backslash (\) character causes the following character to be interpreted in a special manner [string "one\ntwo" has an embedded newline character (linefeed on VMS, but treated as if it were both carriage-return and linefeed); string "\033[" has an ASCII 'escape' character (which has octal value 033) followed by a 'right-bracket' character] Backslash is also used in regular expressions Redirection operators < Read-from -- valid with 'getline' > Write-to (create new file) -- valid with 'print' and 'printf' >> Append-to (create file if it doesn't already exist) | Pipe-from/to -- valid with 'getline', 'print', and 'printf' 4 precedence Operator precedence, listed from highest to lowest. Assignment, conditional, and exponentiation operators group from right to left; all others group from left to right. Parentheses may be used to override the normal order. field ($) increment (++), decrement (--) exponentiation (^, **) unary plus (+), unary minus (-), boolean not (!) multiplication (*), division (/), remainder (%) addition (+), subtraction (-) concatenation (no special symbol; implied by context) relational (==, !=, <, >=, etc), and redirection (<, >, >>, |) Relational and redirection operators have the same precedence and use similar symbols; context distinguishes between them matching (~, !~) array membership ('in') boolean and (&&) boolean or (||) conditional (? :) assignment (=, +=, etc) 4 escaped_characters Inside of a quoted string or constant regular expression, the backslash (\) character gives special meaning to the character(s) after it. Special character letters are case sensitive. \\ results in one backslash in the string \a is an 'alert' (. the ASCII character) \b is a backspace (BS, ) \f is a form feed (FF, ) \n 'newline' ( [line feed treated as CR+LF] \r carriage return (CR, [re-positions at the beginning of the current line] \t tab (HT, ) \v vertical tab (VT, ) \### is an arbitrary character, where '###' represents 1 to 3 octal (ie, 0 thru 7) digits \x## is an alternate arbitrary character, where '##' represents 1 or more hexadecimal (ie, 0 thru 9 and/or A through E and/or a through e) digits; if more than two digits follow, the result is undefined; not recognized if POSIX compatibility mode is specified. When a regular expression is represented in string form ("regex" as opposed to /regex/), backslashes need to be paired. The first one quotes the second during string processing, and the second one remains to be used to quote whatever follows in regular expression processing. For example, to match variable `xxx' against a period character, use (xxx ~ "\\.") or (xxx ~ /\./); if you tried to use (xxx ~ "\."), after string processing it would operate as (xxx ~ /./) and end up matching any single character rather than just a period. 3 statements A statement refers to a unit of instruction found in the action part of an awk rule, and also found in the definition of a function. The distinction between action, statement, and expression usually won't matter to an awk programmer. Compound statements consist of multiple statements separated by semicolons or newlines and enclosed within braces ({}). They are sometimes referred to as 'blocks'. 4 expressions An expression such as 'a = 10' or 'n += i++' is a valid statement. Function invocations such as 'reformat_field($3)' are also valid statements. 4 if-then-else A conditional statement in awk uses the same syntax as for the 'C' programming language: the 'if' keyword, followed by an expression in parentheses, followed by a statement--or block of statements enclosed within braces ({})--which will be executed if the expression is true but skipped if it's false. This can optionally be followed by the 'else' keyword and another statement--or block of statements-- which will be executed if (and only if) the expression was false. 5 examples Simple example showing a statement used to control how many numbers are printed on a given line. if ( ++i <= 10 ) #check whether this would be the 11th printf(" %5d", k) #print on current line if not else { printf("\n %5d", k) #print on next line if so i = 1 #and reset the counter } 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' statement. It consists of the 'while' keyword, followed by an expression enclosed within parentheses, followed by a statement--or block of statements in braces ({})--which will be executed if the expression evaluates to true. The expression is evaluated before attempting to execute the statement; if it's true, the statement is executed (the entire block of statements if there is a block) and then the expression is re-evaluated. The second type of loop is the do-while loop. It consists of the 'do' keyword, followed by a statement (usually a block of statements enclosed within braces), followed by the 'while' keyword, followed by a test expression enclosed within parentheses. The statement--or block--is always executed at least once. Then the test expression is evaluated, and the statement(s) re-executed if the result was true (followed by re-evaluation of the test, and so on). The most complex of the three loops is the 'for' statement, and it has a second variant that is not found in 'C'. The ordinary for-loop consists of the 'for' keyword, followed by three semicolon-separated expressions enclosed within parentheses, followed by a statement or brace-enclosed block of statements. The first of the three expressions is an initialization clause; it is done before starting the loop. The second expression is used as a test, just like the expression in a while-loop. It is checked before attempting to execute the statement block, and then re-checked after each execution (if any) of the block. The third expression is an 'increment' clause; it is evaluated after an execution of the statement block and before re-evaluation of the test (2nd) expression. Normally, the increment clause will change a variable used in the test clause, in such a fashion that the test clause will eventually evaluate to false and cause the loop to finish. Note to 'C' programmers: the comma (,) operator commonly used in 'C' for-loop expressions is not valid in awk. The awk-specific variant of the for-loop is used for processing arrays. Its syntax is 'for' keyword, followed by variable_name 'in' 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 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) { $1 = "" #this will affect the value of $0 $0 = $0 #this causes $0 and NF to be re-evaluated print } 5 do_while_example # This is a variation of the while_example; it gives a slightly # different display due to the order of operation. # echo input record until all fields have been stripped do { print #output $0 $1 = "" #this will affect the value of $0 $0 = $0 #this causes $0 and NF to be re-evaluated } while (NF > 0) 5 for_example # echo command line arguments (won't include option switches) for ( i = 0; i < ARGC; i++ ) print ARGV[i] # 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 a compound (block) statement; when executed, it effectively skips the rest of the block so that the increment-expression (only for for-loops) and loop-termination expression can be re-evaluated. The 'break' statement, when executed, effectively skips the rest of the block and also treats the test expression as if it were false (instead of actually re-evaluating it). In this case, the increment-expression of a for-loop is also skipped. Inside nested loops, both 'break' and 'continue' only apply to the innermost loop. When in compatibility mode, 'break' or 'continue' may be used outside of a loop; either will be treated like 'next' (see action-controls). 4 action-controls There are two special statements for controlling statement execution. The 'next' statement, when executed, causes the rest of the current action and all further pattern-action rules to be skipped, so that 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. 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, if any, is executed. 'exit' takes an optional numeric value as a argument which is used as an exit status value, so that some sort of indication of why execution has stopped can be passed on to the user's environment. 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 ([]). 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 expression. See also subtopic 'functions IO_functions' for a description of 'print', 'printf', and 'getline'. 3 fields When an input record is read, it is automatically split into fields based on the current values of FS (builtin variable defining field separator expression) and RS (builtin variable defining record separator character). The default value of FS is an expression which matches one or more spaces and tabs; the default for RS is newline. If the FIELDWIDTHS variable is set to a space separated list of numbers (as in ``FIELDWIDTHS = "2 3 2"'') then the input is treated as if it had fixed-width fields of the indicated sizes and the FS value will be ignored. The field prefix operator ($), is used to reference a particular field. For example, $3 designates the third field of the current record. The entire record can be referenced via $0 (and it holds the actual input record, not the values of $1, $2, ... concatenated together, so multiple spaces--when present--remain intact, unless a new value gets assigned). The builtin variable NF holds the number of fields in the current record. $NF is therefore the value of the last field. Attempts to access fields beyond NF result in null values (if a record contained 3 fields, the value of $5 would be ""). Assigning a new value to $0 causes all the other field values (and NF) 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 declare them at all. Variable names consist of a leading letter (either upper or lower case, which are distinct from each other) or underscore (_) character followed by any number of letters, digits, or underscores. When a variable that didn't previously exist is referenced, it is created and given a null value. A null value is treated as 0 when used as a number, and is a string of zero characters in length if used as a string. 4 builtin_variables GAWK maintains several 'built-in' variables. All have default values; some are updated automatically. All the builtins have uppercase-only names. 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 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; 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 a 'print' statement; default is one space; can be arbitrary string ORS output record separator; value to implicitly terminate 'print' statement with; default is newline ("\n"); can be arbitrary string OFMT default output format used for printing numbers; default value is "%.6g" CONVFMT conversion format used for number-to-string conversions; default value is also "%.6g", like OFMT; not used when the number has a value which may be represented internally as an exact integer (typically within -2147483648 to 2147483647) SUBSEP subscript separator for array indices; used when an array subscript is specified as a comma separated list of values: the comma is replaced by SUBSEP and the resulting index is a concatenation of the values and SUBSEP(s); default value is "\034"; value may be arbitrary string IGNORECASE string and regular expression matching flag; if true (non-zero) matching ignores differences between upper and lower case letters; affects the '~' and '!~' operators, the 'index', 'match', 'split', 'sub', and 'gsub' functions, and field splitting based on FS; default value is false (0); has no effect if GAWK is in strict compatibility mode FIELDWIDTHS space or tab separated list of width sizes; takes precedence over FS when set, but is cleared if FS has a 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 NR record number (accumulated over all files when more than one input file is processed by the same program) 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 `-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 RLENGTH length of substring matched by the last invocation of the 'match' function; set to -1 if a match fails FILENAME name of the input file currently being processed; the special name "-" is used to represent the standard input ENVIRON array of miscellaneous user environment values; the VMS implementation of GAWK provides values for ["USER"] (the 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' 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 program name (ie, "gawk") in held in ARGV[0]; command line parameters (data files and "var=value" expressions, but not program options or the awk program text string if present) are stored in ARGV[1] through ARGV[ARGC-1]; the awk program can change values of ARGC and ARGV[] during execution in order to alter which files are processed or which between- file assignments are made ARGIND current index into ARGV[] 4 arrays awk supports associative arrays to collect data into tables. Array elements can be either numeric or string, as can the indices used to access them. Each array must have a unique name, but a given array can hold both string and numeric elements at the same time. Arrays are one-dimensional only, but multi-dimensional arrays can be simulated using comma (,) separated indices, whereby a single index value gets created by replacing commas with SUBSEP and concatenating the resulting expression into a single string. Referencing an array element is done with the expression Array[Index] where 'Array' represents the array's name and 'Index' represents a value or expression used for a subscript. If the requested array element did not exist, it will be created and assigned an initial null value. To check whether an element exists without creating it, use the 'in' boolean operator. Index in Array would check 'Array' for element 'Index' and return 1 if it existed or 0 otherwise. To remove an element from an array, use the 'delete' statement delete Array[Index] To remove all array elements at once, use delete Array Note: the latter is a gawk extension; also, there is no way to delete an ordinary variable or an entire array; 'delete' only works on array elements. 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 parameters, performs some calculations or other manipulations based on them, and returns a single result. The syntax for calling a function consists of the function name immediately followed by an open parenthesis (left parenthesis '('), followed by an argument list, followed by a closing parenthesis (right parenthesis ')'). The argument list is a sequence of values (numbers, strings, variables, array references, or expressions involving the above and/or nested function calls), separated by commas and optional white space. The parentheses are required punctuation, except for the 'print' and 'printf' builtin IO functions, where they're optional, and for the builtin IO function 'getline', where they're not allowed. Some functions support optional [trailing] arguments which can be simply omitted (along with the corresponding comma if applicable). 4 numeric_functions Builtin numeric functions int(n) returns the value of 'n' with any fraction truncated [truncation of negative values is towards 0] sqrt(n) the square root of n exp(n) the exponential of n ('e' raised to the 'n'th power) log(n) natural logarithm of n sin(n) sine of n (in radians) cos(n) cosine of n (radians) atan2(m,n) arctangent of m/n (radians) rand() random number in the range 0 to 1 (exclusive) srand(s) sets the random number 'seed' to s, so that a sequence of 'random' numbers can be repeated; returns the previous seed value; srand() [argument omitted] sets the seed to an 'unpredictable' value (based on date and time, for instance, so should be unrepeatable) 4 string_functions Builtin string functions index(s,t) search string s for substring t; result is 1-based offset of t within s, or 0 if not found length(s) returns the length of string s; either 'length()' with its argument omitted or 'length' without any parenthesized argument list will return length of $0 match(s,r) search string s for regular expression r; the offset of the longest, left-most substring which matches is returned, or 0 if no match was found; the builtin 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,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 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 sub(r,t,s) search string target s for regular expression r, and if a match is found, replace the matching text with substring t, then store the result back in s; if s is omitted, use $0 for the string; the result is either 1 if a match+substitution was made, or 0 otherwise; if substring t contains the character '&', the text which matched the regular expression is used instead of '&' [to suppress this feature of '&', 'quote' it with a backslash (\); since this will be inside a quoted string which will receive 'backslash' processing before being passed to sub(), *two* consecutive backslashes will be needed "\\&"] gsub(r,t,s) similar to sub(), but gsub() replaces all nonoverlapping substrings instead of just the first, and the return value is the number of substitutions made gensub(r,t,n,s) search string s ($0 if omitted) for regexp r and replace the n'th occurrence with substring t; the result is the new string and s (or $0) remains unchanged; if n begins with letter "g" or "G" then all matches are replaced instead of just the n'th; if r has parenthesized subexpressions in it, t may contain the special sequences \\0, \\1, through \\9 which expand into the value of the corresponding subexpression; this function is a gawk extension substr(s,p,l) extract a substring l characters long starting at offset p in string s; l is optional, if omitted then the remainder of the string (p thru end) is returned 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) 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 percent sign (%)); the directive is substituted by the corresponding value a abbreviated weekday name (Sun,Mon,Tue,Wed,Thu,Fri,Sat) A full weekday name b abbreviated month name (Jan,Feb,...) B full month name c date and time (Unix-style "aaa bbb dd HH:MM:SS YYYY" format) C century prefix (19 or 20) [not century number, ie 20th] d day of month as two digit decimal number (01-31) D date in mm/dd/yy format e day of month with leading space instead of leading 0 ( 1-31) E ignored; following format character used H hour (24 hour clock) as two digit number (00-23) h abbreviated month name (Jan,Feb,...) [same as %b] I hour (12 hour clock) as two digit number (01-12) j day of year as three digit number (001-366) m month as two digit number (01-12) M minute as two digit number (00-59) n 'newline' (ie, treat %n as \n) O ignored; following format character used p AM/PM designation for 12 hour clock r time in AM/PM format ("II:MM:SS p") R time without seconds ("HH:MM") S second as two digit number (00-59) t tab (ie, treat %t as \t) T time ("HH:MM:SS") U week of year (00-53) [first Sunday is first day of week 1] V date (VMS-style "dd-bbb-YYYY" with 'bbb' forced to uppercase) w weekday as decimal digit (0 [Sunday] through 6 [Saturday]) W week of year (00-53) [first _Monday_ is first day of week 1] x date ("aaa bbb dd YYYY") X time ("HH:MM:SS") y year without century (00-99) Y year with century (19yy-20yy) Z time zone name (always "local" for VMS) % literal percent sign (%) 4 IO_functions Builtin I/O functions print x,... print the values of one or more expressions; if none are listed, $0 is used; parentheses are optional; when multiple values are printed, the current value of builtin OFS (default is 1 space) is used to separate them; the print line is implicitly terminated with the current value of ORS (default is newline); print does not have a return value printf(f,x,...) print the values of one or more expressions, using the specified format string; null strings are used to supply missing values (if any); no between field or trailing newline characters are printed, they should be specified within the format string; the argument-enclosing parentheses are optional; printf does not have a return value getline v read a record into variable v; if v is omitted, $0 is used (and NF, NR, and FNR are updated); if v is specified, then field-splitting won't be performed; note: parentheses around the argument are *not* allowed; return value is 1 for successful read, 0 if end of file is encountered, or -1 if some sort of error occurred; [see 'redirection' for several variants] close(s) close a file or pipe specified by the string s; the string used should have the same value as the one used in a getline or print/printf redirection fflush(s) flush output stream s; if s is omitted, stdout is flushed; if it is specified but its value is an empty string, all output streams are flushed system(s) pass string s to executed by the operating system; the command string is executed in a subprocess 5 redirection Both getline and print/printf support variant forms which use redirection and pipes. To read from a file (instead of from the primary input file), use getline var < "file" or getline < "file" (read into $0) where the string "file" represents either an actual file name (in quotes) or a variable which contains a file name string value or an expression which evaluates to a string filename. To create a pipe executing some command and read the result into a variable (or into $0), use "command" | getline var or "command" | getline (read into $0) where "command" is a literal string containing an operating system command or a variable with a string value representing such a command. To output into a file other that the primary output, use print x,... > "file" (or >> "file") or printf(f,x,...) > "file" (or >> "file") similar to the 'getline' example above. '>>' causes output to be appended to an existing file if it exists, or create the file if it doesn't already exist. '>' always creates a new file. The alternate redirection method of '>$' (for RMS text file attributes) is *only* available on the command line, not with 'print' or 'printf' in the current release. To output an error message, use 'print' or 'printf' and redirect the output to file "/dev/stderr" (or equivalently to "SYS$ERROR:" on VMS). 'stderr' will normally be the user's terminal, even if ordinary output is being redirected into a file. To feed awk output into another command, use print x,... | "command" (similarly for 'printf') similar to the second 'getline' example. In this case, output from awk will be passed as input to the specified operating system command. The command must be capable of reading input from 'stdin' ("SYS$INPUT:" on VMS) in order to receive data in this manner. The 'close' function operates on the "file" or "command" argument specified here (either a literal string or a variable or expression resulting in a string value). It completely closes the file or pipe so that further references to the same file or command string would re-open that file or command at the beginning. Closing a pipe or redirection also releases some file-oriented resources. Note: the VMS implementation of GAWK uses temporary files to simulate pipes, so a command must finish before 'getline' can get any input from it, and 'close' must be called for an output pipe before any data can be passed to the specified command. 5 formats Formatting characters used by the 'printf' and 'sprintf' functions (each is introduced in the format string by preceding it with a percent sign (%)) % include a literal percent sign (%) in the result c format the next argument as a single ASCII character (prints first character of string argument, or corresponding ASCII character if numeric argument, e.g. 65 is 'A') s format the next argument as a string (numeric arguments are converted into strings on demand) d decimal number (ie, integer value in base 10) i integer (equivalent to decimal) o octal number (integer in base 8) x hexadecimal number (integer in base 16) [lowercase] X hexadecimal number [digits 'A' thru 'E' in uppercase] f floating point number (digits, decimal point, fraction digits) e exponential (scientific notation) number (digit, decimal point, fraction digits, letter 'e', sign '+' or '-', exponent digits) g 'fractional' number in either 'e' or 'f' format, whichever produces shorter result Several optional modifiers can be placed between the initiating percent sign and the format character (doesn't apply to %%). - left justify (only matters when width specifier is present) (space) for numeric specifiers, prefix nonnegative values with a space and negative values with a minus sign + for numeric specifiers, prefix nonnegative values with a plus sign and negative values with a minus sign # alternate form applicable to several of the format characters (o, x, X, e, E, f, g, G) NN width ['NN' represents 1 or more decimal digits]; actually minimum width to use, longer items will not be truncated; a leading 0 will cause right-justified numbers to be padded on the left with zeroes instead of spaces when they're aligned .MM precision [decimal point followed by 1 or more digits]; used as maximum width for strings (causing truncation if they're 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 general syntax of a user-defined function is the 'function' keyword followed by unique function name, followed by a comma-separated parameter list enclosed in parentheses, followed by statement(s) enclosed within braces ({}). A 'return' statement is customary but is not required. function FuncName(arg1,arg2) { # arbitrary statements return (arg1 + arg2) / 2 } If a function does not use 'return' to specify an output value, the result received by the caller will be unpredictable. 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 fundamental to awk's operation. Meta symbols ^ matches beginning of line or beginning of string; note that embedded newlines ('\n') create multi-line strings, so beginning of line is not necessarily beginning of string $ matches end of line or end of string . any single character (except newline) [ ] set of characters; [ABC] matches either 'A' or 'B' or 'C'; a dash (other than first or last of the set) denotes a range of characters: [A-Z] matches any upper case letter; if the first character of the set is '^', then the sense of match is reversed: [^0-9] matches any non-digit; several characters need to be quoted with backslash (\) if they occur in a set: '\', ']', '-', and '^'; within sets, various special character class designations are recognized, such as [:digit:] and [:punct:], as per POSIX | alternation (similar to boolean 'or'); match either of two patterns [for example "^start|stop$" matches leading 'start' or trailing 'stop'] ( ) grouping, alter normal precedence [for example, "^(start|stop)$" matches lines reading either 'start' or 'stop'] * repeated matching; when placed after a pattern, indicates that the pattern should match any number of times [for example, "[a-z][0-9]*" matches a lower case letter followed by zero or more digits] + repeated matching; when placed after a pattern, indicates that the pattern should match one or more times ["[0-9]+" matches any non-empty sequence of digits] ? optional matching; indicates that the pattern can match zero or one times ["[a-z][0-9]?" matches lower case letter alone or 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 `-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 another backslash A regular expression which matches a string or line will match against the first (left-most) substring which meets the pattern and include the longest sequence of characters which still meets that pattern. 3 comments Comments in awk programs are introduced with '#'. Anything after '#' on a line is ignored by GAWK. It's a good idea to include an explanation of what an awk program is doing and also who wrote it and when. 3 further_information For complete documentation on GAWK, see "Effective AWK Programming" by Arnold Robbins. The second edition (ISBN 1-57831-000-8) is jointly published by SSC and the FSF (http://www.ssc.com). Source text for it is present in the file GAWK.TEXI. A postscript version is available via anonymous FTP from host gnudist.gnu.org in directory /gnu/gawk, file gawk-{version}-doc.tar.gz where {version} would be the current version number, such as 3.0.6. Another source of documentation is "The AWK Programming Language" by Aho, Weinberger, and Kernighan (1988), published by Addison-Wesley. ISBN code is 0-201-07981-X. Each of these works contains both a reference on the awk language and a tutorial on awk's use, with many sample programs. 3 authors The awk programming language was originally created by Alfred V. Aho, Peter J. Weinberger, and Brian W. Kernighan in 1977. The language was revised and enhanced in a new version which was released in 1985. GAWK, the GNU implementation of awk, was written in 1986 by Paul Rubin and Jay Fenlason, with advice from Richard Stallman, and with contributions from John Woods. In 1988 and 1989, David Trueman and Arnold Robbins revised GAWK for compatibility with the newer awk. Arnold Robbins is the current maintainer. GAWK version 2.11.1 was ported to VMS by Pat Rankin in November, 1989, with further revisions in the Spring of 1990. The VMS port was incorporated into the official GNU distribution of version 2.13 in Spring 1991. (Version 2.12 was never publically released.) 2 release_notes 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 name does not include a device and/or directory. GAWK will first look in the current default directory, then if the file wasn't found it will look in the directory specified by the translation of logical name "AWK_LIBRARY". 3 known_problems There are several known problems with GAWK running on VMS. Some can be ignored, others require work-arounds. 4 file_formats If a file having the RMS attribute "Fortran carriage control" is read as input, it will generate an empty first record if the first actual record begins with a space (leading space becomes a newline). Also, the last record of the file will give a "record not terminated" warning. Both of these minor problems are due to the way that the C Run-Time Library (VAXCRTL) converts record attributes. Another poor feature without a work-around is that there's no way to specify "append if possible, create with RMS text attributes if not" with the current command line I/O redirection. '>>$' isn't supported. Ditto for binary output; '>>+' isn't supported. 4 RS_peculiarities Changing the record separator to something other than newline ('\n') will produce anomalous results for ordinary files. For example, using RS = "\f" and FS = "\n" with the following input |rec 1, line 1 |rec 1, line 2 |^L (form feed) |rec 2, line 1 |rec 2, line 2 |^L (form feed) |rec 3, line 1 |rec 3, line 2 |(end of file) will produce two fields for record 1, but three fields each for records 2 and 3. This is because the form-feed record delimiter is on its own line, so awk sees a newline after it. Since newline is now a field separator, records 2 and 3 will have null first fields. The following awk code will work-around this problem by inserting a null first field in the first record, so that all records can be handled the same by subsequent processing. # fix up for first record (RS != "\n") FNR == 1 { if ( $0 == "" ) #leading separator next #skip its null record else #otherwise, $0 = FS $0 #realign fields } There is a second problem with this same example. It will always trigger a "record not terminated" warning when it reaches the end of file. In the sample shown, there is no final separator; however, if a trailing form-feed were present, it would produce a spurious final record with two null fields. This occurs because the I/O system sees an implicit newline at the end of the last record, so awk sees a pair of null fields separated by that newline. The following code fragment will fix that provided there are no null records (in this case, that would be two consecutive lines containing just form-feeds). # fix up for last record (RS != "\n") $0 == FS { next } #drop spurious final record Note that the "record not terminated" warning will persist. 4 cmd_inconsistency The DCL qualifier /OUTPUT is internally equivalent to '>$' output redirection, but the qualifier /INPUT corresponds to the -f option rather than to '<' input redirection. 4 exit The exit statement can optionally pass a final status value to the operating system. GAWK expects a UN*X-style value instead of a 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 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 RS can contain multiple characters or be a regexp Regular expression interval support added gensub() and fflush() functions added memory leak(s) introduced in 3.0.2 or 3.0.1 fixed the user manual has been substantially revised VMS-specific Switched to build with DEC C by default Changes between version 2.15.6 and 2.14 General Many obscure bugs fixed `delete' may operate on an entire array ARGIND and ERRNO builtin variables added VMS-specific `>+ file' binary-mode output redirection added /variable=(foo=42) fixed Floating point number formatting improved Changes between version 2.14 and 2.13.2: General 'next file' construct added 'continue' outside of any loop is treated as 'next' Assorted bug fixes and efficiency improvements _The_GAWK_Manual_ updated Test suite expanded VMS-specific VMS POSIX support added Disk I/O throughput enhanced Pipe emulation improved and incorrect interaction with user-mode redefinition of SYS$OUTPUT eliminated Changes between version 2.13 and 2.11.1: (2.12 was not released) General CONVFMT and FIELDWIDTHS builtin control variables added systime() and strftime() date/time functions added 'lint' and 'posix' run-time options added '-W' command line option syntax supercedes '-c', '-C', and '-V' '-a' and '-e' regular expression options made obsolete Various bug fixes and efficiency improvements More platforms supported ('officially' including VMS) VMS-specific %g printf format fixed Handling of '\' on command line modified; no longer necessary to double it up Problem redirecting stderr (>&efile) at same time as stdin (ofile) has been fixed ``2>&1'' and ``1>&2'' redirection constructs added Interaction between command line I/O redirection and gawk pipes fixed; also, name used for pseudo-pipe temporary file expanded 3 license GAWK is covered by the "GNU General Public License", the gist of which is that if you supply this software to a third party, you are expressly forbidden to prevent them from supplying it to a fourth party, and if you supply binaries you must make the source code available to them at no additional cost. Any revisions or modified versions are also covered by the same license. There is no warranty, express or implied, for this software. It is provided "as is." [Disclaimer: This is just an informal summary with no legal basis; refer to the actual GNU General Public License for specific details.] !2 examples ! gawk-4.0.1+dfsg.orig/vms/vmstest.com0000644000175000017500000013625411734665352016406 0ustar schotschot$! vmstest.com -- DCL script to perform test/Makefile actions for VMS $! $! Usage: $! $ set default [-.test] $! $ @[-.vms]vmstest.com bigtest $! This assumes that newly built gawk.exe is in the next directory up. $ $! 3.1.7: changed to share code among many common tests, and $! to put results for test foo into _foo.tmp instead of tmp. $! $ 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 $ list = f$edit(list,"TRIM,LOWERCASE") $ if list.eqs."" then list = "all" ! bigtest $ gosub list_of_tests $ echo "done." $ exit $ $all: $bigtest: echo "bigtest..." $ ! omits "printlang" and "extra" $ list = "basic unix_tests gawk_ext vms_tests charset_tests" - + " machine_tests pgawk_tests" $ gosub list_of_tests $ return $ $basic: echo "basic..." $ list = "msg addcomma anchgsub argarray arrayparm arrayref" - + " arrymem1 arrayprm2 arrayprm3 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" $ gosub list_of_tests $ list = "concat2 concat3 concat4 convfmt datanonl defref" - + " 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" - + " getline4" $ gosub list_of_tests $ list = "getlnbuf getnr2tb getnr2tm gsubasgn gsubtest" - + " 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 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" - + " ofmta ofmts onlynl opasnidx opasnslf paramdup" - + " paramres paramtyp parse1 parsefld parseme pcntplus" - + " posix2008sub prdupval prec printf0 printf1 prmarscl" $ gosub list_of_tests $ 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" - + " strcat1 strtod strnum1 subamp subi18n" $ gosub list_of_tests $ list = "subsepnm subslash substr swaplns synerr1 synerr2" - + " tradanch tweakfld uninit2 uninit3 uninit4 uninit5" - + " uninitialized unterm uparrfs wideidx wideidx2" - + " widesub widesub2 widesub3 widesub4 wjposer1 zeroe0" - + " zeroflag zero2" $ gosub list_of_tests $ return $ $unix: $unix_tests: echo "unix_tests..." $ list = "fflush getlnhd localenl pid pipeio1 pipeio2" - + " poundbang rtlen rtlen01 space strftlng" $ gosub list_of_tests $ return $ $gnu: $gawk_ext: echo "gawk_ext... (gawk.extensions)" $ 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 = "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 $ $vms: $vms_tests: echo "vms_tests..." $ list = "vms_cmd vms_io1 vms_io2" $ gosub list_of_tests $ return $ $locale_tests: $charset_tests: echo "charset_tests..." $ ! 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 rtlenmb sort1 sprintfc" $ gosub list_of_tests $ return $ $hardware: $machine_tests: echo "machine_tests..." $ ! these depend upon the floating point format in use $ list = "double1 double2 fmtspcl intformat" $ 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 $ return $ $inet: echo "inet..." $ type sys$input: The inet tests only work if gawk has been built with TCP/IP socket support and your system supports the services "discard" at port 9 and "daytimed" at port 13. $ list = "inetechu inetecht inetdayu inetdayt" $ gosub list_of_tests $ return $ $! list_of_tests: process 'list', a space-separated list of tests. $! Some tests assign their own 'list' and call us recursively, $! so we have to emulate a local stack to prevent the current list $! from being clobbered by nested execution. We do this by making $! and operating on list1, list2, &c depending upon call depth. $! Lower level tests access higher numbered entries; the lower $! entries in use by caller or caller's caller are kept intact. $list_of_tests: $ listdepth = listdepth + 1 ! increment calling depth $ list'listdepth' = f$edit(list,"COMPRESS,TRIM") $next_test: $ test = f$element(0," ",list'listdepth') $ list'listdepth' = list'listdepth' - test - " " $ gosub 'test' $ if list'listdepth'.nes."" then goto next_test $ listdepth = listdepth - 1 ! reset $ return $ $ $! common tests, not needing special set up: gawk -f 'test'.awk 'test'.in $addcomma: $anchgsub: $arrayprm2: $arryref2: $aryprm8: $asgext: $backgsub: $backw: $concat1: $concat2: $concat3: $datanonl: $delarpm2: $fldchg: $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: $match3: $membug1: $nested: $nfset: $nlfldsep: $nlinstr: $noloop1: $noloop2: $nulrsend: $ofmt: $ofmtfidl: $ofmts: $onlynl: $parse1: $parsefld: $prdupval: $prec: $prtoeval: $range1: $rebuf: $regeq: $reindops: $reparse: $rsnul1nl: $rsstart1: $rstest1: $rstest2: $rstest3: $rstest6: $rswhite: $sortempty: $sortfor: $splitarg4: $splitargv: $splitarr: $splitvar: $sprintfc: $strcat1: $strtod: $subsepnm: $swaplns: $uparrfs: $wjposer1: $zeroe0: $! common with 'test'.in $ echo "''test'" $ gawk -f 'test'.awk 'test'.in >_'test'.tmp $ cmp 'test'.ok _'test'.tmp $ if $status then rm _'test'.tmp; $ return $ $! more common tests, without a data file: gawk -f 'test'.awk $aarray1: $aasort: $aasorti: $arrayref: $arraysort: $arrymem1: $arynasty: $arysubnm: $asort: $asorti: $closebad: $compare2: $convfmt: $delargv: $delarprm: $delsub: $!!double1: $!!double2: $dynlj: $fnarydel: $fnparydl: $fpat2: $forref: $forsimp: $funsemnl: $gensub2: $gnuops2: $gnuops3: $gnureops: $hsprint: $icasefs: $intest: $match1: $math: $minusstr: $negrange: $nlstrina: $nondec: $octsub: $ofmta: $paramtyp: $patsplit: $pcntplus: $printf1: $procinfs: $prt1eval: $rebt8b1: $rebt8b2: $regrange: $regx8bit: $sort1: $sortu: $splitdef: $splitwht: $strnum1: $strtonum: $substr: $switch2: $zero2: $zeroflag: $! common without 'test'.in $ echo "''test'" $ gawk -f 'test'.awk >_'test'.tmp $ cmp 'test'.ok _'test'.tmp $ if $status then rm _'test'.tmp; $ return $ $double1: $double2: $lc_num1: $mbprintf1: $ echo "''test' skipped" $ 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: $! the default locale is C, with LC_LANG and LC_ALL left empty; $! showing that at the very beginning may cause some confusion about $! whether gawk requires those, so we don't run this as the first test $ gawk -f printlang.awk $ return $ $poundbang: $pty1: $ echo "''test': not supported" $ return $ $messages: echo "messages" $ set noOn $ gawk -f messages.awk > out2 >& out3 $ cmp out1.ok out1. $ if $status then rm out1.; $ cmp out2.ok out2. $ if $status then rm out2.; $ cmp out3.ok out3. $ if $status then rm out3.; $ set On $ return $ $argarray: echo "argarray" $ define/User TEST "test" !this is useless... $ gawk -f argarray.awk ./argarray.in - >_argarray.tmp just a test $ cmp argarray.ok _argarray.tmp $ if $status then rm _argarray.tmp; $ return $ $fstabplus: echo "fstabplus" $ gawk -f fstabplus.awk >_fstabplus.tmp 1 2 $ cmp fstabplus.ok _fstabplus.tmp $ if $status then rm _fstabplus.tmp; $ return $ $longwrds: echo "longwrds" $ gawk -v "SORT=sort sys$input: _longwrds.tmp" -f longwrds.awk longwrds.in >_NL: $ cmp longwrds.ok _longwrds.tmp $ if $status then rm _longwrds.tmp; $ return $ $fieldwdth: echo "fieldwdth" $ gawk -v "FIELDWIDTHS=2 3 4" "{ print $2}" >_fieldwdth.tmp 123456789 $ cmp fieldwdth.ok _fieldwdth.tmp $ if $status then rm _fieldwdth.tmp; $ return $ $ignrcase: echo "ignrcase" $ gawk -v "IGNORECASE=1" "{ sub(/y/, """"); print}" >_ignrcase.tmp xYz $ cmp ignrcase.ok _ignrcase.tmp $ if $status then rm _ignrcase.tmp; $ return $ $regtest: $ if f$search("regtest.com").eqs."" $ then echo "regtest: not available" $ else echo "regtest" $ echo "Some of the output from regtest is very system specific, do not" $ echo "be distressed if your output differs from that distributed." $ echo "Manual inspection is called for." $ @regtest.com $ endif $ return $ $posix: echo "posix" $ gawk -f posix.awk >_posix.tmp 1:2,3 4 $ cmp posix.ok _posix.tmp $ if $status then rm _posix.tmp; $ return $ $manyfiles: echo "manyfiles" $!! this used to use a hard-coded value of 300 simultaneously open $!! files, but if our open file quota is generous enough then that $!! wouldn't exercise the ability to handle more than the maximum $!! number allowed at once $ f_cnt = 300 $ chnlc = f$getsyi("CHANNELCNT") $ fillm = f$getjpi("","FILLM") $ if fillm.ge.chnlc then fillm = chnlc - 1 $ if fillm.ge.f_cnt then f_cnt = fillm + 10 $ if f$search("[.junk]*.*").nes."" then rm [.junk]*.*;* $ if f$parse("[.junk]").eqs."" then create/Dir/Prot=(O:rwed) [.junk] $ gawk -- "BEGIN {for (i = 1; i <= ''f_cnt'; i++) print i, i}" >_manyfiles.dat $ echo "(processing ''f_cnt' files; this may take quite a while)" $ set noOn ! continue even if gawk fails $ gawk -f manyfiles.awk _manyfiles.dat _manyfiles.dat $ set On $ define/User sys$error _NL: $ define/User sys$output _manyfiles.tmp $ search/Match=Nor/Output=_NL:/Log [.junk]*.* "" $!/Log output: "%SEARCH-S-NOMATCH, - <#> records" plus 1 line summary $ gawk -v "F_CNT=''f_cnt'" -f - _manyfiles.tmp $deck !some input begins with "$" $4 != 2 {++count} END {if (NR != F_CNT+1 || count != 1) {print "\nFailed!"}} $eod $ rm _manyfiles.tmp;,_manyfiles.dat;,[.junk]*.*;*,[]junk.dir; $ return $ $compare: echo "compare" $ gawk -f compare.awk 0 1 compare.in >_compare.tmp $ cmp compare.ok _compare.tmp $ if $status then rm _compare.tmp; $ return $ $rs: echo "rs" $ gawk -v "RS=" "{ print $1, $2}" rs.in >_rs.tmp $ cmp rs.ok _rs.tmp $ if $status then rm _rs.tmp; $ return $ $fsbs: echo "fsbs" $ gawk -v "FS=\" "{ print $1, $2 }" fsbs.in >_fsbs.tmp $ cmp fsbs.ok _fsbs.tmp $ if $status then rm _fsbs.tmp; $ return $ $inftest: echo "inftest" $ !! echo "This test is very machine specific..." $ set noOn $ gawk -f inftest.awk >_inftest.tmp $ !! cmp inftest.ok _inftest.tmp !just care that gawk doesn't crash... $ if $status then rm _inftest.tmp; $ set On $ return $ $getline2: echo "getline2" $ gawk -f getline2.awk getline2.awk getline2.awk >_getline2.tmp $ cmp getline2.ok _getline2.tmp $ if $status then rm _getline2.tmp; $ return $ $rand: echo "rand" $ echo "The following line should just be 19 random numbers between 1 and 100" $ echo "" $ gawk -f rand.awk $ return $ $negexp: echo "negexp" $ gawk "BEGIN { a = -2; print 10^a }" >_negexp.tmp $ cmp negexp.ok _negexp.tmp $ if $status then rm _negexp.tmp; $ return $ $awkpath: echo "awkpath" $ define/User AWK_LIBRARY [],[.lib] $ gawk -f awkpath.awk >_awkpath.tmp $ cmp awkpath.ok _awkpath.tmp $ if $status then rm _awkpath.tmp; $ return $ $argtest: echo "argtest" $ gawk -f argtest.awk -x -y abc >_argtest.tmp $ cmp argtest.ok _argtest.tmp $ if $status then rm _argtest.tmp; $ return $ $badargs: echo "badargs" $ on error then continue $ gawk -f 2>&1 >_badargs.too $! search/Match=Nor _badargs.too "patchlevel" /Output=_badargs.tmp $ gawk "/patchlevel/{next}; {gsub(""\"""",""'""); print}" <_badargs.too >_badargs.tmp $ cmp badargs.ok _badargs.tmp $ if $status then rm _badargs.tmp;,_badargs.too; $ 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. $ AWKPATH_srcdir $ gawk --lint -f nonl.awk _NL: >_nonl.tmp 2>&1 $ cmp nonl.ok _nonl.tmp $ if $status then rm _nonl.tmp; $ return $ $defref: echo "defref" $ set noOn $ AWKPATH_srcdir $ gawk --lint -f defref.awk >_defref.tmp 2>&1 $ if .not.$status then call exit_code 2 _defref.tmp $ set On $ cmp defref.ok _defref.tmp $ if $status then rm _defref.tmp; $ return $ $nofmtch: echo "nofmtch" $ AWKPATH_srcdir $ gawk --lint -f nofmtch.awk >_nofmtch.tmp 2>&1 $ cmp nofmtch.ok _nofmtch.tmp $ if $status then rm _nofmtch.tmp; $ return $ $strftime: echo "strftime" $ ! this test could fail on slow machines or on a second boundary, $ ! so if it does, double check the actual results $!! date | gawk -v "OUTPUT"=_strftime.tmp -f strftime.awk $ now = f$time() $ wkd = f$extract(0,3,f$cvtime(now,,"WEEKDAY")) $ mon = f$cvtime(now,"ABSOLUTE","MONTH") $ mon = f$extract(0,1,mon) + f$edit(f$extract(1,2,mon),"LOWERCASE") $ day = f$cvtime(now,,"DAY") $ tim = f$extract(0,8,f$cvtime(now,,"TIME")) $ tz = "" $ yr = f$cvtime(now,,"YEAR") $ if f$trnlnm("FTMP").nes."" then close/noLog ftmp $ open/Write ftmp strftime.in $ write ftmp wkd," ",mon," ",day," ",tim," ",tz," ",yr $ close ftmp $ gawk -v "OUTPUT"=_strftime.tmp -f strftime.awk strftime.in $ set noOn $ cmp strftime.ok _strftime.tmp $ if $status then rm _strftime.tmp;,strftime.ok;*,strftime.in;* $ set On $ return $ $litoct: echo "litoct" $ gawk --traditional -f litoct.awk >_litoct.tmp ab $ cmp litoct.ok _litoct.tmp $ if $status then rm _litoct.tmp; $ return $ $resplit: echo "resplit" $ gawk -- "{ FS = "":""; $0 = $0; print $2 }" >_resplit.tmp a:b:c d:e:f $ cmp resplit.ok _resplit.tmp $ if $status then rm _resplit.tmp; $ return $ $intprec: echo "intprec" $ gawk -f intprec.awk >_intprec.tmp 2>&1 $ cmp intprec.ok _intprec.tmp $ if $status then rm _intprec.tmp; $ return $ $childin: echo "childin skipped" $ return $! note: this `childin' test currently [gawk 3.0.3] fails for vms $!!childin: echo "childin" $ echo "note: type ``hi'",- "' if testing appears to hang in `childin'" $!! @echo hi | gawk "BEGIN { ""cat"" | getline; print; close(""cat"") }" >_childin.tmp $ gawk "BEGIN { ""type sys$input:"" | getline; print; close(""type sys$input:"") }" >_childin.tmp hi $ cmp childin.ok _childin.tmp $ if $status then rm _childin.tmp; $ return $ $noeffect: echo "noeffect" $ AWKPATH_srcdir $ gawk --lint -f noeffect.awk >_noeffect.tmp 2>&1 $ cmp noeffect.ok _noeffect.tmp $ if $status then rm _noeffect.tmp; $ return $ $numsubstr: echo "numsubstr" $ AWKPATH_srcdir $ gawk -f numsubstr.awk numsubstr.in >_numsubstr.tmp $ cmp numsubstr.ok _numsubstr.tmp $ if $status then rm _numsubstr.tmp; $ return $ $prmreuse: echo "prmreuse" $ if f$search("prmreuse.ok").eqs."" then create prmreuse.ok $ gawk -f prmreuse.awk >_prmreuse.tmp $ cmp prmreuse.ok _prmreuse.tmp $ if $status then rm _prmreuse.tmp; $ return $ $fflush: $ echo "fflush: not supported" $ return $!!fflush: echo "fflush" $ ! hopelessly Unix-specific $!! @fflush.sh >_fflush.tmp $ cmp fflush.ok _fflush.tmp $ if $status then rm _fflush.tmp; $ return $ $getlnhd: $ echo "getlnhd skipped" $ return $!!getlnhd: echo "getlnhd" $ gawk -f getlnhd.awk >_getlnhd.tmp $ cmp getlnhd.ok _getlnhd.tmp $ if $status then rm _getlnhd.tmp; $ return $ $tweakfld: echo "tweakfld" $ gawk -f tweakfld.awk tweakfld.in >_tweakfld.tmp $ if f$search("errors.cleanup").nes."" then rm errors.cleanup;* $ cmp tweakfld.ok _tweakfld.tmp $ if $status then rm _tweakfld.tmp; $ return $ $clsflnam: echo "clsflnam" $ if f$search("clsflnam.ok").eqs."" then create clsflnam.ok $ gawk -f clsflnam.awk clsflnam.in >_clsflnam.tmp 2>&1 $ cmp clsflnam.ok _clsflnam.tmp $ if $status then rm _clsflnam.tmp; $ return $ $mmap8k: echo "mmap8k" $ gawk "{ print }" mmap8k.in >_mmap8k.tmp $ cmp mmap8k.in _mmap8k.tmp $ if $status then rm _mmap8k.tmp; $ return $ $eofsplit: echo "eofsplit" $ if f$search("eofsplit.ok").eqs."" then create eofsplit.ok $ gawk -f eofsplit.awk >_eofsplit.tmp $ cmp eofsplit.ok _eofsplit.tmp $ if $status then rm _eofsplit.tmp; $ return $ $back89: echo "back89" $ gawk "/a\8b/" back89.in >_back89.tmp $ cmp back89.ok _back89.tmp $ if $status then rm _back89.tmp; $ return $ $tradanch: echo "tradanch" $ if f$search("tradanch.ok").eqs."" then create tradanch.ok $ gawk --traditional -f tradanch.awk tradanch.in >_tradanch.tmp $ cmp tradanch.ok _tradanch.tmp $ if $status then rm _tradanch.tmp; $ return $ $pid: echo "pid" $ pid = f$integer("%x" + f$getjpi("","PID")) $ ppid = f$integer("%x" + f$getjpi("","OWNER")) $ gawk -v "ok_pid=''pid'" -v "ok_ppid=''ppid'" -f pid.awk >_pid.tmp >& _NL: $ cmp pid.ok _pid.tmp $ if $status then rm _pid.tmp; $ return $ $strftlng: echo "strftlng" $ define/User TZ "UTC" !useless $ gawk -f strftlng.awk >_strftlng.tmp $ cmp strftlng.ok _strftlng.tmp $ if $status then rm _strftlng.tmp; $ return $ $nfldstr: echo "nfldstr" $ if f$search("nfldstr.ok").eqs."" then create nfldstr.ok $ gawk "$1 == 0 { print ""bug"" }" >_nfldstr.tmp $ cmp nfldstr.ok _nfldstr.tmp $ if $status then rm _nfldstr.tmp; $ return $ $nors: echo "nors" $!! there's no straightforward way to supply non-terminated input on the fly $!! @echo A B C D E | tr -d '\12' | $(AWK) '{ print $$NF }' - $(srcdir)/nors.in > _$@ $!! so just read a line from sys$input instead $ gawk "{ print $NF }" - nors.in >_nors.tmp A B C D E $ cmp nors.ok _nors.tmp $ if $status then rm _nors.tmp; $ return $ $reint: echo "reint" $ gawk --re-interval -f reint.awk reint.in >_reint.tmp $ cmp reint.ok _reint.tmp $ if $status then rm _reint.tmp; $ return $ $noparms: echo "noparms" $ set noOn $ AWKPATH_srcdir $ gawk -f noparms.awk >_noparms.tmp 2>&1 $ if .not.$status then call exit_code 1 _noparms.tmp $ set On $ cmp noparms.ok _noparms.tmp $ if $status then rm _noparms.tmp; $ return $ $pipeio1: echo "pipeio1" $ cat = "TYPE" !close enough, as long as we avoid .LIS default suffix $ define/User test1 []test1. $ define/User test2 []test2. $ gawk -f pipeio1.awk >_pipeio1.tmp $ rm test1.;,test2.; $ cmp pipeio1.ok _pipeio1.tmp $ if $status then rm _pipeio1.tmp; $ return $ $pipeio2: $ echo "pipeio2 skipped" $ return $!!pipeio2: echo "pipeio2" $ cat = "gawk -- {print}" $ tr = "??" !unfortunately, no trivial substitution available... $ gawk -v "SRCDIR=." -f pipeio2.awk >_pipeio2.tmp $ cmp pipeio2.ok _pipeio2.tmp $ if $status then rm _pipeio2.tmp; $ return $ $clobber: echo "clobber" $ gawk -f clobber.awk >_clobber.tmp $ cmp clobber.ok seq. $ if $status then rm seq.;* $ cmp clobber.ok _clobber.tmp $ if $status then rm _clobber.tmp; $ return $ $nasty: echo "nasty" $ set noOn $ gawk -f nasty.awk >_nasty.tmp $ call fixup_LRL nasty.ok $ call fixup_LRL _nasty.tmp "purge" $ cmp nasty.ok _nasty.tmp $ if $status then rm _nasty.tmp; $ set On $ return $ $nasty2: echo "nasty2" $ set noOn $ gawk -f nasty2.awk >_nasty2.tmp $ call fixup_LRL nasty2.ok $ call fixup_LRL _nasty2.tmp "purge" $ cmp nasty2.ok _nasty2.tmp $ if $status then rm _nasty2.tmp; $ set On $ return $ $aadelete1: $aadelete2: $arrayparm: $fnaryscl: $match2: $nastyparm: $opasnslf: $opasnidx: $printfbad1: $prmarscl: $subslash: $ echo "''test'" $ set noOn $ gawk -f 'test'.awk >_'test'.tmp 2>&1 $ if .not.$status then call exit_code 2 _'test'.tmp $ set On $ cmp 'test'.ok _'test'.tmp $ if $status then rm _'test'.tmp; $ return $ $arynocls: echo "arynocls" $ gawk -v "INPUT"=arynocls.in -f arynocls.awk >_arynocls.tmp $ cmp arynocls.ok _arynocls.tmp $ if $status then rm _arynocls.tmp; $ return $ $getlnbuf: echo "getlnbuf" $ gawk -f getlnbuf.awk getlnbuf.in >_getlnbuf.tmp $ gawk -f gtlnbufv.awk getlnbuf.in >_getlnbuf.too $ cmp getlnbuf.ok _getlnbuf.tmp $ if $status then rm _getlnbuf.tmp; $ cmp getlnbuf.ok _getlnbuf.too $ if $status then rm _getlnbuf.too; $ return $ $lint: echo "lint" $ AWKPATH_srcdir $ gawk -f lint.awk >_lint.tmp 2>&1 $ cmp lint.ok _lint.tmp $ if $status then rm _lint.tmp; $ return $ $lintold: echo "lintold" $ AWKPATH_srcdir $ gawk -f lintold.awk --lint-old _lintold.tmp 2>&1 $ cmp lintold.ok _lintold.tmp $ if $status then rm _lintold.tmp; $ return $ $ofmtbig: echo "ofmtbig" $ set noOn $ gawk -f ofmtbig.awk ofmtbig.in >_ofmtbig.tmp 2>&1 $ set On $ cmp ofmtbig.ok _ofmtbig.tmp $ if $status then rm _ofmtbig.tmp; $ return $ $inetechu: echo "inetechu" $ echo "this test is for establishing UDP connections" $ set noOn $ gawk -- "BEGIN {print """" |& ""/inet/udp/0/127.0.0.1/9""}" $ set On $ return $ $inetecht: echo "inetecht" $ echo "this test is for establishing TCP connections" $ set noOn $ gawk -- "BEGIN {print """" |& ""/inet/tcp/0/127.0.0.1/9""}" $ set On $ return $ $inetdayu: echo "inetdayu" $ echo "this test is for bidirectional UDP transmission" $ set noOn $ 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 $ return $ $inetdayt: echo "inetdayt" $ echo "this test is for bidirectional TCP transmission" $ set noOn $ 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 $ return $ $redfilnm: echo "redfilnm" $ gawk -f redfilnm.awk srcdir="." redfilnm.in >_redfilnm.tmp $ cmp redfilnm.ok _redfilnm.tmp $ if $status then rm _redfilnm.tmp; $ return $ $leaddig: echo "leaddig" $ gawk -v "x=2E" -f leaddig.awk >_leaddig.tmp $ cmp leaddig.ok _leaddig.tmp $ if $status then rm _leaddig.tmp; $ return $ $clos1way: $ echo "clos1way: not supported" $ return $!!clos1way: echo "clos1way" $ gawk -f clos1way.awk >_clos1way.tmp $ cmp clos1way.ok _clos1way.tmp $ if $status then rm _clos1way.tmp; $ return $ $shadow: echo "shadow" $ set noOn $ AWKPATH_srcdir $ gawk --lint -f shadow.awk >_shadow.tmp 2>&1 $ set On $ cmp shadow.ok _shadow.tmp $ 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 $!! the records here are too long for DIFF to handle $!! so assume success as long as gawk doesn't crash $!! call fixup_LRL longsub.ok $!! call fixup_LRL _longsub.tmp "purge" $!! cmp longsub.ok _longsub.tmp $ if $status then rm _longsub.tmp; $ set On $ return $ $arrayprm3: echo "arrayprm3" $ gawk -f arrayprm3.awk arrayprm3.in >_arrayprm3.tmp $ cmp arrayprm3.ok _arrayprm3.tmp $ if $status then rm _arrayprm3.tmp; $ return $ $arryref3: $arryref4: $arryref5: $aryprm1: $aryprm2: $aryprm3: $aryprm4: $aryprm5: $aryprm6: $aryprm7: $delfunc: $dfastress: $nfneg: $numindex: $scalar: $sclforin: $sclifin: $ echo "''test'" $ set noOn $ gawk -f 'test'.awk 'test'.in >_'test'.tmp 2>&1 $ if .not.$status then call exit_code 2 _'test'.tmp $ set On $ cmp 'test'.ok _'test'.tmp $ if $status then rm _'test'.tmp; $ return $ $fnamedat: $fnasgnm: $ echo "''test'" $ set noOn $ gawk -f 'test'.awk <'test'.in >_'test'.tmp 2>&1 $ if .not.$status then call exit_code 2 _'test'.tmp $ set On $ cmp 'test'.ok _'test'.tmp $ if $status then rm _'test'.tmp; $ return $ $exitval2: echo "exitval2 skipped" $ return $!!exitval2: echo "exitval2" $ gawk -f exitval2.awk exitval2.in >_exitval2.tmp $ cmp exitval2.ok _exitval2.tmp $ if $status then rm _exitval2.tmp; $ return $ $fcall_exit2: $fnarray2: $fnmisc: $gsubasgn: $unterm: $ echo "''test'" $ set noOn $ gawk -f 'test'.awk 'test'.in >_'test'.tmp 2>&1 $ if .not.$status then call exit_code 1 _'test'.tmp $ set On $ cmp 'test'.ok _'test'.tmp $ if $status then rm _'test'.tmp; $ return $ $getline: echo "getline skipped" $ return $!!getline: echo "getline" $ gawk -f getline.awk getline.in >_getline.tmp $ cmp getline.ok _getline.tmp $ if $status then rm _getline.tmp; $ return $ $gsubtst3: echo "gsubtst3" $ gawk --re-interval -f gsubtst3.awk gsubtst3.in >_gsubtst3.tmp $ cmp gsubtst3.ok _gsubtst3.tmp $ if $status then rm _gsubtst3.tmp; $ return $ $! FIXME: gawk generates an extra, empty output file while running this test... $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 $ $rstest4: echo "rstest4 skipped" $ return $!!rstest4: echo "rstest4" $ gawk -f rstest4.awk rstest4.in >_rstest4.tmp $ cmp rstest4.ok _rstest4.tmp $ if $status then rm _rstest4.tmp; $ return $ $rstest5: echo "rstest5 skipped" $ return $!!rstest5: echo "rstest5" $ gawk -f rstest5.awk rstest5.in >_rstest5.tmp $ cmp rstest5.ok _rstest5.tmp $ if $status then rm _rstest5.tmp; $ return $ $fcall_exit: $fnarray: $funsmnam: $paramdup: $paramres: $parseme: $synerr1: $synerr2: $ echo "''test'" $ set noOn $ gawk -f 'test'.awk >_'test'.tmp 2>&1 $ if .not.$status then call exit_code 1 _'test'.tmp $ set On $ cmp 'test'.ok _'test'.tmp $ if $status then rm _'test'.tmp; $ return $ $uninit2: $uninit3: $uninit4: $uninit5: $uninitialized: $ echo "''test'" $ gawk --lint -f 'test'.awk 'test'.in >_'test'.tmp 2>&1 $ cmp 'test'.ok _'test'.tmp $ if $status then rm _'test'.tmp; $ return $ $space: echo "space" $ set noOn $ gawk -f " " space.awk >_space.tmp 2>&1 $ if .not.$status then call exit_code 2 _space.tmp $ set On $! we get a different error from what space.ok expects $ gawk "{gsub(""file specification syntax error"", ""no such file or directory""); print}" - _space.tmp >_space.too $ rm _space.tmp; $ mv _space.too _space.tmp $ igncascmp space.ok _space.tmp $ if $status then rm _space.tmp; $ return $ $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" $ if .not.pipeok $ then echo "Without the PIPE command, ''test' can't be run." $ On warning then return $ pipe echo "With PIPE, this will probably take quite a while..." $ On warning then $ $ pipeok = 1 $ else echo "This will probably take quite a while too..." $ endif $ set noOn $ pipe - gawk -- "BEGIN {for (i = 1; i <= 128*64+1; i++) print ""abcdefgh123456\n""}" | - gawk -- "BEGIN {RS = """"; ORS = ""\n\n""}; {print}" | - gawk -- "/^[^a]/; END {print NR}" >_rsnulbig.tmp $ set On $ cmp rsnulbig.ok _rsnulbig.tmp $ if $status then rm _rsnulbig.tmp; $ return $ $rsnulbig2: echo "rsnulbig2" $ if .not.pipeok $ then echo "Without the PIPE command, ''test' can't be run." $ On warning then return $ pipe echo "With PIPE, this will probably take quite a while..." $ On warning then $ $ pipeok = 1 $ else echo "This will probably take quite a while too..." $ endif $ set noOn $ pipe - gawk -- "BEGIN {ORS=""""; n=""\n""; for (i=1; i<=10; i++) n=(n n); for (i=1; i<=128; i++) print n; print ""abc\n""}" | - gawk -- "BEGIN {RS=""""; ORS=""\n\n"" }; {print}" | - gawk -- "/^[^a]/; END {print NR}" >_rsnulbig2.tmp $ set On $ cmp rsnulbig2.ok _rsnulbig2.tmp $ if $status then rm _rsnulbig2.tmp; $ return $ $subamp: $wideidx: $widesub2: $widesub3: $ echo "''test'" $ gosub define_gawklocale $ gawk -f 'test'.awk 'test'.in >_'test'.tmp $ cmp 'test'.ok _'test'.tmp $ if $status then rm _'test'.tmp; $ return $ $ignrcas2: $!!lc_num1: $wideidx2: $widesub: $widesub4: $ echo "''test'" $ gosub define_gawklocale $ gawk -f 'test'.awk >_'test'.tmp $ cmp 'test'.ok _'test'.tmp $ if $status then rm _'test'.tmp; $ return $ $! This test is somewhat suspect for vms due to exit code manipulation $exitval1: echo "exitval1" $ gawk -f exitval1.awk >_exitval1.tmp 2>&1 $ if $status then call exit_code 0 _exitval1.tmp $ cmp exitval1.ok _exitval1.tmp $ if $status then rm _exitval1.tmp; $ return $ $fsspcoln: echo "fsspcoln" $ gawk -f fsspcoln.awk "FS=[ :]+" fsspcoln.in >_forspcoln.tmp $ cmp fsspcoln.ok _forspcoln.tmp $ if $status then rm _forspcoln.tmp; $ return $ $getlndir: echo "getlndir" $ ! assume we're running in the test subdirectory; we don't want to $ ! perform a messy conversion of [] into its file specification $ gawk -v "SRCDIR=[-]test.dir" -f getlndir.awk >_getlndir.tmp $! getlndir.ok expects "Is a directory", we see "is a directory" $ igncascmp getlndir.ok _getlndir.tmp $ if $status then rm _getlndir.tmp; $ return $ $rsstart2: echo "rsstart2" $ gawk -f rsstart2.awk rsstart1.in >_rsstart2.tmp $ cmp rsstart2.ok _rsstart2.tmp $ if $status then rm _rsstart2.tmp; $ return $ $! rsstart3 fails, presumeably due to PIPE's use of print file format $rsstart3: echo "rsstart3 skipped" $ return $!!rsstart3: echo "rsstart3" $ 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 $ ! head rsstart1.in | gawk -f rsstart2.awk >_rsstart3.tmp $ ! splitting this into two steps would make it the same as rsstart2 $ set noOn $ pipe - gawk -- "FNR <= 10" rsstart1.in | - gawk -f rsstart2.awk >_rsstart3.tmp $ set On $ cmp rsstart3.ok _rsstart3.tmp $ 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 $ if $status then rm _nondec2.tmp; $ return $ $nofile: echo "nofile" $! gawk "{}" no/such/file >_nofile.tmp 2>&1 $! nofile.ok expects no/such/file, but using that name in the test would $! yield "file specification syntax error" instead of "no such file..." $ set noOn $ gawk "{}" no-such-file >_nofile.tmp 2>&1 $ if .not.$status then call exit_code 2 _nofile.tmp $ set On $! restore altered file name $ gawk "{gsub(""no-such-file"", ""no/such/file""); print}" _nofile.tmp >_nofile.too $ rm _nofile.tmp; $ mv _nofile.too _nofile.tmp $! nofile.ok expects "No such file ...", we see "no such file ..." $ igncascmp nofile.ok _nofile.tmp $ if $status then rm _nofile.tmp; $ return $ $binmode1: echo "binmode1" $ gawk -v "BINMODE=3" "BEGIN { print BINMODE }" >_binmode1.tmp $ cmp binmode1.ok _binmode1.tmp $ if $status then rm _binmode1.tmp; $ return $ $subi18n: echo "subi18n" $ define/User GAWKLOCALE "en_US.UTF-8" $ gawk -f subi18n.awk >_subi18n.tmp $ cmp subi18n.ok _subi18n.tmp $ if $status then rm _subi18n.tmp; $ return $ $concat4: echo "concat4" $ define/User GAWKLOCALE "en_US.UTF-8" $ gawk -f concat4.awk concat4.in >_concat4.tmp $ cmp concat4.ok _concat4.tmp $ if $status then rm _concat4.tmp; $ return $ $devfd: echo "devfd: not supported" $ return $!!devfd: echo "devfd" $ gawk 1 /dev/fd/4 /dev/fd/5 4< /devfd.in4 5< devfd.in5 >_devfd.tmp $ cmp devfd.ok _devfd.tmp $ if $status then rm _devfd.tmp; $ return $ $devfd1: echo "devfd1: not supported" $ return $!!devfd1: echo "devfd1" $ gawk -f devfd1.awk 4< devfd.in1 5< devfd.in2 >_devfd1.tmp $ cmp devfd1.ok _devfd1.tmp $ if $status then rm _devfd1.tmp; $ return $ $devfd2: echo "devfd2: not supported" $ return $!!devfd2: echo "devfd2" $! The program text is the '1' which will print each record. How compact can you get? $ gawk 1 /dev/fd/4 /dev/fd/5 4< /devfd.in1 5< devfd.in2 >_devfd2.tmp $ cmp devfd2.ok _devfd2.tmp $ if $status then rm _devfd2.tmp; $ return $ $mixed1: echo "mixed1" $ set noOn $ gawk -f /dev/null --source "BEGIN {return junk}" >_mixed1.tmp 2>&1 $ if .not.$status then call exit_code 1 _mixed1.tmp $ set On $ cmp mixed1.ok _mixed1.tmp $ if $status then rm _mixed1.tmp; $ return $ $mtchi18n: echo "mtchi18n" $ define/User GAWKLOCALE "ru_RU.UTF-8" $ gawk -f mtchi18n.awk mtchi18n.in >_mtchi18n.tmp $ cmp mtchi18n.ok _mtchi18n.tmp $ if $status then rm _mtchi18n.tmp; $ return $ $reint2: echo "reint2" $ gosub define_gawklocale $ gawk --re-interval -f reint2.awk reint2.in >_reint2.tmp $ cmp reint2.ok _reint2.tmp $ if $status then rm _reint2.tmp; $ return $ $localenl: echo "localenl skipped" $ return $!!localenl: echo "localenl" $ @localenl.com /Output=_localenl.tmp ! sh ./localenl.sh >tmp. $ cmp localenl.ok _localenl.tmp $ if $status then rm _localenl.tmp; $ return $ $mbprintf1: echo "mbprintf1 skipped" $ return $!!mbprintf1: echo "mbprintf1" $! Makefile test exports this, but we don't want to impact user's environment $ define/User GAWKLOCALE "en_US.UTF-8" $ gawk -f mbprintf1.awk mbprintf1.in >_mbprintf1.tmp $ cmp mbprintf1.ok _mbprintf1.tmp $ if $status then rm _mbprintf1.tmp; $ return $ $mbprintf2: echo "mbprintf2" $! Makefile test exports this, ... $ define/User GAWKLOCALE "ja_JP.UTF-8" $ gawk -f mbprintf2.awk >_mbprintf2.tmp $ cmp mbprintf2.ok _mbprintf2.tmp $ if $status then rm _mbprintf2.tmp; $ return $ $mbprintf3: echo "mbprintf3" $! Makefile test exports this, ... $ define/User GAWKLOCALE "en_US.UTF-8" $ gawk -f mbprintf3.awk mbprintf3.in >_mbprintf2.tmp $ cmp mbprintf3.ok _mbprintf2.tmp $ if $status then rm _mbprintf2.tmp; $ return $ $mbfw1: echo "mbfw1 skipped" $ return $!!mbfw1: echo "mbfw1" $! Makefile test exports this, ... $ define/User GAWKLOCALE "en_US.UTF-8" $ gawk -f mbfw1.awk mbfw1.in >_mbfw1.tmp $ cmp mbfw1.ok _mbfw1.tmp $ if $status then rm _mbfw1.tmp; $ return $ $gsubtst6: echo "gsubtst6" $ define/User GAWKLOCALE "C" $ gawk -f gsubtst6.awk >_gsubtst6.tmp $ cmp gsubtst6.ok _gsubtst6.tmp $ if $status then rm _gsubtst6.tmp; $ return $ $mbstr1: echo "mbstr1" $ gosub define_gawklocale $ AWKPATH_srcdir $ gawk -f mbstr1.awk >_mbstr1.tmp $ cmp mbstr1.ok _mbstr1.tmp $ if $status then rm _mbstr1.tmp; $ return $ $printfbad2: $printfbad3: $ echo "''test'" $ set noOn $ gawk --lint -f 'test'.awk 'test'.in >_'test'.tmp 2>&1 $ set On $ cmp 'test'.ok _'test'.tmp $ if $status then rm _'test'.tmp; $ return $ $fmtspcl: echo "fmtspcl: not supported" $ return $!!fmtspcl: $! fmtspcl ought to work if gawk was compiled to use IEEE floating point $ if floatmode.lt.0 then gosub calc_floatmode $ if floatmode.lt.2 $ then echo "fmtspcl: not supported" $ else echo "fmtspcl" $ gawk -f fmtspcl.awk >_fmtspcl.tmp 2>&1 $ cmp fmtspcl.ok _fmtspcl.tmp $ if $status then rm _fmtspcl.tmp; $ endif $ return $ $intformat: echo "intformat" $! note: we use the Alpha value for D_float; VAX value is slightly higher $! due to not losing precision by being processed via G_float $ huge_0 = "1.70141183460469213e+38" ! D_float $ huge_1 = "8.98846567431157854e+307" ! G_float $ huge_2 = "1.79769313486231570e+308" ! IEEE T_float $ if floatmode.lt.0 then gosub calc_floatmode $ hugeval = huge_'floatmode' $ set noOn $ gawk -v "HUGEVAL=''hugeval'" -f intformat.awk >_intformat.tmp 2>&1 $ set On $ cmp intformat.ok _intformat.tmp $ 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 World! $ endif $ gawk /Commands="BEGIN { print ""World!"" }" _NL: /Output=_vms_cmd.tmp $ cmp vms_cmd.ok _vms_cmd.tmp $ if $status then rm _vms_cmd.tmp; $ return $ $vms_io1: echo "vms_io1" $ if f$search("vms_io1.ok").eqs."" $ then create vms_io1.ok Hello $ endif $ ! define/User dbg$input sys$command: $ gawk -f - >_vms_io1.tmp # prior to 3.0.4, gawk crashed doing any redirection after closing stdin BEGIN { print "Hello" >"/dev/stdout" } $ cmp vms_io1.ok _vms_io1.tmp $ if $status then rm _vms_io1.tmp; $ return $ $vms_io2: echo "vms_io2" $ if f$search("vms_io2.ok").eqs."" $ then create vms_io2.ok xyzzy $ endif $ ! VAXCRTL created all files in stream_LF format unless explicitly $ ! overridden by the program; with DECC$SHR, a new version of an $ ! existing file inherits the previous version's record format; $ ! for gawk versions older than 3.1.7, that resulted in $ ! "can't redirect to `File' (invalid record attributes)" $ ! when an awk program used >"File" (internally, not on command line) $ ! and File already existed as a batch log file or PIPE output file $ create /FDL=sys$input: _vms_io2.vfc file organization sequential record format VFC ! variable with fixed control area (default size 2 bytes) carriage_control print $ set noOn $ ! define/User dbg$input sys$command: $ gawk -- "BEGIN { print ""xyzzy"" >""_vms_io2.vfc"" }" >_vms_io2.tmp 2>&1 $ set On $ cmp _NL: _vms_io2.tmp $ if $status then rm _vms_io2.tmp; $ cmp vms_io2.ok _vms_io2.vfc $ if $status then rm _vms_io2.vfc;* $ return $ $clean: $ if f$search("_*.*") .nes."" then rm _*.tmp;* $ if f$search("_*.too") .nes."" then rm _*.too;* $ if f$search("out%.") .nes."" then rm out%.;* $ if f$search("strftime.in").nes."" then rm strftime.in;* $ if f$search("strftime.ok").nes."" then rm strftime.ok;* $ if f$search("test%.") .nes."" then rm test%.;* $ if f$search("seq.") .nes."" then rm seq.;* $ if f$search("_pid.in") .nes."" then rm _pid.in;* $ if f$search("[.junk]*.*").nes."" then rm [.junk]*.*;* $ if f$parse("[.junk]") .nes."" then rm []junk.dir;1 $ if f$search("_vms_io2.vfc") .nes."" then rm _vms_io2.vfc;* $ return $ $! try to determine what type of double precision floating point gawk uses $calc_floatmode: $ ! this is fragile; it might break if gawk changes overflow handling $ Set noOn $ gawk -- "BEGIN {print 10^308}" >_NL: 2>&1 $ if $status $ then floatmode = 2 ! IEEE T_float $ else gawk -- "BEGIN {print 10^307}" >_NL: 2>&1 $ if $status $ then floatmode = 1 ! Alpha/VAX G_float $ else floatmode = 0 ! VAX D_float $ endif $ endif $ Set On $ return $ $! assign temporary value to logical name GAWKLOCALE unless it already has one $! [ -z "$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8 $define_gawklocale: $ ! gawk uses the C run-time libary's getenv() function to look up $ ! GAWKLOCALE, so a symbol provides another way to supply the value; $ ! we don't want to override logical or symbol if either is present $ if f$trnlnm("GAWKLOCALE").eqs."" $ then $ if f$type(gawklocale).nes."STRING" .or. "''gawklocale'".eqs."" $ then $ define/User GAWKLOCALE "en_US.UTF-8" $ endif $ endif $ return $ $! make sure that the specified file's longest-record-length field is set; $! 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: $ lrl = f$file_attribute(p1,"LRL") $ if lrl.eq.0 then lrl = f$file_attribute(p1,"MRS") $ if lrl.eq.0 $ then convert/fdl=sys$input: 'p1' *.* file organization sequential record format stream_lf size 32767 $ if $status .and. p2.eqs."purge" then rm 'p1';-1 $ else cmp _NL: _NL: !deassign/user sys${error,output} $ endif $ endsubroutine !fixup_LRL $ $! add a fake "EXIT CODE" record to the end of the temporary output file $! to simulate the ``|| echo EXIT CODE $$? >>_$@'' shell script usage $exit_code: subroutine $ if f$trnlnm("FTMP").nes."" then close/noLog ftmp $ open/Append ftmp 'p2' $ write ftmp "EXIT CODE: ",p1 $ close ftmp $ endsubroutine !exit_code $ $!NOTREACHED $ exit gawk-4.0.1+dfsg.orig/vms/vms_misc.c0000644000175000017500000002655311677655142016167 0ustar schotschot/* vms_misc.c -- sustitute code for missing/different run-time library routines. 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 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. */ #define creat creat_dummy /* one of gcc-vms's headers has bad prototype */ #include "awk.h" #include "vms.h" #undef creat #include #ifndef O_RDONLY #include #endif #include #include #include /* * In VMS's VAXCRTL, strerror() takes an optional second argument. * #define strerror(errnum) strerror(errnum,vaxc$errno) * is all that's needed, but VAXC can't handle that (gcc can). * [The 2nd arg is used iff errnum == EVMSERR.] */ #ifdef strerror # undef strerror #endif extern char *strerror(int,...); /* vms_strerror() -- convert numeric error code into text string */ char * vms_strerror( int errnum ) { return ( errnum != EVMSERR ? strerror(errnum) : strerror(EVMSERR, vaxc$errno) ); } # define strerror(v) vms_strerror(v) /* * Miscellaneous utility routine, not part of the run-time library. */ /* vms_strdup() - allocate some new memory and copy a string into it */ char * vms_strdup( const char *str ) { char *result; int len = strlen(str); emalloc(result, char *, len+1, "strdup"); return strcpy(result, str); } /* * VAXCRTL does not contain unlink(). This replacement has limited * functionality which is sufficient for GAWK's needs. It works as * desired even when we have the file open. */ /* unlink(file) -- delete a file (ignore soft links) */ int unlink( const char *file_spec ) { char tmp[255+1]; /*(should use alloca(len+2+1)) */ extern int delete(const char *); strcpy(tmp, file_spec); /* copy file name */ if (strchr(tmp, ';') == NULL) strcat(tmp, ";0"); /* append version number */ return delete(tmp); } /* * Work-around an open(O_CREAT+O_TRUNC) bug (screwed up modification * and creation dates when new version is created), and also use some * VMS-specific file options. Note: optional 'prot' arg is completely * ignored; gawk doesn't need it. */ #ifdef open # undef open #endif extern int creat(const char *,int,...); extern int open(const char *,int,unsigned,...); /* vms_open() - open a file, possibly creating it */ int vms_open( const char *name, int mode, ... ) { int result; 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: */ name = "NL:"; else if (strcmp(name + 5, "tty") == 0) /* /dev/tty -> TT: */ name = "TT:"; } if (mode == (O_WRONLY|O_CREAT|O_TRUNC)) { /* explicitly force stream_lf record format to override DECC$SHR's defaulting of RFM to earlier file version's when one is present */ /* 3.1.7 fix: letting record attibutes default resulted in DECC$SHR's creat() failing with "invalid record attributes" when trying to make a new version of an existing file which had rfm=vfc,rat=prn format, so add explicit "rat=cr" to go with rfm=stmlf to force the usual "carriage return carriage control" setting */ result = creat(name, 0, "rfm=stmlf", "rat=cr", "shr=nil", "mbc=32"); } else { struct stat stb; const char *mbc, *shr = "shr=get", *ctx = "ctx=stm"; if (stat((char *)name, &stb) < 0) { /* assume DECnet */ mbc = "mbc=8"; } else { /* ordinary file; allow full sharing iff record format */ mbc = "mbc=32"; if ((stb.st_fab_rfm & 0x0F) < FAB$C_STM) shr = "shr=get,put,upd"; } result = open(name, mode, 0, shr, mbc, "mbf=2"); } /* This is only approximate; the ACP -> RMS -> VAXCRTL interface discards too much potentially useful status information... */ if (result < 0 && errno == EVMSERR && (vaxc$errno == RMS$_ACC || vaxc$errno == RMS$_CRE)) errno = EMFILE; /* redirect() should close 1 file & try again */ return result; } /* * Check for attempt to (re-)open known file. */ /* vms_devopen() - check for "SYS$INPUT" or "SYS$OUTPUT" or "SYS$ERROR" */ int vms_devopen( const char *name, int mode ) { FILE *file = NULL; if (strncasecmp(name, "SYS$", 4) == 0) { name += 4; /* skip "SYS$" */ if (strncasecmp(name, "INPUT", 5) == 0 && (mode & O_WRONLY) == 0) file = stdin, name += 5; else if (strncasecmp(name, "OUTPUT", 6) == 0 && (mode & O_WRONLY) != 0) file = stdout, name += 6; else if (strncasecmp(name, "ERROR", 5) == 0 && (mode & O_WRONLY) != 0) file = stderr, name += 5; if (*name == ':') name++; /* treat trailing colon as optional */ } /* note: VAXCRTL stdio has extra level of indirection (*file) */ return (file && *file && *name == '\0') ? fileno(file) : -1; } #define VMS_UNITS_PER_SECOND 10000000L /* hundreds of nanoseconds, 1e-7 */ #define UNIX_EPOCH "01-JAN-1970 00:00:00.00" extern U_Long sys$bintim(), sys$gettim(); extern U_Long lib$subx(), lib$ediv(); /* * Get current time in microsecond precision. */ /* vms_gettimeofday() - get current time in `struct timeval' format */ int vms_gettimeofday(struct timeval *tv, void *timezone__not_used) { /* Emulate unix's gettimeofday call; timezone argument is ignored. */ static const Dsc epoch_dsc = { sizeof UNIX_EPOCH - sizeof "", UNIX_EPOCH }; static long epoch[2] = {0L,0L}; /* needs one time initialization */ const long thunk = VMS_UNITS_PER_SECOND; long now[2], quad[2]; if (!epoch[0]) sys$bintim(&epoch_dsc, epoch); /* 1 Jan 0:0:0 1970 */ /* get current time, as VMS quadword time */ sys$gettim(now); /* convert the quadword time so that it's relative to Unix epoch */ lib$subx(now, epoch, quad); /* quad = now - epoch; */ /* convert 1e-7 units into seconds and fraction of seconds */ lib$ediv(&thunk, quad, &tv->tv_sec, &tv->tv_usec); /* convert fraction of seconds into microseconds */ tv->tv_usec /= (VMS_UNITS_PER_SECOND / 1000000); return 0; /* success */ } #ifndef VMS_V7 /* * VMS prior to V7.x has no timezone support unless DECnet/OSI is used. */ /* these are global for use by missing/strftime.c */ char *tzname[2] = { "local", "" }; int daylight = 0, timezone = 0, altzone = 0; /* tzset() -- dummy to satisfy linker */ void tzset(void) { return; } #endif /*VMS_V7*/ #ifndef CRTL_VER_V731 /* getpgrp() -- there's no such thing as process group under VMS; * job tree might be close enough to be useful though. */ int getpgrp(void) { return 0; } #endif #ifndef __GNUC__ void vms_bcopy( const char *src, char *dst, int len ) { (void) memcpy(dst, src, len); } #endif /*!__GNUC__*/ /*----------------------------------------------------------------------*/ #ifdef NO_VMS_ARGS /* real code is in "vms/vms_args.c" */ void vms_arg_fixup( int *argc, char ***argv ) { return; } /* dummy */ #endif #ifdef NO_VMS_PIPES /* real code is in "vms/vms_popen.c" */ FILE *popen( const char *command, const char *mode ) { fatal(" Cannot open pipe `%s' (not implemented)", command); return NULL; } int pclose( FILE *current ) { fatal(" Cannot close pipe #%d (not implemented)", fileno(current)); return -1; } int fork( void ) { fatal(" Cannot fork process (not implemented)"); return -1; } #endif /*NO_VMS_PIPES*/ /*----------------------------------------------------------------------*/ /* * The following code is taken from the GNU C preprocessor (cccp.c, * 2.8.1 vintage) where it was used #if VMS. It is only needed for * VAX C and GNU C on VAX configurations; DEC C's run-time library * doesn't have the problem described. * * VMS_fstat() and VMS_stat() were static in cccp.c but need to be * accessible to the whole program here. Also, the special handling * for the null device has been introduced for gawk's benefit, to * prevent --lint mode from giving spurious warnings about /dev/null * being empty if it's used as an input file. */ #if defined(VAXC) || (defined(__GNUC__) && !defined(__alpha)) /* more VMS hackery */ #include #include extern unsigned long sys$parse(), sys$search(); /* Work around a VAXCRTL bug. If a file is located via a searchlist, and if the device it's on is not the same device as the one specified in the first element of that searchlist, then both stat() and fstat() will fail to return info about it. `errno' will be set to EVMSERR, and `vaxc$errno' will be set to SS$_NORMAL due yet another bug in stat()! We can get around this by fully parsing the filename and then passing that absolute name to stat(). Without this fix, we can end up failing to find header files, which is bad enough, but then compounding the problem by reporting the reason for failure as "normal successful completion." */ #undef fstat /* Get back to the library version. */ int VMS_fstat (fd, statbuf) int fd; struct stat *statbuf; { int result = fstat (fd, statbuf); if (result < 0) { FILE *fp; char nambuf[NAM$C_MAXRSS+1]; if ((fp = fdopen (fd, "r")) != 0 && fgetname (fp, nambuf) != 0) result = VMS_stat (nambuf, statbuf); /* No fclose(fp) here; that would close(fd) as well. */ } if (result == 0 /* GAWK addition; fixup /dev/null flags */ && (statbuf->st_mode & S_IFREG) && strcmp(statbuf->st_dev, "_NLA0:") == 0) { statbuf->st_mode &= ~S_IFREG; statbuf->st_mode |= S_IFCHR; } return result; } int VMS_stat (name, statbuf) const char *name; struct stat *statbuf; { int result = stat (name, statbuf); if (result < 0) { struct FAB fab; struct NAM nam; char exp_nam[NAM$C_MAXRSS+1], /* expanded name buffer for sys$parse */ res_nam[NAM$C_MAXRSS+1]; /* resultant name buffer for sys$search */ fab = cc$rms_fab; fab.fab$l_fna = (char *) name; fab.fab$b_fns = (unsigned char) strlen (name); fab.fab$l_nam = (void *) &nam; nam = cc$rms_nam; nam.nam$l_esa = exp_nam, nam.nam$b_ess = sizeof exp_nam - 1; nam.nam$l_rsa = res_nam, nam.nam$b_rss = sizeof res_nam - 1; nam.nam$b_nop = NAM$M_PWD | NAM$M_NOCONCEAL; if (sys$parse (&fab) & 1) { if (sys$search (&fab) & 1) { res_nam[nam.nam$b_rsl] = '\0'; result = stat (res_nam, statbuf); } /* Clean up searchlist context cached by the system. */ nam.nam$b_nop = NAM$M_SYNCHK; fab.fab$l_fna = 0, fab.fab$b_fns = 0; (void) sys$parse (&fab); } } if (result == 0 /* GAWK addition; fixup /dev/null flags */ && (statbuf->st_mode & S_IFREG) && strcmp(statbuf->st_dev, "_NLA0:") == 0) { statbuf->st_mode &= ~S_IFREG; statbuf->st_mode |= S_IFCHR; } return result; } #endif /* VAXC || (__GNUC__ && !__alpha) */ gawk-4.0.1+dfsg.orig/vms/gawkmisc.vms0000644000175000017500000000755311734665352016534 0ustar schotschot/* * gawkmisc.vms --- miscellanious gawk routines that are OS specific. */ /* * 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. * * 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 *defpath = DEFPATH; 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; /* "device:[root.][directory.subdir]GAWK.EXE;n" -> "GAWK" */ p = strrchr(filespec, ']'); /* directory punctuation */ q = strrchr(filespec, '>'); /* alternate punct */ if (p == NULL || q > p) p = q; p = strdup(p == NULL ? filespec : (p + 1)); if ((q = strrchr(p, '.')) != NULL) *q = '\0'; /* strip .typ;vers */ return p; } /* os_arg_fixup --- fixup the command line */ void os_arg_fixup(argcp, argvp) int *argcp; char ***argvp; { (void) vms_arg_fixup(argcp, argvp); } /* os_devopen --- open special per-OS devices */ int os_devopen(name, flag) const char *name; int flag; { return vms_devopen(name, flag); } /* 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)); /* * These values correspond with the RMS multi-block count used by * vms_open() in vms/vms_misc.c. */ if (isatty(fd) > 0) return BUFSIZ; else if (fstat(fd, stb) < 0) return 8*512; /* conservative in case of DECnet access */ else return 32*512; } /* ispath --- return true if path has directory components */ int ispath(file) const char *file; { for (; *file; file++) { switch (*file) { case ':': case ']': case '>': case '/': return 1; } } return 0; } /* isdirpunct --- return true if char is a directory separator */ int isdirpunct(c) int c; { return (strchr(":]>/", c) != NULL); } /* 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; { /* 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)); } /* 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; } /* 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); } gawk-4.0.1+dfsg.orig/vms/vmsbuild.com0000644000175000017500000001233211734665352016514 0ustar schotschot$! vmsbuild.com -- Commands to build GAWK Pat Rankin, Dec'89 $! revised, Mar'90 $! gawk 2.13 revised, Jun'91 $! gawk 2.14 revised, Sep'92 $! gawk 2.15 revised, Oct'93 $! gawk 3.0 revised, Dec'95 $! gawk 3.0.1 revised, Nov'96 $! 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 = "4.0" !release version number $ PATCHLVL = "1" $! $! $ CCFLAGS = "/noList" ! "/noOpt/Debug" $ CDEFS = "GAWK,HAVE_CONFIG_H" $! $ if p1.eqs."" then p1 = "DECC" !default compiler $ if p1.eqs."GNUC" $ then $! assumes VAX $ CC = "gcc" $ if f$type(gcc).eqs."STRING" then CC = gcc $ CFLAGS = "/Incl=([],[.vms])/Obj=[]/Def=(''CDEFS')''CCFLAGS'" $ LIBS = "gnu_cc:[000000]gcclib.olb/Library,sys$library:vaxcrtl.olb/Library" $ if p2.eqs."DO_GNUC_SETUP" then set command gnu_cc:[000000]gcc $ else !!GNUC $ if p1.eqs."VAXC" $ then $! always VAX; version V3.x of VAX C assumed (for V2.x, remove /Opt=noInline) $ CC = "cc" $ if f$trnlnm("DECC$CC_DEFAULT").nes."" then CC = "cc/VAXC" $ CFLAGS = "/Incl=[]/Obj=[]/Opt=noInline/Def=(''CDEFS')''CCFLAGS'" $ LIBS = "sys$share:vaxcrtl.exe/Shareable" $ else !!VAXC $! neither GNUC nor VAXC, assume DECC (same for either VAX or Alpha) $ CC = "cc/DECC/Prefix=All" $ CFLAGS = "/Incl=[]/Obj=[]/Def=(''CDEFS')''CCFLAGS'" $ LIBS = "" ! DECC$SHR instead of VAXCRTL, no special link option needed $ endif !VAXC $ endif !GNUC $! $ cc = CC + CFLAGS $ show symbol cc $! $ if f$search("config.h").nes."" then - if f$cvtime(f$file_attr("config.h","RDT")).ges.- f$cvtime(f$file_attr("[.vms]vms-conf.h","RDT")) then goto config_ok $ v = f$verify(1) $ copy [.vms]vms-conf.h []config.h $! 'f$verify(v)' $config_ok: $ 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 `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 `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 $ cc builtin.c $ cc dfa.c $ cc ext.c $ cc field.c $ cc floatcomp.c $ cc gawkmisc.c $ cc getopt.c $ cc getopt1.c $ cc io.c $ cc main.c $ cc msg.c $ cc node.c $ cc random.c $ cc re.c $ cc regex.c $ cc replace.c $ 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 $ cc [.vms]vms_args.c $ cc [.vms]vms_gawk.c $ cc [.vms]vms_cli.c $ set command/Object=[]gawk_cmd.obj [.vms]gawk.cld $! 'f$verify(v)' $! $ close/noLog Fopt $ 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 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 psect_attr=environ,noshr !extern [noshare] char ** stack=48 !preallocate more pages (default is 20) iosegment=128 !ditto (default is 32) $ open/append Fopt gawk.opt $ write Fopt libs $ write Fopt "identification=""V''REL'.''PATCHLVL'""" $ close Fopt $! $ 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 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 psect_attr=environ,noshr !extern [noshare] char ** stack=48 !preallocate more pages (default is 20) iosegment=128 !ditto (default is 32) $ open/append Fopt pgawk.opt $ write Fopt libs $ 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 gawk-4.0.1+dfsg.orig/vms/posix-cc.sh0000755000175000017500000000141211463242060016232 0ustar schotschot# The VMS POSIX `c89' command writes any/all diagnostic info to stdout # rather than stderr, confusing configure tests which capture error output. # # Also, the VMS linker issues a warning for any undefined symbol, but that # does not inhibit creation of the final executable file, again confusing # configure. As an added complication, there's not enough control of the # linker to put the map file with chosen name into the current directory. # if [ -f ~/_posix-cc.map ] ; then rm -f ~/_posix-cc.map* ; fi c89 -Wc,nowarn -Wl,nodebug -Wl,map=_posix-cc.map $* ; x=$? if [ -f ~/_posix-cc.map ] ; then if [ -n "`fgrep LINK-W-USEUNDEF ~/_posix-cc.map`" ] ; then x=1 ; fi rm -f ~/_posix-cc.map* fi if [ x -ne 0 ] ; then echo "c89 reports failure" 1>&2 && exit 1 ; fi exit 0 gawk-4.0.1+dfsg.orig/vms/redirect.h0000644000175000017500000001024611526020251016121 0ustar schotschot/* * redirect.h --- definitions for functions that are OS specific. */ /* * 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 * 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 included by custom.h for VMS-POSIX, or first by config.h (vms-conf.h) then again by awk.h for normal VMS. */ #if defined(VMS_POSIX) || defined(IN_CONFIG_H) #define DEFAULT_FILETYPE ".awk" /* some macros to redirect some non-VMS-specific code */ #define getopt gnu_getopt #define opterr gnu_opterr #define optarg gnu_optarg #define optind gnu_optind #define optopt gnu_optopt #define regcomp gnu_regcomp #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 #define strncasecmp gnu_strncasecmp #ifndef VMS_V7 #define tzset fake_tzset #define tzname fake_tzname #define daylight fake_daylight #define timezone fake_timezone #define altzone fake_altzone #endif #if !defined(__DECC) && !defined(VAXC2DECC) && !defined(__alpha) #define strcoll(s,t) strcmp((s),(t)) /* VAXCRTL lacks locale support */ #endif #endif #ifdef STDC_HEADERS /* This is for getopt.c and alloca.c (compiled with HAVE_CONFIG_H defined), to prevent diagnostics about various implicitly declared functions. */ #include #include #endif #ifndef VMS_POSIX /* This if for random.c. */ #define gettimeofday vms_gettimeofday #ifndef __TIMEVAL #define __TIMEVAL 1 struct timeval { long tv_sec, tv_usec; }; #endif extern int gettimeofday(struct timeval *,void *); #endif #else /* awk.h, not POSIX */ /* some macros to redirect to code in vms/vms_misc.c */ #ifndef bcopy #define bcopy vms_bcopy #endif #define open vms_open #define popen vms_popen #define pclose vms_pclose #ifndef HAVE_SNPRINTF #define snprintf gawk_snprintf /* avoid %CC-I-INTRINSICDECL diagnostic */ #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(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(const void *,size_t,size_t,FILE *); extern int fclose(FILE *); # endif 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(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(FILE *); #endif 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 */ /*vms/redirect.h*/ gawk-4.0.1+dfsg.orig/vms/ChangeLog.00000644000175000017500000006076311600556715016104 0ustar schotschotWed 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. gawk-4.0.1+dfsg.orig/vms/fcntl.h0000644000175000017500000000040711463242060015430 0ustar schotschot/* "fcntl.h" -- constants for BSD-style I/O routines (ala VAX C's ) */ #define O_RDONLY 0 #define O_WRONLY 1 #define O_RDWR 2 #define O_NDELAY 4 #define O_NOWAIT 4 #define O_APPEND 8 #define O_CREAT 0x0200 #define O_TRUNC 0x0400 #define O_EXCL 0x0800 gawk-4.0.1+dfsg.orig/vms/varargs.h0000644000175000017500000000213711463242060015771 0ustar schotschot/* "varargs.h" -- old style variable argument list manipulation (for VAX) */ #ifndef __GNUC__ /* Use the system's macros with the system's compiler. */ #include #else /*__GNUC__*/ # if defined(__VAX__) || defined(__vax__) || defined(VAX) || defined(vax) /* These macros implement traditional (non-ANSI) varargs for GNU C on VAX */ # if !defined(_VA_LIST) && !defined(_VA_LIST_) # define _VA_LIST # define _VA_LIST_ typedef char *va_list; # endif # define va_alist _varargs # define va_dcl int va_alist; # define va_start(AP) AP = (va_list) &va_alist # define va_end(AP) # define _va_rounded_size(TYPE) \ (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) # define va_arg(AP,TYPE) \ (AP += _va_rounded_size(TYPE), \ *((TYPE *) (AP - _va_rounded_size(TYPE)))) # if defined(__VMS__) || defined(__vms__) || defined(VMS) || defined(vms) /* VAX C compatability macros */ # define va_count(CNT) vaxc$va_count(&CNT) /* rtl routine */ # define va_start_1(AP,OFFSET) AP = (va_list) (&va_alist + (OFFSET)) # endif /* VMS */ # endif /* VAX */ #endif /*__GNUC__*/ gawk-4.0.1+dfsg.orig/vms/unixlib.h0000644000175000017500000000122411463242060015772 0ustar schotschot/* "unixlib.h" -- limited substitute for VAX C V3.x's , * for use with VAX C V2.x and/or GNU C when building gawk. */ /* declare the global environ[] array */ #ifdef VAXC extern char noshare **environ; #else # ifdef __GNUC__ # define environ $$PsectAttributes_NOSHR$$environ # endif extern char **environ; #endif /* miscellaneous Unix emulation routines available in VAXCRTL */ char *getenv(), *getcwd(); char *ecvt(), *fcvt(), *gcvt(); int getpid(), getppid(); unsigned getuid(); #ifndef _stdlib_h /* gcc's stdlib.h has these with conflicting types */ unsigned getgid(), getegid(), geteuid(); #endif int setgid(), setuid(); /* no-ops */ gawk-4.0.1+dfsg.orig/vms/vms.h0000644000175000017500000000602611533763630015143 0ustar schotschot/* * vms.h - miscellaneous definitions for use with VMS system services. * Pat Rankin, Nov'89 */ #if 0 #include #else #define IO$_WRITEVBLK 48 /* write virtual block */ #define IO$V_CANCTRLO 6 /* cancel (ie, resume tty output) */ #define IO$M_CANCTRLO (1 << IO$V_CANCTRLO) #endif #if 0 #include #include #include #else #define CLI$K_GETCMD 1 #define CLI$K_VERB_MCR 33 #define CLI$K_VERB_RUN 36 #define FSCN$_FILESPEC 1 #endif #if 0 #include #else #define CLI$_RUNUSED 0x00030000 /* value returned by $CLI for "RUN" */ #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 #if 0 #include #else #define PSL$C_USER 3 /* user mode */ #endif /* note: `ulong' and `u_long' end up conflicting with various header files */ typedef unsigned long U_Long; typedef unsigned short U_Short; typedef struct _dsc { int len; char *adr; } Dsc; /* limited string descriptor */ /* standard VMS itemlist-3 structure */ typedef struct _itm { U_Short len, code; void *buffer; U_Short *retlen; } Itm; #define vmswork(sts) ((sts)&1) #define vmsfail(sts) (!vmswork(sts)) #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(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(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(long, void *); #endif /*!NO_TTY_FWRITE*/ 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(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 *); gawk-4.0.1+dfsg.orig/vms/descrip.mms0000644000175000017500000002670411734665352016346 0ustar schotschot# Descrip.MMS -- Makefile for building GNU awk on VMS. # # usage: # $ MMS /Description=[.vms]Descrip.MMS gawk # possibly add `/Macro=("GNUC=1")' to compile with GNU C, # or add `/Macro=("GNUC=1","DO_GNUC_SETUP=1")' to compile with GNU C # on a system where GCC is not installed as a defined command, # or add `/Macro=("VAXC=1")' to compile with VAX C, # or add `/Macro=("VAXC=1","CC=cc/VAXC")' to compile with VAX C on # a system which has DEC C installed as the default compiler. # # gawk.exe : # This is the default target. DEC C has become the default compiler. # # pgawk.exe : # 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 # have either yacc or bison, you'll have to make sure that the # distributed version of "awkgram.c" has its modification date later # than the date of "awkgram.y", so that MMS won't try to build that # 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 # to put entry into the regular VMS library. (If you use an alternate # help library, it must already exist; this target won't create it.) # # gawk.dvi : # If you have TeX, you can make the target 'gawk.dvi' to process # _The_GAWK_Manual_ from gawk.texi. You'll need to use a device # specific post-processor on gawk.dvi in order to get printable data. # The full output is approximately 325 pages. # # 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 #CCFLAGS = /noOpt/Debug # a comma separated list of macros to define CDEFS = "GAWK","HAVE_CONFIG_H" .ifdef GNUC # assumes VAX CC = gcc CFLAGS = /Incl=([],$(VMSDIR))/Obj=[]/Def=($(CDEFS)) $(CCFLAGS) LIBS = gnu_cc:[000000]gcclib.olb/Library,sys$library:vaxcrtl.olb/Library .ifdef DO_GNUC_SETUP # in case GCC command verb needs to be manually defined .first set command gnu_cc:[000000]gcc .endif !DO_GNUC_SETUP .else !!GNUC .ifdef VAXC # always VAX; versions of VAX C older than V3.2 won't work CC = cc CFLAGS = /Incl=[]/Obj=[]/Opt=noInline/Def=($(CDEFS)) $(CCFLAGS) LIBS = sys$share:vaxcrtl.exe/Shareable .else !!VAXC # neither GNUC nor VAXC, assume DECC (same for either VAX or Alpha) CC = cc/DECC/Prefix=All CFLAGS = /Incl=[]/Obj=[]/Def=($(CDEFS)) $(CCFLAGS) LIBS = # DECC$SHR instead of VAXCRTL, no special link option needed .endif !VAXC .endif !GNUC PARSER = bison PARSERINIT = set command gnu_bison:[000000]bison #PARSER = yacc #PARSERINIT = yacc := posix/run/path=posix """/bin/yacc" #PARSERINIT = yacc := $shell$exe:yacc # this is used for optional target 'install.help' HELPLIB = sys$help:helplib.hlb #HELPLIB = sys$help:local.hlb # ######## nothing below this line should need to be changed ######## # ECHO = write sys$output NOOP = continue # 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 AWKOBJ2 = main.obj,msg.obj,node.obj,random.obj,re.obj,\ regex.obj,replace.obj,version.obj AWKOBJS = $(AWKOBJ1),$(AWKOBJ2) # VMSOBJS # VMS specific stuff VMSCODE = vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj,\ vms_gawk.obj,vms_cli.obj VMSCMD = gawk_cmd.obj # built from .cld file VMSOBJS = $(VMSCODE),$(VMSCMD) # primary source files AWKSRC = array.c,builtin.c,dfa.c,eval.c,eval_p.c,ext.c,field.c,\ floatcomp.c,gawkmisc.c,getopt.c,getopt1.c,io.c,main.c,\ 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 VMSSRC = $(VMSDIR)gawkmisc.vms,$(VMSDIR)vms_misc.c,$(VMSDIR)vms_popen.c,\ $(VMSDIR)vms_fwrite.c,$(VMSDIR)vms_args.c,$(VMSDIR)vms_gawk.c,\ $(VMSDIR)vms_cli.c VMSHDRS = $(VMSDIR)redirect.h,$(VMSDIR)vms.h,$(VMSDIR)fcntl.h,\ $(VMSDIR)varargs.h,$(VMSDIR)unixlib.h VMSOTHR = $(VMSDIR)descrip.mms,$(VMSDIR)vmsbuild.com,$(VMSDIR)version.com,\ $(VMSDIR)gawk.hlp DOCS= $(DOCDIR)gawk.1,$(DOCDIR)gawk.texi,$(DOCDIR)texinfo.tex # Release of gawk REL=4.0 PATCHLVL=1 # generic target all : gawk,pgawk,dgawk $(NOOP) # dummy target to allow building "gawk" in addition to explicit "gawk.exe" gawk : gawk.exe $(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 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' write opt "! GAWK -- GNU awk" @ write opt "$(GAWKOBJ)" @ 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 pgawk.opt : $(MAKEFILE) # create linker options file open/write opt pgawk.opt write opt "! PGAWK -- GNU awk w/ run-time profiling" @ write opt "$(PGAWKOBJ)" @ 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 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 vms_args.obj : $(VMSDIR)vms_args.c vms_gawk.obj : $(VMSDIR)vms_gawk.c vms_cli.obj : $(VMSDIR)vms_cli.c $(VMSCODE) : awk.h config.h $(VMSDIR)redirect.h $(VMSDIR)vms.h gawkmisc.obj : gawkmisc.c $(VMSDIR)gawkmisc.vms $(AWKOBJS) : awk.h gettext.h mbsupport.h regex.h dfa.h \ 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("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("command_tab.c").nes."" then rename/new_vers command_tab.c $@ config.h : $(VMSDIR)vms-conf.h copy $< $@ $(VMSCMD) : $(VMSDIR)gawk.cld set command $(CLDFLAGS)/object=$@ $< # special target for loading the help text into a VMS help library install.help : $(VMS)gawk.hlp library/help $(HELPLIB) $< /log # miscellaneous other targets tidy : - if f$search("*.*;-1").nes."" then purge - if f$search("[.*]*.*;-1").nes."" then purge [.*] clean : - 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;* # # Note: this only works if you kept a copy of [.support]texindex.c # from a gawk 2.x distribution and put it into [.doc]texindex.c. # Also, depending on the fonts available with the version of TeX # you have, you might need to edit [.doc]texinfo.tex and change # the reference to "lcircle10" to be "circle10". # # build gawk.dvi from within the 'doc' subdirectory # gawk.dvi : [.doc]texindex.exe [.doc]gawk.texi @ set default [.doc] @ write sys$output " Warnings from TeX are expected during the first pass" TeX gawk.texi mcr []texindex gawk.cp gawk.fn gawk.ky gawk.pg gawk.tp gawk.vr @ write sys$output " Second pass" TeX gawk.texi mcr []texindex gawk.cp gawk.fn gawk.ky gawk.pg gawk.tp gawk.vr @ write sys$output " Third (final) pass" TeX gawk.texi -@ purge -@ delete gawk.lis;,.aux;,gawk.%%;,.cps;,.fns;,.kys;,.pgs;,.toc;,.tps;,.vrs; @ rename/new_vers gawk.dvi [-]*.* @ set default [-] # Note: [.doc]texindex.c is not included with the gawk 3.x distribution. # Expect lots of "implicitly declared function" diagnostics from DEC C. # [.doc]texindex.exe : [.doc]texindex.c @ set default [.doc] $(CC) /noOpt/noList/Define=("lines=tlines") texindex.c @ open/Write opt texindex.opt @ write opt "texindex.obj" @ write opt "$(LIBS)" @ close opt $(LINK) /noMap/Exe=texindex.exe texindex.opt/Options -@ delete texindex.obj;*,texindex.opt;* @ set default [-] #eof gawk-4.0.1+dfsg.orig/vms/vms_cli.c0000644000175000017500000000776111533763630015774 0ustar schotschot/* 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. */ #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 sys$cli(void *, ...); extern U_Long sys$filescan(const Dsc *, void *, long *); extern void *lib$establish(U_Long (*handler)(void *, void *)); extern U_Long lib$sig_to_ret(void *, void *); /* condition handler */ /* Cli_Present() - call CLI$PRESENT to determine whether a parameter or */ /* qualifier is present on the [already parsed] command line */ U_Long Cli_Present( const char *item ) { Dsc item_dsc; (void)lib$establish(lib$sig_to_ret); item_dsc.len = strlen(item_dsc.adr = (char *)item); return cli$present(&item_dsc); } /* Cli_Get_Value() - call CLI$GET_VALUE to retreive the value of a */ /* parameter or qualifier from the command line */ U_Long Cli_Get_Value( const char *item, char *result, int size ) { Dsc item_dsc, res_dsc; U_Long sts; short len = 0; (void)lib$establish(lib$sig_to_ret); 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); result[len] = '\0'; return sts; } /* Cli_Parse_Command() - use the $CLI system service (undocumented) to */ /* retreive the actual command line (which might be */ /* "run prog" or "mcr prog [params]") and then call */ /* CLI$DCL_PARSE to parse it using specified tables */ U_Long Cli_Parse_Command( const void *cmd_tables, const char *cmd_verb ) { struct { short len, code; void *adr; } fscn[2]; struct { char rqtype, rqindx, rqflags, rqstat; unsigned :32; Dsc rdesc; unsigned :32; unsigned :32; unsigned :32; } cmd; U_Long sts; int ltmp; char longbuf[8200]; (void)lib$establish(lib$sig_to_ret); memset(&cmd, 0, sizeof cmd); cmd.rqtype = CLI$K_GETCMD; /* command line minus the verb */ sts = sys$cli(&cmd, (void *)0, (void *)0); /* get actual command line */ if (vmswork(sts)) { /* ok => cli available & verb wasn't "RUN" */ /* invoked via symbol => have command line (which might be empty) */ /* [might also be invoked via mcr or dcl; that's ok] */ if (cmd.rqstat == CLI$K_VERB_MCR) { /* need to strip image name from MCR invocation */ memset(fscn, 0, sizeof fscn); fscn[0].code = FSCN$_FILESPEC; /* full file specification */ (void)sys$filescan(&cmd.rdesc, fscn, (long *)0); cmd.rdesc.len -= fscn[0].len; /* shrink size */ cmd.rdesc.adr += fscn[0].len; /* advance ptr */ } /* prepend verb and then parse the command line */ strcat(strcpy(longbuf, cmd_verb), " "), ltmp = strlen(longbuf); if (cmd.rdesc.len + ltmp > sizeof longbuf) 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); } return sts; } gawk-4.0.1+dfsg.orig/vms/vms_fwrite.c0000644000175000017500000001777111532364226016524 0ustar schotschot/* vms_fwrite.c - augmentation for the fwrite() function. 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 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. */ #include "awk.h" /* really "../awk.h" */ #ifndef NO_TTY_FWRITE #include "vms.h" #include #include #ifdef VAXC_BUILTINS #pragma builtins /* VAXC V3.0 & up */ # define find_c(s,n,c) ((n) - _LOCC((c),(n),(s))) #else /*VAXC_BUILTINS*/ static int find_c( const char *s, int n, char c ) { register const char *t = (const char *)memchr(s, c, n); return (t == 0 ? n : t - s); /* 0..n-1, or n if not found */ } #endif /*VAXC_BUILTINS*/ #define is_stdout(file_no) ((file_no) == 1) /* fileno(stdout) */ #define is_stderr(file_no) ((file_no) == 2) /* fileno(stderr) */ #define PREFIX_CR 0x008D0000 /* leading carriage return */ #define POSTFIX_CR 0x8D000000 /* trailing carriage return (=> lf/cr) */ static short channel[_NFILE] = {0}; static FILE *prev_file = 0; static int prev_file_num; /* * VAXCRTL's fwrite() seems to flush after every character when * writing to a terminal. This routine is a limited functionality * substitute that is *much* faster. However, calls to fwrite() * should not be mixed with other stdio calls to the same file * 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 #endif /* tty_fwrite() - performance hack for fwrite() to a terminal */ size_t tty_fwrite( const void *buf, size_t size, size_t number, FILE *file ) { static long evfn = -1; short chan; int file_num, result; if (!size || !number) return 0; else if (!file || !*file) return 0 * (errno = EBADF); /* kludge alert! */ else if (file == prev_file) file_num = prev_file_num; else /* note: VAXCRTL's fileno() is a function, not just a macro */ prev_file_num = file_num = fileno(file), prev_file = file; 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 */ && 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))) { /* get an event flag; use #0 if problem */ if (evfn == -1 && vmsfail(lib$get_ef(&evfn))) evfn = 0; } else chan = 0; /* $ASSIGN failed */ } /* store channel for later use; -1 => don't repeat failed init attempt */ channel[file_num] = (chan > 0 ? chan : -1); } /* 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) */ while (count > 0) { /* special handling for line-feeds to make them be 'newlines' */ offset = 0; if (*pt == '\n') { /* got at least one leading line-feed */ cc_fmt = PREFIX_CR, extra++; /* precede 1st LF with a CR */ do offset++; while (offset < count && *(pt + offset) == '\n'); } else cc_fmt = 0; /* look for another line-feed; if found, break line there */ pos = offset + find_c(pt + offset, count - offset, '\n'); if (pos >= BUFSIZ) pos = BUFSIZ - 1; /* throttle quota usage */ else if (pos < count) pos++, cc_fmt |= POSTFIX_CR, extra++; /* wait for previous write, if any, to complete */ if (pt > (char *)buf) { sts = sys$synch(evfn, &iosb); if (vmswork(sts)) sts = iosb.status, result += iosb.count; if (vmsfail(sts)) break; } /* queue an asynchronous write */ sts = sys$qio(evfn, chan, io_func, &iosb, (void (*)(U_Long))0, 0L, pt, pos, 0, cc_fmt, 0, 0); if (vmsfail(sts)) break; /*(should never happen)*/ pt += pos, count -= pos; } /* wait for last write to complete */ if (pt > (char *)buf && vmswork(sts)) { sts = sys$synch(evfn, &iosb); if (vmswork(sts)) sts = iosb.status, result += iosb.count; } if (vmsfail(sts)) errno = EVMSERR, vaxc$errno = sts; else if (iosb.rt_kludge == 0) result = number + extra; result -= extra; /* subtract the additional carriage-returns */ } else { /* use stdio */ /* Note: we assume that we're writing text, not binary data. For stream format files, 'size' and 'number' are effectively interchangable, and fwrite works fine. However, for record format files, 'size' governs the maximum record length, so fwrite(string, size(char), strlen(string), file) will produce a sequence of 1-byte records, which is hardly what we want in this (assumed) situation. Line-feeds ('\n') are converted into newlines (ie, record separators) by the run-time library, but strings that don't end with a newline still become separate records. The simplest work around is just to use fputs() instead of fwrite(); unfortunately, we have to provide special treatment for NULs ('\0's). At present, only stdout might be in record format (via >$'filename' redirection on the command line). */ if (size > 1) { /* not used by GAWK */ result = fwrite((void *)buf, size, number, file); } else if (*((char *)buf + number - 1) == '\n' || !is_stdout(file_num)) { result = fwrite((void *)buf, number, size, file); result = result * number / size; /*(same as 'result = number')*/ } else { #ifdef NO_ALLOCA # define alloca(n) ((n) <= abuf_siz ? abuf : \ ((abuf_siz > 0 ? (free(abuf),0) : 0), \ (abuf = malloc(abuf_siz = (n)+20)))) static void *abuf = 0; static size_t abuf_siz = 0; #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'; /* if exiting this block undoes the alloca(), we're hosed :-( */ } result = 0; while (count > 0) { pos = find_c(pt, count, '\0'); if (fputs(pt, file) < 0) break; if (pos < count) { if (fputc('\0', file) < 0) break; pos++; /* 0..n-1 -> 1..n */ } result += pos, pt += pos, count -= pos; } } } return result; } #define fwrite(b,s,n,f) tty_fwrite((b),(s),(n),(f)) #ifdef fclose # undef fclose #endif /* tty_fclose() - keep tty_fwrite() up to date when closing a file */ int tty_fclose( FILE *file ) { 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) channel[file_num] = 0; /* clear stale info */ } prev_file = 0; /* force tty_fwrite() to reset */ return fclose(file); } #define fclose(f) tty_fclose(f) #endif /*!NO_TTY_FWRITE*/