Reorganized the directory structure

This commit is contained in:
2022-09-25 09:23:29 +09:00
parent 1bac167e2d
commit 84d1c4c55f
864 changed files with 11 additions and 12 deletions

165
regress/awk/Makefile.am Normal file
View File

@ -0,0 +1,165 @@
AUTOMAKE_OPTIONS = no-dependencies
EXTRA_DIST = \
regress.out \
regress.out.xma \
adr-001.awk \
adr-002.awk \
asm.awk \
cou-001.awk \
cou-002.awk \
cou-003.awk \
cou-004.awk \
cou-005.awk \
cou-006.awk \
cou-007.awk \
cou-008.awk \
cou-009.awk \
cou-010.awk \
cou-011.awk \
cou-012.awk \
cou-013.awk \
cou-014.awk \
cou-015.awk \
cou-016.awk \
cou-017.awk \
cou-018.awk \
cou-019.awk \
cou-020.awk \
cou-021.awk \
cou-022.awk \
cou-023.awk \
cou-024.awk \
cou-025.awk \
cou-026.awk \
cou-027.awk \
emp-001.awk \
emp-002.awk \
emp-003.awk \
emp-004.awk \
emp-005.awk \
emp-006.awk \
emp-007.awk \
emp-008.awk \
emp-009.awk \
emp-010.awk \
emp-011.awk \
emp-012.awk \
emp-013.awk \
emp-014.awk \
emp-015.awk \
emp-016.awk \
emp-017.awk \
emp-018.awk \
emp-019.awk \
emp-020.awk \
emp-021.awk \
emp-022.awk \
emp-023.awk \
emp-024.awk \
emp-025.awk \
emp-026.awk \
emp-027.awk \
hanoi.awk \
indent.awk \
lang-001.awk \
lang-002.awk \
lang-003.awk \
lang-004.awk \
lang-005.awk \
lang-006.awk \
lang-007.awk \
lang-008.awk \
lang-009.awk \
lang-010.awk \
lang-011.awk \
lang-012.awk \
lang-013.awk \
lang-014.awk \
lang-015.awk \
lang-016.awk \
lang-017.awk \
lang-018.awk \
lang-019.awk \
lang-020.awk \
lang-021.awk \
lang-022.awk \
lang-023.awk \
lang-024.awk \
lang-025.awk \
lang-026.awk \
lang-027.awk \
lang-028.awk \
lang-029.awk \
lang-030.awk \
lang-031.awk \
lang-032.awk \
lang-033.awk \
lang-034.awk \
lang-035.awk \
lang-036.awk \
lang-037.awk \
lang-038.awk \
lang-039.awk \
lang-040.awk \
lang-041.awk \
lang-042.awk \
lang-043.awk \
lang-044.awk \
lang-045.awk \
lang-046.awk \
lang-047.awk \
lang-048.awk \
lang-049.awk \
lang-050.awk \
lang-051.awk \
lang-052.awk \
lang-053.awk \
lang-054.awk \
columnate.awk \
levenshtein.awk \
levenshtein-utests.awk \
rcalc.awk \
quicksort2.awk \
quicksort.awk \
stripcomment.awk \
unr-001.awk \
wordfreq.awk \
lang-035.dat1 \
lang-035.dat2 \
lang-036.dat \
lang-037.dat \
lang-043.dat \
lang-044.dat \
adr.dat \
asm.dat \
cou.dat \
emp.dat \
indent.dat \
passwd.dat \
quicksort2.dat \
quicksort.dat \
stripcomment.dat \
unr.dat \
asm.s \
lisp/awklisp \
lisp/lists \
lisp/perlisp \
lisp/tail.lsp \
lisp/eliza.dat \
lisp/Manual \
lisp/README \
lisp/test.scm \
lisp/eliza.lsp \
lisp/numbers \
lisp/scheme.lsp \
lisp/trace \
lisp/fib.lsp \
lisp/numbers.dat \
lisp/scmhelp.lsp \
lisp/Impl-notes \
lisp/old-awklisp \
lisp/startup
all-local:
chmod +x $(DESTDIR)$(builddir)/regress.sh

652
regress/awk/Makefile.in Normal file
View File

