diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 1999-09-27 08:51:05 +0000 | 
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 1999-09-27 08:51:05 +0000 | 
| commit | 83f715f4873e30dc5c610c3aa50d6cf1333b9a1e (patch) | |
| tree | eaca4386f64bfe0492c23cbd566d54fdc319a80f | |
| parent | 73b83ffce6234b02f47fc1c0e3761b0ca7f1631c (diff) | |
222 files changed, 0 insertions, 5787 deletions
diff --git a/contrib/awk/FREEBSD-upgrade b/contrib/awk/FREEBSD-upgrade deleted file mode 100644 index d2add40f4737..000000000000 --- a/contrib/awk/FREEBSD-upgrade +++ /dev/null @@ -1,60 +0,0 @@ - -Import of GNU awk 3.0.3 - -Original source available as ftp://prep.ai.mit.edu/pub/gnu/gawk-3.0.3.tar.gz - -The following files and directories were removed for this import: - -Makefile.in -README_d/README.VMS -README_d/README.atari -README_d/README.irix -README_d/README.linux -README_d/README.pc -README_d/README.sco -README_d/README.sgi -README_d/README.solaris -README_d/README.sony -README_d/README.sunos4 -README_d/README.ultrix -README_d/README.yacc -aclocal.m4 -alloca.c -atari/ -awklib/ -awktab.c -configh.in -configure -configure.in -doc/Makefile.in -doc/README.card -doc/ad.block -doc/awkcard.in -doc/awkforai.txt -doc/cardfonts -doc/colors -doc/igawk.1 -doc/macros -doc/no.colors -doc/setter.outline -doc/texinfo.tex -install-sh -missing/ -mkinstalldirs -pc/ -protos.h -regex.c -stamp-h.in -vms/ - -In addition, doc/gawk.1 and doc/gawk.texi were renamed to awk.1 and awk.texi. - -The test sub-directory has been left in, as, although not necessary to build -awk on FreeBSD, it will be useful to anyone changing the code.  To use it, -do something like - -cd /usr/src/contrib/awk -ln -s /path/to/new/awk gawk -cd test && make - -jraynard@freebsd.org 26 Sept 1997 diff --git a/contrib/awk/config.h b/contrib/awk/config.h deleted file mode 100644 index c745db168550..000000000000 --- a/contrib/awk/config.h +++ /dev/null @@ -1,207 +0,0 @@ -/* config.h.  Generated automatically by configure.  */ -/* configh.in.  Generated automatically from configure.in by autoheader.  */ -/* - * acconfig.h -- configuration definitions for gawk. - */ - -/*  - * Copyright (C) 1995-1997 the Free Software Foundation, Inc. - *  - * This file is part of GAWK, the GNU implementation of the - * AWK 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 if on AIX 3. -   System headers sometimes define this. -   We just want to avoid a redefinition error message.  */ -#ifndef _ALL_SOURCE -/* #undef _ALL_SOURCE */ -#endif - -/* Define if using alloca.c.  */ -/* #undef C_ALLOCA */ - -/* Define if type char is unsigned and you are not using gcc.  */ -#ifndef __CHAR_UNSIGNED__ -/* #undef __CHAR_UNSIGNED__ */ -#endif - -/* Define to empty if the keyword does not work.  */ -/* #undef const */ - -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. -   This function is required for alloca.c support on those systems.  */ -/* #undef CRAY_STACKSEG_END */ - -/* Define to the type of elements in the array set by `getgroups'. -   Usually this is either `int' or `gid_t'.  */ -#define GETGROUPS_T gid_t - -/* Define if the `getpgrp' function takes no argument.  */ -#define GETPGRP_VOID 1 - -/* Define to `int' if <sys/types.h> doesn't define.  */ -/* #undef gid_t */ - -/* Define if you have alloca, as a function or macro.  */ -#define HAVE_ALLOCA 1 - -/* Define if you have <alloca.h> and it should be used (not on Ultrix).  */ -/* #undef HAVE_ALLOCA_H */ - -/* Define if you don't have vprintf but do have _doprnt.  */ -/* #undef HAVE_DOPRNT */ - -/* Define if you have a working `mmap' system call.  */ -#define HAVE_MMAP 1 - -/* Define if your struct stat has st_blksize.  */ -#define HAVE_ST_BLKSIZE 1 - -/* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */ -#define HAVE_SYS_WAIT_H 1 - -/* Define if your struct tm has tm_zone.  */ -#define HAVE_TM_ZONE 1 - -/* Define if you don't have tm_zone but do have the external array -   tzname.  */ -/* #undef HAVE_TZNAME */ - -/* Define if you have the vprintf function.  */ -#define HAVE_VPRINTF 1 - -/* Define if on MINIX.  */ -/* #undef _MINIX */ - -/* Define to `int' if <sys/types.h> doesn't define.  */ -/* #undef pid_t */ - -/* Define if the system does not provide POSIX.1 features except -   with this defined.  */ -/* #undef _POSIX_1_SOURCE */ - -/* Define if you need to in order for stat and other things to work.  */ -/* #undef _POSIX_SOURCE */ - -/* Define as the return type of signal handlers (int or void).  */ -#define RETSIGTYPE void - -/* Define to `unsigned' if <sys/types.h> doesn't define.  */ -/* #undef size_t */ - -/* If using the C implementation of alloca, define if you know the -   direction of stack growth for your system; otherwise it will be -   automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown - */ -/* #undef STACK_DIRECTION */ - -/* Define if you have the ANSI C header files.  */ -#define STDC_HEADERS 1 - -/* Define if you can safely include both <sys/time.h> and <time.h>.  */ -#define TIME_WITH_SYS_TIME 1 - -/* Define if your <sys/time.h> declares struct tm.  */ -/* #undef TM_IN_SYS_TIME */ - -/* Define to `int' if <sys/types.h> doesn't define.  */ -/* #undef uid_t */ - -#define HAVE_STRINGIZE 1 /* can use ANSI # operator in cpp */ -#define REGEX_MALLOC 1 /* use malloc instead of alloca in regex.c */ -#define SPRINTF_RET int /* return type of sprintf */ -/* #undef BITOPS */  /* bitwise ops (undocumented feature) */ -/* #undef NONDECDATA */ /* non-decimal input data (undocumented feature) */ - -/* Define if you have the fmod function.  */ -#define HAVE_FMOD 1 - -/* Define if you have the getpagesize function.  */ -#define HAVE_GETPAGESIZE 1 - -/* Define if you have the madvise function.  */ -#define HAVE_MADVISE 1 - -/* Define if you have the memcmp function.  */ -#define HAVE_MEMCMP 1 - -/* Define if you have the memcpy function.  */ -#define HAVE_MEMCPY 1 - -/* Define if you have the memset function.  */ -#define HAVE_MEMSET 1 - -/* Define if you have the setlocale function.  */ -#define HAVE_SETLOCALE 1 - -/* Define if you have the strchr function.  */ -#define HAVE_STRCHR 1 - -/* Define if you have the strerror function.  */ -#define HAVE_STRERROR 1 - -/* Define if you have the strftime function.  */ -#define HAVE_STRFTIME 1 - -/* Define if you have the strncasecmp function.  */ -#define HAVE_STRNCASECMP 1 - -/* Define if you have the strtod function.  */ -#define HAVE_STRTOD 1 - -/* Define if you have the system function.  */ -#define HAVE_SYSTEM 1 - -/* Define if you have the tzset function.  */ -#define HAVE_TZSET 1 - -/* Define if you have the <limits.h> header file.  */ -#define HAVE_LIMITS_H 1 - -/* Define if you have the <locale.h> header file.  */ -#define HAVE_LOCALE_H 1 - -/* Define if you have the <memory.h> header file.  */ -#define HAVE_MEMORY_H 1 - -/* Define if you have the <signum.h> header file.  */ -/* #undef HAVE_SIGNUM_H */ - -/* Define if you have the <stdarg.h> header file.  */ -#define HAVE_STDARG_H 1 - -/* Define if you have the <string.h> header file.  */ -#define HAVE_STRING_H 1 - -/* Define if you have the <strings.h> header file.  */ -/* #undef HAVE_STRINGS_H */ - -/* Define if you have the <sys/param.h> header file.  */ -#define HAVE_SYS_PARAM_H 1 - -/* Define if you have the <unistd.h> header file.  */ -#define HAVE_UNISTD_H 1 - -/* Define if you have the m library (-lm).  */ -#define HAVE_LIBM 1 - -#include <custom.h>	/* overrides for stuff autoconf can't deal with */ diff --git a/contrib/awk/missing.c b/contrib/awk/missing.c deleted file mode 100644 index 7494d7668c2b..000000000000 --- a/contrib/awk/missing.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Do all necessary includes here, so that we don't have to worry about - * overlapping includes in the files in missing.d. - */ -#include "awk.h" - - -#ifdef atarist -/* - * this will work with gcc compiler - for other compilers you may - * have to replace path separators in this file into backslashes - */ -#include "atari/stack.c" -#include "atari/tmpnam.c" -#endif /* atarist */ - -#ifndef HAVE_SYSTEM -#ifdef atarist -#include "atari/system.c" -#else -#include "missing/system.c" -#endif -#endif /* HAVE_SYSTEM */ - -#ifndef HAVE_MEMCMP -#include "missing/memcmp.c" -#endif	/* HAVE_MEMCMP */ - -#ifndef HAVE_MEMCPY -#include "missing/memcpy.c" -#endif	/* HAVE_MEMCPY */ - -#ifndef HAVE_MEMSET -#include "missing/memset.c" -#endif	/* HAVE_MEMSET */ - -#ifndef HAVE_STRNCASECMP -#include "missing/strncasecmp.c" -#endif	/* HAVE_STRCASE */ - -#ifndef HAVE_STRERROR -#include "missing/strerror.c" -#endif	/* HAVE_STRERROR */ - -#ifndef HAVE_STRFTIME -#include "missing/strftime.c" -#endif	/* HAVE_STRFTIME */ - -#ifndef HAVE_STRCHR -#include "missing/strchr.c" -#endif	/* HAVE_STRCHR */ - -#ifndef HAVE_STRTOD -#include "missing/strtod.c" -#endif	/* HAVE_STRTOD */ - -#ifndef HAVE_TZSET -#include "missing/tzset.c" -#endif /* HAVE_TZSET */ diff --git a/contrib/awk/random.c b/contrib/awk/random.c deleted file mode 100644 index 002b22655eef..000000000000 --- a/contrib/awk/random.c +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley.  The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)random.c	5.5 (Berkeley) 7/6/88"; -#endif /* LIBC_SCCS and not lint */ - -#include <stdio.h> -#include "random.h"	/* GAWK ADDITION */ - -/* - * 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 longs; 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 longs 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 register 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. - */ - - - -/* - * 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 -#ifdef _CRAY -#define		DEG_3_P1	32		/* bug - do addition here */ -#define		SEP_3_P1	4		/* *_3 + 1 = _3_P1 */ -#endif - -#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 */ - -static  int		degrees[ MAX_TYPES ]	= { DEG_0, DEG_1, DEG_2, -								DEG_3, DEG_4 }; - -static  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  long		randtbl[ DEG_3 + 1 ]	= { TYPE_3, -			    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 }; - -/* - * 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). - */ - -#ifdef _CRAY -static  long		*fptr			= &randtbl[ SEP_3_P1 ]; -#else -static  long		*fptr			= &randtbl[ SEP_3 + 1 ]; -#endif -static  long		*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  long		*state			= &randtbl[ 1 ]; - -static  int		rand_type		= TYPE_3; -static  int		rand_deg		= DEG_3; -static  int		rand_sep		= SEP_3; - -#ifdef _CRAY -static  long		*end_ptr		= &randtbl[ DEG_3_P1 ]; -#else -static  long		*end_ptr		= &randtbl[ DEG_3 + 1 ]; -#endif - - - -/* - * 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		x; -{ -    	register  int		i, j; -	long random(); - -	if(  rand_type  ==  TYPE_0  )  { -	    state[ 0 ] = x; -	} -	else  { -	    j = 1; -	    state[ 0 ] = x; -	    for( i = 1; i < rand_deg; i++ )  { -		state[i] = 1103515245*state[i - 1] + 12345; -	    } -	    fptr = &state[ rand_sep ]; -	    rptr = &state[ 0 ]; -	    for( i = 0; i < 10*rand_deg; i++ )  random(); -	} -} - - - -/* - * 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. - */ - -char  * -initstate( seed, arg_state, n ) - -    unsigned		seed;			/* seed for R. N. G. */ -    char		*arg_state;		/* pointer to state array */ -    int			n;			/* # bytes of state info */ -{ -	register  char		*ostate		= (char *)( &state[ -1 ] ); - -	if(  rand_type  ==  TYPE_0  )  state[ -1 ] = rand_type; -	else  state[ -1 ] = MAX_TYPES*(rptr - state) + rand_type; -	if(  n  <  BREAK_1  )  { -	    if(  n  <  BREAK_0  )  { -		fprintf( stderr, "initstate: not enough state (%d bytes) with which to do jack; ignored.\n", n ); -		return 0; -	    } -	    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 = &(  ( (long *)arg_state )[1]  );	/* first location */ -	end_ptr = &state[ rand_deg ];	/* must set end_ptr before srandom */ -	srandom( seed ); -	if(  rand_type  ==  TYPE_0  )  state[ -1 ] = rand_type; -	else  state[ -1 ] = 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. - */ - -char  * -setstate( arg_state ) - -    char		*arg_state; -{ -	register  long		*new_state	= (long *)arg_state; -	register  int		type		= new_state[0]%MAX_TYPES; -	register  int		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: -		fprintf( stderr, "setstate: state info has been munged; 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 ther 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() -{ -	long		i; - -	if(  rand_type  ==  TYPE_0  )  { -	    i = state[0] = ( state[0]*1103515245 + 12345 )&0x7fffffff; -	} -	else  { -	    *fptr += *rptr; -	    i = (*fptr >> 1)&0x7fffffff;	/* chucking least random bit */ -	    if(  ++fptr  >=  end_ptr  )  { -		fptr = state; -		++rptr; -	    } -	    else  { -		if(  ++rptr  >=  end_ptr  )  rptr = state; -	    } -	} -	return( i ); -} diff --git a/contrib/awk/random.h b/contrib/awk/random.h deleted file mode 100644 index 7fd0ff9bbf62..000000000000 --- a/contrib/awk/random.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * random.h - redefine name of random lib routines to avoid conflicts - */ - -/*  - * Copyright (C) 1996 the Free Software Foundation, Inc. - *  - * This file is part of GAWK, the GNU implementation of the - * AWK Programming Language. - *  - * GAWK is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 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 initstate gawk_initstate -#define setstate gawk_setstate -#define random gawk_random -#define srandom gawk_srandom diff --git a/contrib/awk/regex.h b/contrib/awk/regex.h deleted file mode 100644 index 5140052c374f..000000000000 --- a/contrib/awk/regex.h +++ /dev/null @@ -1,531 +0,0 @@ -/* Definitions for data structures and routines for the regular -   expression library, version 0.12. -   Copyright (C) 1985,89,90,91,92,93,95,96,97 Free Software Foundation, Inc. - -   This program is free software; you can redistribute it and/or modify -   it under the terms of the GNU General Public License as published by -   the Free Software Foundation; either version 2, or (at your option) -   any later version. - -   This program is distributed in the hope that it will be useful, -   but WITHOUT ANY WARRANTY; without even the implied warranty of -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -   GNU General Public License for more details. - -   You should have received a copy of the GNU General Public License -   along with this program; if not, write to the Free Software Foundation, -   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */ - -#ifndef __REGEXP_LIBRARY_H__ -#define __REGEXP_LIBRARY_H__ - -/* Allow the use in C++ code.  */ -#ifdef __cplusplus -extern "C" { -#endif - -/* POSIX says that <sys/types.h> must be included (by the caller) before -   <regex.h>.  */ - -#if !defined (_POSIX_C_SOURCE) && !defined (_POSIX_SOURCE) && defined (VMS) -/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it -   should be there.  */ -#include <stddef.h> -#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; - -/* 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 \<digit> matches <digit>. -   If not set, then \<digit> 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) - -/* 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; - -/* 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_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) - -#define RE_SYNTAX_GNU_AWK						\ -  ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG)	\ -   & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS)) - -#define RE_SYNTAX_POSIX_AWK 						\ -  (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS		\ -   | RE_INTERVALS	    | RE_NO_GNU_OPS) - -#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) - -/* 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) - -/* 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_UNMATCHED_RIGHT_PAREN_ORD) - -/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS -   replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added.  */ -#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) - - -/* 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) - - -/* If any error codes are removed, changed, or added, update the -   `re_error_msg' table in regex.c.  */ -typedef enum -{ -  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,		/* Not implemented.  */ -  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', -   `translate', and `no_sub' can be set.  After the pattern has been -   compiled, the `re_nsub' field is available.  All other fields are -   private to the regex routines.  */ - -#ifndef RE_TRANSLATE_TYPE -#define RE_TRANSLATE_TYPE char * -#endif - -struct re_pattern_buffer -{ -/* [[[begin 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 *buffer; - -	/* Number of bytes to which `buffer' points.  */ -  unsigned long int allocated; - -	/* Number of bytes actually used in `buffer'.  */ -  unsigned long int used; - -        /* Syntax setting with which the pattern was compiled.  */ -  reg_syntax_t 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 *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 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 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.  */ -#define REGS_UNALLOCATED 0 -#define REGS_REALLOCATE 1 -#define REGS_FIXED 2 -  unsigned 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 fastmap_accurate : 1; - -        /* If set, `re_match_2' does not return information about -           subexpressions.  */ -  unsigned no_sub : 1; - -        /* If set, a beginning-of-line anchor doesn't match at the -           beginning of the string.  */ -  unsigned not_bol : 1; - -        /* Similarly for an end-of-line anchor.  */ -  unsigned not_eol : 1; - -        /* If true, an anchor at a newline matches.  */ -  unsigned newline_anchor : 1; - -/* [[[end pattern_buffer]]] */ -}; - -typedef struct re_pattern_buffer regex_t; - -/* Type for byte offsets within the string.  POSIX mandates this.  */ -typedef int regoff_t; - - -/* 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 - - -/* 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.  */ - -/* To avoid duplicating every routine declaration -- once with a -   prototype (if we are ANSI), and once without (if we aren't) -- we -   use the following macro to declare argument types.  This -   unfortunately clutters up the declarations a bit, but I think it's -   worth it.  */ - -#if __STDC__ - -#define _RE_ARGS(args) args - -#else /* not __STDC__ */ - -#define _RE_ARGS(args) () - -#endif /* not __STDC__ */ - -/* 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 _RE_ARGS ((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.  */ -extern const char *re_compile_pattern -  _RE_ARGS ((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 _RE_ARGS ((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 -  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string, -            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 -  _RE_ARGS ((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 -  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string, -             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 -  _RE_ARGS ((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 -  _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs, -             unsigned num_regs, regoff_t *starts, regoff_t *ends)); - -#ifdef _REGEX_RE_COMP -#ifndef _CRAY -/* 4.2 bsd compatibility.  */ -extern char *re_comp _RE_ARGS ((const char *)); -extern int re_exec _RE_ARGS ((const char *)); -#endif -#endif - -/* POSIX compatibility.  */ -extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags)); -extern int regexec -  _RE_ARGS ((const regex_t *preg, const char *string, size_t nmatch, -             regmatch_t pmatch[], int eflags)); -extern size_t regerror -  _RE_ARGS ((int errcode, const regex_t *preg, char *errbuf, -             size_t errbuf_size)); -extern void regfree _RE_ARGS ((regex_t *preg)); - - -#ifdef __cplusplus -} -#endif	/* C++ */ - -#endif /* not __REGEXP_LIBRARY_H__ */ - -/* -Local variables: -make-backup-files: t -version-control: t -trim-versions-without-asking: nil -End: -*/ diff --git a/contrib/awk/test/ChangeLog b/contrib/awk/test/ChangeLog deleted file mode 100644 index 8efafaad3b9d..000000000000 --- a/contrib/awk/test/ChangeLog +++ /dev/null @@ -1,252 +0,0 @@ -Thu May 15 12:49:08 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Release 3.0.3: Release tar file made. - -Tue May 13 12:53:46 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (messages): more testing for OK failure on Linux. - -Sun May 11 14:57:11 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (nondec): new test case. -	* nondec.awk, nondec.ok: new files. - -Sun May 11 07:07:05 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (prdupval): new test case. -	* prdupval.awk, prdupval.in, prdupval.ok: new files. - -Wed May  7 21:54:34 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (delarprm): new test case. -	* delarprm.awk, delarprm.ok: new files. - -Wed May  7 17:54:00 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (pid): several fixes from ghazi@caip.rutgers.edu. - -Tue May  6 20:28:30 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* 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  <arnold@skeeve.atl.ga.us> - -	* 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  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (pipeio2): new test case. -	* pipeio2.awk, pipeio2.ok, pipeio2.in: new files. - -Sun Apr 20 12:22:52 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (clobber): new test case. -	* clobber.awk, clobber.ok: new files. - -Fri Apr 18 07:55:47 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* BETA Release 3.0.34: Release tar file made. - -Tue Apr 15 05:57:29 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* 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  <arnold@skeeve.atl.ga.us> - -	* 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  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (pipeio1): new test case. -	* pipeio1.awk, pipeio1.ok: new files. - -Tue Mar 18 06:38:36 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (noparm): new test case. -	* noparm.awk, noparm.ok: new files. - -Fri Feb 21 06:30:18 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (reint): new test case. -	* reint.awk, reint.in, reint.ok: new files. - -Wed Feb  5 18:17:51 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (fnarydel): new test case. -	* fnarydel.awk, fnarydel.ok: new files. - -Sun Jan 19 17:06:18 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (nors): new test case. -	* nors.ok: new file. - -Sun Jan 19 17:06:18 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* 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  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (intest): new test case. -	* intest.awk, intest.ok: new files. - -Wed Dec 25 11:25:22 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Release 3.0.2: Release tar file made. - -Tue Dec 10 23:09:26 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Release 3.0.1: Release tar file made. - -Thu Nov  7 09:12:20 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (splitvar): new test case. -	* splitvar.awk, splitvar.in, splitvar.ok: new files. - -Sun Nov  3 10:55:50 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (nlfldsep): new test case. -	* nlfldsep.sh, nlfldsep.ok: new files. - -Fri Oct 25 10:29:56 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* 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  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (tradanch): new test case. -	* tradanch.awk, tradanch.in, tradanch.ok: new files. - -Thu Oct 17 21:22:05 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* 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  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (back89): new test case. -	* back89.in, back89.ok: new files. - -Sun Oct  6 20:45:54 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (splitwht): new test case. -	* splitwht.awk, splitwht.ok: new files. - -Sun Sep 29 23:14:20 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (gsubtest): new test case. -	* gsubtest.awk, gsubtest.ok: new files. - -Fri Sep 20 11:58:40 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (prtoeval): new test case. -	* prtoeval.awk, prtoeval.ok: new files. - -Tue Sep 10 06:26:44 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (gsubasgn): new test case. -	* gsubasgn.awk, gsubasgn.ok: new files. - -Wed Aug 28 22:06:33 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* badargs.ok: updated output corresponding to change made to -	  main.c (see main ChangeLog). - -Thu Aug  1 07:20:28 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* 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  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (prt1eval): new test case. -	* prt1eval.awk, prt1eval.ok: new files. - -Mon Jul 22 22:06:10 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (eofsplit): new test case. -	* eofsplit.awk, eofsplit.ok: new files. - -Sun Jul 14 07:07:45 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (fldchgnf): new test case. -	* fldchgnf.awk, fldchgnf.ok: new files. - -Tue May 21 23:23:22 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (substr): new test case. -	* substr.awk, substr.ok: new files. - -Tue May 14 15:05:23 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (dynlj): new test case. -	* dynlj.awk, dynlj.ok: new files. - -Sun May 12 20:45:34 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (fnarray): new test case. -	* fnarray.awk, fnarray.ok: new files. - -Fri Mar 15 06:46:48 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* 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  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (mmap8k): new test case. -	* mmap8k.in, mmap8k.ok: new files. - -Sun Mar 10 22:58:35 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* 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  <arnold@skeeve.atl.ga.us> - -	* Makefile.in (tweakfld): new test case. -	* tweakfld.in, tweakfld.awk, tweakfld.ok: new files. - -Sun Mar  3 06:51:26 1996  Arnold D. Robbins  <arnold@skeeve.atl.ga.us> - -	* 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  <arnold@skeeve.atl.ga.us> - -	* 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  <arnold@skeeve.atl.ga.us> - -	* 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  <arnold@skeeve.atl.ga.us> - -	* ChangeLog created. diff --git a/contrib/awk/test/Makefile b/contrib/awk/test/Makefile deleted file mode 100644 index 1a9168ef12cb..000000000000 --- a/contrib/awk/test/Makefile +++ /dev/null @@ -1,451 +0,0 @@ -# Generated automatically from Makefile.in by configure. -# Makefile for GNU Awk test suite. -# -# Copyright (C) 1988-1997 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 - -SHELL = /bin/sh -AWK = ../gawk -CMP = cmp - -srcdir = . - -bigtest:	basic unix-tests gawk.extensions - -basic:	msg swaplns messages argarray longwrds \ -	getline fstabplus compare arrayref rs fsrs rand \ -	fsbs negexp asgext anchgsub splitargv awkpath nfset reparse \ -	convfmt arrayparm paramdup nonl defref nofmtch litoct resplit \ -	rswhite prmarscl sclforin sclifin intprec childin noeffect \ -	numsubstr pcntplus prmreuse math fldchg fldchgnf reindops \ -	sprintfc backgsub tweakfld clsflnam mmap8k fnarray \ -	dynlj substr eofsplit prt1eval gsubasgn prtoeval gsubtest splitwht \ -	back89 tradanch nlfldsep splitvar intest nfldstr nors fnarydel \ -	noparms funstack clobber delarprm prdupval - -unix-tests: poundbang fflush getlnhd pipeio1 pipeio2 strftlng pid - -gawk.extensions: fieldwdth ignrcase posix manyfiles igncfs argtest \ -		badargs strftime gensub gnureops reint nondec - -extra:	regtest inftest - -poundbang:: -	@cp $(AWK) /tmp/gawk && $(srcdir)/poundbang $(srcdir)/poundbang >_`basename $@` -	@rm -f /tmp/gawk -	$(CMP) $(srcdir)/poundbang.ok _`basename $@` && rm -f _`basename $@` - -msg:: -	@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.' - -swaplns:: -	@$(AWK) -f $(srcdir)/swaplns.awk $(srcdir)/swaplns.in >_$@ -	$(CMP) $(srcdir)/swaplns.ok _$@ && rm -f _$@ - -messages:: -	@$(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; } || \ -	{ { test -d /dev/fd || test -d /proc/self/fd; } && \ -	echo IT IS OK THAT THIS TEST FAILED; } - -argarray:: -	@case $(srcdir) in \ -	.)	: ;; \ -	*)	cp $(srcdir)/argarray.in . ;; \ -	esac -	@TEST=test echo just a test | $(AWK) -f $(srcdir)/argarray.awk ./argarray.in - >_$@ -	$(CMP) $(srcdir)/argarray.ok _$@ && rm -f _$@ - -fstabplus:: -	@echo '1		2' | $(AWK) -f $(srcdir)/fstabplus.awk >_$@ -	$(CMP) $(srcdir)/fstabplus.ok _$@ && rm -f _$@ - -fsrs:: -	@$(AWK) -f $(srcdir)/fsrs.awk $(srcdir)/fsrs.in >_$@ -	$(CMP) $(srcdir)/fsrs.ok _$@ && rm -f _$@ - -igncfs:: -	@$(AWK) -f $(srcdir)/igncfs.awk $(srcdir)/igncfs.in >_$@ -	$(CMP) $(srcdir)/igncfs.ok _$@ && rm -f _$@ - -longwrds:: -	@$(AWK) -f $(srcdir)/longwrds.awk $(srcdir)/manpage | sort >_$@ -	$(CMP) $(srcdir)/longwrds.ok _$@ && rm -f _$@ - -fieldwdth:: -	@echo '123456789' | $(AWK) -v FIELDWIDTHS="2 3 4" '{ print $$2}' >_$@ -	$(CMP) $(srcdir)/fieldwdth.ok _$@ && rm -f _$@ - -ignrcase:: -	@echo xYz | $(AWK) -v IGNORECASE=1 '{ sub(/y/, ""); print}' >_$@ -	$(CMP) $(srcdir)/ignrcase.ok _$@ && rm -f _$@ - -regtest:: -	@echo 'Some of the output from regtest is very system specific, do not' -	@echo 'be distressed if your output differs from that distributed.' -	@echo 'Manual inspection is called for.' -	AWK=`pwd`/$(AWK) $(srcdir)/regtest - -posix:: -	@echo '1:2,3 4' | $(AWK) -f $(srcdir)/posix.awk >_$@ -	$(CMP) $(srcdir)/posix.ok _$@ && rm -f _$@ - -manyfiles:: -	@rm -rf junk -	@mkdir junk -	@$(AWK) 'BEGIN { for (i = 1; i <= 300; i++) print i, i}' >_$@ -	@$(AWK) -f $(srcdir)/manyfiles.awk _$@ _$@ -	@echo "This number better be 1 ->" | tr -d '\012' -	@wc -l junk/* | $(AWK) '$$1 != 2' | wc -l -	@rm -rf junk _$@ - -compare:: -	@$(AWK) -f $(srcdir)/compare.awk 0 1 $(srcdir)/compare.in >_$@ -	$(CMP) $(srcdir)/compare.ok _$@ && rm -f _$@ - -arrayref:: -	@$(AWK) -f $(srcdir)/arrayref.awk >_$@ -	$(CMP) $(srcdir)/arrayref.ok _$@ && rm -f _$@ - -rs:: -	@$(AWK) -v RS="" '{ print $$1, $$2}' $(srcdir)/rs.in >_$@ -	$(CMP) $(srcdir)/rs.ok _$@ && rm -f _$@ - -fsbs:: -	@$(AWK) -v FS='\' '{ print $$1, $$2 }' $(srcdir)/fsbs.in >_$@ -	$(CMP) $(srcdir)/fsbs.ok _$@ && rm -f _$@ - -inftest:: -	@echo This test is very machine specific... -	@$(AWK) -f $(srcdir)/inftest.awk >_$@ -	$(CMP) $(srcdir)/inftest.ok _$@ && rm -f _$@ - -getline:: -	@$(AWK) -f $(srcdir)/getline.awk $(srcdir)/getline.awk $(srcdir)/getline.awk >_$@ -	$(CMP) $(srcdir)/getline.ok _$@ && rm -f _$@ - -rand:: -	@$(AWK) -f $(srcdir)/rand.awk >_$@ -	$(CMP) $(srcdir)/rand.ok _$@ && rm -f _$@ - -negexp:: -	@$(AWK) 'BEGIN { a = -2; print 10^a }' >_$@ -	$(CMP) $(srcdir)/negexp.ok _$@ && rm -f _$@ - -asgext:: -	@$(AWK) -f $(srcdir)/asgext.awk $(srcdir)/asgext.in >_$@ -	$(CMP) $(srcdir)/asgext.ok _$@ && rm -f _$@ - -anchgsub:: -	@$(AWK) -f $(srcdir)/anchgsub.awk $(srcdir)/anchgsub.in >_$@ -	$(CMP) $(srcdir)/anchgsub.ok _$@ && rm -f _$@ - -splitargv:: -	@$(AWK) -f $(srcdir)/splitargv.awk $(srcdir)/splitargv.in >_$@ -	$(CMP) $(srcdir)/splitargv.ok _$@ && rm -f _$@ - -awkpath:: -	@AWKPATH="$(srcdir):$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ -	$(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@ - -nfset:: -	@$(AWK) -f $(srcdir)/nfset.awk $(srcdir)/nfset.in >_$@ -	$(CMP) $(srcdir)/nfset.ok _$@ && rm -f _$@ - -reparse:: -	@$(AWK) -f $(srcdir)/reparse.awk $(srcdir)/reparse.in >_$@ -	$(CMP) $(srcdir)/reparse.ok _$@ && rm -f _$@ - -argtest:: -	@$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@ -	$(CMP) $(srcdir)/argtest.ok _$@ && rm -f _$@ - -badargs:: -	@-$(AWK) -f 2>&1 | grep -v patchlevel >_$@ -	$(CMP) $(srcdir)/badargs.ok _$@ && rm -f _$@ - -convfmt:: -	@$(AWK) -f $(srcdir)/convfmt.awk >_$@ -	$(CMP) $(srcdir)/convfmt.ok _$@ && rm -f _$@ - -arrayparm:: -	@-AWKPATH=$(srcdir) $(AWK) -f arrayparm.awk >_$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/arrayparm.ok _$@ && rm -f _$@ - -paramdup:: -	@-AWKPATH=$(srcdir) $(AWK) -f paramdup.awk >_$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/paramdup.ok _$@ && rm -f _$@ - -nonl:: -	@-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1 -	$(CMP) $(srcdir)/nonl.ok _$@ && rm -f _$@ - -defref:: -	@-AWKPATH=$(srcdir) $(AWK) --lint -f defref.awk >_$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/defref.ok _$@ && rm -f _$@ - -nofmtch:: -	@-AWKPATH=$(srcdir) $(AWK) --lint -f nofmtch.awk >_$@ 2>&1 -	$(CMP) $(srcdir)/nofmtch.ok _$@ && rm -f _$@ - -strftime:: -	: this test could fail on slow machines or on a second boundary, -	: so if it does, double check the actual results -	@LC_ALL=C; export LC_ALL; LANC=C; export LANG; \ -	date | $(AWK) '{ $$3 = sprintf("%02d", $$3 + 0) ; \ -	print > "strftime.ok" ; \ -	print strftime() > "'_$@'" }' -	$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 - -litoct:: -	@echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@ -	$(CMP) $(srcdir)/litoct.ok _$@ && rm -f _$@ - -gensub:: -	@$(AWK) -f $(srcdir)/gensub.awk $(srcdir)/gensub.in >_$@ -	$(CMP) $(srcdir)/gensub.ok _$@ && rm -f _$@ - -resplit:: -	@echo a:b:c d:e:f | $(AWK) '{ FS = ":"; $$0 = $$0; print $$2 }' > _$@ -	$(CMP) $(srcdir)/resplit.ok _$@ && rm -f _$@ - -rswhite:: -	@$(AWK) -f $(srcdir)/rswhite.awk $(srcdir)/rswhite.in > _$@ -	$(CMP) $(srcdir)/rswhite.ok _$@ && rm -f _$@ - -prmarscl:: -	@-AWKPATH=$(srcdir) $(AWK) -f prmarscl.awk > _$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/prmarscl.ok _$@ && rm -f _$@ - -sclforin:: -	@-AWKPATH=$(srcdir) $(AWK) -f sclforin.awk > _$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/sclforin.ok _$@ && rm -f _$@ - -sclifin:: -	@-AWKPATH=$(srcdir) $(AWK) -f sclifin.awk > _$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/sclifin.ok _$@ && rm -f _$@ - -intprec:: -	@-$(AWK) -f $(srcdir)/intprec.awk > _$@ 2>&1 -	$(CMP) $(srcdir)/intprec.ok _$@ && rm -f _$@ - -childin:: -	@echo hi | $(AWK) 'BEGIN { "cat" | getline; print; close("cat") }' > _$@ -	$(CMP) $(srcdir)/childin.ok _$@ && rm -f _$@ - -noeffect:: -	@-AWKPATH=$(srcdir) $(AWK) --lint -f noeffect.awk > _$@ 2>&1 -	$(CMP) $(srcdir)/noeffect.ok _$@ && rm -f _$@ - -numsubstr:: -	@-AWKPATH=$(srcdir) $(AWK) -f numsubstr.awk $(srcdir)/numsubstr.in >_$@ -	$(CMP) $(srcdir)/numsubstr.ok _$@ && rm -f _$@ - -gnureops:: -	@$(AWK) -f $(srcdir)/gnureops.awk >_$@ -	$(CMP) $(srcdir)/gnureops.ok _$@ && rm -f _$@ - -pcntplus:: -	@$(AWK) -f $(srcdir)/pcntplus.awk >_$@ -	$(CMP) $(srcdir)/pcntplus.ok _$@ && rm -f _$@ - -prmreuse:: -	@$(AWK) -f $(srcdir)/prmreuse.awk >_$@ -	$(CMP) $(srcdir)/prmreuse.ok _$@ && rm -f _$@ - -math:: -	@$(AWK) -f $(srcdir)/math.awk >_$@ -	$(CMP) $(srcdir)/math.ok _$@ && rm -f _$@ - -fflush:: -	@$(srcdir)/fflush.sh >_$@ -	$(CMP) $(srcdir)/fflush.ok _$@ && rm -f _$@ - -fldchg:: -	@$(AWK) -f $(srcdir)/fldchg.awk $(srcdir)/fldchg.in >_$@ -	$(CMP) $(srcdir)/fldchg.ok _$@ && rm -f _$@ - -fldchgnf:: -	@$(AWK) -f $(srcdir)/fldchgnf.awk $(srcdir)/fldchgnf.in >_$@ -	$(CMP) $(srcdir)/fldchgnf.ok _$@ && rm -f _$@ - -reindops:: -	@$(AWK) -f $(srcdir)/reindops.awk $(srcdir)/reindops.in >_$@ -	$(CMP) $(srcdir)/reindops.ok _$@ && rm -f _$@ - -sprintfc:: -	@$(AWK) -f $(srcdir)/sprintfc.awk $(srcdir)/sprintfc.in >_$@ -	$(CMP) $(srcdir)/sprintfc.ok _$@ && rm -f _$@ - -getlnhd:: -	@$(AWK) -f $(srcdir)/getlnhd.awk >_$@ -	$(CMP) $(srcdir)/getlnhd.ok _$@ && rm -f _$@ - -backgsub:: -	@$(AWK) -f $(srcdir)/backgsub.awk $(srcdir)/backgsub.in >_$@ -	$(CMP) $(srcdir)/backgsub.ok _$@ && rm -f _$@ - -tweakfld:: -	@$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@ -	@rm -f errors.cleanup -	$(CMP) $(srcdir)/tweakfld.ok _$@ && rm -f _$@ - -clsflnam:: -	@$(AWK) -f $(srcdir)/clsflnam.awk $(srcdir)/clsflnam.in >_$@ -	$(CMP) $(srcdir)/clsflnam.ok _$@ && rm -f _$@ - -mmap8k:: -	@$(AWK) '{ print }' $(srcdir)/mmap8k.in >_$@ -	$(CMP) $(srcdir)/mmap8k.in _$@ && rm -f _$@ - -fnarray:: -	@-AWKPATH=$(srcdir) $(AWK) -f fnarray.awk >_$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/fnarray.ok _$@ && rm -f _$@ - -dynlj:: -	@$(AWK) -f $(srcdir)/dynlj.awk >_$@ -	$(CMP) $(srcdir)/dynlj.ok _$@ && rm -f _$@ - -substr:: -	@$(AWK) -f $(srcdir)/substr.awk >_$@ -	$(CMP) $(srcdir)/substr.ok _$@ && rm -f _$@ - -eofsplit:: -	@$(AWK) -f $(srcdir)/eofsplit.awk >_$@ -	$(CMP) $(srcdir)/eofsplit.ok _$@ && rm -f _$@ - -prt1eval:: -	@$(AWK) -f $(srcdir)/prt1eval.awk >_$@ -	$(CMP) $(srcdir)/prt1eval.ok _$@ && rm -f _$@ - -gsubasgn:: -	@-AWKPATH=$(srcdir) $(AWK) -f gsubasgn.awk >_$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/gsubasgn.ok _$@ && rm -f _$@ - -prtoeval:: -	@$(AWK) -f $(srcdir)/prtoeval.awk >_$@ -	$(CMP) $(srcdir)/prtoeval.ok _$@ && rm -f _$@ - -gsubtest:: -	@$(AWK) -f $(srcdir)/gsubtest.awk >_$@ -	$(CMP) $(srcdir)/gsubtest.ok _$@ && rm -f _$@ - -splitwht:: -	@$(AWK) -f $(srcdir)/splitwht.awk >_$@ -	$(CMP) $(srcdir)/splitwht.ok _$@ && rm -f _$@ - -back89:: -	@$(AWK) '/a\8b/' $(srcdir)/back89.in >_$@ -	$(CMP) $(srcdir)/back89.ok _$@ && rm -f _$@ - -tradanch:: -	@$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@ -	$(CMP) $(srcdir)/tradanch.ok _$@ && rm -f _$@ - -nlfldsep:: -	@$(AWK) -f $(srcdir)/nlfldsep.awk $(srcdir)/nlfldsep.in > _$@ -	$(CMP) $(srcdir)/nlfldsep.ok _$@ && rm -f _$@ - -splitvar:: -	@$(AWK) -f $(srcdir)/splitvar.awk $(srcdir)/splitvar.in >_$@ -	$(CMP) $(srcdir)/splitvar.ok _$@ && rm -f _$@ - -intest:: -	@$(AWK) -f $(srcdir)/intest.awk >_$@ -	$(CMP) $(srcdir)/intest.ok _$@ && rm -f _$@ - -# 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:: -	@AWKPATH=$(srcdir) AWK=$(AWK) $(SHELL) $(srcdir)/pid.sh $$$$ > _`basename $@` ; : -	$(CMP) $(srcdir)/pid.ok _`basename $@` && rm -f _`basename $@` _`basename $@`.in - -strftlng:: -	@TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ -	@if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ - 	TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ -	fi -	$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ - -nfldstr:: -	@echo | $(AWK) '$$1 == 0 { print "bug" }' > _$@ -	$(CMP) $(srcdir)/nfldstr.ok _$@ && rm -f _$@ - -nors:: -	@echo A B C D E | tr -d '\12' | $(AWK) '{ print $$NF }' - $(srcdir)/nors.in > _$@ -	$(CMP) $(srcdir)/nors.ok _$@ && rm -f _$@ - -fnarydel:: -	@$(AWK) -f $(srcdir)/fnarydel.awk >_$@ -	$(CMP) $(srcdir)/fnarydel.ok _$@ && rm -f _$@ - -reint:: -	@$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@ -	$(CMP) $(srcdir)/reint.ok _$@ && rm -f _$@ - -noparms:: -	@-AWKPATH=$(srcdir) $(AWK) -f noparms.awk >_$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/noparms.ok _$@ && rm -f _$@ - -pipeio1:: -	@$(AWK) -f $(srcdir)/pipeio1.awk >_$@ -	@rm -f test1 test2 -	$(CMP) $(srcdir)/pipeio1.ok _$@ && rm -f _$@ - -pipeio2:: -	@$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@ -	$(CMP) $(srcdir)/pipeio2.ok _$@ && rm -f _$@ - -funstack:: -	@$(AWK) -f $(srcdir)/funstack.awk $(srcdir)/funstack.in >_$@ -	$(CMP) $(srcdir)/funstack.ok _$@ && rm -f _$@ - -clobber:: -	@$(AWK) -f $(srcdir)/clobber.awk >_$@ -	$(CMP) $(srcdir)/clobber.ok seq && $(CMP) $(srcdir)/clobber.ok _$@ && rm -f _$@ -	@rm -f seq - -delarprm:: -	@$(AWK) -f $(srcdir)/delarprm.awk >_$@ -	$(CMP) $(srcdir)/delarprm.ok _$@ && rm -f _$@ - -prdupval:: -	@$(AWK) -f $(srcdir)/prdupval.awk $(srcdir)/prdupval.in >_$@ -	$(CMP) $(srcdir)/prdupval.ok _$@ && rm -f _$@ - -nondec:: -	@if grep BITOP ../config.h | grep define > /dev/null; \ -	then \ -		$(AWK) -f $(srcdir)/nondec.awk >_$@; \ -	else \ -		cp $(srcdir)/nondec.ok _$@; \ -	fi -	$(CMP) $(srcdir)/nondec.ok _$@ && rm -f _$@ - -clean: -	rm -fr _* core junk out1 out2 out3 strftime.ok test1 test2 seq *~ - -distclean: clean -	rm -f Makefile - -maintainer-clean: distclean diff --git a/contrib/awk/test/Makefile.in b/contrib/awk/test/Makefile.in deleted file mode 100644 index 07d0cbcf7009..000000000000 --- a/contrib/awk/test/Makefile.in +++ /dev/null @@ -1,451 +0,0 @@ -# Makefile for GNU Awk test suite. -# -# Copyright (C) 1988-1997 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 - -SHELL = /bin/sh -AWK = ../gawk -CMP = cmp - -srcdir = @srcdir@ -VPATH = @srcdir@ - -bigtest:	basic unix-tests gawk.extensions - -basic:	msg swaplns messages argarray longwrds \ -	getline fstabplus compare arrayref rs fsrs rand \ -	fsbs negexp asgext anchgsub splitargv awkpath nfset reparse \ -	convfmt arrayparm paramdup nonl defref nofmtch litoct resplit \ -	rswhite prmarscl sclforin sclifin intprec childin noeffect \ -	numsubstr pcntplus prmreuse math fldchg fldchgnf reindops \ -	sprintfc backgsub tweakfld clsflnam mmap8k fnarray \ -	dynlj substr eofsplit prt1eval gsubasgn prtoeval gsubtest splitwht \ -	back89 tradanch nlfldsep splitvar intest nfldstr nors fnarydel \ -	noparms funstack clobber delarprm prdupval - -unix-tests: poundbang fflush getlnhd pipeio1 pipeio2 strftlng pid - -gawk.extensions: fieldwdth ignrcase posix manyfiles igncfs argtest \ -		badargs strftime gensub gnureops reint nondec - -extra:	regtest inftest - -poundbang:: -	@cp $(AWK) /tmp/gawk && $(srcdir)/poundbang $(srcdir)/poundbang >_`basename $@` -	@rm -f /tmp/gawk -	$(CMP) $(srcdir)/poundbang.ok _`basename $@` && rm -f _`basename $@` - -msg:: -	@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.' - -swaplns:: -	@$(AWK) -f $(srcdir)/swaplns.awk $(srcdir)/swaplns.in >_$@ -	$(CMP) $(srcdir)/swaplns.ok _$@ && rm -f _$@ - -messages:: -	@$(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; } || \ -	{ { test -d /dev/fd || test -d /proc/self/fd; } && \ -	echo IT IS OK THAT THIS TEST FAILED; } - -argarray:: -	@case $(srcdir) in \ -	.)	: ;; \ -	*)	cp $(srcdir)/argarray.in . ;; \ -	esac -	@TEST=test echo just a test | $(AWK) -f $(srcdir)/argarray.awk ./argarray.in - >_$@ -	$(CMP) $(srcdir)/argarray.ok _$@ && rm -f _$@ - -fstabplus:: -	@echo '1		2' | $(AWK) -f $(srcdir)/fstabplus.awk >_$@ -	$(CMP) $(srcdir)/fstabplus.ok _$@ && rm -f _$@ - -fsrs:: -	@$(AWK) -f $(srcdir)/fsrs.awk $(srcdir)/fsrs.in >_$@ -	$(CMP) $(srcdir)/fsrs.ok _$@ && rm -f _$@ - -igncfs:: -	@$(AWK) -f $(srcdir)/igncfs.awk $(srcdir)/igncfs.in >_$@ -	$(CMP) $(srcdir)/igncfs.ok _$@ && rm -f _$@ - -longwrds:: -	@$(AWK) -f $(srcdir)/longwrds.awk $(srcdir)/manpage | sort >_$@ -	$(CMP) $(srcdir)/longwrds.ok _$@ && rm -f _$@ - -fieldwdth:: -	@echo '123456789' | $(AWK) -v FIELDWIDTHS="2 3 4" '{ print $$2}' >_$@ -	$(CMP) $(srcdir)/fieldwdth.ok _$@ && rm -f _$@ - -ignrcase:: -	@echo xYz | $(AWK) -v IGNORECASE=1 '{ sub(/y/, ""); print}' >_$@ -	$(CMP) $(srcdir)/ignrcase.ok _$@ && rm -f _$@ - -regtest:: -	@echo 'Some of the output from regtest is very system specific, do not' -	@echo 'be distressed if your output differs from that distributed.' -	@echo 'Manual inspection is called for.' -	AWK=`pwd`/$(AWK) $(srcdir)/regtest - -posix:: -	@echo '1:2,3 4' | $(AWK) -f $(srcdir)/posix.awk >_$@ -	$(CMP) $(srcdir)/posix.ok _$@ && rm -f _$@ - -manyfiles:: -	@rm -rf junk -	@mkdir junk -	@$(AWK) 'BEGIN { for (i = 1; i <= 300; i++) print i, i}' >_$@ -	@$(AWK) -f $(srcdir)/manyfiles.awk _$@ _$@ -	@echo "This number better be 1 ->" | tr -d '\012' -	@wc -l junk/* | $(AWK) '$$1 != 2' | wc -l -	@rm -rf junk _$@ - -compare:: -	@$(AWK) -f $(srcdir)/compare.awk 0 1 $(srcdir)/compare.in >_$@ -	$(CMP) $(srcdir)/compare.ok _$@ && rm -f _$@ - -arrayref:: -	@$(AWK) -f $(srcdir)/arrayref.awk >_$@ -	$(CMP) $(srcdir)/arrayref.ok _$@ && rm -f _$@ - -rs:: -	@$(AWK) -v RS="" '{ print $$1, $$2}' $(srcdir)/rs.in >_$@ -	$(CMP) $(srcdir)/rs.ok _$@ && rm -f _$@ - -fsbs:: -	@$(AWK) -v FS='\' '{ print $$1, $$2 }' $(srcdir)/fsbs.in >_$@ -	$(CMP) $(srcdir)/fsbs.ok _$@ && rm -f _$@ - -inftest:: -	@echo This test is very machine specific... -	@$(AWK) -f $(srcdir)/inftest.awk >_$@ -	$(CMP) $(srcdir)/inftest.ok _$@ && rm -f _$@ - -getline:: -	@$(AWK) -f $(srcdir)/getline.awk $(srcdir)/getline.awk $(srcdir)/getline.awk >_$@ -	$(CMP) $(srcdir)/getline.ok _$@ && rm -f _$@ - -rand:: -	@$(AWK) -f $(srcdir)/rand.awk >_$@ -	$(CMP) $(srcdir)/rand.ok _$@ && rm -f _$@ - -negexp:: -	@$(AWK) 'BEGIN { a = -2; print 10^a }' >_$@ -	$(CMP) $(srcdir)/negexp.ok _$@ && rm -f _$@ - -asgext:: -	@$(AWK) -f $(srcdir)/asgext.awk $(srcdir)/asgext.in >_$@ -	$(CMP) $(srcdir)/asgext.ok _$@ && rm -f _$@ - -anchgsub:: -	@$(AWK) -f $(srcdir)/anchgsub.awk $(srcdir)/anchgsub.in >_$@ -	$(CMP) $(srcdir)/anchgsub.ok _$@ && rm -f _$@ - -splitargv:: -	@$(AWK) -f $(srcdir)/splitargv.awk $(srcdir)/splitargv.in >_$@ -	$(CMP) $(srcdir)/splitargv.ok _$@ && rm -f _$@ - -awkpath:: -	@AWKPATH="$(srcdir):$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ -	$(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@ - -nfset:: -	@$(AWK) -f $(srcdir)/nfset.awk $(srcdir)/nfset.in >_$@ -	$(CMP) $(srcdir)/nfset.ok _$@ && rm -f _$@ - -reparse:: -	@$(AWK) -f $(srcdir)/reparse.awk $(srcdir)/reparse.in >_$@ -	$(CMP) $(srcdir)/reparse.ok _$@ && rm -f _$@ - -argtest:: -	@$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@ -	$(CMP) $(srcdir)/argtest.ok _$@ && rm -f _$@ - -badargs:: -	@-$(AWK) -f 2>&1 | grep -v patchlevel >_$@ -	$(CMP) $(srcdir)/badargs.ok _$@ && rm -f _$@ - -convfmt:: -	@$(AWK) -f $(srcdir)/convfmt.awk >_$@ -	$(CMP) $(srcdir)/convfmt.ok _$@ && rm -f _$@ - -arrayparm:: -	@-AWKPATH=$(srcdir) $(AWK) -f arrayparm.awk >_$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/arrayparm.ok _$@ && rm -f _$@ - -paramdup:: -	@-AWKPATH=$(srcdir) $(AWK) -f paramdup.awk >_$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/paramdup.ok _$@ && rm -f _$@ - -nonl:: -	@-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1 -	$(CMP) $(srcdir)/nonl.ok _$@ && rm -f _$@ - -defref:: -	@-AWKPATH=$(srcdir) $(AWK) --lint -f defref.awk >_$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/defref.ok _$@ && rm -f _$@ - -nofmtch:: -	@-AWKPATH=$(srcdir) $(AWK) --lint -f nofmtch.awk >_$@ 2>&1 -	$(CMP) $(srcdir)/nofmtch.ok _$@ && rm -f _$@ - -strftime:: -	: this test could fail on slow machines or on a second boundary, -	: so if it does, double check the actual results -	@LC_ALL=C; export LC_ALL; LANC=C; export LANG; \ -	date | $(AWK) '{ $$3 = sprintf("%02d", $$3 + 0) ; \ -	print > "strftime.ok" ; \ -	print strftime() > "'_$@'" }' -	$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 - -litoct:: -	@echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@ -	$(CMP) $(srcdir)/litoct.ok _$@ && rm -f _$@ - -gensub:: -	@$(AWK) -f $(srcdir)/gensub.awk $(srcdir)/gensub.in >_$@ -	$(CMP) $(srcdir)/gensub.ok _$@ && rm -f _$@ - -resplit:: -	@echo a:b:c d:e:f | $(AWK) '{ FS = ":"; $$0 = $$0; print $$2 }' > _$@ -	$(CMP) $(srcdir)/resplit.ok _$@ && rm -f _$@ - -rswhite:: -	@$(AWK) -f $(srcdir)/rswhite.awk $(srcdir)/rswhite.in > _$@ -	$(CMP) $(srcdir)/rswhite.ok _$@ && rm -f _$@ - -prmarscl:: -	@-AWKPATH=$(srcdir) $(AWK) -f prmarscl.awk > _$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/prmarscl.ok _$@ && rm -f _$@ - -sclforin:: -	@-AWKPATH=$(srcdir) $(AWK) -f sclforin.awk > _$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/sclforin.ok _$@ && rm -f _$@ - -sclifin:: -	@-AWKPATH=$(srcdir) $(AWK) -f sclifin.awk > _$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/sclifin.ok _$@ && rm -f _$@ - -intprec:: -	@-$(AWK) -f $(srcdir)/intprec.awk > _$@ 2>&1 -	$(CMP) $(srcdir)/intprec.ok _$@ && rm -f _$@ - -childin:: -	@echo hi | $(AWK) 'BEGIN { "cat" | getline; print; close("cat") }' > _$@ -	$(CMP) $(srcdir)/childin.ok _$@ && rm -f _$@ - -noeffect:: -	@-AWKPATH=$(srcdir) $(AWK) --lint -f noeffect.awk > _$@ 2>&1 -	$(CMP) $(srcdir)/noeffect.ok _$@ && rm -f _$@ - -numsubstr:: -	@-AWKPATH=$(srcdir) $(AWK) -f numsubstr.awk $(srcdir)/numsubstr.in >_$@ -	$(CMP) $(srcdir)/numsubstr.ok _$@ && rm -f _$@ - -gnureops:: -	@$(AWK) -f $(srcdir)/gnureops.awk >_$@ -	$(CMP) $(srcdir)/gnureops.ok _$@ && rm -f _$@ - -pcntplus:: -	@$(AWK) -f $(srcdir)/pcntplus.awk >_$@ -	$(CMP) $(srcdir)/pcntplus.ok _$@ && rm -f _$@ - -prmreuse:: -	@$(AWK) -f $(srcdir)/prmreuse.awk >_$@ -	$(CMP) $(srcdir)/prmreuse.ok _$@ && rm -f _$@ - -math:: -	@$(AWK) -f $(srcdir)/math.awk >_$@ -	$(CMP) $(srcdir)/math.ok _$@ && rm -f _$@ - -fflush:: -	@$(srcdir)/fflush.sh >_$@ -	$(CMP) $(srcdir)/fflush.ok _$@ && rm -f _$@ - -fldchg:: -	@$(AWK) -f $(srcdir)/fldchg.awk $(srcdir)/fldchg.in >_$@ -	$(CMP) $(srcdir)/fldchg.ok _$@ && rm -f _$@ - -fldchgnf:: -	@$(AWK) -f $(srcdir)/fldchgnf.awk $(srcdir)/fldchgnf.in >_$@ -	$(CMP) $(srcdir)/fldchgnf.ok _$@ && rm -f _$@ - -reindops:: -	@$(AWK) -f $(srcdir)/reindops.awk $(srcdir)/reindops.in >_$@ -	$(CMP) $(srcdir)/reindops.ok _$@ && rm -f _$@ - -sprintfc:: -	@$(AWK) -f $(srcdir)/sprintfc.awk $(srcdir)/sprintfc.in >_$@ -	$(CMP) $(srcdir)/sprintfc.ok _$@ && rm -f _$@ - -getlnhd:: -	@$(AWK) -f $(srcdir)/getlnhd.awk >_$@ -	$(CMP) $(srcdir)/getlnhd.ok _$@ && rm -f _$@ - -backgsub:: -	@$(AWK) -f $(srcdir)/backgsub.awk $(srcdir)/backgsub.in >_$@ -	$(CMP) $(srcdir)/backgsub.ok _$@ && rm -f _$@ - -tweakfld:: -	@$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@ -	@rm -f errors.cleanup -	$(CMP) $(srcdir)/tweakfld.ok _$@ && rm -f _$@ - -clsflnam:: -	@$(AWK) -f $(srcdir)/clsflnam.awk $(srcdir)/clsflnam.in >_$@ -	$(CMP) $(srcdir)/clsflnam.ok _$@ && rm -f _$@ - -mmap8k:: -	@$(AWK) '{ print }' $(srcdir)/mmap8k.in >_$@ -	$(CMP) $(srcdir)/mmap8k.in _$@ && rm -f _$@ - -fnarray:: -	@-AWKPATH=$(srcdir) $(AWK) -f fnarray.awk >_$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/fnarray.ok _$@ && rm -f _$@ - -dynlj:: -	@$(AWK) -f $(srcdir)/dynlj.awk >_$@ -	$(CMP) $(srcdir)/dynlj.ok _$@ && rm -f _$@ - -substr:: -	@$(AWK) -f $(srcdir)/substr.awk >_$@ -	$(CMP) $(srcdir)/substr.ok _$@ && rm -f _$@ - -eofsplit:: -	@$(AWK) -f $(srcdir)/eofsplit.awk >_$@ -	$(CMP) $(srcdir)/eofsplit.ok _$@ && rm -f _$@ - -prt1eval:: -	@$(AWK) -f $(srcdir)/prt1eval.awk >_$@ -	$(CMP) $(srcdir)/prt1eval.ok _$@ && rm -f _$@ - -gsubasgn:: -	@-AWKPATH=$(srcdir) $(AWK) -f gsubasgn.awk >_$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/gsubasgn.ok _$@ && rm -f _$@ - -prtoeval:: -	@$(AWK) -f $(srcdir)/prtoeval.awk >_$@ -	$(CMP) $(srcdir)/prtoeval.ok _$@ && rm -f _$@ - -gsubtest:: -	@$(AWK) -f $(srcdir)/gsubtest.awk >_$@ -	$(CMP) $(srcdir)/gsubtest.ok _$@ && rm -f _$@ - -splitwht:: -	@$(AWK) -f $(srcdir)/splitwht.awk >_$@ -	$(CMP) $(srcdir)/splitwht.ok _$@ && rm -f _$@ - -back89:: -	@$(AWK) '/a\8b/' $(srcdir)/back89.in >_$@ -	$(CMP) $(srcdir)/back89.ok _$@ && rm -f _$@ - -tradanch:: -	@$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@ -	$(CMP) $(srcdir)/tradanch.ok _$@ && rm -f _$@ - -nlfldsep:: -	@$(AWK) -f $(srcdir)/nlfldsep.awk $(srcdir)/nlfldsep.in > _$@ -	$(CMP) $(srcdir)/nlfldsep.ok _$@ && rm -f _$@ - -splitvar:: -	@$(AWK) -f $(srcdir)/splitvar.awk $(srcdir)/splitvar.in >_$@ -	$(CMP) $(srcdir)/splitvar.ok _$@ && rm -f _$@ - -intest:: -	@$(AWK) -f $(srcdir)/intest.awk >_$@ -	$(CMP) $(srcdir)/intest.ok _$@ && rm -f _$@ - -# 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:: -	@AWKPATH=$(srcdir) AWK=$(AWK) $(SHELL) $(srcdir)/pid.sh $$$$ > _`basename $@` ; : -	$(CMP) $(srcdir)/pid.ok _`basename $@` && rm -f _`basename $@` _`basename $@`.in - -strftlng:: -	@TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ -	@if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ - 	TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ -	fi -	$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ - -nfldstr:: -	@echo | $(AWK) '$$1 == 0 { print "bug" }' > _$@ -	$(CMP) $(srcdir)/nfldstr.ok _$@ && rm -f _$@ - -nors:: -	@echo A B C D E | tr -d '\12' | $(AWK) '{ print $$NF }' - $(srcdir)/nors.in > _$@ -	$(CMP) $(srcdir)/nors.ok _$@ && rm -f _$@ - -fnarydel:: -	@$(AWK) -f $(srcdir)/fnarydel.awk >_$@ -	$(CMP) $(srcdir)/fnarydel.ok _$@ && rm -f _$@ - -reint:: -	@$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@ -	$(CMP) $(srcdir)/reint.ok _$@ && rm -f _$@ - -noparms:: -	@-AWKPATH=$(srcdir) $(AWK) -f noparms.awk >_$@ 2>&1 || exit 0 -	$(CMP) $(srcdir)/noparms.ok _$@ && rm -f _$@ - -pipeio1:: -	@$(AWK) -f $(srcdir)/pipeio1.awk >_$@ -	@rm -f test1 test2 -	$(CMP) $(srcdir)/pipeio1.ok _$@ && rm -f _$@ - -pipeio2:: -	@$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@ -	$(CMP) $(srcdir)/pipeio2.ok _$@ && rm -f _$@ - -funstack:: -	@$(AWK) -f $(srcdir)/funstack.awk $(srcdir)/funstack.in >_$@ -	$(CMP) $(srcdir)/funstack.ok _$@ && rm -f _$@ - -clobber:: -	@$(AWK) -f $(srcdir)/clobber.awk >_$@ -	$(CMP) $(srcdir)/clobber.ok seq && $(CMP) $(srcdir)/clobber.ok _$@ && rm -f _$@ -	@rm -f seq - -delarprm:: -	@$(AWK) -f $(srcdir)/delarprm.awk >_$@ -	$(CMP) $(srcdir)/delarprm.ok _$@ && rm -f _$@ - -prdupval:: -	@$(AWK) -f $(srcdir)/prdupval.awk $(srcdir)/prdupval.in >_$@ -	$(CMP) $(srcdir)/prdupval.ok _$@ && rm -f _$@ - -nondec:: -	@if grep BITOP ../config.h | grep define > /dev/null; \ -	then \ -		$(AWK) -f $(srcdir)/nondec.awk >_$@; \ -	else \ -		cp $(srcdir)/nondec.ok _$@; \ -	fi -	$(CMP) $(srcdir)/nondec.ok _$@ && rm -f _$@ - -clean: -	rm -fr _* core junk out1 out2 out3 strftime.ok test1 test2 seq *~ - -distclean: clean -	rm -f Makefile - -maintainer-clean: distclean diff --git a/contrib/awk/test/README b/contrib/awk/test/README deleted file mode 100644 index 2343be2f9648..000000000000 --- a/contrib/awk/test/README +++ /dev/null @@ -1,18 +0,0 @@ -Mon 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. diff --git a/contrib/awk/test/anchgsub.awk b/contrib/awk/test/anchgsub.awk deleted file mode 100644 index 52e8aa4dab7d..000000000000 --- a/contrib/awk/test/anchgsub.awk +++ /dev/null @@ -1 +0,0 @@ -{ gsub(/^[ 	]*/, "", $0) ; print } diff --git a/contrib/awk/test/anchgsub.in b/contrib/awk/test/anchgsub.in deleted file mode 100644 index b829d84ee13b..000000000000 --- a/contrib/awk/test/anchgsub.in +++ /dev/null @@ -1 +0,0 @@ -  	This is a test, this is only a test. diff --git a/contrib/awk/test/anchgsub.ok b/contrib/awk/test/anchgsub.ok deleted file mode 100644 index c33dfb95b7cd..000000000000 --- a/contrib/awk/test/anchgsub.ok +++ /dev/null @@ -1 +0,0 @@ -This is a test, this is only a test. diff --git a/contrib/awk/test/argarray.awk b/contrib/awk/test/argarray.awk deleted file mode 100644 index 1960f9bd3b25..000000000000 --- a/contrib/awk/test/argarray.awk +++ /dev/null @@ -1,14 +0,0 @@ -BEGIN { -	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 "\"" -} diff --git a/contrib/awk/test/argarray.in b/contrib/awk/test/argarray.in deleted file mode 100644 index bc93338c8835..000000000000 --- a/contrib/awk/test/argarray.in +++ /dev/null @@ -1 +0,0 @@ -this is a simple test file diff --git a/contrib/awk/test/argarray.ok b/contrib/awk/test/argarray.ok deleted file mode 100644 index 18eb841c695f..000000000000 --- a/contrib/awk/test/argarray.ok +++ /dev/null @@ -1,9 +0,0 @@ -here 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 "-" diff --git a/contrib/awk/test/argtest.awk b/contrib/awk/test/argtest.awk deleted file mode 100644 index e7a1145d07f1..000000000000 --- a/contrib/awk/test/argtest.awk +++ /dev/null @@ -1,4 +0,0 @@ -BEGIN { -	for (i = 0; i < ARGC; i++) -		printf("ARGV[%d] = %s\n", i, ARGV[i]) -} diff --git a/contrib/awk/test/argtest.ok b/contrib/awk/test/argtest.ok deleted file mode 100644 index 591bc641525a..000000000000 --- a/contrib/awk/test/argtest.ok +++ /dev/null @@ -1,4 +0,0 @@ -ARGV[0] = gawk -ARGV[1] = -x -ARGV[2] = -y -ARGV[3] = abc diff --git a/contrib/awk/test/arrayparm.awk b/contrib/awk/test/arrayparm.awk deleted file mode 100644 index d6f34d9640a3..000000000000 --- a/contrib/awk/test/arrayparm.awk +++ /dev/null @@ -1,21 +0,0 @@ -# -# 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; -} diff --git a/contrib/awk/test/arrayparm.ok b/contrib/awk/test/arrayparm.ok deleted file mode 100644 index b315f7cfe67f..000000000000 --- a/contrib/awk/test/arrayparm.ok +++ /dev/null @@ -1 +0,0 @@ -gawk: arrayparm.awk:18: fatal: attempt to use array `foo' in a scalar context diff --git a/contrib/awk/test/arrayref.awk b/contrib/awk/test/arrayref.awk deleted file mode 100644 index 144d41a06872..000000000000 --- a/contrib/awk/test/arrayref.awk +++ /dev/null @@ -1,13 +0,0 @@ -	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 -	} diff --git a/contrib/awk/test/arrayref.ok b/contrib/awk/test/arrayref.ok deleted file mode 100644 index 6ed281c757a9..000000000000 --- a/contrib/awk/test/arrayref.ok +++ /dev/null @@ -1,2 +0,0 @@ -1 -1 diff --git a/contrib/awk/test/asgext.awk b/contrib/awk/test/asgext.awk deleted file mode 100644 index c7f17754fa63..000000000000 --- a/contrib/awk/test/asgext.awk +++ /dev/null @@ -1 +0,0 @@ -{ print $3; $4 = "a"; print } diff --git a/contrib/awk/test/asgext.in b/contrib/awk/test/asgext.in deleted file mode 100644 index 3743b5b464ad..000000000000 --- a/contrib/awk/test/asgext.in +++ /dev/null @@ -1,3 +0,0 @@ -1 2 3 -1 -1 2 3 4 diff --git a/contrib/awk/test/asgext.ok b/contrib/awk/test/asgext.ok deleted file mode 100644 index 2c0df70f4236..000000000000 --- a/contrib/awk/test/asgext.ok +++ /dev/null @@ -1,6 +0,0 @@ -3 -1 2 3 a - -1   a -3 -1 2 3 a diff --git a/contrib/awk/test/awkpath.ok b/contrib/awk/test/awkpath.ok deleted file mode 100644 index 6cffe1b7a956..000000000000 --- a/contrib/awk/test/awkpath.ok +++ /dev/null @@ -1 +0,0 @@ -Found it. diff --git a/contrib/awk/test/back89.in b/contrib/awk/test/back89.in deleted file mode 100644 index b0a88f248e01..000000000000 --- a/contrib/awk/test/back89.in +++ /dev/null @@ -1,2 +0,0 @@ -a8b -a\8b diff --git a/contrib/awk/test/back89.ok b/contrib/awk/test/back89.ok deleted file mode 100644 index e9ea4d5f00cc..000000000000 --- a/contrib/awk/test/back89.ok +++ /dev/null @@ -1 +0,0 @@ -a8b diff --git a/contrib/awk/test/backgsub.awk b/contrib/awk/test/backgsub.awk deleted file mode 100644 index bec735490fc3..000000000000 --- a/contrib/awk/test/backgsub.awk +++ /dev/null @@ -1,4 +0,0 @@ -{ -        gsub( "\\\\", "\\\\") -        print -} diff --git a/contrib/awk/test/backgsub.in b/contrib/awk/test/backgsub.in deleted file mode 100644 index 2d3f17f01844..000000000000 --- a/contrib/awk/test/backgsub.in +++ /dev/null @@ -1 +0,0 @@ -\x\y\z diff --git a/contrib/awk/test/backgsub.ok b/contrib/awk/test/backgsub.ok deleted file mode 100644 index e2e265fac75d..000000000000 --- a/contrib/awk/test/backgsub.ok +++ /dev/null @@ -1 +0,0 @@ -\\x\\y\\z diff --git a/contrib/awk/test/badargs.ok b/contrib/awk/test/badargs.ok deleted file mode 100644 index c89e520f9ad6..000000000000 --- a/contrib/awk/test/badargs.ok +++ /dev/null @@ -1,23 +0,0 @@ -gawk: option requires an argument -- f -Usage: gawk [POSIX or GNU style options] -f progfile [--] file ... -	gawk [POSIX or GNU style options] [--] 'program' file ... -POSIX options:		GNU long options: -	-f progfile		--file=progfile -	-F fs			--field-separator=fs -	-v var=val		--assign=var=val -	-m[fr] val -	-W compat		--compat -	-W copyleft		--copyleft -	-W copyright		--copyright -	-W help			--help -	-W lint			--lint -	-W lint-old		--lint-old -	-W posix		--posix -	-W re-interval		--re-interval -	-W source=program-text	--source=program-text -	-W traditional		--traditional -	-W usage		--usage -	-W version		--version - -Report bugs to bug-gnu-utils@prep.ai.mit.edu, -with a Cc: to arnold@gnu.ai.mit.edu diff --git a/contrib/awk/test/childin.ok b/contrib/awk/test/childin.ok deleted file mode 100644 index 45b983be36b7..000000000000 --- a/contrib/awk/test/childin.ok +++ /dev/null @@ -1 +0,0 @@ -hi diff --git a/contrib/awk/test/clobber.awk b/contrib/awk/test/clobber.awk deleted file mode 100644 index d6635f264fe6..000000000000 --- a/contrib/awk/test/clobber.awk +++ /dev/null @@ -1,98 +0,0 @@ -BEGIN { -	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 <emory!synet.net!imdave> -# 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 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 <set_field>, 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 <set_field>, 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 <Error reading address 0x804d006: No such file or directory> -# (gdb) print buf -# $2 = (char **) 0x37704 -# (gdb) print *buf -# $3 = 0x804d000 <Error reading address 0x804d000: No such file or directory> -# (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 diff --git a/contrib/awk/test/clobber.ok b/contrib/awk/test/clobber.ok deleted file mode 100644 index 71057085a907..000000000000 --- a/contrib/awk/test/clobber.ok +++ /dev/null @@ -1 +0,0 @@ -000801
\ No newline at end of file diff --git a/contrib/awk/test/clsflnam.awk b/contrib/awk/test/clsflnam.awk deleted file mode 100644 index 53928912648f..000000000000 --- a/contrib/awk/test/clsflnam.awk +++ /dev/null @@ -1,12 +0,0 @@ -#! /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 } - diff --git a/contrib/awk/test/clsflnam.in b/contrib/awk/test/clsflnam.in deleted file mode 100644 index a92d664bc20a..000000000000 --- a/contrib/awk/test/clsflnam.in +++ /dev/null @@ -1,3 +0,0 @@ -line 1 -line 2 -line 3 diff --git a/contrib/awk/test/clsflnam.ok b/contrib/awk/test/clsflnam.ok deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/contrib/awk/test/clsflnam.ok +++ /dev/null diff --git a/contrib/awk/test/compare.awk b/contrib/awk/test/compare.awk deleted file mode 100644 index 39a88f317adc..000000000000 --- a/contrib/awk/test/compare.awk +++ /dev/null @@ -1,13 +0,0 @@ -BEGIN { -	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 -} diff --git a/contrib/awk/test/compare.in b/contrib/awk/test/compare.in deleted file mode 100644 index 1ab098bc4544..000000000000 --- a/contrib/awk/test/compare.in +++ /dev/null @@ -1,4 +0,0 @@ -0 -1 -0 1 - diff --git a/contrib/awk/test/compare.ok b/contrib/awk/test/compare.ok deleted file mode 100644 index 8241359bf0e9..000000000000 --- a/contrib/awk/test/compare.ok +++ /dev/null @@ -1,5 +0,0 @@ -2 -zero -1 -1 -0 1 diff --git a/contrib/awk/test/convfmt.awk b/contrib/awk/test/convfmt.awk deleted file mode 100644 index 90fd204b2fc3..000000000000 --- a/contrib/awk/test/convfmt.awk +++ /dev/null @@ -1,10 +0,0 @@ -BEGIN { -	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 -} diff --git a/contrib/awk/test/convfmt.ok b/contrib/awk/test/convfmt.ok deleted file mode 100644 index a7b66f785759..000000000000 --- a/contrib/awk/test/convfmt.ok +++ /dev/null @@ -1,3 +0,0 @@ -a = 123.46 -a = 123.456 -a = 123.456 diff --git a/contrib/awk/test/defref.awk b/contrib/awk/test/defref.awk deleted file mode 100644 index b4e8f1078214..000000000000 --- a/contrib/awk/test/defref.awk +++ /dev/null @@ -1 +0,0 @@ -BEGIN { foo() } diff --git a/contrib/awk/test/defref.ok b/contrib/awk/test/defref.ok deleted file mode 100644 index f833c961f791..000000000000 --- a/contrib/awk/test/defref.ok +++ /dev/null @@ -1,2 +0,0 @@ -gawk: defref.awk:2: warning: function `foo' called but never defined -gawk: defref.awk:1: fatal: function `foo' not defined diff --git a/contrib/awk/test/delarprm.awk b/contrib/awk/test/delarprm.awk deleted file mode 100644 index d59de31f77cb..000000000000 --- a/contrib/awk/test/delarprm.awk +++ /dev/null @@ -1,50 +0,0 @@ -# From dragon!unagi.cis.upenn.edu!sjanet Tue Mar 25 17:12:20 1997 -# Return-Path: <dragon!unagi.cis.upenn.edu!sjanet> -# Received: by skeeve.atl.ga.us (/\==/\ Smail3.1.22.1 #22.1) -# 	id <m0w9eS4-000GWyC@skeeve.atl.ga.us>; 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 <bug-gnu-utils@prep.ai.mit.edu>; 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 <sjanet@unagi.cis.upenn.edu> -# 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 diff --git a/contrib/awk/test/delarprm.ok b/contrib/awk/test/delarprm.ok deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/contrib/awk/test/delarprm.ok +++ /dev/null diff --git a/contrib/awk/test/dynlj.awk b/contrib/awk/test/dynlj.awk deleted file mode 100644 index ec6851bb1702..000000000000 --- a/contrib/awk/test/dynlj.awk +++ /dev/null @@ -1 +0,0 @@ -BEGIN { printf "%*sworld\n", -20, "hello" } diff --git a/contrib/awk/test/dynlj.ok b/contrib/awk/test/dynlj.ok deleted file mode 100644 index c8f3fe9d149b..000000000000 --- a/contrib/awk/test/dynlj.ok +++ /dev/null @@ -1 +0,0 @@ -hello               world diff --git a/contrib/awk/test/eofsplit.awk b/contrib/awk/test/eofsplit.awk deleted file mode 100644 index 22042b4471fb..000000000000 --- a/contrib/awk/test/eofsplit.awk +++ /dev/null @@ -1,68 +0,0 @@ -# Date: 	Sat, 30 Mar 1996 12:47:17 -0800 (PST) -# From: Charles Howes <chowes@grid.direct.ca> -# 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 diff --git a/contrib/awk/test/eofsplit.ok b/contrib/awk/test/eofsplit.ok deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/contrib/awk/test/eofsplit.ok +++ /dev/null diff --git a/contrib/awk/test/fflush.ok b/contrib/awk/test/fflush.ok deleted file mode 100644 index 4cf0df6c2c8e..000000000000 --- a/contrib/awk/test/fflush.ok +++ /dev/null @@ -1,16 +0,0 @@ -1st -2nd -1st -2nd -1st -2nd -1st -2nd -1st -2nd -1st -2nd -1st -2nd -1st -2nd diff --git a/contrib/awk/test/fflush.sh b/contrib/awk/test/fflush.sh deleted file mode 100755 index 42d624c91491..000000000000 --- a/contrib/awk/test/fflush.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /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 diff --git a/contrib/awk/test/fieldwdth.ok b/contrib/awk/test/fieldwdth.ok deleted file mode 100644 index 51b4008129ff..000000000000 --- a/contrib/awk/test/fieldwdth.ok +++ /dev/null @@ -1 +0,0 @@ -345 diff --git a/contrib/awk/test/fldchg.awk b/contrib/awk/test/fldchg.awk deleted file mode 100644 index a8018f7859e8..000000000000 --- a/contrib/awk/test/fldchg.awk +++ /dev/null @@ -1,8 +0,0 @@ -{ -#	print "0:", $0 -	gsub("aa", "+") -	print "1:", $0 -	$3 = "<" $3 ">" -	print "2:", $0 -	print "2a:" "%" $1 "%" $2 "%" $3 "%" $4 "%" $5 -} diff --git a/contrib/awk/test/fldchg.in b/contrib/awk/test/fldchg.in deleted file mode 100644 index f500c36acd6f..000000000000 --- a/contrib/awk/test/fldchg.in +++ /dev/null @@ -1 +0,0 @@ -aa aab c d e f diff --git a/contrib/awk/test/fldchg.ok b/contrib/awk/test/fldchg.ok deleted file mode 100644 index cc5032a8f6ae..000000000000 --- a/contrib/awk/test/fldchg.ok +++ /dev/null @@ -1,3 +0,0 @@ -1: + +b c d e f -2: + +b <c> d e f -2a:%+%+b%<c>%d%e diff --git a/contrib/awk/test/fldchgnf.awk b/contrib/awk/test/fldchgnf.awk deleted file mode 100644 index fbb8f118a70c..000000000000 --- a/contrib/awk/test/fldchgnf.awk +++ /dev/null @@ -1 +0,0 @@ -{ OFS = ":"; $2 = ""; print $0; print NF } diff --git a/contrib/awk/test/fldchgnf.in b/contrib/awk/test/fldchgnf.in deleted file mode 100644 index 8e13e468a002..000000000000 --- a/contrib/awk/test/fldchgnf.in +++ /dev/null @@ -1 +0,0 @@ -a b c d diff --git a/contrib/awk/test/fldchgnf.ok b/contrib/awk/test/fldchgnf.ok deleted file mode 100644 index 10b38eddf1d4..000000000000 --- a/contrib/awk/test/fldchgnf.ok +++ /dev/null @@ -1,2 +0,0 @@ -a::c:d -4 diff --git a/contrib/awk/test/fnarray.awk b/contrib/awk/test/fnarray.awk deleted file mode 100644 index 92a18b98eab0..000000000000 --- a/contrib/awk/test/fnarray.awk +++ /dev/null @@ -1,7 +0,0 @@ -function foo(N) { -  return 0 -} -BEGIN { -  Num = foo[c] -} - diff --git a/contrib/awk/test/fnarray.ok b/contrib/awk/test/fnarray.ok deleted file mode 100644 index 94beacdd5360..000000000000 --- a/contrib/awk/test/fnarray.ok +++ /dev/null @@ -1 +0,0 @@ -gawk: fnarray.awk:5: fatal: attempt to use function `foo' as array diff --git a/contrib/awk/test/fnarydel.awk b/contrib/awk/test/fnarydel.awk deleted file mode 100644 index 8a1264cbed64..000000000000 --- a/contrib/awk/test/fnarydel.awk +++ /dev/null @@ -1,60 +0,0 @@ -#!/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" -} diff --git a/contrib/awk/test/fnarydel.ok b/contrib/awk/test/fnarydel.ok deleted file mode 100644 index 7f3e45312ea3..000000000000 --- a/contrib/awk/test/fnarydel.ok +++ /dev/null @@ -1,27 +0,0 @@ -first 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 diff --git a/contrib/awk/test/fsbs.in b/contrib/awk/test/fsbs.in deleted file mode 100644 index 0a102c32d6c5..000000000000 --- a/contrib/awk/test/fsbs.in +++ /dev/null @@ -1 +0,0 @@ -1\2 diff --git a/contrib/awk/test/fsbs.ok b/contrib/awk/test/fsbs.ok deleted file mode 100644 index 8d04f961a037..000000000000 --- a/contrib/awk/test/fsbs.ok +++ /dev/null @@ -1 +0,0 @@ -1 2 diff --git a/contrib/awk/test/fsrs.awk b/contrib/awk/test/fsrs.awk deleted file mode 100644 index a0014891a28f..000000000000 --- a/contrib/awk/test/fsrs.awk +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN { -       RS=""; FS="\n"; -       ORS=""; OFS="\n"; -      } -{ -        split ($2,f," ") -        print $0; -} diff --git a/contrib/awk/test/fsrs.in b/contrib/awk/test/fsrs.in deleted file mode 100644 index 4b49d81c716e..000000000000 --- a/contrib/awk/test/fsrs.in +++ /dev/null @@ -1,7 +0,0 @@ -a b -c d -e f - -1 2 -3 4 -5 6 diff --git a/contrib/awk/test/fsrs.ok b/contrib/awk/test/fsrs.ok deleted file mode 100644 index 7dafd658fcad..000000000000 --- a/contrib/awk/test/fsrs.ok +++ /dev/null @@ -1,5 +0,0 @@ -a b -c d -e f1 2 -3 4 -5 6
\ No newline at end of file diff --git a/contrib/awk/test/fstabplus.awk b/contrib/awk/test/fstabplus.awk deleted file mode 100644 index 748a44f42aa0..000000000000 --- a/contrib/awk/test/fstabplus.awk +++ /dev/null @@ -1,2 +0,0 @@ -BEGIN   { FS = "\t+" } -        { print $1, $2 } diff --git a/contrib/awk/test/fstabplus.ok b/contrib/awk/test/fstabplus.ok deleted file mode 100644 index 8d04f961a037..000000000000 --- a/contrib/awk/test/fstabplus.ok +++ /dev/null @@ -1 +0,0 @@ -1 2 diff --git a/contrib/awk/test/funstack.awk b/contrib/awk/test/funstack.awk deleted file mode 100644 index ab85b45eec5b..000000000000 --- a/contrib/awk/test/funstack.awk +++ /dev/null @@ -1,977 +0,0 @@ -### ==================================================================== -###  @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 -###                        <at>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) "<BR>") -		} -		html_end_toc() -		html_begin_issue() -		print_line(prefix(2) Journal "<BR>") -	} -	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) "<HR>") -	print_line("") -	print_line(prefix(2) "<H1>") -	print_line(prefix(3) "<A NAME=\"" html_label() "\">") -} - - -function html_begin_pages() -{ -	return ((HTML && (BIBFILEURL != "")) ? ("<A HREF=\"" BIBFILEURL "#" Citation_label "\">") : "") -} - - -function html_begin_pre() -{ -	In_PRE = 1 -	print_line("<PRE>") -} - - -function html_begin_title() -{ -	return ((HTML && (Url != "")) ? ("<A HREF=\"" 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) "</A>") -	print_line(prefix(2) "</H1>") -} - - -function html_end_pages() -{ -	return ((HTML && (BIBFILEURL != "")) ? "</A>" : "") -} - - -function html_end_pre() -{ -	if (In_PRE) -	{ -		print_line("</PRE>") -		In_PRE = 0 -	} -} - - -function html_end_title() -{ -	return ((HTML && (Url != "")) ? "</A>" : "") -} - - -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 -> <TAG>arg</TAG> -					arg = "<" Font_decl_map[control_word] ">" arg "</" Font_decl_map[control_word] ">" -				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 -> <TAG>arg</TAG> -					arg = "<" Font_cmd_map[control_word] ">" arg "</" Font_cmd_map[control_word] ">" -				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 "<!-- WARNING: Do NOT edit this file.  It was converted from -->" -	print "<!-- BibTeX format to HTML by journal-toc.awk version " VERSION_NUMBER " " VERSION_DATE " -->" -	print "<!-- on " DATE " -->" -	print "<!-- for " PERSONAL_NAME " (" USER "@" HOSTNAME ") -->" -	print "" -	print "" -	print "<!DOCTYPE HTML public \"-//IETF//DTD HTML//EN\">" -	print "" -	print "<HTML>" -	print prefix(1) "<HEAD>" -	print prefix(2) "<TITLE>" -	print prefix(3)  Journal -	print prefix(2) "</TITLE>" -	print prefix(2) "<LINK REV=\"made\" HREF=\"mailto:" USER "@" HOSTNAME "\">" -	print prefix(1) "</HEAD>" -	print "" -	print prefix(1) "<BODY>" -} - - -function html_label( label) -{ -	label = Volume "(" Number "):" Month ":" Year -	gsub(/[^A-Za-z0-9():,;.\/\-]/,"",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 -	} -	return (length(s)) -} - - -function html_toc() -{ -	print prefix(2) "<H1>" -	print prefix(3) "Table of contents for issues of " Journal -	print prefix(2) "</H1>" -	print HTML_TOC -} - - -function html_toc_entry() -{ -	HTML_TOC = HTML_TOC "        <A HREF=\"#" html_label() "\">" -	HTML_TOC = HTML_TOC vol_no_month_year() -	HTML_TOC = HTML_TOC "</A><BR>" "\n" -} - - -function html_trailer() -{ -	html_end_pre() -	print prefix(1) "</BODY>" -	print "</HTML>" -} - - -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) -    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(/</,	"\\<",	s) -	    gsub(/"/,	"\\"",	s) -	} - -	gsub(/[$][$]/,"$$",s)	# change display math to triple dollars for split -	n = split(s,parts,/[$]/)# split into non-math (odd) and math (even) parts - -	s = "" -	for (k = 1; k <= n; ++k) # unbrace non-math part, leaving math mode intact -		s = s ((k > 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(/\\[^A-Za-z]/,"",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 ? ("<STRONG>" value "</STRONG>") : value) -} diff --git a/contrib/awk/test/funstack.in b/contrib/awk/test/funstack.in deleted file mode 100644 index 7a29a254a395..000000000000 --- a/contrib/awk/test/funstack.in +++ /dev/null @@ -1,206 +0,0 @@ -%%% ==================================================================== -%%%  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 <at>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.", -} diff --git a/contrib/awk/test/funstack.ok b/contrib/awk/test/funstack.ok deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/contrib/awk/test/funstack.ok +++ /dev/null diff --git a/contrib/awk/test/gensub.awk b/contrib/awk/test/gensub.awk deleted file mode 100644 index f91d84dc4c8e..000000000000 --- a/contrib/awk/test/gensub.awk +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN { 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") } diff --git a/contrib/awk/test/gensub.in b/contrib/awk/test/gensub.in deleted file mode 100644 index 96c9fafc727a..000000000000 --- a/contrib/awk/test/gensub.in +++ /dev/null @@ -1,2 +0,0 @@ -a b c a b c a b c -a b c a b c a b c diff --git a/contrib/awk/test/gensub.ok b/contrib/awk/test/gensub.ok deleted file mode 100644 index b9ea3dece06e..000000000000 --- a/contrib/awk/test/gensub.ok +++ /dev/null @@ -1,4 +0,0 @@ -3 = <gawk>, 2 = <test>, 1 = <this> -a b c a BB c a b c -a b CC a b CC a b CC -DON'T PANIC diff --git a/contrib/awk/test/getline.awk b/contrib/awk/test/getline.awk deleted file mode 100644 index f4e413f936a5..000000000000 --- a/contrib/awk/test/getline.awk +++ /dev/null @@ -1 +0,0 @@ -BEGIN { while( getline > 0) { print } } diff --git a/contrib/awk/test/getline.ok b/contrib/awk/test/getline.ok deleted file mode 100644 index 9b7f2b90efee..000000000000 --- a/contrib/awk/test/getline.ok +++ /dev/null @@ -1,2 +0,0 @@ -BEGIN { while( getline > 0) { print } } -BEGIN { while( getline > 0) { print } } diff --git a/contrib/awk/test/getlnhd.awk b/contrib/awk/test/getlnhd.awk deleted file mode 100644 index f0f801b2657e..000000000000 --- a/contrib/awk/test/getlnhd.awk +++ /dev/null @@ -1,10 +0,0 @@ -BEGIN { pipe =      "cat <<EOF\n" -        pipe = pipe "select * from user\n" -        pipe = pipe "  where Name = 'O\\'Donell'\n" -        pipe = pipe "EOF\n" -         -        while ((pipe | getline) > 0) -                print -         -        exit 0 -}        diff --git a/contrib/awk/test/getlnhd.ok b/contrib/awk/test/getlnhd.ok deleted file mode 100644 index d8cb4530159d..000000000000 --- a/contrib/awk/test/getlnhd.ok +++ /dev/null @@ -1,2 +0,0 @@ -select * from user -  where Name = 'O\'Donell' diff --git a/contrib/awk/test/gnureops.awk b/contrib/awk/test/gnureops.awk deleted file mode 100644 index 15b9b841e2ca..000000000000 --- a/contrib/awk/test/gnureops.awk +++ /dev/null @@ -1,45 +0,0 @@ -# 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" ~ /\<word/)	print "test  6 ok (\\<)" -	else				print "test  6 failed (\\<)" -	if ("foreword" !~ /\<word/)	print "test  7 ok (\\<)" -	else				print "test  7 failed (\\<)" - -	if ("a word" ~ /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 (\\')" -} diff --git a/contrib/awk/test/gnureops.ok b/contrib/awk/test/gnureops.ok deleted file mode 100644 index 0fb5f504b208..000000000000 --- a/contrib/awk/test/gnureops.ok +++ /dev/null @@ -1,17 +0,0 @@ -test  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 (\') diff --git a/contrib/awk/test/gsubasgn.awk b/contrib/awk/test/gsubasgn.awk deleted file mode 100644 index f0b770127b61..000000000000 --- a/contrib/awk/test/gsubasgn.awk +++ /dev/null @@ -1,13 +0,0 @@ -# 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("") } diff --git a/contrib/awk/test/gsubasgn.ok b/contrib/awk/test/gsubasgn.ok deleted file mode 100644 index dfa6fbc72f09..000000000000 --- a/contrib/awk/test/gsubasgn.ok +++ /dev/null @@ -1,4 +0,0 @@ -gawk: 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 diff --git a/contrib/awk/test/gsubtest.awk b/contrib/awk/test/gsubtest.awk deleted file mode 100755 index 3137479577de..000000000000 --- a/contrib/awk/test/gsubtest.awk +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN { -	str = "abc"; gsub("b+", "FOO", str); print str -	str = "abc"; gsub("x*", "X", str); print str -	str = "abc"; gsub("b*", "X", str); print str -	str = "abc"; gsub("c", "X", str); print str -	str = "abc"; gsub("c+", "X", str); print str -	str = "abc"; gsub("x*$", "X", str); print str -} diff --git a/contrib/awk/test/gsubtest.ok b/contrib/awk/test/gsubtest.ok deleted file mode 100644 index 191bebda4310..000000000000 --- a/contrib/awk/test/gsubtest.ok +++ /dev/null @@ -1,6 +0,0 @@ -aFOOc -XaXbXcX -XaXcX -abX -abX -abcX diff --git a/contrib/awk/test/igncfs.awk b/contrib/awk/test/igncfs.awk deleted file mode 100644 index ebb58b2409ac..000000000000 --- a/contrib/awk/test/igncfs.awk +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN   { -        IGNORECASE=1 -        FS="[^a-z]+" -} -{ -        for (i=1; i<NF; i++) printf "%s, ", $i -        printf "%s\n", $NF -} diff --git a/contrib/awk/test/igncfs.in b/contrib/awk/test/igncfs.in deleted file mode 100644 index 559801723efa..000000000000 --- a/contrib/awk/test/igncfs.in +++ /dev/null @@ -1,2 +0,0 @@ -this is handled ok -This is Not hanDLed Well diff --git a/contrib/awk/test/igncfs.ok b/contrib/awk/test/igncfs.ok deleted file mode 100644 index 41df9a4ca6cd..000000000000 --- a/contrib/awk/test/igncfs.ok +++ /dev/null @@ -1,2 +0,0 @@ -this, is, handled, ok -This, is, Not, hanDLed, Well diff --git a/contrib/awk/test/ignrcase.ok b/contrib/awk/test/ignrcase.ok deleted file mode 100644 index d66e95ca507e..000000000000 --- a/contrib/awk/test/ignrcase.ok +++ /dev/null @@ -1 +0,0 @@ -xz diff --git a/contrib/awk/test/inftest.awk b/contrib/awk/test/inftest.awk deleted file mode 100644 index ec0eda13e214..000000000000 --- a/contrib/awk/test/inftest.awk +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { -  x = 100 -  do { y = x ; x *= 1000; print x,y } while ( y != x ) -  print "loop terminated" -} diff --git a/contrib/awk/test/inftest.ok b/contrib/awk/test/inftest.ok deleted file mode 100644 index 83a93d018edd..000000000000 --- a/contrib/awk/test/inftest.ok +++ /dev/null @@ -1,105 +0,0 @@ -100000 100 -100000000 100000 -1e+11 100000000 -1e+14 1e+11 -1e+17 1e+14 -1e+20 1e+17 -1e+23 1e+20 -1e+26 1e+23 -1e+29 1e+26 -1e+32 1e+29 -1e+35 1e+32 -1e+38 1e+35 -1e+41 1e+38 -1e+44 1e+41 -1e+47 1e+44 -1e+50 1e+47 -1e+53 1e+50 -1e+56 1e+53 -1e+59 1e+56 -1e+62 1e+59 -1e+65 1e+62 -1e+68 1e+65 -1e+71 1e+68 -1e+74 1e+71 -1e+77 1e+74 -1e+80 1e+77 -1e+83 1e+80 -1e+86 1e+83 -1e+89 1e+86 -1e+92 1e+89 -1e+95 1e+92 -1e+98 1e+95 -1e+101 1e+98 -1e+104 1e+101 -1e+107 1e+104 -1e+110 1e+107 -1e+113 1e+110 -1e+116 1e+113 -1e+119 1e+116 -1e+122 1e+119 -1e+125 1e+122 -1e+128 1e+125 -1e+131 1e+128 -1e+134 1e+131 -1e+137 1e+134 -1e+140 1e+137 -1e+143 1e+140 -1e+146 1e+143 -1e+149 1e+146 -1e+152 1e+149 -1e+155 1e+152 -1e+158 1e+155 -1e+161 1e+158 -1e+164 1e+161 -1e+167 1e+164 -1e+170 1e+167 -1e+173 1e+170 -1e+176 1e+173 -1e+179 1e+176 -1e+182 1e+179 -1e+185 1e+182 -1e+188 1e+185 -1e+191 1e+188 -1e+194 1e+191 -1e+197 1e+194 -1e+200 1e+197 -1e+203 1e+200 -1e+206 1e+203 -1e+209 1e+206 -1e+212 1e+209 -1e+215 1e+212 -1e+218 1e+215 -1e+221 1e+218 -1e+224 1e+221 -1e+227 1e+224 -1e+230 1e+227 -1e+233 1e+230 -1e+236 1e+233 -1e+239 1e+236 -1e+242 1e+239 -1e+245 1e+242 -1e+248 1e+245 -1e+251 1e+248 -1e+254 1e+251 -1e+257 1e+254 -1e+260 1e+257 -1e+263 1e+260 -1e+266 1e+263 -1e+269 1e+266 -1e+272 1e+269 -1e+275 1e+272 -1e+278 1e+275 -1e+281 1e+278 -1e+284 1e+281 -1e+287 1e+284 -1e+290 1e+287 -1e+293 1e+290 -1e+296 1e+293 -1e+299 1e+296 -1e+302 1e+299 -1e+305 1e+302 -1e+308 1e+305 -Inf 1e+308 -Inf Inf -loop terminated diff --git a/contrib/awk/test/intest.awk b/contrib/awk/test/intest.awk deleted file mode 100644 index f030d07a41f0..000000000000 --- a/contrib/awk/test/intest.awk +++ /dev/null @@ -1,4 +0,0 @@ -BEGIN { -	bool = ((b = 1) in c); -	print bool, b	# gawk-3.0.1 prints "0 "; should print "0 1" -}  diff --git a/contrib/awk/test/intest.ok b/contrib/awk/test/intest.ok deleted file mode 100644 index 6e8183b72e5e..000000000000 --- a/contrib/awk/test/intest.ok +++ /dev/null @@ -1 +0,0 @@ -0 1 diff --git a/contrib/awk/test/intprec.awk b/contrib/awk/test/intprec.awk deleted file mode 100644 index 978e9eacc63b..000000000000 --- a/contrib/awk/test/intprec.awk +++ /dev/null @@ -1 +0,0 @@ -BEGIN { printf "%.10d:%.10x\n", 5, 14 } diff --git a/contrib/awk/test/intprec.ok b/contrib/awk/test/intprec.ok deleted file mode 100644 index 8783fac1fab0..000000000000 --- a/contrib/awk/test/intprec.ok +++ /dev/null @@ -1 +0,0 @@ -0000000005:000000000e diff --git a/contrib/awk/test/lib/awkpath.awk b/contrib/awk/test/lib/awkpath.awk deleted file mode 100644 index 6663ca4b379f..000000000000 --- a/contrib/awk/test/lib/awkpath.awk +++ /dev/null @@ -1 +0,0 @@ -BEGIN { print "Found it." } diff --git a/contrib/awk/test/litoct.awk b/contrib/awk/test/litoct.awk deleted file mode 100644 index 5cfc1284463a..000000000000 --- a/contrib/awk/test/litoct.awk +++ /dev/null @@ -1 +0,0 @@ -{ if (/a\52b/) print "match" ; else print "no match" } diff --git a/contrib/awk/test/litoct.ok b/contrib/awk/test/litoct.ok deleted file mode 100644 index 4c0be978325e..000000000000 --- a/contrib/awk/test/litoct.ok +++ /dev/null @@ -1 +0,0 @@ -no match diff --git a/contrib/awk/test/longwrds.awk b/contrib/awk/test/longwrds.awk deleted file mode 100644 index f6a7816d30cf..000000000000 --- a/contrib/awk/test/longwrds.awk +++ /dev/null @@ -1,20 +0,0 @@ -# From Gawk Manual modified by bug fix and removal of punctuation -# Record every word which is used at least once -{ -	for (i = 1; i <= NF; i++) { -		tmp = tolower($i) -		if (0 != (pos = match(tmp, /([a-z]|-)+/))) -			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 -		} -	print num_long_words, "long words" -} diff --git a/contrib/awk/test/longwrds.ok b/contrib/awk/test/longwrds.ok deleted file mode 100644 index 01faa84717eb..000000000000 --- a/contrib/awk/test/longwrds.ok +++ /dev/null @@ -1,21 +0,0 @@ -20 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 diff --git a/contrib/awk/test/manpage b/contrib/awk/test/manpage deleted file mode 100644 index 09c39485c634..000000000000 --- a/contrib/awk/test/manpage +++ /dev/null @@ -1,200 +0,0 @@ -.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 diff --git a/contrib/awk/test/manyfiles.awk b/contrib/awk/test/manyfiles.awk deleted file mode 100644 index 8651a3a46d69..000000000000 --- a/contrib/awk/test/manyfiles.awk +++ /dev/null @@ -1 +0,0 @@ -{ print $2 > ("junk/" $1) } diff --git a/contrib/awk/test/math.awk b/contrib/awk/test/math.awk deleted file mode 100644 index 90a01dd83588..000000000000 --- a/contrib/awk/test/math.awk +++ /dev/null @@ -1,10 +0,0 @@ -BEGIN { -	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) -} diff --git a/contrib/awk/test/math.ok b/contrib/awk/test/math.ok deleted file mode 100644 index a396a5b3b4ce..000000000000 --- a/contrib/awk/test/math.ok +++ /dev/null @@ -1,6 +0,0 @@ -cos(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 diff --git a/contrib/awk/test/messages.awk b/contrib/awk/test/messages.awk deleted file mode 100644 index 555f6e3856fc..000000000000 --- a/contrib/awk/test/messages.awk +++ /dev/null @@ -1,9 +0,0 @@ -# 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" -} diff --git a/contrib/awk/test/mmap8k.in b/contrib/awk/test/mmap8k.in deleted file mode 100644 index 0500ddf2f5fe..000000000000 --- a/contrib/awk/test/mmap8k.in +++ /dev/null @@ -1,143 +0,0 @@ -XXXXXXXX.com   ALTERNET    9305 930528  1500.00 startup -XXXXXXXX.com   ALTERNET    9305 930624    94.38 Line-9305 -XXXXXXXX.com   ALTERNET    9306 930624   104.49 Line-9306 -XXXXXXXX.com   ALTERNET    9306 930624   649.16 Line-install -XXXXXXXX.com   ALTERNET    9306 930624   166.67 TCP-slip -XXXXXXXX.com   ALTERNET    9307 930624   104.49 Line-9307 -XXXXXXXX.com   ALTERNET    9307 930624   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9308 930701   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9308 930701   104.49 line-9308 -XXXXXXXX.com   PAYMENT     9307 930731  1500.00 1870 -XXXXXXXX.com   ALTERNET    9309 930801   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9309 930801   104.49 line-9309 -XXXXXXXX.com   INTEREST    9307 930801    22.50 -XXXXXXXX.com   CREDADJ     9308 930805    22.50 waive interest -XXXXXXXX.com   PAYMENT     9308 930820  1723.68 1982 -XXXXXXXX.com   ALTERNET    9310 930901   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9310 930901   104.49 line-9310 -XXXXXXXX.com   PAYMENT     9310 931001   708.98 2313 -XXXXXXXX.com   ALTERNET    9311 931001   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9311 931001   104.49 line-9311 -XXXXXXXX.com   INTEREST    9309 931001     5.32 -XXXXXXXX.com   CREDADJ     9310 931007     5.32 waive int-9309 -XXXXXXXX.com   ALTERNET    9312 931101   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9312 931101   104.49 line-9312 -XXXXXXXX.com   PAYMENT     9311 931120   354.49 002701 -XXXXXXXX.com   ALTERNET    9401 931201   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9401 931201   104.49 line-9401 -XXXXXXXX.com   PAYMENT     9312 931218   354.49 2884 -XXXXXXXX.com   ALTERNET    9402 940101   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9402 940101   104.49 line-9402 -XXXXXXXX.com   INTEREST    9312 940101     5.32 -XXXXXXXX.com   PAYMENT     9401 940122   354.49 3084 -XXXXXXXX.com   ALTERNET    9403 940201   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9403 940201   104.49 line-9403 -XXXXXXXX.com   INTEREST    9401 940201     5.40 -XXXXXXXX.com   PAYMENT     9402 940207   354.49 3140 -XXXXXXXX.com   CREDADJ     9402 940211     5.32 interest-9402 -XXXXXXXX.com   CREDADJ     9402 940211     5.40 interest-9403 -XXXXXXXX.com   ALTERNET    9404 940301   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9404 940301   104.49 line-9404 -XXXXXXXX.com   INTEREST    9402 940301     5.32 -XXXXXXXX.com   PAYMENT     9403 940310   354.49 003307 -XXXXXXXX.com   PAYMENT     9403 940324   354.49 3446 -XXXXXXXX.com   ALTERNET    9405 940401   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9405 940401   104.49 line-9405 -XXXXXXXX.com   ALTERNET    9406 940501   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9406 940501   104.49 line-9406 -XXXXXXXX.com   INTEREST    9404 940501     5.40 -XXXXXXXX.com   PAYMENT     9405 940509   359.81 003819 -XXXXXXXX.com   ALTERNET    9407 940601   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9407 940601   104.49 line-9407 -XXXXXXXX.com   INTEREST    9405 940601     5.40 -XXXXXXXX.com   PAYMENT     9406 940603   354.49 004025 -XXXXXXXX.com   ALTERNET    9408 940701   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9408 940701   104.49 line-9408 -XXXXXXXX.com   INTEREST    9406 940701     5.48 -XXXXXXXX.com   PAYMENT     9407 940725   354.49 004350 -XXXXXXXX.com   ALTERNET    9409 940801   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9409 940801   104.49 line-9409 -XXXXXXXX.com   INTEREST    9407 940801     5.56 -XXXXXXXX.com   PAYMENT     9408 940808   354.49 004454 -XXXXXXXX.com   ALTERNET    9409 940811     0.00 startup -XXXXXXXX.com   EQUIPMENT   9408 940831   399.00 ATL6402-1 -XXXXXXXX.com   EQUIPMENT   9408 940831  2295.00 NBClassicPac-1 -XXXXXXXX.com   EQUIPMENT   9408 940831  1060.00 Syn35-1+ship -XXXXXXXX.com   ALTERNET    9410 940901   250.00 TCP-slip -XXXXXXXX.com   ALTERNET    9410 940901   104.49 line-9410 -XXXXXXXX.com   INTEREST    9408 940901     5.64 -XXXXXXXX.com   PAYMENT     9409 940906   354.49 004677 -XXXXXXXX.com   CREDADJ     9409 940921   124.95 TCP-slip-9409 -XXXXXXXX.com   CREDADJ     9409 940921    52.20 line-9409 -XXXXXXXX.com   CREDADJ     9410 940921   250.00 TCP-slip-9410 -XXXXXXXX.com   CREDADJ     9410 940921   104.49 line-9410 -XXXXXXXX.com   ALTERNET    9409 940921   397.50 TCP-56k-local recon -XXXXXXXX.com   ALTERNET    9409 940921    87.45 line-9409 recon -XXXXXXXX.com   ALTERNET    9410 940921   795.00 TCP-56k-local recon -XXXXXXXX.com   ALTERNET    9410 940921   174.90 line-9410 recon -XXXXXXXX.com   ALTERNET    9411 941001   795.00 TCP-56k-local -XXXXXXXX.com   ALTERNET    9411 941001   174.90 line-9411 -XXXXXXXX.com   INTEREST    9409 941001    54.06 -XXXXXXXX.com   PAYMENT     9410 941017   354.49 5026 -XXXXXXXX.com   ALTERNET    9412 941101   795.00 TCP-56k-local -XXXXXXXX.com   ALTERNET    9412 941101   174.90 line-9412 -XXXXXXXX.com   INTEREST    9410 941101    85.93 -XXXXXXXX.com   PAYMENT     9411 941114   969.90 005274 -XXXXXXXX.com   ALTERNET    9501 941201   795.00 TCP-56k-local -XXXXXXXX.com   ALTERNET    9501 941201   174.90 line-9501 -XXXXXXXX.com   INTEREST    9411 941201    87.22 -XXXXXXXX.com   PAYMENT     9412 941219  4723.90 5590 -XXXXXXXX.com   ALTERNET    9502 950101   795.00 TCP-56k-local -XXXXXXXX.com   ALTERNET    9502 950101   174.90 line-9502 -XXXXXXXX.com   INTEREST    9412 950101    32.22 -XXXXXXXX.com   PAYMENT     9501 950103  1893.11 5766 -XXXXXXXX.com   ALTERNET    9503 950201   795.00 TCP-56k-local-old -XXXXXXXX.com   ALTERNET    9503 950201   174.90 line-9503 -XXXXXXXX.com   INTEREST    9501 950201    18.85 -XXXXXXXX.com   PAYMENT     9502 950207   969.90 6044 -XXXXXXXX.com   ALTERNET    9504 950301   795.00 TCP-56k-local-old -XXXXXXXX.com   ALTERNET    9504 950301   174.90 line-9504 -XXXXXXXX.com   INTEREST    9502 950301    19.13 -XXXXXXXX.com   PAYMENT     9503 950307   969.90 6408 -XXXXXXXX.com   ALTERNET    9504 950316  3000.00 startup TCP-bt1-128k%5 -XXXXXXXX.com   PAYMENT     9503 950327   969.90 6594 -XXXXXXXX.com   ALTERNET    9505 950401  1187.50 TCP-bt1-128k%5.00 -XXXXXXXX.com   ALTERNET    9505 950401   556.60 line-9505 -XXXXXXXX.com   EQUIPMENT   9504 950410  1595.00 cisco2501-1 -XXXXXXXX.com   CREDADJ     9504 950417   503.50 TCP-56k-local -XXXXXXXX.com   CREDADJ     9504 950417   116.60 line-9504 -XXXXXXXX.com   ALTERNET    9504 950417   448.80 line-install -XXXXXXXX.com   ALTERNET    9504 950417   752.02 TCP-bt1-128k%5 recon -XXXXXXXX.com   ALTERNET    9504 950417   371.00 line-9504 recon -XXXXXXXX.com   PAYMENT     9504 950424  3000.00 6841 -XXXXXXXX.com   ALTERNET    9506 950501  1187.50 TCP-bt1-128k%5.00 -XXXXXXXX.com   ALTERNET    9506 950501   556.60 line-9506 -XXXXXXXX.com   PAYMENT     9505 950505  2049.86 6985 -XXXXXXXX.com   PAYMENT     9505 950531  3924.22 7179 -XXXXXXXX.com   ALTERNET    9507 950601  1187.50 TCP-bt1-128k%5.00 -XXXXXXXX.com   ALTERNET    9507 950601   556.60 line-9507 -XXXXXXXX.com   PAYMENT     9506 950607  1744.10 7232 -XXXXXXXX.com   ALTERNET    9508 950701  1187.50 TCP-bt1-128k%5.00 -XXXXXXXX.com   ALTERNET    9508 950701   556.60 line-9508 -XXXXXXXX.com   PAYMENT     9507 950705  1744.10 7641 -XXXXXXXX.com   ALTERNET    9509 950801  1187.50 TCP-bt1-128k%5.00 -XXXXXXXX.com   ALTERNET    9509 950801   556.60 line-9509 -XXXXXXXX.com   PAYMENT     9508 950803  1744.10 7914 -XXXXXXXX.com   ALTERNET    9510 950901  1187.50 TCP-bt1-128k%5.00 -XXXXXXXX.com   ALTERNET    9510 950901   556.60 line-9510 -XXXXXXXX.com   PAYMENT     9509 950905  1744.10 8203 -XXXXXXXX.com   ALTERNET    9511 951001  1187.50 TCP-bt1-128k%5.00 -XXXXXXXX.com   ALTERNET    9511 951001   556.60 line-9511 -XXXXXXXX.com   PAYMENT     9510 951003  1744.10 8508 -XXXXXXXX.com   ALTERNET    9512 951101  1187.50 TCP-bt1-128k%5.00 -XXXXXXXX.com   ALTERNET    9512 951101   556.60 line-9512 -XXXXXXXX.com   PAYMENT     9511 951103  2129.83 8837 -XXXXXXXX.com   ALTERNET    9601 951201  1187.50 TCP-bt1-128k%5.00 -XXXXXXXX.com   ALTERNET    9601 951201   556.60 line-9601 -XXXXXXXX.com   PAYMENT     9512 951204  2129.83 9131 -XXXXXXXX.com   ALTERNET    9602 960101  1187.50 TCP-bt1-128k%5.00 -XXXXXXXX.com   ALTERNET    9602 960101   556.60 line-9602 -XXXXXXXX.com   PAYMENT     9601 960103  1744.10 9456 -XXXXXXXX.com   ALTERNET    9603 960201  1187.50 TCP-bt1-128k%5.00 -XXXXXXXX.com   ALTERNET    9603 960201   556.60 line-9603 -XXXXXXXX.com   PAYMENT     9602 960205  1358.37 9834 diff --git a/contrib/awk/test/negexp.ok b/contrib/awk/test/negexp.ok deleted file mode 100644 index 6e6566ce88eb..000000000000 --- a/contrib/awk/test/negexp.ok +++ /dev/null @@ -1 +0,0 @@ -0.01 diff --git a/contrib/awk/test/nfldstr.ok b/contrib/awk/test/nfldstr.ok deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/contrib/awk/test/nfldstr.ok +++ /dev/null diff --git a/contrib/awk/test/nfset.awk b/contrib/awk/test/nfset.awk deleted file mode 100644 index 09ebd083545f..000000000000 --- a/contrib/awk/test/nfset.awk +++ /dev/null @@ -1 +0,0 @@ -{ NF = 5 ; print } diff --git a/contrib/awk/test/nfset.in b/contrib/awk/test/nfset.in deleted file mode 100644 index 43329b51636c..000000000000 --- a/contrib/awk/test/nfset.in +++ /dev/null @@ -1,5 +0,0 @@ -1 2 -1 2 3 4 -1 2 3 4 5 -1 2 3 4 5 6 7 8 -1 diff --git a/contrib/awk/test/nfset.ok b/contrib/awk/test/nfset.ok deleted file mode 100644 index 3ba48aec4b88..000000000000 --- a/contrib/awk/test/nfset.ok +++ /dev/null @@ -1,5 +0,0 @@ -1 2    -1 2 3 4  -1 2 3 4 5 -1 2 3 4 5 -1     diff --git a/contrib/awk/test/nlfldsep.awk b/contrib/awk/test/nlfldsep.awk deleted file mode 100644 index 4fac81da30de..000000000000 --- a/contrib/awk/test/nlfldsep.awk +++ /dev/null @@ -1,2 +0,0 @@ -BEGIN { RS = "A" } -{print NF; for (i = 1; i <= NF; i++) print $i ; print ""} diff --git a/contrib/awk/test/nlfldsep.in b/contrib/awk/test/nlfldsep.in deleted file mode 100644 index 7b2317f071c1..000000000000 --- a/contrib/awk/test/nlfldsep.in +++ /dev/null @@ -1,5 +0,0 @@ -some stuff -more stuffA -junk -stuffA -final diff --git a/contrib/awk/test/nlfldsep.ok b/contrib/awk/test/nlfldsep.ok deleted file mode 100644 index 66849161faab..000000000000 --- a/contrib/awk/test/nlfldsep.ok +++ /dev/null @@ -1,13 +0,0 @@ -4 -some -stuff -more -stuff - -2 -junk -stuff - -1 -final - diff --git a/contrib/awk/test/noeffect.awk b/contrib/awk/test/noeffect.awk deleted file mode 100644 index b375a4c2722e..000000000000 --- a/contrib/awk/test/noeffect.awk +++ /dev/null @@ -1,4 +0,0 @@ -BEGIN { -	s == "hello, world"; -	print s -} diff --git a/contrib/awk/test/noeffect.ok b/contrib/awk/test/noeffect.ok deleted file mode 100644 index b820ddf80181..000000000000 --- a/contrib/awk/test/noeffect.ok +++ /dev/null @@ -1,2 +0,0 @@ -gawk: noeffect.awk:3: warning: statement may have no effect - diff --git a/contrib/awk/test/nofmtch.awk b/contrib/awk/test/nofmtch.awk deleted file mode 100644 index 2ea2249209a5..000000000000 --- a/contrib/awk/test/nofmtch.awk +++ /dev/null @@ -1 +0,0 @@ -BEGIN { printf "%3\n" } diff --git a/contrib/awk/test/nofmtch.ok b/contrib/awk/test/nofmtch.ok deleted file mode 100644 index e6f3846fa550..000000000000 --- a/contrib/awk/test/nofmtch.ok +++ /dev/null @@ -1,2 +0,0 @@ -gawk: nofmtch.awk:1: warning: printf format specifier does not have control letter -%3 diff --git a/contrib/awk/test/nondec.awk b/contrib/awk/test/nondec.awk deleted file mode 100644 index a68011013144..000000000000 --- a/contrib/awk/test/nondec.awk +++ /dev/null @@ -1 +0,0 @@ -BEGIN  { print 0x81c3e8, 0x744018 } diff --git a/contrib/awk/test/nondec.ok b/contrib/awk/test/nondec.ok deleted file mode 100644 index 560f3d1c8c0a..000000000000 --- a/contrib/awk/test/nondec.ok +++ /dev/null @@ -1 +0,0 @@ -8504296 7618584 diff --git a/contrib/awk/test/nonl.awk b/contrib/awk/test/nonl.awk deleted file mode 100644 index c227083464fb..000000000000 --- a/contrib/awk/test/nonl.awk +++ /dev/null @@ -1 +0,0 @@ -0
\ No newline at end of file diff --git a/contrib/awk/test/nonl.ok b/contrib/awk/test/nonl.ok deleted file mode 100644 index 24bd9b781227..000000000000 --- a/contrib/awk/test/nonl.ok +++ /dev/null @@ -1 +0,0 @@ -gawk: nonl.awk:1: warning: source file does not end in newline diff --git a/contrib/awk/test/noparms.awk b/contrib/awk/test/noparms.awk deleted file mode 100644 index 2c7ccc76780e..000000000000 --- a/contrib/awk/test/noparms.awk +++ /dev/null @@ -1 +0,0 @@ -function x(a, b, c , ,) {} diff --git a/contrib/awk/test/noparms.ok b/contrib/awk/test/noparms.ok deleted file mode 100644 index 4c934c38274b..000000000000 --- a/contrib/awk/test/noparms.ok +++ /dev/null @@ -1,4 +0,0 @@ -gawk: noparms.awk:1: function x(a, b, c , ,) {} -gawk: noparms.awk:1:                      ^ parse error -gawk: noparms.awk:1: function x(a, b, c , ,) {} -gawk: noparms.awk:1:                       ^ parse error diff --git a/contrib/awk/test/nors.in b/contrib/awk/test/nors.in deleted file mode 100644 index f90d9ecafedd..000000000000 --- a/contrib/awk/test/nors.in +++ /dev/null @@ -1 +0,0 @@ -A B C D E
\ No newline at end of file diff --git a/contrib/awk/test/nors.ok b/contrib/awk/test/nors.ok deleted file mode 100644 index 54d5aab88c2f..000000000000 --- a/contrib/awk/test/nors.ok +++ /dev/null @@ -1,2 +0,0 @@ -E -E diff --git a/contrib/awk/test/numsubstr.awk b/contrib/awk/test/numsubstr.awk deleted file mode 100644 index 7a30993b83dd..000000000000 --- a/contrib/awk/test/numsubstr.awk +++ /dev/null @@ -1 +0,0 @@ -{ print substr(1000+$1, 2) } diff --git a/contrib/awk/test/numsubstr.in b/contrib/awk/test/numsubstr.in deleted file mode 100644 index ac65c3641d32..000000000000 --- a/contrib/awk/test/numsubstr.in +++ /dev/null @@ -1,3 +0,0 @@ -5000 -10000 -5000 diff --git a/contrib/awk/test/numsubstr.ok b/contrib/awk/test/numsubstr.ok deleted file mode 100644 index 86ec13caa124..000000000000 --- a/contrib/awk/test/numsubstr.ok +++ /dev/null @@ -1,3 +0,0 @@ -000 -1000 -000 diff --git a/contrib/awk/test/out1.ok b/contrib/awk/test/out1.ok deleted file mode 100644 index f54b2b4d1a27..000000000000 --- a/contrib/awk/test/out1.ok +++ /dev/null @@ -1 +0,0 @@ -Goes to a file out1 diff --git a/contrib/awk/test/out2.ok b/contrib/awk/test/out2.ok deleted file mode 100644 index 66b7d2f7f756..000000000000 --- a/contrib/awk/test/out2.ok +++ /dev/null @@ -1,2 +0,0 @@ -Normal print statement -This printed on stdout diff --git a/contrib/awk/test/out3.ok b/contrib/awk/test/out3.ok deleted file mode 100644 index 7eb822ffd96e..000000000000 --- a/contrib/awk/test/out3.ok +++ /dev/null @@ -1 +0,0 @@ -You blew it! diff --git a/contrib/awk/test/paramdup.awk b/contrib/awk/test/paramdup.awk deleted file mode 100644 index 1f1cc7a4552a..000000000000 --- a/contrib/awk/test/paramdup.awk +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN { foo(0, 1, 2) } - -function foo(a, b, c, b, a) -{ -	print "a =", a -	print "b =", b -	print "c =", c -} diff --git a/contrib/awk/test/paramdup.ok b/contrib/awk/test/paramdup.ok deleted file mode 100644 index 0308cc8c9e03..000000000000 --- a/contrib/awk/test/paramdup.ok +++ /dev/null @@ -1,2 +0,0 @@ -gawk: paramdup.awk:4: error: function `foo': parameter #4, `b', duplicates parameter #2 -gawk: paramdup.awk:4: error: function `foo': parameter #5, `a', duplicates parameter #1 diff --git a/contrib/awk/test/pcntplus.awk b/contrib/awk/test/pcntplus.awk deleted file mode 100644 index 13999ac48017..000000000000 --- a/contrib/awk/test/pcntplus.awk +++ /dev/null @@ -1 +0,0 @@ -BEGIN { printf "%+d %d\n", 3, 4 } diff --git a/contrib/awk/test/pcntplus.ok b/contrib/awk/test/pcntplus.ok deleted file mode 100644 index b7902695aed2..000000000000 --- a/contrib/awk/test/pcntplus.ok +++ /dev/null @@ -1 +0,0 @@ -+3 4 diff --git a/contrib/awk/test/pid.awk b/contrib/awk/test/pid.awk deleted file mode 100644 index 9b47d908bbdb..000000000000 --- a/contrib/awk/test/pid.awk +++ /dev/null @@ -1,44 +0,0 @@ -# From: John C. Oppenheimer <jco@slinky.convex.com> -# 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" -} -NR == 1 { -	if (pid != $0) { -		printf "Bad pid %d, wanted %d\n", $0, pid -	} -} -NR == 2 { -	if (ppid != $0) { -		printf "Bad ppid %d, wanted %d\n", $0, ppid -	} -} -END {	# ADR --- added -	close("/dev/pid") -	close("/dev/ppid") -} diff --git a/contrib/awk/test/pid.ok b/contrib/awk/test/pid.ok deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/contrib/awk/test/pid.ok +++ /dev/null diff --git a/contrib/awk/test/pid.sh b/contrib/awk/test/pid.sh deleted file mode 100755 index a19d72ce291a..000000000000 --- a/contrib/awk/test/pid.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -AWK=${AWK-../gawk} -echo $$ > _pid.in -echo $1 >> _pid.in -exec $AWK -f pid.awk _pid.in diff --git a/contrib/awk/test/pipeio1.awk b/contrib/awk/test/pipeio1.awk deleted file mode 100644 index 66f50adf41d5..000000000000 --- a/contrib/awk/test/pipeio1.awk +++ /dev/null @@ -1,31 +0,0 @@ -# From dragon!gamgee.acad.emich.edu!dhw Tue Mar 18 01:12:15 1997 -# Return-Path: <dragon!gamgee.acad.emich.edu!dhw> -# Message-ID: <m0w6owW-000IDSC@gamgee.acad.emich.edu> -# 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; -          } -      } diff --git a/contrib/awk/test/pipeio1.ok b/contrib/awk/test/pipeio1.ok deleted file mode 100644 index 706b09ef72b6..000000000000 --- a/contrib/awk/test/pipeio1.ok +++ /dev/null @@ -1,2 +0,0 @@ -1 2 - 2 diff --git a/contrib/awk/test/pipeio2.awk b/contrib/awk/test/pipeio2.awk deleted file mode 100644 index 6f4f979d5a64..000000000000 --- a/contrib/awk/test/pipeio2.awk +++ /dev/null @@ -1,67 +0,0 @@ -# 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 <this_prog> -" - -			#com = "cal 01 1997" -			com = ("cat " SRCDIR "/pipeio2.in") - -			while ((com | getline fnam) > 0) { - -				com_tr = "echo " fnam " | tr [0-9]. ..........." -				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     * -# \********************************************************/ diff --git a/contrib/awk/test/pipeio2.in b/contrib/awk/test/pipeio2.in deleted file mode 100644 index 2652b0ef4be5..000000000000 --- a/contrib/awk/test/pipeio2.in +++ /dev/null @@ -1,8 +0,0 @@ -   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 - diff --git a/contrib/awk/test/pipeio2.ok b/contrib/awk/test/pipeio2.ok deleted file mode 100644 index 3f55c05c4e70..000000000000 --- a/contrib/awk/test/pipeio2.ok +++ /dev/null @@ -1,16 +0,0 @@ -'echo    January 1997 | tr [0-9]. ...........' -January .... -'echo  S  M Tu  W Th  F  S | tr [0-9]. ...........' -S M Tu W Th F S -'echo           1  2  3  4 | tr [0-9]. ...........' -. . . . -'echo  5  6  7  8  9 10 11 | tr [0-9]. ...........' -. . . . . .. .. -'echo 12 13 14 15 16 17 18 | tr [0-9]. ...........' -.. .. .. .. .. .. .. -'echo 19 20 21 22 23 24 25 | tr [0-9]. ...........' -.. .. .. .. .. .. .. -'echo 26 27 28 29 30 31 | tr [0-9]. ...........' -.. .. .. .. .. .. -'echo  | tr [0-9]. ...........' - diff --git a/contrib/awk/test/posix.awk b/contrib/awk/test/posix.awk deleted file mode 100644 index 79474f300530..000000000000 --- a/contrib/awk/test/posix.awk +++ /dev/null @@ -1,69 +0,0 @@ -BEGIN { -	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 -} diff --git a/contrib/awk/test/posix.ok b/contrib/awk/test/posix.ok deleted file mode 100644 index 100b15055076..000000000000 --- a/contrib/awk/test/posix.ok +++ /dev/null @@ -1,16 +0,0 @@ -Test #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 diff --git a/contrib/awk/test/poundbang b/contrib/awk/test/poundbang deleted file mode 100755 index d60652e3ecf0..000000000000 --- a/contrib/awk/test/poundbang +++ /dev/null @@ -1,3 +0,0 @@ -#! /tmp/gawk -f  -	{ ccount += length($0) } -END { printf "average line length is %2.4f\n", ccount/NR} diff --git a/contrib/awk/test/poundbang.ok b/contrib/awk/test/poundbang.ok deleted file mode 100644 index 143e28dd6aec..000000000000 --- a/contrib/awk/test/poundbang.ok +++ /dev/null @@ -1 +0,0 @@ -average line length is 32.6667 diff --git a/contrib/awk/test/prdupval.awk b/contrib/awk/test/prdupval.awk deleted file mode 100644 index 32c67dceb86b..000000000000 --- a/contrib/awk/test/prdupval.awk +++ /dev/null @@ -1 +0,0 @@ -{ print NF, $NF, "abc" $NF } diff --git a/contrib/awk/test/prdupval.in b/contrib/awk/test/prdupval.in deleted file mode 100644 index 5626abf0f72e..000000000000 --- a/contrib/awk/test/prdupval.in +++ /dev/null @@ -1 +0,0 @@ -one diff --git a/contrib/awk/test/prdupval.ok b/contrib/awk/test/prdupval.ok deleted file mode 100644 index 62536160dda3..000000000000 --- a/contrib/awk/test/prdupval.ok +++ /dev/null @@ -1 +0,0 @@ -1 one abcone diff --git a/contrib/awk/test/prmarscl.awk b/contrib/awk/test/prmarscl.awk deleted file mode 100644 index 3caf3d9c7f77..000000000000 --- a/contrib/awk/test/prmarscl.awk +++ /dev/null @@ -1,6 +0,0 @@ -function test(a) -{ -	print a[1] -} - -BEGIN	{ j = 4; test(j) } diff --git a/contrib/awk/test/prmarscl.ok b/contrib/awk/test/prmarscl.ok deleted file mode 100644 index b42cee678dcf..000000000000 --- a/contrib/awk/test/prmarscl.ok +++ /dev/null @@ -1 +0,0 @@ -gawk: prmarscl.awk:4: fatal: attempt to use scalar parameter 1 as an array diff --git a/contrib/awk/test/prmreuse.awk b/contrib/awk/test/prmreuse.awk deleted file mode 100644 index 37e06f5938f0..000000000000 --- a/contrib/awk/test/prmreuse.awk +++ /dev/null @@ -1,14 +0,0 @@ -# from Pat Rankin, rankin@eql.caltech.edu - -BEGIN { dummy(1); legit(); exit } - -function dummy(arg) -{ -	return arg -} - -function legit(         scratch) -{ -	split("1 2 3", scratch) -	return "" -} diff --git a/contrib/awk/test/prmreuse.ok b/contrib/awk/test/prmreuse.ok deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/contrib/awk/test/prmreuse.ok +++ /dev/null diff --git a/contrib/awk/test/prt1eval.awk b/contrib/awk/test/prt1eval.awk deleted file mode 100644 index 4ecd3680bc8e..000000000000 --- a/contrib/awk/test/prt1eval.awk +++ /dev/null @@ -1,6 +0,0 @@ -function tst () { -	sum += 1 -	return sum -} - -BEGIN { OFMT = "%.0f" ; print tst() } diff --git a/contrib/awk/test/prt1eval.ok b/contrib/awk/test/prt1eval.ok deleted file mode 100644 index d00491fd7e5b..000000000000 --- a/contrib/awk/test/prt1eval.ok +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/contrib/awk/test/prtoeval.awk b/contrib/awk/test/prtoeval.awk deleted file mode 100644 index 77880d871467..000000000000 --- a/contrib/awk/test/prtoeval.awk +++ /dev/null @@ -1,4 +0,0 @@ -function returns_a_str() { print "<in function>" ; return "'A STRING'" } -BEGIN { -	print "partial line:", returns_a_str() -} diff --git a/contrib/awk/test/prtoeval.ok b/contrib/awk/test/prtoeval.ok deleted file mode 100644 index 13e122b8d111..000000000000 --- a/contrib/awk/test/prtoeval.ok +++ /dev/null @@ -1,2 +0,0 @@ -<in function> -partial line: 'A STRING' diff --git a/contrib/awk/test/rand.awk b/contrib/awk/test/rand.awk deleted file mode 100644 index 6378f3d3773c..000000000000 --- a/contrib/awk/test/rand.awk +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN { -	srand(2) -	for (i = 0; i < 19; i++)  -		printf "%3d ", (1 + int(100 * rand())) -	print "" -} diff --git a/contrib/awk/test/rand.ok b/contrib/awk/test/rand.ok deleted file mode 100644 index b6d75545d173..000000000000 --- a/contrib/awk/test/rand.ok +++ /dev/null @@ -1 +0,0 @@ - 27  17  86  27  22  53  61  11  33  48  51  97  99  35  20  27  62 100  32  diff --git a/contrib/awk/test/reg/exp-eq.awk b/contrib/awk/test/reg/exp-eq.awk deleted file mode 100644 index fed6a69421b5..000000000000 --- a/contrib/awk/test/reg/exp-eq.awk +++ /dev/null @@ -1 +0,0 @@ -{ $0 ^= 3 ; print $1} diff --git a/contrib/awk/test/reg/exp-eq.good b/contrib/awk/test/reg/exp-eq.good deleted file mode 100644 index d8d59aa0856e..000000000000 --- a/contrib/awk/test/reg/exp-eq.good +++ /dev/null @@ -1,3 +0,0 @@ -1 -8 -27 diff --git a/contrib/awk/test/reg/exp-eq.in b/contrib/awk/test/reg/exp-eq.in deleted file mode 100644 index 01e79c32a8c9..000000000000 --- a/contrib/awk/test/reg/exp-eq.in +++ /dev/null @@ -1,3 +0,0 @@ -1 -2 -3 diff --git a/contrib/awk/test/reg/exp.awk b/contrib/awk/test/reg/exp.awk deleted file mode 100644 index 4e707f891a77..000000000000 --- a/contrib/awk/test/reg/exp.awk +++ /dev/null @@ -1 +0,0 @@ -BEGIN { print exp(0), exp(1000000), exp(0.5) } diff --git a/contrib/awk/test/reg/exp.good b/contrib/awk/test/reg/exp.good deleted file mode 100644 index 07b88537dd81..000000000000 --- a/contrib/awk/test/reg/exp.good +++ /dev/null @@ -1,2 +0,0 @@ -1 gawk: reg/exp.awk:1: warning: exp argument 1e+06 is out of range -Inf 1.64872 diff --git a/contrib/awk/test/reg/exp.in b/contrib/awk/test/reg/exp.in deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/contrib/awk/test/reg/exp.in +++ /dev/null diff --git a/contrib/awk/test/reg/func.awk b/contrib/awk/test/reg/func.awk deleted file mode 100644 index e32cd4e607f3..000000000000 --- a/contrib/awk/test/reg/func.awk +++ /dev/null @@ -1 +0,0 @@ -BEGIN { print dummy(1) } diff --git a/contrib/awk/test/reg/func.good b/contrib/awk/test/reg/func.good deleted file mode 100644 index d3c7c7153172..000000000000 --- a/contrib/awk/test/reg/func.good +++ /dev/null @@ -1 +0,0 @@ -gawk: reg/func.awk:1: fatal: function `dummy' not defined diff --git a/contrib/awk/test/reg/func.in b/contrib/awk/test/reg/func.in deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/contrib/awk/test/reg/func.in +++ /dev/null diff --git a/contrib/awk/test/reg/func2.awk b/contrib/awk/test/reg/func2.awk deleted file mode 100644 index 2abf2c10f02f..000000000000 --- a/contrib/awk/test/reg/func2.awk +++ /dev/null @@ -1,2 +0,0 @@ -function dummy() { ; } -BEGIN { print dummy (1) } diff --git a/contrib/awk/test/reg/func2.good b/contrib/awk/test/reg/func2.good deleted file mode 100644 index ae87bc3dd940..000000000000 --- a/contrib/awk/test/reg/func2.good +++ /dev/null @@ -1,2 +0,0 @@ -gawk: reg/func2.awk:2: fatal: function `dummy' called with space between name and (, -or used in other expression context diff --git a/contrib/awk/test/reg/func2.in b/contrib/awk/test/reg/func2.in deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/contrib/awk/test/reg/func2.in +++ /dev/null diff --git a/contrib/awk/test/reg/log.awk b/contrib/awk/test/reg/log.awk deleted file mode 100644 index bcae90b8132d..000000000000 --- a/contrib/awk/test/reg/log.awk +++ /dev/null @@ -1 +0,0 @@ -BEGIN { print log(0), log(-1), log(100) } diff --git a/contrib/awk/test/reg/log.good b/contrib/awk/test/reg/log.good deleted file mode 100644 index 857ab7703650..000000000000 --- a/contrib/awk/test/reg/log.good +++ /dev/null @@ -1,4 +0,0 @@ -log: SING error --Inf gawk: reg/log.awk:1: warning: log called with negative argument -1 -log: DOMAIN error -NaN 4.60517 diff --git a/contrib/awk/test/reg/log.in b/contrib/awk/test/reg/log.in deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/contrib/awk/test/reg/log.in +++ /dev/null diff --git a/contrib/awk/test/regtest b/contrib/awk/test/regtest deleted file mode 100755 index 72b0dbf9aa56..000000000000 --- a/contrib/awk/test/regtest +++ /dev/null @@ -1,18 +0,0 @@ -#! /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.in >reg/$it.out 2>&1 -	if cmp -s reg/$it.out reg/$it.good -	then -		rm -f reg/$it.out -	else -		echo "regtest: $it fails" -	fi -done diff --git a/contrib/awk/test/reindops.awk b/contrib/awk/test/reindops.awk deleted file mode 100644 index 13ae65766575..000000000000 --- a/contrib/awk/test/reindops.awk +++ /dev/null @@ -1,6 +0,0 @@ -{  -	if ($1 !~ /^+[2-9]/) -		print "gawk is broken" -	else -		print "gawk is ok" -} diff --git a/contrib/awk/test/reindops.in b/contrib/awk/test/reindops.in deleted file mode 100644 index b1e543536e3f..000000000000 --- a/contrib/awk/test/reindops.in +++ /dev/null @@ -1 +0,0 @@ -+44 123 456 diff --git a/contrib/awk/test/reindops.ok b/contrib/awk/test/reindops.ok deleted file mode 100644 index f9605fd36a1b..000000000000 --- a/contrib/awk/test/reindops.ok +++ /dev/null @@ -1 +0,0 @@ -gawk is ok diff --git a/contrib/awk/test/reint.awk b/contrib/awk/test/reint.awk deleted file mode 100644 index add0f2ac07f7..000000000000 --- a/contrib/awk/test/reint.awk +++ /dev/null @@ -1 +0,0 @@ -{ print match($0, /a{3}/) } diff --git a/contrib/awk/test/reint.in b/contrib/awk/test/reint.in deleted file mode 100644 index 43caa2a71ec5..000000000000 --- a/contrib/awk/test/reint.in +++ /dev/null @@ -1 +0,0 @@ -match this: aaa diff --git a/contrib/awk/test/reint.ok b/contrib/awk/test/reint.ok deleted file mode 100644 index b1bd38b62a08..000000000000 --- a/contrib/awk/test/reint.ok +++ /dev/null @@ -1 +0,0 @@ -13 diff --git a/contrib/awk/test/reparse.awk b/contrib/awk/test/reparse.awk deleted file mode 100644 index 433ecbb2d69f..000000000000 --- a/contrib/awk/test/reparse.awk +++ /dev/null @@ -1,7 +0,0 @@ -{ -	gsub(/x/, " ") -	$0 = $0 -	print $1 -	print $0 -	print $1, $2, $3 -} diff --git a/contrib/awk/test/reparse.in b/contrib/awk/test/reparse.in deleted file mode 100644 index 6f31cde84446..000000000000 --- a/contrib/awk/test/reparse.in +++ /dev/null @@ -1 +0,0 @@ -1 axbxc 2 diff --git a/contrib/awk/test/reparse.ok b/contrib/awk/test/reparse.ok deleted file mode 100644 index 6bdfacfa9103..000000000000 --- a/contrib/awk/test/reparse.ok +++ /dev/null @@ -1,3 +0,0 @@ -1 -1 a b c 2 -1 a b diff --git a/contrib/awk/test/resplit.ok b/contrib/awk/test/resplit.ok deleted file mode 100644 index 61780798228d..000000000000 --- a/contrib/awk/test/resplit.ok +++ /dev/null @@ -1 +0,0 @@ -b diff --git a/contrib/awk/test/rs.in b/contrib/awk/test/rs.in deleted file mode 100644 index edef835e0309..000000000000 --- a/contrib/awk/test/rs.in +++ /dev/null @@ -1,15 +0,0 @@ - - -a -b - - -c d - - - -e - - - - diff --git a/contrib/awk/test/rs.ok b/contrib/awk/test/rs.ok deleted file mode 100644 index 9dd6bd392829..000000000000 --- a/contrib/awk/test/rs.ok +++ /dev/null @@ -1,3 +0,0 @@ -a b -c d -e  diff --git a/contrib/awk/test/rswhite.awk b/contrib/awk/test/rswhite.awk deleted file mode 100644 index 004876567c5b..000000000000 --- a/contrib/awk/test/rswhite.awk +++ /dev/null @@ -1,2 +0,0 @@ -BEGIN { RS = "" } -{ printf("<%s>\n", $0) } diff --git a/contrib/awk/test/rswhite.in b/contrib/awk/test/rswhite.in deleted file mode 100644 index 39f77564a3cc..000000000000 --- a/contrib/awk/test/rswhite.in +++ /dev/null @@ -1,2 +0,0 @@ -    a b -c d diff --git a/contrib/awk/test/rswhite.ok b/contrib/awk/test/rswhite.ok deleted file mode 100644 index a029e47fd74c..000000000000 --- a/contrib/awk/test/rswhite.ok +++ /dev/null @@ -1,2 +0,0 @@ -<    a b -c d> diff --git a/contrib/awk/test/sclforin.awk b/contrib/awk/test/sclforin.awk deleted file mode 100644 index 335e85402ad8..000000000000 --- a/contrib/awk/test/sclforin.awk +++ /dev/null @@ -1 +0,0 @@ -BEGIN { j = 4; for (i in j) print j[i] } diff --git a/contrib/awk/test/sclforin.ok b/contrib/awk/test/sclforin.ok deleted file mode 100644 index d87fa61fe000..000000000000 --- a/contrib/awk/test/sclforin.ok +++ /dev/null @@ -1 +0,0 @@ -gawk: sclforin.awk:1: fatal: attempt to use scalar as array diff --git a/contrib/awk/test/sclifin.awk b/contrib/awk/test/sclifin.awk deleted file mode 100644 index 64f5d0d3ac02..000000000000 --- a/contrib/awk/test/sclifin.awk +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN { -	j = 4 -	if ("foo" in j) -		print "ouch" -	else -		print "ok" -} diff --git a/contrib/awk/test/sclifin.ok b/contrib/awk/test/sclifin.ok deleted file mode 100644 index 717f83684407..000000000000 --- a/contrib/awk/test/sclifin.ok +++ /dev/null @@ -1 +0,0 @@ -gawk: sclifin.awk:7: fatal: attempt to use scalar as array diff --git a/contrib/awk/test/splitargv.awk b/contrib/awk/test/splitargv.awk deleted file mode 100644 index 10886ef26d00..000000000000 --- a/contrib/awk/test/splitargv.awk +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN   { -          for (idx = 1; idx < ARGC; idx++) -            split(ARGV[idx], temp, "."); -        } -        { -          print $0; -        } diff --git a/contrib/awk/test/splitargv.in b/contrib/awk/test/splitargv.in deleted file mode 100644 index 10886ef26d00..000000000000 --- a/contrib/awk/test/splitargv.in +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN   { -          for (idx = 1; idx < ARGC; idx++) -            split(ARGV[idx], temp, "."); -        } -        { -          print $0; -        } diff --git a/contrib/awk/test/splitargv.ok b/contrib/awk/test/splitargv.ok deleted file mode 100644 index 10886ef26d00..000000000000 --- a/contrib/awk/test/splitargv.ok +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN   { -          for (idx = 1; idx < ARGC; idx++) -            split(ARGV[idx], temp, "."); -        } -        { -          print $0; -        } diff --git a/contrib/awk/test/splitvar.awk b/contrib/awk/test/splitvar.awk deleted file mode 100644 index 9e1ac7905900..000000000000 --- a/contrib/awk/test/splitvar.awk +++ /dev/null @@ -1,5 +0,0 @@ -{ -	sep = "=+" -	n = split($0, a, sep) -	print n -} diff --git a/contrib/awk/test/splitvar.in b/contrib/awk/test/splitvar.in deleted file mode 100644 index 85be8ee5a363..000000000000 --- a/contrib/awk/test/splitvar.in +++ /dev/null @@ -1 +0,0 @@ -Here===Is=Some=====Data diff --git a/contrib/awk/test/splitvar.ok b/contrib/awk/test/splitvar.ok deleted file mode 100644 index b8626c4cff28..000000000000 --- a/contrib/awk/test/splitvar.ok +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/contrib/awk/test/splitwht.awk b/contrib/awk/test/splitwht.awk deleted file mode 100644 index 6163d72e210b..000000000000 --- a/contrib/awk/test/splitwht.awk +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN { -	str = "a   b\t\tc d" -	n = split(str, a, " ") -	print n -	m = split(str, b, / /) -	print m -} diff --git a/contrib/awk/test/splitwht.ok b/contrib/awk/test/splitwht.ok deleted file mode 100644 index 61c83cba41ce..000000000000 --- a/contrib/awk/test/splitwht.ok +++ /dev/null @@ -1,2 +0,0 @@ -4 -5 diff --git a/contrib/awk/test/sprintfc.awk b/contrib/awk/test/sprintfc.awk deleted file mode 100644 index ee1e5a7c5c54..000000000000 --- a/contrib/awk/test/sprintfc.awk +++ /dev/null @@ -1 +0,0 @@ -{ print sprintf("%c", $1), $1 } diff --git a/contrib/awk/test/sprintfc.in b/contrib/awk/test/sprintfc.in deleted file mode 100644 index 4602d28dda5c..000000000000 --- a/contrib/awk/test/sprintfc.in +++ /dev/null @@ -1,3 +0,0 @@ -65 -66 -foo diff --git a/contrib/awk/test/sprintfc.ok b/contrib/awk/test/sprintfc.ok deleted file mode 100644 index 33769a82a39e..000000000000 --- a/contrib/awk/test/sprintfc.ok +++ /dev/null @@ -1,3 +0,0 @@ -A 65 -B 66 -f foo diff --git a/contrib/awk/test/strftlng.awk b/contrib/awk/test/strftlng.awk deleted file mode 100644 index 0ef819509ed7..000000000000 --- a/contrib/awk/test/strftlng.awk +++ /dev/null @@ -1,11 +0,0 @@ -# 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) -} diff --git a/contrib/awk/test/strftlng.ok b/contrib/awk/test/strftlng.ok deleted file mode 100644 index 3008aa2edab1..000000000000 --- a/contrib/awk/test/strftlng.ok +++ /dev/null @@ -1,58 +0,0 @@ -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 -01/01/70 00:00:00 diff --git a/contrib/awk/test/substr.awk b/contrib/awk/test/substr.awk deleted file mode 100644 index 60163696d2c3..000000000000 --- a/contrib/awk/test/substr.awk +++ /dev/null @@ -1,14 +0,0 @@ -BEGIN { -	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) -} diff --git a/contrib/awk/test/substr.ok b/contrib/awk/test/substr.ok deleted file mode 100644 index be6889d1d12e..000000000000 --- a/contrib/awk/test/substr.ok +++ /dev/null @@ -1,10 +0,0 @@ -A                                       -ab -bc -ab - - -ab - -ef - diff --git a/contrib/awk/test/swaplns.awk b/contrib/awk/test/swaplns.awk deleted file mode 100644 index 6bf2240a9dab..000000000000 --- a/contrib/awk/test/swaplns.awk +++ /dev/null @@ -1,7 +0,0 @@ -{ -	if ((getline tmp) > 0) { -		print tmp -		print -	} else -		print -} diff --git a/contrib/awk/test/swaplns.in b/contrib/awk/test/swaplns.in deleted file mode 100644 index 71fb1627d409..000000000000 --- a/contrib/awk/test/swaplns.in +++ /dev/null @@ -1,9 +0,0 @@ -This 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 - diff --git a/contrib/awk/test/swaplns.ok b/contrib/awk/test/swaplns.ok deleted file mode 100644 index d38b7caad155..000000000000 --- a/contrib/awk/test/swaplns.ok +++ /dev/null @@ -1,9 +0,0 @@ -features 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 - - diff --git a/contrib/awk/test/tradanch.awk b/contrib/awk/test/tradanch.awk deleted file mode 100644 index 0cd45d17a41c..000000000000 --- a/contrib/awk/test/tradanch.awk +++ /dev/null @@ -1,2 +0,0 @@ -/foo^bar/ -/foo$bar/ diff --git a/contrib/awk/test/tradanch.in b/contrib/awk/test/tradanch.in deleted file mode 100644 index e5c8a094caa9..000000000000 --- a/contrib/awk/test/tradanch.in +++ /dev/null @@ -1,2 +0,0 @@ -foo^bar -foo$bar diff --git a/contrib/awk/test/tradanch.ok b/contrib/awk/test/tradanch.ok deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/contrib/awk/test/tradanch.ok +++ /dev/null diff --git a/contrib/awk/test/tweakfld.awk b/contrib/awk/test/tweakfld.awk deleted file mode 100644 index e7b538f64de0..000000000000 --- a/contrib/awk/test/tweakfld.awk +++ /dev/null @@ -1,296 +0,0 @@ -# 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" <emory!head-cfa.harvard.edu!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 -} diff --git a/contrib/awk/test/tweakfld.in b/contrib/awk/test/tweakfld.in deleted file mode 100644 index e27a9dde8066..000000000000 --- a/contrib/awk/test/tweakfld.in +++ /dev/null @@ -1,3 +0,0 @@ -0.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 diff --git a/contrib/awk/test/tweakfld.ok b/contrib/awk/test/tweakfld.ok deleted file mode 100644 index 3c4d89476b2a..000000000000 --- a/contrib/awk/test/tweakfld.ok +++ /dev/null @@ -1,3 +0,0 @@ -0.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  | 