@ -0,0 +1,652 @@
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = regress/awk
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
$(top_srcdir)/m4/ax_cxx_namespace.m4 \
$(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/ax_numval.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/lx_find_mpi.m4 \
$(top_srcdir)/m4/qse_try_cflags.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/qse/config.h
CONFIG_CLEAN_FILES = regress.sh
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
depcomp =
am__maybe_remake_depfiles =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/regress.sh.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_MODE = @BUILD_MODE@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
HAVE_CXX = @HAVE_CXX@
HAVE_CXX11 = @HAVE_CXX11@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LTDL_LIBS = @LTDL_LIBS@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPICC = @MPICC@
MPI_CFLAGS = @MPI_CFLAGS@
MPI_CLDFLAGS = @MPI_CLDFLAGS@
MYSQL_CFLAGS = @MYSQL_CFLAGS@
MYSQL_CONFIG = @MYSQL_CONFIG@
MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
MYSQL_LIBS = @MYSQL_LIBS@
MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
PACKAGE_VERSION_PATCH = @PACKAGE_VERSION_PATCH@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
QSE_PROJECT_AUTHOR = @QSE_PROJECT_AUTHOR@
QSE_PROJECT_URL = @QSE_PROJECT_URL@
QUADMATH_LIBS = @QUADMATH_LIBS@
RANLIB = @RANLIB@
RM = @RM@
RMDIR = @RMDIR@
SED = @SED@
SENDFILE_LIBS = @SENDFILE_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SOCKET_LIBS = @SOCKET_LIBS@
SSL_LIBS = @SSL_LIBS@
STRIP = @STRIP@
TRUE = @TRUE@
UCI_LIBS = @UCI_LIBS@
UNICOWS_LIBS = @UNICOWS_LIBS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = no-dependencies
EXTRA_DIST = \
regress.out \
regress.out.xma \
adr-001.awk \
adr-002.awk \
asm.awk \
cou-001.awk \
cou-002.awk \
cou-003.awk \
cou-004.awk \
cou-005.awk \
cou-006.awk \
cou-007.awk \
cou-008.awk \
cou-009.awk \
cou-010.awk \
cou-011.awk \
cou-012.awk \
cou-013.awk \
cou-014.awk \
cou-015.awk \
cou-016.awk \
cou-017.awk \
cou-018.awk \
cou-019.awk \
cou-020.awk \
cou-021.awk \
cou-022.awk \
cou-023.awk \
cou-024.awk \
cou-025.awk \
cou-026.awk \
cou-027.awk \
emp-001.awk \
emp-002.awk \
emp-003.awk \
emp-004.awk \
emp-005.awk \
emp-006.awk \
emp-007.awk \
emp-008.awk \
emp-009.awk \
emp-010.awk \
emp-011.awk \
emp-012.awk \
emp-013.awk \
emp-014.awk \
emp-015.awk \
emp-016.awk \
emp-017.awk \
emp-018.awk \
emp-019.awk \
emp-020.awk \
emp-021.awk \
emp-022.awk \
emp-023.awk \
emp-024.awk \
emp-025.awk \
emp-026.awk \
emp-027.awk \
hanoi.awk \
indent.awk \
lang-001.awk \
lang-002.awk \
lang-003.awk \
lang-004.awk \
lang-005.awk \
lang-006.awk \
lang-007.awk \
lang-008.awk \
lang-009.awk \
lang-010.awk \
lang-011.awk \
lang-012.awk \
lang-013.awk \
lang-014.awk \
lang-015.awk \
lang-016.awk \
lang-017.awk \
lang-018.awk \
lang-019.awk \
lang-020.awk \
lang-021.awk \
lang-022.awk \
lang-023.awk \
lang-024.awk \
lang-025.awk \
lang-026.awk \
lang-027.awk \
lang-028.awk \
lang-029.awk \
lang-030.awk \
lang-031.awk \
lang-032.awk \
lang-033.awk \
lang-034.awk \
lang-035.awk \
lang-036.awk \
lang-037.awk \
lang-038.awk \
lang-039.awk \
lang-040.awk \
lang-041.awk \
lang-042.awk \
lang-043.awk \
lang-044.awk \
lang-045.awk \
lang-046.awk \
lang-047.awk \
lang-048.awk \
lang-049.awk \
lang-050.awk \
lang-051.awk \
lang-052.awk \
lang-053.awk \
lang-054.awk \
columnate.awk \
levenshtein.awk \
levenshtein-utests.awk \
rcalc.awk \
quicksort2.awk \
quicksort.awk \
stripcomment.awk \
unr-001.awk \
wordfreq.awk \
lang-035.dat1 \
lang-035.dat2 \
lang-036.dat \
lang-037.dat \
lang-043.dat \
lang-044.dat \
adr.dat \
asm.dat \
cou.dat \
emp.dat \
indent.dat \
passwd.dat \
quicksort2.dat \
quicksort.dat \
stripcomment.dat \
unr.dat \
asm.s \
lisp/awklisp \
lisp/lists \
lisp/perlisp \
lisp/tail.lsp \
lisp/eliza.dat \
lisp/Manual \
lisp/README \
lisp/test.scm \
lisp/eliza.lsp \
lisp/numbers \
lisp/scheme.lsp \
lisp/trace \
lisp/fib.lsp \
lisp/numbers.dat \
lisp/scmhelp.lsp \
lisp/Impl-notes \
lisp/old-awklisp \
lisp/startup
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign regress/awk/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign regress/awk/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
regress.sh: $(top_builddir)/config.status $(srcdir)/regress.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
tags TAGS:
ctags CTAGS:
cscope cscopelist:
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile all-local
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am all-local check check-am clean clean-generic \
clean-libtool cscopelist-am ctags-am distclean \
distclean-generic distclean-libtool distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
uninstall-am
.PRECIOUS: Makefile
all-local:
chmod +x $(DESTDIR)$(builddir)/regress.sh
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

9
regress/awk/adr-001.awk Normal file
View File

@ -0,0 +1,9 @@
#!/bin/awk
BEGIN {
RS = "\n\n";
FS = "\n";
}
{
print $1, $NF;
}

10
regress/awk/adr-002.awk Normal file
View File

@ -0,0 +1,10 @@
#!/bin/awk
BEGIN {
RS = "\n\n";
FS = "\n";
}
$3 ~ /^S/ {
print $1, $3, $NF;
}

15
regress/awk/adr.dat Normal file
View File

@ -0,0 +1,15 @@
James Brown
IBM
Somewhere over the rainbow
012-345-678
Richie Ren
Ezsystem
Taipei Taiwan
02-3473-9192
Toh WeeKung
Topaz
Singapore
9102-1203

51
regress/awk/asm.awk Normal file
View File

@ -0,0 +1,51 @@
#
# $Id: asm.awk,v 1.4 2007/09/27 11:33:45 bacon Exp $
#
# Taken from the book "The AWK Programming Language"
#
BEGIN {
srcfile = ARGV[1];
ARGV[1] = "";
tempfile = "asm.temp";
n = split("const get put ld st add sub jpos jz j halt", x);
for (i = 1; i <= n; i++) op[x[i]] = i - 1;
# PASS 1
FS = "[ \t]+";
while (getline <srcfile > 0) {
sub (/#.*/, "");
symtab[$1] = nextmem;
if ($2 != "") {
print $2 "\t" $3 >tempfile;
nextmem++;
}
}
close (tempfile);
# PASS 2
nextmem = 0;
while (getline <tempfile > 0) {
if ($2 !~ /^[0-9]*$/) $2 = symtab[$2];
mem[nextmem++] = 1000 * op[$1] + $2;
}
# INTERPRETER
for (pc = 0; pc >= 0; ) {
addr = mem[pc] % 1000;
code = int(mem[pc++] / 1000);
if (code == op["get"]) { if (getline acc <= 0) acc = 0; }
else if (code == op["put"]) { print acc; }
else if (code == op["st"]) { mem[addr] = acc; }
else if (code == op["ld"]) { acc = mem[addr]; }
else if (code == op["add"]) { acc += mem[addr]; }
else if (code == op["sub"]) { acc -= mem[addr]; }
else if (code == op["jpos"]) { if (acc > 0) pc = addr; }
else if (code == op["jz"]) { if (acc == 0) pc = addr; }
else if (code == op["j"]) { pc = addr; }
else if (code == op["halt"]) { pc = -1; }
else { pc = -1; }
}
}

11
regress/awk/asm.dat Normal file
View File

@ -0,0 +1,11 @@
10
20
30
40
50
60
70
80
90
100
-1

14
regress/awk/asm.s Normal file
View File

@ -0,0 +1,14 @@
ld zero # initialize sum to zero
st sum
loop get # read a number
jz done # no more input if number is zero
add sum # add in accumulated sum
st sum # store new value back in sum
j loop # go back and read another number
done ld sum # print sum
put
halt
zero const 0
sum const

31
regress/awk/columnate.awk Normal file
View File

@ -0,0 +1,31 @@
#.H1 Columnate
#.H2 Synopsis
#.PRE
##e.g.
#gawk -F: -f columnate.awk /etc/passwd
#./PRE
#.H2 Download
#Download from
#.URL http://lawker.googlecode.com/svn/fridge/lib/awk/columnate.awk LAWKER.
#.H2 About
#This script columnates the input file, so that columns line up like in the GNU column(1) command. Its output is like that of column -t. First, awk reads the whole file, keeps track of the maximum width of each field, and saves all the lines/records. At the END, the lines are printed in columnated format. If your terminal is not too narrow, you'll get a handsome display of the file.
#.H2 Code
#.PRE
{ line[NR] = $0 # saves the line
for (f=1; f<=NF; f++) {
len = length($f)
if (len>max[f])
max[f] = len } # an array of maximum field widths
}
END {
for(nr=1; nr<=NR; nr++) {
nf = split(line[nr], fields)
for (f=1; f<nf; f++)
printf "%-*s", max[f]+2, fields[f]
print fields[f] } # the last field need not be padded
}
#./PRE
#.H2 Author
#.P
# h-67-101-152-180.nycmny83.dynamic.covad.net

1
regress/awk/cou-001.awk Normal file
View File

@ -0,0 +1 @@
{ print $1, $3; } # print country name and population

15
regress/awk/cou-002.awk Normal file
View File

@ -0,0 +1,15 @@
BEGIN {
FS = "\t";
printf ("%10s %6s %5s %s\n\n",
"COUNTRY", "AREA", "POP", "CONTINENT");
}
{
printf ("%10s %6d %5d %s\n", $1, $2, $3, $4);
area = area + $2;
pop = pop + $3;
}
END {
printf ("\n%10s %6d %5d\n", "TOTAL", area, pop);
}

1
regress/awk/cou-003.awk Normal file
View File

@ -0,0 +1 @@
$3/$2 >= 0.5

1
regress/awk/cou-004.awk Normal file
View File

@ -0,0 +1 @@
$0 >= "M"

1
regress/awk/cou-005.awk Normal file
View File

@ -0,0 +1 @@
$1 < $4

1
regress/awk/cou-006.awk Normal file
View File

@ -0,0 +1 @@
$2 < $3

1
regress/awk/cou-007.awk Normal file
View File

@ -0,0 +1 @@
/Asia/

1
regress/awk/cou-008.awk Normal file
View File

@ -0,0 +1 @@
$4 ~ /Asia/

1
regress/awk/cou-009.awk Normal file
View File

@ -0,0 +1 @@
$4 !~ /Asia/

1
regress/awk/cou-010.awk Normal file
View File

@ -0,0 +1 @@
$0 ~ /Asia/

3
regress/awk/cou-011.awk Normal file
View File

@ -0,0 +1,3 @@
$2 !~ /^[0-9]+$/

1
regress/awk/cou-012.awk Normal file
View File

@ -0,0 +1 @@
$4 == "Asia" && $3 > 500

1
regress/awk/cou-013.awk Normal file
View File

@ -0,0 +1 @@
$4 == "Asia" || $4 == "Europe"

1
regress/awk/cou-014.awk Normal file
View File

@ -0,0 +1 @@
$4 ~ /^(Asia|Europe)$/

1
regress/awk/cou-015.awk Normal file
View File

@ -0,0 +1 @@
/Asia/ || /Europe/

1
regress/awk/cou-016.awk Normal file
View File

@ -0,0 +1 @@
/Asia|Europe/

1
regress/awk/cou-017.awk Normal file
View File

@ -0,0 +1 @@
/Canada/, /USA/

1
regress/awk/cou-018.awk Normal file
View File

@ -0,0 +1 @@
/Eurpoe/, /Africa/

7
regress/awk/cou-019.awk Normal file
View File

@ -0,0 +1,7 @@
function basename (str) {
ridx = str::rindex (str, "/");
if (ridx == 0) return str;
else return substr (str, ridx + 1);
}
FNR == 1, FNR == 5 { print basename(FILENAME) ": " $0; }

6
regress/awk/cou-020.awk Normal file
View File

@ -0,0 +1,6 @@
function basename (str) {
ridx = str::rindex (str, "/");
if (ridx == 0) return str;
else return substr (str, ridx + 1);
}
FNR <= 5 { print basename(FILENAME) ": " $0; }

1
regress/awk/cou-021.awk Normal file
View File

@ -0,0 +1 @@
$4 == "Asia" { print $1, 1000 * $2; }

6
regress/awk/cou-022.awk Normal file
View File

@ -0,0 +1,6 @@
#BEGIN { FS = "\t"; OFS = "\t"; }
BEGIN { FS = OFS = "\t"; }
$4 == "North America" { $4 = "NA"; }
$4 == "South America" { $4 = "SA"; }
{ print; }

2
regress/awk/cou-023.awk Normal file
View File

@ -0,0 +1,2 @@
BEGIN { FS = OFS = "\t"; }
{ $5 = 1000 * $3 / $2; print; }

4
regress/awk/cou-024.awk Normal file
View File

@ -0,0 +1,4 @@
$4 == "Asia" { pop = pop + $3; n = n + 1; }
END { print "Total population of the", n,
"Asian countries is", pop, "million.";
}

6
regress/awk/cou-025.awk Normal file
View File

@ -0,0 +1,6 @@
/Asia/ { pop["Asia"] += $3; }
/Europe/ { pop["Europe"] += $3; }
END { print "Asian population is", pop["Asia"], "million.";
print "European population is", pop["Europe"], "million.";
}

34
regress/awk/cou-026.awk Normal file
View File

@ -0,0 +1,34 @@
BEGIN { FS = "\t"; }
{ pop[$4] += $3; }
END {
count = 0;
for (name in pop)
{
for (i = 0; i < count; i++)
{
if (name < x[i])
{
for (j = count; j > i; j--)
{
x[j] = x[j-1];
y[j] = y[j-1];
}
break;
}
}
x[i] = name;
y[i] = pop[name];
count++;
}
for (i = 0; i < count; i++)
{
print x[i], y[i];
}
}

17
regress/awk/cou-027.awk Normal file
View File

@ -0,0 +1,17 @@
BEGIN { FS = "\t"; }
{ pop[$4] += $3; }
END {
# specifying a postion with + notation seems obsolete for sort
# on most platforms.
# sort -t'\t' +1rn => sort -t'\t' -k2 -rn
for (c in pop)
printf ("%15s\t%6d\n", c, pop[c]) | "sort -t'\t' -k2 -rn";
# the following two statements make the program behave
# consistently across different platforms.
# on some platforms, the sort command output has
# been delayed until the program exits.
close ("sort -t'\t' -k2 -rn");
sleep (1);
}

11
regress/awk/cou.dat Normal file
View File

@ -0,0 +1,11 @@
USSR 8649 275 Asia
Canada 3852 25 North America
China 3705 1032 Asia
USA 3615 237 North America
Brazil 3286 134 South America
India 1267 746 Asia
Mexico 762 78 North America
France 211 55 Europe
Japan 144 120 Asia
Germany 96 61 Europe
England 94 56 Europe

1
regress/awk/emp-001.awk Normal file
View File

@ -0,0 +1 @@
$3 > 0 { print $1, $2 * $3; }

1
regress/awk/emp-002.awk Normal file
View File

@ -0,0 +1 @@
$3 == 0 { print $1; }

1
regress/awk/emp-003.awk Normal file
View File

@ -0,0 +1 @@
{ print NF, $1, $NF; }

1
regress/awk/emp-004.awk Normal file
View File

@ -0,0 +1 @@
{ print NR, $0; }

1
regress/awk/emp-005.awk Normal file
View File

@ -0,0 +1 @@
{ print "total pay for", $1, "is", $2 * $3; }

1
regress/awk/emp-006.awk Normal file
View File

@ -0,0 +1 @@
{ printf ("total pay for %s is $%.2f\n", $1, $2 * $3); }

1
regress/awk/emp-007.awk Normal file
View File

@ -0,0 +1 @@
{ printf ("%-8s $%6.2f\n", $1, $2 * $3); }

1
regress/awk/emp-008.awk Normal file
View File

@ -0,0 +1 @@
$2 >= 5

1
regress/awk/emp-009.awk Normal file
View File

@ -0,0 +1 @@
$2 * $3 > 50 { printf ("$%.2f for %s\n", $2 * $3, $1); }

1
regress/awk/emp-010.awk Normal file
View File

@ -0,0 +1 @@
$1 == "Susie"

1
regress/awk/emp-011.awk Normal file
View File

@ -0,0 +1 @@
/Susie/

1
regress/awk/emp-012.awk Normal file
View File

@ -0,0 +1 @@
$2 >= 4 || $3 >= 20

2
regress/awk/emp-013.awk Normal file
View File

@ -0,0 +1,2 @@
$2 >= 4
$3 >= 20

1
regress/awk/emp-014.awk Normal file
View File

@ -0,0 +1 @@
!($2 < 4 && $3 < 20)

5
regress/awk/emp-015.awk Normal file
View File

@ -0,0 +1,5 @@
NF != 3 { print $0, "number of fields is not equal to 3"; }
$2 < 3.35 { print $0, "rate is below minimum wage"; }
$2 > 10 { print $0, "rate exceeds $10 per hour"; }
$3 < 0 { print $0, "negative hours worked"; }
$3 > 60 { print $0, "too many hours worked"; }

2
regress/awk/emp-016.awk Normal file
View File

@ -0,0 +1,2 @@
BEGIN { print "NAME RATE HOURS"; print ""; }
{ print; }

2
regress/awk/emp-017.awk Normal file
View File

@ -0,0 +1,2 @@
$3 > 15 { emp = emp + 1; }
END { print emp, "employees worked more than 15 hours"; }

1
regress/awk/emp-018.awk Normal file
View File

@ -0,0 +1 @@
END { print NR, "employees"; }

5
regress/awk/emp-019.awk Normal file
View File

@ -0,0 +1,5 @@
{ pay = pay + $2 * $3; }
END { print NR, "employees";
print "total pay is", pay;
print "average pay is", pay/NR;
}

2
regress/awk/emp-020.awk Normal file
View File

@ -0,0 +1,2 @@
$2 > maxrate { maxrate = $2; maxemp = $1; }
END { print "highest hourly rage:", maxrate, "for", maxemp; }

2
regress/awk/emp-021.awk Normal file
View File

@ -0,0 +1,2 @@
{ names = names $1 " "; }
END { print names; }

2
regress/awk/emp-022.awk Normal file
View File

@ -0,0 +1,2 @@
{ last = $0; }
END { print last; }

1
regress/awk/emp-023.awk Normal file
View File

@ -0,0 +1 @@
{ print $1, length($1); }

4
regress/awk/emp-024.awk Normal file
View File

@ -0,0 +1,4 @@
{ nc = nc + length($0) + 1;
nw = nw + NF;
}
END { print NR, "lines,", nw, "words,", nc, "characters"; }

7
regress/awk/emp-025.awk Normal file
View File

@ -0,0 +1,7 @@
$2 > 6 { n = n + 1; pay = pay + $2 * $3; }
END { if (n > 0)
print n, "employees, total pay is", pay,
"average pay is", pay/n;
else
print "no employees are paid more than $6/hour";
}

12
regress/awk/emp-026.awk Normal file
View File

@ -0,0 +1,12 @@
{
line[NR] = $0;
}
END {
i = NR;
while (i > 0)
{
print line[i];
i = i - 1;
}
}

8
regress/awk/emp-027.awk Normal file
View File

@ -0,0 +1,8 @@
{
line[NR] = $0;
}
END {
i = NR;
for (i = NR; i > 0; i = i - 1) print line[i];
}

6
regress/awk/emp.dat Normal file
View File

@ -0,0 +1,6 @@
Beth 4.00 0
Dan 3.74 0
Kathy 4.00 10
Mark 5.00 20
Mary 5.50 22
Susie 4.25 18

40
regress/awk/hanoi.awk Normal file
View File

@ -0,0 +1,40 @@
BEGIN {
n = arg("-n",5)
for (j=0; j<n; j++) push(0,n-j)
showstacks()
hanoi(n,0,1,2)
}
function hanoi(n,a,b,c) {
if (n==1) {
move(a,b)
} else {
hanoi(n-1,a,c,b)
move(a,b)
hanoi(n-1,c,b,a)
}
}
function move(i,j) {
push(j,pop(i))
showstacks()
}
function showstacks( i,j) {
for (i=0; i<=2; i++) {
printf "%s ", i
for (j=0; j<sp[i]; j++) printf "%s", stack[i,j]
print "" }
print ""
}
function arg(tag,default) {
for(i in ARGV)
if (ARGV[i] ~ tag)
return ARGV[i+1]
return default
}
function push(i,v) { stack[i,sp[i]++]=v }
function pop(i) { return stack[i,--sp[i]] }

56
regress/awk/indent.awk Normal file
View File

@ -0,0 +1,56 @@
#.H1 indent.awk
#.H2 Synopsis
#.P gawk -f indent.awk file.sh
#.H2 Download
#.P Download from <a href="http://lawker.googlecode.com/svn/fridge/lib/awk/indent.awk">LAWKER</a>
#.h2 Description
#.P
# This is part of Phil's AWK tutorial at
#<a href="http://www.bolthole.com/AWK.html">http://www.bolthole.com/AWK.html</a>.
# This program adjusts the indentation level based on which keywords are
# found in each line it encounters.
#.h2 Code
#.H3 doindent
#.PRE
function doindent(){
tmpindent=indent;
if(indent<0){
print "ERROR; indent level == " indent
}
while(tmpindent >0){
printf(" ");
tmpindent-=1;
}
}
#./PRE
#.H3 Out-denting
#.PRE
$1 == "done" { indent -=1; }
$1 == "fi" { indent -=1; }
$0 ~ /^}$/ { if(indent!=0) indent-=1; }
#./PRE
#.H3 Worker
#.P
# This is the 'default' action, that actually prints a line out.
# This gets called AS WELL AS any other matching clause, in the
# order they appear in this program.
# An "if" match is run AFTER we run this clause.
# A "done" match is run BEFORE we run this clause.
#.PRE
{
doindent();
print $0;
}
#./PRE
#.H3 In-denting
#.PRE
$0 ~ /if.*;[ ]*then/ { indent+=1; }
$0 ~ /for.*;[ ]*do/ { indent+=1; }
$0 ~ /while.*;[ ]*do/ { indent+=1; }
$1 == "then" { indent+=1; }
$1 == "do" { indent+=1; }
$0 ~ /^{$/ { indent+=1; }
#./PRE
#.H2 Author
#.P Philip Brown phil@bolthole.com

12
regress/awk/indent.dat Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
if [ $# -ne 0 ]
then
echo "not the right usage"
exit 1
fi
while true
do
sleep 20
done

8
regress/awk/lang-001.awk Normal file
View File

@ -0,0 +1,8 @@
# cannot use function name as a parameter name
# unless QSE_AWK_STRICTNAMING is off
function f(f) { print f; }
/*
* the begin block
*/
BEGIN { f("hello"); }

11
regress/awk/lang-002.awk Normal file
View File

@ -0,0 +1,11 @@
#
# deep recursion must be detected if it goes too deep.
#
function f(x)
{
print x;
f("my hello");
}
BEGIN { f(10); }

5
regress/awk/lang-003.awk Normal file
View File

@ -0,0 +1,5 @@
# a parameter can shade a named variable.
# it should print 50
BEGIN { f = 50; fn(100); print f; }
function fn(f) { f = 20; }

3
regress/awk/lang-004.awk Normal file
View File

@ -0,0 +1,3 @@
# A function and a named variable cannot have the same name.
function a () { }
BEGIN { a = 20; }

21
regress/awk/lang-005.awk Normal file
View File

@ -0,0 +1,21 @@
#
# a local variable can shade a function name and other local variables.
#
function a (x) { print x; }
BEGIN {
{
@local a;
a = 50;
{
@local a;
a = 30;
print a;
}
print a;
}
a (100);
}

5
regress/awk/lang-006.awk Normal file
View File

@ -0,0 +1,5 @@
#
# a global variable can not have the same name as a function name
#
@global a;
function a () { }

19
regress/awk/lang-007.awk Normal file
View File

@ -0,0 +1,19 @@
#
# depending on where a variable name appeared, a variable name can be
# a global variable or a named variable.
#
function fn ()
{
a = 20;
return a;
}
@global a;
BEGIN {
a = 30
print fn ()
print a
}

21
regress/awk/lang-008.awk Normal file
View File

@ -0,0 +1,21 @@
#
# a local variable can shade a global variable
#
@global x;
BEGIN {
x = 1;
{
@local x;
x = 2;
{
@local x;
x = 3;
print x;
}
print x;
}
print x;
}

11
regress/awk/lang-009.awk Normal file
View File

@ -0,0 +1,11 @@
function a (a) {
print a;
}
BEGIN {
@local a;
a = 20;
}
END { a (1000); }

34
regress/awk/lang-010.awk Normal file
View File

@ -0,0 +1,34 @@
BEGIN {
print "ARGC=", ARGC;
for (i in ARGV)
{
print "ARGV[" i "]", ARGV[i];
}
print "----------------------";
print "ARGC=", ARGC;
split ("111 22 333 555 666 777", ARGV);
for (i in ARGV)
{
print "ARGV[" i "]", ARGV[i];
}
#for (i = 0
# i < 20
# i;;) print "[" i "]";
#for (i = 0
# (i < 20)
# i;;) print "[" i "]";
#printf 10, 20, 30;
if (ARGC >= 0) printf ("ARGC [%++#10.10i] is positive\n", 10);
if (ARGC >= 0) printf ("ARGC [%++#10.10f] is positive\n", 10);
if (ARGC >= 0) printf ("ARGC [%++#10.10E] is positive\n", 10124.1123);
if (ARGC >= 0) printf ("ARGC [%++#10.10G] is positive\n", 10124.1123);
if (ARGC >= 0) printf ("ARGC [%++#10.10g] is positive\n", 10124.1123);
if (ARGC >= 0) printf ("ARGC [%++#10.10f] is positive\n", 10124.1123);
printf ("[%d], [%f], [%s]\n", 10124.1123, 10124.1123, 10124.1123);
printf ("[%-10c] [% 0*.*d]\n", 65, 45, 48, -1);
print sprintf ("abc%d %*.*d %c %s %c", 10, 20, 30, 40, "good", "good", 75.34);
}

32
regress/awk/lang-011.awk Normal file
View File

@ -0,0 +1,32 @@
BEGIN {
a[1,2,3] = 20;
a[4,5,6] = 30;
for (i in a)
{
n = split (i, k, SUBSEP);
for (j = 1; j <= n; j++)
{
print k[j]
}
print "-------------------"
}
if ((1,2,3) in a)
{
print "(1,2,3) in a ==> " a[1,2,3];
}
else
{
print "(1,2,3) not in a"
}
if ((4,5) in a)
{
print "(4,5) in a ==> " a[4,5]
}
else
{
print "(4,5) not in a"
}
}

122
regress/awk/lang-012.awk Normal file
View File

@ -0,0 +1,122 @@
BEGIN {
OFS="\t\t";
print "1==1 :", (1 == 1);
print "1==0 :", (1 == 0);
print "1.0==1 :", (1.0 == 1);
print "1.1==1 :", (1.1 == 1);
print "1.0!=1 :", (1.0 != 1);
print "1.1!=1 :", (1.1 != 1);
print "\"abc\" == \"abc\"", ("abc" == "abc");
print "\"abc\" != \"abc\"", ("abc" != "abc");
print "--------------------------";
print "a == \"\" :", (a == "");
print "a >= \"\" :", (a >= "");
print "a <= \"\" :", (a <= "");
print "a > \"\" :", (a > "");
print "a < \"\" :", (a < "");
print "--------------------------";
print "a == \" \" :", (a == " ");
print "a >= \" \" :", (a >= " ");
print "a <= \" \" :", (a <= " ");
print "a > \" \" :", (a > " ");
print "a < \" \" :", (a < " ");
print "--------------------------";
print "\"\" == a :", ("" == a);
print "\"\" >= a:", ("" >= a);
print "\"\" <= a:", ("" <= a);
print "\"\" > a:", ("" > a);
print "\"\" < a:", ("" < a);
print "--------------------------";
print "\" \" == a :", (" " == a);
print "\" \" >= a:", (" " >= a);
print "\" \" <= a:", (" " <= a);
print "\" \" > a:", (" " > a);
print "\" \" < a:", (" " < a);
print "--------------------------";
print "10 == \"10\"", (10 == "10");
print "10 != \"10\"", (10 != "10");
print "10 >= \"10\"", (10 >= "10");
print "10 <= \"10\"", (10 <= "10");
print "10 > \"10\"", (10 > "10");
print "10 < \"10\"", (10 < "10");
print "--------------------------";
print "10 == \"11\"", (10 == "11");
print "10 != \"11\"", (10 != "11");
print "10 >= \"11\"", (10 >= "11");
print "10 <= \"11\"", (10 <= "11");
print "10 > \"11\"", (10 > "11");
print "10 < \"11\"", (10 < "11");
print "--------------------------";
print "11 == \"10\"", (11 == "10");
print "11 != \"10\"", (11 != "10");
print "11 >= \"10\"", (11 >= "10");
print "11 <= \"10\"", (11 <= "10");
print "11 > \"10\"", (11 > "10");
print "11 < \"10\"", (11 < "10");
# octal number
print "--------------------------";
print "010 == \"8\"", (010 == "8");
print "010 != \"8\"", (010 != "8");
print "010 >= \"8\"", (010 >= "8");
print "010 <= \"8\"", (010 <= "8");
print "010 > \"8\"", (010 > "8");
print "010 < \"8\"", (010 < "8");
print "--------------------------";
print "10 == \"10.0\"", (10 == "10.0");
print "10 != \"10.0\"", (10 != "10.0");
print "10 >= \"10.0\"", (10 >= "10.0");
print "10 <= \"10.0\"", (10 <= "10.0");
print "10 > \"10.0\"", (10 > "10.0");
print "10 < \"10.0\"", (10 < "10.0");
#OFMT="abc";
print "--------------------------";
print "10.0 == \"10\"", (10.0 == "10");
print "10.0 != \"10\"", (10.0 != "10");
print "10.0 >= \"10\"", (10.0 >= "10");
print "10.0 <= \"10\"", (10.0 <= "10");
print "10.0 > \"10\"", (10.0 > "10");
print "10.0 < \"10\"", (10.0 < "10");
print "--------------------------";
print "\"10\" == 10.0", ("10" == 10.0);
print "\"10\" != 10.0", ("10" != 10.0);
print "\"10\" >= 10.0", ("10" >= 10.0);
print "\"10\" <= 10.0", ("10" <= 10.0);
print "\"10\" > 10.0", ("10" > 10.0);
print "\"10\" < 10.0", ("10" < 10.0);
print "--------------------------";
print "\"10\" == 10.1", ("10" == 10.1);
print "\"10\" != 10.1", ("10" != 10.1);
print "\"10\" >= 10.1", ("10" >= 10.1);
print "\"10\" <= 10.1", ("10" <= 10.1);
print "\"10\" > 10.1", ("10" > 10.1);
print "\"10\" < 10.1", ("10" < 10.1);
#a[10] = 2;
#print a == 1;
print (0.234 + 1.01123);
print 12345678901234567890E20;
print .123;
print +.123;
print -.123;
print .123E-;
print +.123E-;
print -.123E-;
print -.123E- + "123";
}

4
regress/awk/lang-013.awk Normal file
View File

@ -0,0 +1,4 @@
BEGIN {
CONVFMT="%s";
printf ("%s\n", 10.34);
}

7
regress/awk/lang-014.awk Normal file
View File

@ -0,0 +1,7 @@
BEGIN {
a = (((((10+20)))));
b = (((((((((((((((((((10+20)))))))))))))))))));
c = ((((((((((((((((((((((((((((10 + 20))))))))))))))))))))))))))));
print a, b, c;
}

17
regress/awk/lang-015.awk Normal file
View File

@ -0,0 +1,17 @@
BEGIN {
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{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}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
}

9
regress/awk/lang-016.awk Normal file
View File

@ -0,0 +1,9 @@
BEGIN {
#CONVFMT="%s";
#CONVFMT="%*.*s";
#CONVFMT="%*.*f";
printf "[[[[[%s]]]]\n", sprintf ("abc %s abc", sprintf ("def %s %s", sprintf ("%s %s %s", "xyz", 1.2342, "xyz"), sprintf ("ttt %s tttt", 123.12)));
printf "[[[[%s]]]]\n", sprintf ("ttt %s tttt", 123.12);
}

41
regress/awk/lang-017.awk Normal file
View File

@ -0,0 +1,41 @@
function error() { exit (200); }
function getx()
{
if (x == 2) error();
return x++;
}
function gety() { return y++; }
function main() {
x = 0;
y = 0;
print getx() + gety();
print getx() + gety();
print getx() + gety();
print getx() + gety();
return 999;
}
BEGIN {
main ();
}
END {
print "END OF PROGRAM";
return 10;
}
END {
print "END OF PROGRAM 2";
exit (100);
}
END {
print "END OF PROGRAM 3";
exit (900);
}

5
regress/awk/lang-018.awk Normal file
View File

@ -0,0 +1,5 @@
@global ARGV;
BEGIN {
print ARGC;
}

1
regress/awk/lang-019.awk Normal file
View File

@ -0,0 +1 @@
function abc (+) {}

2
regress/awk/lang-020.awk Normal file
View File

@ -0,0 +1,2 @@
@global + ;

5
regress/awk/lang-021.awk Normal file
View File

@ -0,0 +1,5 @@
BEGIN {
@local +;
}

3
regress/awk/lang-022.awk Normal file
View File

@ -0,0 +1,3 @@
BEGIN {
substr = 20;
}

7
regress/awk/lang-023.awk Normal file
View File

@ -0,0 +1,7 @@
BEGIN {
@local a;
a = 21;
print a > 20? 1 2;
}

19
regress/awk/lang-024.awk Normal file
View File

@ -0,0 +1,19 @@
BEGIN {
@local a;
a = 21;
print a > 20? 1 : 2;
c = a++ ++b;
print a;
print b;
print c;
print 99++c;
x="he" "ll" %% "o";
x%%=" world"
print x;
}

4
regress/awk/lang-025.awk Normal file
View File

@ -0,0 +1,4 @@
BEGIN {
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiix = 20;
delete iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiix ;
}

6
regress/awk/lang-026.awk Normal file
View File

@ -0,0 +1,6 @@
BEGIN {
abc[20] = "abc";
print abc[20];
abc = 10;
print abc;
}

BIN
regress/awk/lang-027.awk Normal file

Binary file not shown.

4
regress/awk/lang-028.awk Normal file
View File

@ -0,0 +1,4 @@
function substr ()
{
}

19
regress/awk/lang-029.awk Normal file
View File

@ -0,0 +1,19 @@
function abc ()
{
@local x;
print x = 20;
{
@local abc;
abc = 30;
print abc;
abc ();
}
}
BEGIN {
abc ();
}

27
regress/awk/lang-030.awk Normal file
View File

@ -0,0 +1,27 @@
BEGIN {
print 1 + 0;
print 0B11111111 + 0;
print 10 + 0;
print 0x10 + 0;
print 0b00000010 + 0;
print 0b + 0;
print 0x + 0;
print "-----------------------";
print +1 + 0;
print +0B11111111 + 0;
print +10 + 0;
print +0x10 + 0;
print +0b00000010 + 0;
print +0b + 0;
print +0x + 0;
print "-----------------------";
print -1 + 0;
print -0B11111111 + 0;
print -10 + 0;
print -0x10 + 0;
print -0b00000010 + 0;
print -0b + 0;
print -0x + 0;
}

19
regress/awk/lang-031.awk Normal file
View File

@ -0,0 +1,19 @@
BEGIN {
print match ("hhhheeeo", /e+/);
print RSTART, RLENGTH;
print match ("heeeo", /e/);
print RSTART, RLENGTH;
print match ("heeeo", /t/);
print RSTART, RLENGTH;
print "--------------------------";
print match ("hhhheeeo", "e+");
print RSTART, RLENGTH;
print match ("heeeo", "e");
print RSTART, RLENGTH;
print match ("heeeo", "t");
print RSTART, RLENGTH;
print "--------------------------";
}

14
regress/awk/lang-032.awk Normal file
View File

@ -0,0 +1,14 @@
BEGIN {
a=91
print a ++10; # print 9110
print a ++10; # print 9210
print (a) ++10; # print 9310
print ((a)) ++10; # print 9410
print ((a)++) 10; # print 9510
print "---------------------"
a=91
print (++(a)) 10; # print 9210
}

Some files were not shown because too many files have changed in this diff Show More