ccze-0.2.1/0040755000175400017540000000000007660232761012657 5ustar algernonalgernonccze-0.2.1/Makefile.in0100644000175400017540000000371007660232332014714 0ustar algernonalgernon## Makefile srcdir = @srcdir@ top_srcdir = @top_srcdir@ subdir = include Rules.mk ## -- Private variables -- ## EXTRA_DIST = Rules.mk.in configure configure.ac system.h.in \ COPYING ChangeLog install-sh config.guess config.sub \ AUTHORS README NEWS INSTALL THANKS ccze.spec.in \ ccze.spec ccze.plugins FAQ ChangeLog-0.1 DISTCLEANFILES = ccze.spec ## -- Generic rules -- ## all: all-recursive ccze.spec all-recursive: ${MAKE} -C doc all ${MAKE} -C src all ${MAKE} -C testsuite all install uninstall: ${MAKE} -C doc $@ ${MAKE} -C src $@ TAGS:: ${MAKE} -C src $@ mostlyclean clean:: ${MAKE} -C doc $@ ${MAKE} -C src $@ ${MAKE} -C testsuite $@ rm -rf *~ ++* ,,* gmon.out bb.out distclean:: clean ${MAKE} -C doc $@ ${MAKE} -C src $@ ${MAKE} -C testsuite $@ rm -rf config.cache config.status config.log \ autom4te.cache system.h Makefile Rules.mk *~ maintainer-clean:: distclean rm -rf ${top_srcdir}/configure ${top_srcdir}/system.h.in \ ${top_srcdir}/autom4te.cache dist: ccze.spec test -z "${distdir}" || rm -rf "${distdir}" ${MAKE} distdir ${MAKE} -C doc distdir ${MAKE} -C src distdir ${MAKE} -C testsuite distdir ${TAR} ${TAR_OPTIONS} -cf - ${PACKAGE}-${VERSION} | \ ${GZIP} ${GZIP_ENV} >${PACKAGE}-${VERSION}.tar.gz test -z "${distdir}" || rm -rf "${distdir}" distcheck: dist ${GZIP} -dfc ${PACKAGE}-${VERSION}.tar.gz | tar ${TAR_OPTIONS} -xf - cd ${PACKAGE}-${VERSION} && ./configure --with-builtins=all ${MAKE} -C ${PACKAGE}-${VERSION} all install check dist \ DESTDIR=$(shell pwd)/${PACKAGE}-${VERSION} rm -rf ${PACKAGE}-${VERSION} @banner="${PACKAGE}-${VERSION}.tar.gz is ready for distribution." ;\ dashes=`echo "$$banner" | sed -e s/./=/g`; \ echo "$$dashes" ;\ echo "$$banner" ;\ echo "$$dashes" ${top_srcdir}/ccze.spec: ccze.spec.in Rules.mk ${top_srcdir}/ChangeLog sed -e "s,@VERSION@,${VERSION},g" -e "s,@DIST@,${DIST},g" \ <$@.in >$@ check: all ${MAKE} -C testsuite check .PHONY: all-recursive ccze-0.2.1/Rules.mk.in0100644000175400017540000000420407660232332014676 0ustar algernonalgernon## Rules.mk -- Common variables and rules for all Makefiles -*- Makefile -*- SHELL = /bin/sh PACKAGE = ccze VERSION = 0.2.${PATCHLEVEL} DIST = stable PROGRAM = ${PACKAGE} VPATH = ${srcdir} ## -- User modifiable variables -- ## prefix = @prefix@ exec_prefix = @exec_prefix@ sysconfdir = @sysconfdir@ bindir = @bindir@ mandir = @mandir@ man1dir = ${mandir}/man1 man7dir = ${mandir}/man7 libdir = @libdir@ includedir = @includedir@ pkglibdir = ${libdir}/${PACKAGE} CC = @CC@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ TAR = tar GZIP = gzip TAR_OPTIONS = GZIP_ENV = --best ETAGS = etags INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DIR = @INSTALL@ -d EXTRAVERSION = ## -- Private variables -- ## ifeq (${subdir},) top_builddir = . else top_builddir = .. endif builddir = @builddir@ PATCHLEVEL = $(shell head -5 ${top_srcdir}/ChangeLog | tail -1 | \ sed -e "s,^.*patch-,,g" -e "s,^.*base-,,g") DISTFILES = ${SOURCES} ${HEADERS} Makefile.in ${TESTS} ${EXTRA_DIST} ## -- Generic rules -- ## all: TAGS:: ${SOURCES} ${HEADERS} test -z "${SOURCES}${HEADERS}" || ${ETAGS} ${SOURCES} ${HEADERS} mostlyclean clean:: rm -f *~ *.o *.so *.da ${PROGRAM} TAGS test -z "${CLEANFILES}" || rm -rf ${CLEANFILES} distclean:: clean rm -f Makefile test -z "${DISTCLEANFILES}" || rm -rf ${DISTCLEANFILES} maintainer-clean:: distclean test -z "${MAINTCLEANFILES}" || rm -rf ${MAINTCLEANFILES} distdir = ${top_builddir}/${PACKAGE}-${VERSION}/${subdir} distdir: ${DISTFILES} ${INSTALL_DIR} ${distdir} @list='${DISTFILES}'; for f in $$list; do \ if test -e ${srcdir}/$$f; then \ fn=${srcdir}/$$f; \ else \ fn=$$f; \ fi ; \ echo cp -p $$fn ${distdir}/$$f ;\ cp -p $$fn ${distdir}/$$f ;\ done ${top_builddir}/Rules.mk: ${top_srcdir}/Rules.mk.in ${top_builddir}/config.status cd ${top_builddir} && ./config.status ${builddir}/Makefile: ${srcdir}/Makefile.in ${top_builddir}/config.status cd ${top_builddir} && ./config.status ## -- ${MAKE} control -- ## .PHONY: all install clean distclean mostlyclean uninstall maintainer-clean \ distdir dist distcheck .SUFFIXES: .SUFFIXES: .c .o .so .DEFAULT: all ccze-0.2.1/configure0100755000175400017540000054602407660232401014565 0ustar algernonalgernon#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for ccze 0.2-stable. # # Report bugs to . # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='ccze' PACKAGE_TARNAME='ccze' PACKAGE_VERSION='0.2-stable' PACKAGE_STRING='ccze 0.2-stable' PACKAGE_BUGREPORT='algernon@bonehunter.rulez.org' ac_unique_file="src/ccze.c" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC ac_ct_CC CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT WFLAGS WFLAGS_3X CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA EGREP LIBOBJS PCRE_CONFIG PCRE_CFLAGS PCRE_LIBS ALL_PLUGINS S_PLUGINS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures ccze 0.2-stable to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of ccze 0.2-stable:";; esac cat <<\_ACEOF Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-builtins=LIST Build the listed plugins into the binary Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF ccze configure 0.2-stable generated by GNU Autoconf 2.57 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by ccze $as_me 0.2-stable, which was generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core core.* *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers system.h" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` VERSION="$PACKAGE_VERSION" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' \ '#include ' do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu WFLAGS="" WFLAGS_3X="" if test "x$ac_compiler_gnu" = "xyes"; then WFLAGS='${WFLAGS_GCC}' echo "$as_me:$LINENO: checking whether we are using GCC 3" >&5 echo $ECHO_N "checking whether we are using GCC 3... $ECHO_C" >&6 GCCVER=$(${CC} -dumpversion 2>/dev/null) case ${GCCVER} in 3.*) WFLAGS_3X='${WFLAGS_3X}' echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac else echo "$as_me:$LINENO: checking whether we are using the Intel C compiler" >&5 echo $ECHO_N "checking whether we are using the Intel C compiler... $ECHO_C" >&6 if ${CC} -V 2>&1 | head -n 1 | grep -q "Intel(R)"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 WFLAGS='${WFLAGS_ICC}' else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in dir; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi else echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in x; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in argp.h getopt.h netdb.h fcntl.h stddef.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for working volatile" >&5 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6 if test "${ac_cv_c_volatile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { volatile int x; int * volatile y; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_volatile=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_volatile=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 echo "${ECHO_T}$ac_cv_c_volatile" >&6 if test $ac_cv_c_volatile = no; then cat >>confdefs.h <<\_ACEOF #define volatile _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef signal # undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main () { int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=int fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF echo "$as_me:$LINENO: checking for error_t" >&5 echo $ECHO_N "checking for error_t... $ECHO_C" >&6 if test "${ac_cv_type_error_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((error_t *) 0) return 0; if (sizeof (error_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_error_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_error_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_error_t" >&5 echo "${ECHO_T}$ac_cv_type_error_t" >&6 if test $ac_cv_type_error_t = yes; then : else cat >>confdefs.h <<_ACEOF #define error_t int _ACEOF fi for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if STDC_HEADERS || HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { exit (malloc (0) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_malloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_malloc_0_nonnull=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6 if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 0 _ACEOF LIBOBJS="$LIBOBJS malloc.$ac_objext" cat >>confdefs.h <<\_ACEOF #define malloc rpl_malloc _ACEOF fi for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5 echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6 if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_realloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if STDC_HEADERS || HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { exit (realloc (0, 0) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_realloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_realloc_0_nonnull=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6 if test $ac_cv_func_realloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC 0 _ACEOF LIBOBJS="$LIBOBJS realloc.$ac_objext" cat >>confdefs.h <<\_ACEOF #define realloc rpl_realloc _ACEOF fi for ac_func in strftime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else # strftime is in -lintl on SCO UNIX. echo "$as_me:$LINENO: checking for strftime in -lintl" >&5 echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_strftime+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strftime (); int main () { strftime (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_strftime=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_strftime=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5 echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6 if test $ac_cv_lib_intl_strftime = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STRFTIME 1 _ACEOF LIBS="-lintl $LIBS" fi fi done echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6 if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then ac_cv_func_lstat_dereferences_slashed_symlink=no else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_lstat_dereferences_slashed_symlink=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6 test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then LIBOBJS="$LIBOBJS lstat.$ac_objext" fi echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5 echo $ECHO_N "checking whether stat accepts an empty string... $ECHO_C" >&6 if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_stat_empty_string_bug=yes else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; exit (stat ("", &sbuf) ? 1 : 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_stat_empty_string_bug=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_stat_empty_string_bug=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5 echo "${ECHO_T}$ac_cv_func_stat_empty_string_bug" >&6 if test $ac_cv_func_stat_empty_string_bug = yes; then LIBOBJS="$LIBOBJS stat.$ac_objext" cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi echo "$as_me:$LINENO: checking for working memcmp" >&5 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_memcmp_working=no else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) exit (1); } exit (0); } ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_memcmp_working=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext" for ac_func in vprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub__doprnt) || defined (__stub____doprnt) choke me #else char (*f) () = _doprnt; #endif #ifdef __cplusplus } #endif int main () { return f != _doprnt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6 if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done echo "$as_me:$LINENO: checking whether closedir returns void" >&5 echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6 if test "${ac_cv_func_closedir_void+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_closedir_void=yes else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header_dirent> #ifndef __cplusplus int closedir (); #endif int main () { exit (closedir (opendir (".")) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_closedir_void=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_closedir_void=yes fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5 echo "${ECHO_T}$ac_cv_func_closedir_void" >&6 if test $ac_cv_func_closedir_void = yes; then cat >>confdefs.h <<\_ACEOF #define CLOSEDIR_VOID 1 _ACEOF fi for ac_func in alphasort argp_parse asprintf getdelim getline getopt_long \ getsubopt memchr memset scandir strcasecmp strchr strdup \ strndup strstr do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for initscr in -lncurses" >&5 echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6 if test "${ac_cv_lib_ncurses_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initscr (); int main () { initscr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ncurses_initscr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ncurses_initscr=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_ncurses_initscr" >&6 if test $ac_cv_lib_ncurses_initscr = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBNCURSES 1 _ACEOF LIBS="-lncurses $LIBS" else { { echo "$as_me:$LINENO: error: NCurses library not found" >&5 echo "$as_me: error: NCurses library not found" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then : else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBS="-ldl $LIBS" fi fi echo "$as_me:$LINENO: checking for getopt_long" >&5 echo $ECHO_N "checking for getopt_long... $ECHO_C" >&6 if test "${ac_cv_func_getopt_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getopt_long (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getopt_long (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_getopt_long) || defined (__stub___getopt_long) choke me #else char (*f) () = getopt_long; #endif #ifdef __cplusplus } #endif int main () { return f != getopt_long; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_getopt_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_getopt_long=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_getopt_long" >&5 echo "${ECHO_T}$ac_cv_func_getopt_long" >&6 if test $ac_cv_func_getopt_long = yes; then : else echo "$as_me:$LINENO: checking for getopt_long in -lgnugetopt" >&5 echo $ECHO_N "checking for getopt_long in -lgnugetopt... $ECHO_C" >&6 if test "${ac_cv_lib_gnugetopt_getopt_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgnugetopt $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getopt_long (); int main () { getopt_long (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_gnugetopt_getopt_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gnugetopt_getopt_long=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_gnugetopt_getopt_long" >&5 echo "${ECHO_T}$ac_cv_lib_gnugetopt_getopt_long" >&6 if test $ac_cv_lib_gnugetopt_getopt_long = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGNUGETOPT 1 _ACEOF LIBS="-lgnugetopt $LIBS" fi fi if test -z "${PCRE_CONFIG}"; then # Extract the first word of "pcre-config", so it can be a program name with args. set dummy pcre-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PCRE_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PCRE_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PCRE_CONFIG="$PCRE_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PCRE_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_PCRE_CONFIG" && ac_cv_path_PCRE_CONFIG="no" ;; esac fi PCRE_CONFIG=$ac_cv_path_PCRE_CONFIG if test -n "$PCRE_CONFIG"; then echo "$as_me:$LINENO: result: $PCRE_CONFIG" >&5 echo "${ECHO_T}$PCRE_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi echo "$as_me:$LINENO: checking for PCRE" >&5 echo $ECHO_N "checking for PCRE... $ECHO_C" >&6 if test "${PCRE_CONFIG}" = "no"; then { { echo "$as_me:$LINENO: error: PCRE not found" >&5 echo "$as_me: error: PCRE not found" >&2;} { (exit 1); exit 1; }; } fi PCRE_CFLAGS=$($PCRE_CONFIG --cflags) PCRE_LIBS=$($PCRE_CONFIG --libs) echo "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6 echo "$as_me:$LINENO: checking for suboptarg" >&5 echo $ECHO_N "checking for suboptarg... $ECHO_C" >&6 if test "$cross_compiling" = yes; then have_suboptarg="no" else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include static char **empty_subopts[] = { NULL }; extern char *suboptarg; int main () { char *subopts = "something"; char *value; getsubopt (&subopts, empty_subopts, &value); exit (!suboptarg); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then have_suboptarg="yes" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) have_suboptarg="no" fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: ${have_suboptarg}" >&5 echo "${ECHO_T}${have_suboptarg}" >&6 case ${have_suboptarg} in yes) cat >>confdefs.h <<_ACEOF #define HAVE_SUBOPTARG 1 _ACEOF ;; esac ALL_PLUGINS=$(tr '\n' ' ' < ${srcdir}/ccze.plugins) # Check whether --with-builtins or --without-builtins was given. if test "${with_builtins+set}" = set; then withval="$with_builtins" case $withval in all) S_PLUGINS=$ALL_PLUGINS;; *) S_PLUGINS="$(echo $withval | sed 's/,/ /g')";; esac else S_PLUGINS="" fi; ac_config_files="$ac_config_files Rules.mk Makefile doc/Makefile src/Makefile testsuite/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by ccze $as_me 0.2-stable, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ ccze config.status 0.2-stable configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Rules.mk" ) CONFIG_FILES="$CONFIG_FILES Rules.mk" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; "system.h" ) CONFIG_HEADERS="$CONFIG_HEADERS system.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@CC@,$CC,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@WFLAGS@,$WFLAGS,;t t s,@WFLAGS_3X@,$WFLAGS_3X,;t t s,@CPP@,$CPP,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@EGREP@,$EGREP,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@PCRE_CONFIG@,$PCRE_CONFIG,;t t s,@PCRE_CFLAGS@,$PCRE_CFLAGS,;t t s,@PCRE_LIBS@,$PCRE_LIBS,;t t s,@ALL_PLUGINS@,$ALL_PLUGINS,;t t s,@S_PLUGINS@,$S_PLUGINS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi ccze-0.2.1/configure.ac0100644000175400017540000001007307660232332015135 0ustar algernonalgernondnl configure.ac for ccze dnl Copyright (C) 2002, 2003 Gergely Nagy dnl dnl Process this file with autoconf to produce a configure script. dnl dnl This file is part of ccze. dnl dnl ccze is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl ccze is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl ********************** dnl * Boilerplate dnl ********************** AC_PREREQ(2.54) AC_INIT([ccze], [0.2-stable], [algernon@bonehunter.rulez.org]) AC_CONFIG_SRCDIR(src/ccze.c) AC_CONFIG_HEADERS(system.h) AC_CANONICAL_HOST AC_SUBST(host_os) VERSION="$PACKAGE_VERSION" dnl ********************** dnl * Programs dnl ********************** AC_CHECK_TOOL(CC, cc) AC_PROG_CC WFLAGS="" WFLAGS_3X="" if test "x$ac_compiler_gnu" = "xyes"; then WFLAGS='${WFLAGS_GCC}' AC_MSG_CHECKING(whether we are using GCC 3) GCCVER=$(${CC} -dumpversion 2>/dev/null) case ${GCCVER} in 3.*) WFLAGS_3X='${WFLAGS_3X}' AC_MSG_RESULT(yes) ;; *) AC_MSG_RESULT(no) ;; esac else AC_MSG_CHECKING(whether we are using the Intel C compiler) if ${CC} -V 2>&1 | head -n 1 | grep -q "Intel(R)"; then AC_MSG_RESULT(yes) WFLAGS='${WFLAGS_ICC}' else AC_MSG_RESULT(no) fi fi AC_SUBST(WFLAGS) AC_SUBST(WFLAGS_3X) AC_PROG_CPP AC_PROG_INSTALL dnl ********************** dnl * Headers dnl ********************** AC_HEADER_STDC AC_HEADER_DIRENT AC_CHECK_HEADERS([argp.h getopt.h netdb.h fcntl.h stddef.h]) dnl ********************** dnl * Typedefs & co dnl ********************** AC_C_CONST AC_C_VOLATILE AC_TYPE_SIZE_T AC_TYPE_SIGNAL AC_CHECK_TYPE(error_t, int) dnl ********************** dnl * Library functions dnl ********************** AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_STRFTIME AC_FUNC_STAT AC_FUNC_MEMCMP AC_FUNC_VPRINTF AC_FUNC_CLOSEDIR_VOID AC_CHECK_FUNCS([alphasort argp_parse asprintf getdelim getline getopt_long \ getsubopt memchr memset scandir strcasecmp strchr strdup \ strndup strstr]) AC_CHECK_LIB(ncurses, initscr, [], [AC_ERROR(NCurses library not found)]) AC_CHECK_FUNC(dlopen, [], [AC_CHECK_LIB(dl, dlopen)]) AC_CHECK_FUNC(getopt_long, [], [AC_CHECK_LIB(gnugetopt, getopt_long)]) if test -z "${PCRE_CONFIG}"; then AC_PATH_PROG(PCRE_CONFIG, pcre-config, no) fi AC_MSG_CHECKING(for PCRE) if test "${PCRE_CONFIG}" = "no"; then AC_ERROR(PCRE not found) fi PCRE_CFLAGS=$($PCRE_CONFIG --cflags) PCRE_LIBS=$($PCRE_CONFIG --libs) AC_SUBST(PCRE_CFLAGS) AC_SUBST(PCRE_LIBS) AC_MSG_RESULT(found) AC_MSG_CHECKING(for suboptarg) AC_RUN_IFELSE(AC_LANG_PROGRAM( [[#include #include #include static char **empty_subopts[[]] = { NULL }; extern char *suboptarg; ]], [[ char *subopts = "something"; char *value; getsubopt (&subopts, empty_subopts, &value); exit (!suboptarg);]]), [have_suboptarg="yes"], [have_suboptarg="no"], [have_suboptarg="no"]) AC_MSG_RESULT(${have_suboptarg}) case ${have_suboptarg} in yes) AC_DEFINE_UNQUOTED(HAVE_SUBOPTARG, 1, Define this if you have the suboptarg variable) ;; esac dnl ********************** dnl * Plugins dnl ********************** ALL_PLUGINS=$(tr '\n' ' ' < ${srcdir}/ccze.plugins) AC_SUBST(ALL_PLUGINS) AC_ARG_WITH(builtins, [ --with-builtins=LIST Build the listed plugins into the binary], [case $withval in all) S_PLUGINS=$ALL_PLUGINS;; *) S_PLUGINS="$(echo $withval | sed 's/,/ /g')";; esac], [S_PLUGINS=""]) AC_SUBST(S_PLUGINS) dnl ********************** dnl * Output dnl ********************** AC_CONFIG_FILES([ Rules.mk Makefile doc/Makefile src/Makefile testsuite/Makefile ]) AC_OUTPUT ccze-0.2.1/system.h.in0100644000175400017540000001173107660232404014753 0ustar algernonalgernon/* system.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if the `closedir' function returns void instead of `int'. */ #undef CLOSEDIR_VOID /* Define to 1 if you have the `alphasort' function. */ #undef HAVE_ALPHASORT /* Define to 1 if you have the header file. */ #undef HAVE_ARGP_H /* Define to 1 if you have the `argp_parse' function. */ #undef HAVE_ARGP_PARSE /* Define to 1 if you have the `asprintf' function. */ #undef HAVE_ASPRINTF /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `getdelim' function. */ #undef HAVE_GETDELIM /* Define to 1 if you have the `getline' function. */ #undef HAVE_GETLINE /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getopt_long' function. */ #undef HAVE_GETOPT_LONG /* Define to 1 if you have the `getsubopt' function. */ #undef HAVE_GETSUBOPT /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL /* Define to 1 if you have the `gnugetopt' library (-lgnugetopt). */ #undef HAVE_LIBGNUGETOPT /* Define to 1 if you have the `ncurses' library (-lncurses). */ #undef HAVE_LIBNCURSES /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the `memchr' function. */ #undef HAVE_MEMCHR /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the `scandir' function. */ #undef HAVE_SCANDIR /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strftime' function. */ #undef HAVE_STRFTIME /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strndup' function. */ #undef HAVE_STRNDUP /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define this if you have the suboptarg variable */ #undef HAVE_SUBOPTARG /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if does not define. */ #undef error_t /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to `unsigned' if does not define. */ #undef size_t /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ #undef volatile ccze-0.2.1/COPYING0100644000175400017540000004311007660232332013700 0ustar algernonalgernon GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This 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 Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ccze-0.2.1/ChangeLog0100644000175400017540000001341207660232731014424 0ustar algernonalgernon# do not edit -- automatically generated by arch changelog # tag: automatic-ChangeLog--algernon@bonehunter.rulez.org--iluvatar-archive/ccze--0.2 # 2003-05-13 17:51:30 GMT Gergely Nagy patch-1 Summary: The `Fireflower' release Revision: ccze--0.2--patch-1 Always cold outside And it's freezing inside Into the fire we ride * NEWS: Updated. * debian/changelog: Likewise. Patches applied: * algernon@bonehunter-rulez.org--iluvatar-archive/ccze--0.3--patch-12 Run `make check' during distcheck * algernon@bonehunter-rulez.org--iluvatar-archive/ccze--0.3--patch-11 Fixed procmail subject coloring * algernon@bonehunter-rulez.org--iluvatar-archive/ccze--0.3--patch-10 Fixed the testsuite * algernon@bonehunter-rulez.org--iluvatar-archive/ccze--0.3--patch-9 Support transparency in the ANSI output too * algernon@bonehunter-rulez.org--iluvatar-archive/ccze--0.3--patch-8 Raw ANSI supports background colors * algernon@bonehunter-rulez.org--iluvatar-archive/ccze--0.3--patch-7 Documented ccze-dump * algernon@bonehunter-rulez.org--iluvatar-archive/ccze--0.3--patch-6 ChangeLog id update * algernon@bonehunter-rulez.org--iluvatar-archive/ccze--0.3--patch-5 TODO removed * algernon@bonehunter-rulez.org--iluvatar-archive/ccze--0.3--patch-4 Fixed double module loading * algernon@bonehunter-rulez.org--iluvatar-archive/ccze--0.3--patch-3 Added --mode * algernon@bonehunter-rulez.org--iluvatar-archive/ccze--0.3--patch-2 Documented --list-plugins * algernon@bonehunter-rulez.org--iluvatar-archive/ccze--0.3--patch-1 Fixed a compile-time warning new files: {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log/base-0 {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log/patch-1 {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log/patch-10 {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log/patch-11 {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log/patch-12 {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log/patch-2 {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log/patch-3 {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log/patch-4 {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log/patch-5 {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log/patch-6 {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log/patch-7 {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log/patch-8 {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log/patch-9 testsuite/.arch-ids/bug-procmailsubj2.in.id testsuite/.arch-ids/bug-procmailsubj2.ok.id testsuite/.arch-ids/bug-procmailsubj2.test.id testsuite/bug-procmailsubj2.in testsuite/bug-procmailsubj2.ok testsuite/bug-procmailsubj2.test modified files: Makefile.in NEWS ccze.spec.in debian/changelog debian/rules doc/ccze.1.in src/ccze-color.c src/ccze-plugin.c src/ccze.c src/mod_procmail.c testsuite/Makefile.in testsuite/bug-httpd.ok testsuite/bug-procmailsubj.ok testsuite/bug-procmailsubj.test testsuite/do-test new directories: {arch}/ccze/ccze/ccze--0.3 {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive {arch}/ccze/ccze/ccze--0.3/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log new patches: algernon@bonehunter.rulez.org--iluvatar-archive/ccze--0.3--base-0 algernon@bonehunter.rulez.org--iluvatar-archive/ccze--0.3--patch-1 algernon@bonehunter.rulez.org--iluvatar-archive/ccze--0.3--patch-2 algernon@bonehunter.rulez.org--iluvatar-archive/ccze--0.3--patch-3 algernon@bonehunter.rulez.org--iluvatar-archive/ccze--0.3--patch-4 algernon@bonehunter.rulez.org--iluvatar-archive/ccze--0.3--patch-5 algernon@bonehunter.rulez.org--iluvatar-archive/ccze--0.3--patch-6 algernon@bonehunter.rulez.org--iluvatar-archive/ccze--0.3--patch-7 algernon@bonehunter.rulez.org--iluvatar-archive/ccze--0.3--patch-8 algernon@bonehunter.rulez.org--iluvatar-archive/ccze--0.3--patch-9 algernon@bonehunter.rulez.org--iluvatar-archive/ccze--0.3--patch-10 algernon@bonehunter.rulez.org--iluvatar-archive/ccze--0.3--patch-11 algernon@bonehunter.rulez.org--iluvatar-archive/ccze--0.3--patch-12 2003-03-29 19:04:20 GMT Gergely Nagy base-0 Summary: The `Mephisto' release. Revision: ccze--0.2--base-0 (Instrumental) * NEWS: Updated. * debian/changelog: Likewise. * configure.ac: Likewise. * Rules.mk.in: Likewise. * src/ccze.c: Likewise. * ChangeLog-0.1: ChangeLog of the old 0.1 branch. * Makefile.in (EXTRA_DIST): Added ChangeLog-0.1. * ccze.spec.in (%doc): Likewise. new files: .arch-ids/ChangeLog.id ChangeLog modified files: Makefile.in NEWS Rules.mk.in ccze.spec.in configure.ac debian/changelog src/ccze.c renamed files: .arch-ids/ChangeLog.id ==> .arch-ids/ChangeLog-0.1.id ChangeLog ==> ChangeLog-0.1 new directories: {arch}/ccze/ccze/ccze--0.2 {arch}/ccze/ccze/ccze--0.2/algernon@bonehunter.rulez.org--iluvatar-archive {arch}/ccze/ccze/ccze--0.2/algernon@bonehunter.rulez.org--iluvatar-archive/patch-log ccze-0.2.1/install-sh0100755000175400017540000001273707660232332014664 0ustar algernonalgernon#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 ccze-0.2.1/config.guess0100755000175400017540000011536607660232332015202 0ustar algernonalgernon#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. timestamp='2002-07-09' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # This shell variable is my proudest work .. or something. --bje set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; (old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; dummy=$tmpdir/dummy ; files="$dummy.c $dummy.o $dummy.rel $dummy" ; trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; rm -f $files ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; unset files' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF eval $set_cc_for_build $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; 2-1307) UNAME_MACHINE="alphaev68" ;; esac fi rm -f $dummy.s $dummy && rmdir $tmpdir echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 rm -f $dummy.c $dummy && rmdir $tmpdir echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 rm -f $dummy.c $dummy && rmdir $tmpdir echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy` if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy && rmdir $tmpdir fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 rm -f $dummy.c $dummy && rmdir $tmpdir echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3D:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` rm -f $dummy.c && rmdir $tmpdir echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:3*) echo i386-pc-interix3 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` rm -f $dummy.c && rmdir $tmpdir test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` rm -f $dummy.c && rmdir $tmpdir test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 rm -f $dummy.c $dummy && rmdir $tmpdir # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ccze-0.2.1/config.sub0100755000175400017540000007145307660232332014643 0ustar algernonalgernon#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. timestamp='2002-07-03' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 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. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa64 | mipsisa64el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c54x-* \ | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipstx39 | mipstx39el \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3d) basic_machine=alpha-cray os=-unicos ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; windows32) basic_machine=i386-pc os=-windows32-msvcrt ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; c4x*) basic_machine=c4x-none os=-coff ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto*) os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ccze-0.2.1/AUTHORS0100644000175400017540000000005507660232332013716 0ustar algernonalgernonGergely Nagy ccze-0.2.1/README0100644000175400017540000000075607660232332013536 0ustar algernonalgernonThis is CCZE, a fast log colorizer written in C, intended to be a drop-in replacement for colorize (http://colorize.raszi.hu). See the NEWS file for a description of recent changes to CCZE. See the file INSTALL for instructions on how to build and install the CCZE data and program files. See the CCZE manual for details about configuration. Type "man ccze" in the shell prompt. Please visit the official CCZE web page for more information. The URL is http://bonehunter.rulez.org/CCZE.html. ccze-0.2.1/NEWS0100644000175400017540000000733207660232332013352 0ustar algernonalgernonNEWS -- list of user-visible changes -*- outline -*- * CCZE 0.2.1 [Fireflower] -- 2003-05-13 The Fireflower release brings transparency and background colour support for the raw ANSI output mode, documentation updates and minor bugfixes all over the place. * CCZE 0.2.0 [Mephisto] -- 2003-03-29 Mephisto features raw ANSI output support, without the use of nCurses. This adds support for scrollback, both on console and in xterms. Also, it allows one to send CCZE to the background, and mix various logs and options on one terminal. A new coloriser for Pure-FTPD's Stats log format was added, and the httpd module was modified to handle Pure-FTPD's CLF format, and bad HTTP requests. * CCZE 0.1.228 [Largo] -- 2003-03-20 This release features many many internal enhancements, mostly for the plug-in system, a coloriser for proftpd logs, and various fixes all over the place. * CCZE 0.1.212 [Avatar] -- 2003-03-04 Implemented support for passing arguments to plugins. None of the plugins shipped with CCZE support this, however, external plugins might (and do, for that matter, see the homepage). Also, some minor bugs (misformatting on the manual page, garbled output, and not properly recognised procmail logs) were also squashed. * CCZE 0.1.200 [Enigma of the Absolute] -- 2003-02-21 During the past few weeks, CCZE was ported to Cygwin and Tru64 (many thanks to Jon Ewing and Erik Braun for their help). Also, a coloriser for distccd.log files was added too. * CCZE 0.1.171 [Mesmerism] -- 2003-02-09. This release brings colorisers for php.log, oops/oops.log, icecast/icecast.log and icecast/usage.log. Also, it is now possible to disable any of the built-in plugins, that is, they behave as loadable modules when --plugin is specified. For the benefit of transparent xterm users, CCZE defaults to not alter the background colour by default. * CCZE 0.1.150 [The Cardinal Sin] -- 2003-02-04. Since the last release, a great deal of code cleanup took place, resulting in most of the modules' sources getting renamed. As usual, bugs were fixed during this process, so certain characters will get escaped in the HTML output. Also, a full-blown coloriser module was added for xferlog files, and a syslog-subcoloriser for postfix logs. CCZE also handles SIGHUP nicely, by effectively restarting itself. * CCZE 0.1.134 [Song of the Dispossessed] -- 2003-01-19. Colours (even the background of the outputted HTML) can now be changed on the command-line too. During this process, CCZE was ported to FreeBSD. * CCZE 0.1.122 [Wild in The Woods] -- 2003-01-13. HTML output was cleaned up and made customisable. From now on, CCZE uses Cascading Style Sheets. * CCZE 0.1.108 [Devorzhum] -- 2003-01-10. In this release experimental HTML output was added. It is not really customisable yet, but produces usable output (better than that of colorize! :). * CCZE 0.1.103 [For My Fallen Angel] -- 2002.12.02. Many internal cleanups and documentation updates, support for built-in and partial plugins, and more. * CCZE 0.1.91 [Like Gods of the Sun] -- 2002.11.19. Major restructuring in the plugin code: cleaner, better, lighter. The new design allows sub-colorisers, to colorise syslog messages (with the date, host and that kind of stuff handled by the syslog module) for example. Two such plugins are included: one for ulogd, another for apmd. * CCZE 0.1.80 [The Stance of Evander Sinque] -- 2002.10.12. This is mainly a minor convenience-enhanced release. The major change is that CCZE will now exit if it could not load any plugins. * CCZE 0.1.72 [Base Level Erotica] -- 2002.10.04. Brown paper-bag release, as I broke all the modules in 0.1.64. Apart from this fix, this release is the same as 0.1.70 yesterday. * CCZE 0.1.70 [Edenbeast] -- 2002.10.03. Initial public release. ccze-0.2.1/INSTALL0100644000175400017540000001722707660232332013710 0ustar algernonalgernonBasic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. ccze-0.2.1/THANKS0100644000175400017540000000040007660232332013553 0ustar algernonalgernonAlan Schmitt Andreas Brenk DC-1 Erik Braun Ferenc Kalcso (Klay) Istvan Karaszi (RASZi) Janos Lorincz (Loloke) Jon Ewing Mark Szabo (Mw3) Matyas Koszik (koszik) Mickey Everts Morten Brix Pedersen Thomas Graf Zoltan Lengyel (War_New) Zsolt Czigléczki (ciga) ccze-0.2.1/ccze.spec.in0100644000175400017540000000404007660232332015051 0ustar algernonalgernon%define version @VERSION@ %define dist @DIST@ %define release 1 Summary: A robust log colorizer Name: ccze Version: %{version} Release: %{release} Vendor: Generic Packager: Gergely Nagy URL: http://bonehunter.rulez.org/CCZE.html Copyright: GPL Group: Applications/Text Source: ftp://bonehunter.rulez.org/pub/ccze/%{dist}/ccze-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-root BuildPrereq: ncurses-devel >= 5.0, pcre-devel >= 3.1 %description CCZE is a roboust and modular log colorizer, with plugins for apm, exim, fetchmail, httpd, postfix, procmail, squid, syslog, ulogd, vsftpd, xferlog and more. %prep %setup -q %build %configure --with-builtins=all make %install %makeinstall install -d %{buildroot}/%{_sysconfdir} src/ccze-dump >%{buildroot}/%{_sysconfdir}/cczerc %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog ChangeLog-0.1 NEWS README THANKS FAQ %config %{_sysconfdir}/cczerc %{_bindir}/ccze %{_bindir}/ccze-cssdump %{_includedir}/ccze.h %{_mandir}/man1/ccze.1* %{_mandir}/man1/ccze-cssdump.1* %{_mandir}/man7/ccze-plugin.7* %changelog * Sat Mar 29 2003 Gergely Nagy - Support different distributions than CCZE stable. * Tue Feb 25 2003 Gergely Nagy - Include FAQ. * Thu Feb 20 2003 Gergely Nagy - Use %{buildroot}, %configure and %makeinstall. - Improved description. * Sat Jan 25 2003 Gergely Nagy - Include %{_includedir}/ccze.h * Mon Jan 13 2003 Gergely Nagy - Include ccze-cssdump and its manual page. - Packager changed to myself. * Wed Nov 20 2002 Gergely Nagy - Build all modules statically. * Tue Nov 19 2002 Gergely Nagy - Use src/ccze-dump to generate the default configuration file. * Tue Nov 19 2002 Gergely Nagy - Simplified and made it version-neultral. * Sun Nov 17 2002 Andreas Brenk - Initial creation ccze-0.2.1/ccze.spec0100644000175400017540000000403407660232756014461 0ustar algernonalgernon%define version 0.2.1 %define dist stable %define release 1 Summary: A robust log colorizer Name: ccze Version: %{version} Release: %{release} Vendor: Generic Packager: Gergely Nagy URL: http://bonehunter.rulez.org/CCZE.html Copyright: GPL Group: Applications/Text Source: ftp://bonehunter.rulez.org/pub/ccze/%{dist}/ccze-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-root BuildPrereq: ncurses-devel >= 5.0, pcre-devel >= 3.1 %description CCZE is a roboust and modular log colorizer, with plugins for apm, exim, fetchmail, httpd, postfix, procmail, squid, syslog, ulogd, vsftpd, xferlog and more. %prep %setup -q %build %configure --with-builtins=all make %install %makeinstall install -d %{buildroot}/%{_sysconfdir} src/ccze-dump >%{buildroot}/%{_sysconfdir}/cczerc %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog ChangeLog-0.1 NEWS README THANKS FAQ %config %{_sysconfdir}/cczerc %{_bindir}/ccze %{_bindir}/ccze-cssdump %{_includedir}/ccze.h %{_mandir}/man1/ccze.1* %{_mandir}/man1/ccze-cssdump.1* %{_mandir}/man7/ccze-plugin.7* %changelog * Sat Mar 29 2003 Gergely Nagy - Support different distributions than CCZE stable. * Tue Feb 25 2003 Gergely Nagy - Include FAQ. * Thu Feb 20 2003 Gergely Nagy - Use %{buildroot}, %configure and %makeinstall. - Improved description. * Sat Jan 25 2003 Gergely Nagy - Include %{_includedir}/ccze.h * Mon Jan 13 2003 Gergely Nagy - Include ccze-cssdump and its manual page. - Packager changed to myself. * Wed Nov 20 2002 Gergely Nagy - Build all modules statically. * Tue Nov 19 2002 Gergely Nagy - Use src/ccze-dump to generate the default configuration file. * Tue Nov 19 2002 Gergely Nagy - Simplified and made it version-neultral. * Sun Nov 17 2002 Andreas Brenk - Initial creation ccze-0.2.1/ccze.plugins0100644000175400017540000000020107660232332015166 0ustar algernonalgernonapm distcc exim fetchmail ftpstats httpd icecast oops php postfix procmail proftpd squid sulog super syslog ulogd vsftpd xferlog ccze-0.2.1/FAQ0100644000175400017540000000363307660232332013205 0ustar algernonalgernonCCZE Frequently Asked Questions -*- outline -*- =============================== * Compiling ** CCZE compiles fine, but dies with a relocation error. There is an issue with CCZE on some GNU/Linux platforms, when PCRE gets statically linked into the plugins (RedHat for example). Why this is a problem, and how to properly fix it, is beyond me. However, there is a workaround: When you configure CCZE, pass the `--with-builtins=all' option to configure. * Usage ** I would like to combine two files in one terminal. Can I do that? Of course! This is just a little bit of shell trickery. Lets suppose you want to view your access.log and your xferlog in the same terminal: server:/var/log# (tail -f apache/access.log & ; tail -f xferlog) | ccze ** I would like to combine two files, but with different options. This is possible too, once you have a recent enough CCZE (0.1.230 or later). Just launch any number of CCZEs in the background, in raw ANSI mode, like this: /var/log# (tail -f apache/access.log | ccze -A -p httpd -o nolookups) & /var/log# (tail -f syslog | ccze -A -p syslog) & /var/log# tail -f xferlog | ccze -A -p xferlog ** Is there an easy way to follow the html output in a browser? Like tail -f? Naturally! Although, it is not that simple as a `tail -f'.. Or maybe it is. Anyway: tail -f /var/log/syslog | ccze -h >~/logfiles/syslog.html And point your browser to ~/logfiles/syslog.html. A more dynamical approach would be this: ,----[ ccze.cgi ] | #! /bin/sh | cat < patch-243 Summary: mod_ftpstats Revision: ccze--0.1--patch-243 * src/mod_ftpstats.c: New file. * ccze.plugins: Added ftpstats. * doc/ccze.1.in (PLUGINS): Documented it. Thanks to Ciga for the sample logs. new files: src/.arch-ids/mod_ftpstats.c.id src/mod_ftpstats.c modified files: ChangeLog ccze.plugins doc/ccze.1.in 2003-03-29 16:14:20 GMT Gergely Nagy patch-242 Summary: Bumped Standards-Version Revision: ccze--0.1--patch-242 * debian/control (Standards-Version): Updated to 3.5.9. modified files: ChangeLog debian/control 2003-03-29 16:10:25 GMT Gergely Nagy patch-241 Summary: Support Pure-FTPD CLF format Revision: ccze--0.1--patch-241 * src/mod_httpd.c (ccze_httpd_setup): Modified the httpd_access regexp to catch pure-ftpd's CLF logformat. * doc/ccze.1.in (PLUGINS): Documented this. Thanks to Ciga for his assistance. modified files: ChangeLog doc/ccze.1.in src/mod_httpd.c 2003-03-29 15:58:53 GMT Gergely Nagy patch-240 Summary: Fixed coloring of bad HTTP requests Revision: ccze--0.1--patch-240 * src/mod_httpd.c (ccze_httpd_setup): Changed the httpd_access regexp to allow arbitrary request methods. * testsuite/bug-httpd.test: New test. * testsuite/bug-httpd.in: New test input. * testsuite/bug-httpd.ok: New expected test output. * testsuite/Makefile.in (TESTS): Added bug-httpd.test. new files: testsuite/.arch-ids/bug-httpd.in.id testsuite/.arch-ids/bug-httpd.ok.id testsuite/.arch-ids/bug-httpd.test.id testsuite/bug-httpd.in testsuite/bug-httpd.ok testsuite/bug-httpd.test modified files: ChangeLog src/mod_httpd.c testsuite/Makefile.in 2003-03-29 15:06:27 GMT Gergely Nagy patch-239 Summary: FAQ cosmetic fix Revision: ccze--0.1--patch-239 * FAQ: Removed a spurious newline. modified files: ChangeLog FAQ 2003-03-29 15:04:28 GMT Gergely Nagy patch-238 Summary: Documentation update and a minor fix Revision: ccze--0.1--patch-238 * doc/ccze-plugin.7.in: Updated to reflect reality. Some parts were really outdated. * Makefile.in (ccze.spec): Renamed to... (${top_srcdir}/ccze.spec): ...this. modified files: ChangeLog Makefile.in doc/ccze-plugin.7.in 2003-03-29 14:44:28 GMT Gergely Nagy patch-237 Summary: Preparing 0.2.0... Revision: ccze--0.1--patch-237 * Rules.mk.in (DIST): New variable. (PATCHLEVEL): Support -base-*. * ccze.spec.in: Support %{dist} (via @DIST@). * Makefile.in (ccze.spec): Substitue @DIST@ with ${DIST}. * debian/rules (binary-ccze): Support more than one ChangeLog. modified files: ChangeLog Makefile.in Rules.mk.in ccze.spec.in debian/rules 2003-03-29 14:24:27 GMT Gergely Nagy patch-236 Summary: Fixed compile-time warnings Revision: ccze--0.1--patch-236 * src/ccze.c (ccze_newline): Added a default ccze_mode_t handler. (ccze_addstr_internal): Likewise. (ccze_main): Use sigint_handler() when doing the plugin listing. modified files: ChangeLog src/ccze.c 2003-03-29 14:18:55 GMT Gergely Nagy patch-235 Summary: Added support for listing plugins Revision: ccze--0.1--patch-235 * src/ccze-private.h (ccze_mode_t): Added a CCZE_MODE_PLUGIN_LIST mode. (ccze_plugin_list_fancy): New prototype. * src/ccze.c (parse_opt): Handle --list-plugins. (main): Added support for the new CCZE_MODE_PLUGIN_LIST mode. * src/ccze.h (ccze_plugin_t): Added a new `desc' member. [CCZE_ABI_VERSION]: Bumped to 2. [CCZE_DEFINE_PLUGIN]: Take a third argument: desc. * src/ccze-plugin.c (ccze_plugin_list_fancy): New function. All plugins updated to CCZE_ABI_VERSION 2 requirements. modified files: ChangeLog src/ccze-plugin.c src/ccze-private.h src/ccze.c src/ccze.h src/mod_apm.c src/mod_distcc.c src/mod_exim.c src/mod_fetchmail.c src/mod_httpd.c src/mod_icecast.c src/mod_oops.c src/mod_php.c src/mod_postfix.c src/mod_procmail.c src/mod_proftpd.c src/mod_squid.c src/mod_sulog.c src/mod_super.c src/mod_syslog.c src/mod_ulogd.c src/mod_vsftpd.c src/mod_xferlog.c 2003-03-29 13:28:15 GMT Gergely Nagy patch-234 Summary: Code cleanup Revision: ccze--0.1--patch-234 * src/ccze-private.h (ccze_mode_t): New typedef. (ccze_config_t): Replace `html', `debug' and `raw_ansi' members with `mode'. All users updated accordingly. modified files: ChangeLog src/ccze-color.c src/ccze-cssdump.c src/ccze-dump.c src/ccze-private.h src/ccze.c 2003-03-29 13:10:13 GMT Gergely Nagy patch-233 Summary: Fixed plugin loading (well, setup) Revision: ccze--0.1--patch-233 * src/ccze-plugin.c (ccze_plugin_setup): Do not increment `i' while calling ->startup. Problem noticed & debugged by Ciga. modified files: ChangeLog src/ccze-plugin.c 2003-03-29 12:49:11 GMT Gergely Nagy patch-232 Summary: Fixed ICC warnings Revision: ccze--0.1--patch-232 * src/ccze.h [CCZE_DEFINE_PLUGIN]: Do not put a coma after the struct. [!BUILTIN] [__default_plugin]: Start with a coma. * src/ccze-cssdump.c: Do not declare ccze_config static. * src/ccze-dump.c: Likewise. modified files: ChangeLog src/ccze-cssdump.c src/ccze-dump.c src/ccze.h 2003-03-29 12:28:49 GMT Gergely Nagy patch-231 Summary: FAQ update Revision: ccze--0.1--patch-231 * FAQ: Added a new Q&A. modified files: ChangeLog FAQ 2003-03-29 12:17:59 GMT Gergely Nagy patch-230 Summary: raw ANSI output mode Revision: ccze--0.1--patch-230 * src/ccze-private.h (ccze_config_t): Added a new `raw_ansi' member. * src/ccze.c (ccze_raw_ansi_color): New variable. (ccze_config_t): Initialise raw_ansi to off. (parse_opt): Accept --raw-ansi, -A. (ccze_newline): Output only a `\n' in raw_ansi mode. (ccze_addstr_internal): Added support for outputting raw ANSI sequences. (sigint_handler): Likewise. (main): Likewise. * src/ccze-color.c (ccze_color_parse): Added support for raw ANSI sequences. (ccze_color_init_raw_ansi): New function. (ccze_color_init): Use it, if appropriate. * src/ccze-cssdump (ccze_config): New variable. Since ccze_color_parse() needs this. (parse_opt): Use ccze_config.rcfile. (main): Likewise. * src/ccze-dump (ccze_config): New variable. Since ccze_color_parse() needs this. (parse_opt): Use ccze_config.rcfile. (main): Likewise. * THANKS: Added Thomas Graf. * doc/ccze.1.in (OPTIONS): Document --raw-ansi, -A. Patch heavily based on the work of Thomas Graf. modified files: ChangeLog THANKS doc/ccze.1.in src/ccze-color.c src/ccze-cssdump.c src/ccze-dump.c src/ccze-private.h src/ccze.c 2003-03-29 11:11:39 GMT Gergely Nagy patch-229 Summary: Whoops..! Corrected Ciga's name. Revision: ccze--0.1--patch-229 * THANKS: Write Ciga's name in english-style, like all others. Noticed by himself. modified files: ChangeLog THANKS 2003-03-20 22:52:15 GMT Gergely Nagy patch-228 Summary: The `Largo' release. Revision: ccze--0.1--patch-228 No tree's shade ever was more serence, dear and lovely. * NEWS: Updated. * debian/changelog: Likewise. modified files: ChangeLog NEWS debian/changelog 2003-03-19 10:26:56 GMT Gergely Nagy patch-227 Summary: Support loading a module twice or more Revision: ccze--0.1--patch-227 * src/ccze.h (__default_plugin): New define. (CCZE_DEFINE_PLUGIN): Use it. (ccze_plugin_name_get): New prototype. * src/ccze-private.h (ccze_plugin_setup): New prototype. * src/ccze-plugin.c (ccze_plugin_setup): New function, extracted from src/main.c's main(). (ccze_plugin_shutdown): Place the current plugin name into `plugin_running'. (ccze_plugin_run): Likewise. (ccze_plugin_argv_set): Initialise ->argv[0]. (ccze_plugin_name_get): New function. (_ccze_plugin_load): If loading in the normal way failed, check `ccze_default_plugin', and try loading that one. * doc/ccze-plugin.7.in: Document ccze_plugin_name_get and CCZE_DEFINE_PLUGINS. modified files: ChangeLog doc/ccze-plugin.7.in src/Makefile.in src/ccze-plugin.c src/ccze-private.h src/ccze.c src/ccze.h 2003-03-12 20:21:52 GMT Gergely Nagy patch-226 Summary: Support loading multiple plugins from a single file Revision: ccze--0.1--patch-226 * src/ccze.h (CCZE_DEFINE_PLUGINS): New macro. * src/ccze-plugins.c (_ccze_plugin_load): Take a `recurse' argument. Do not check multiple plugins if it is off. Also, before loading a plugin, check if it is loaded already. If the plugin opening succeeds, but the _info symbol is not found, defer bailing out. After loaded the default plugin, or deferred exiting, check if there are more plugins, and load them too. modified files: ChangeLog src/ccze-plugin.c src/ccze.h 2003-03-12 16:23:33 GMT Gergely Nagy patch-225 Summary: Testsuite overhaul Revision: ccze--0.1--patch-225 * testsuite/defs: Support VERBOSE=1 - echoing which test it runs, and a description - and VERBOSE=* - the old behaviour. * testsuite/do-test: Check for the ${testname}.in file in both the objdir, and the sourcedir. * testsuite/exim.in: Removed. * testsuite/exim.ok: Likewise. * testsuite/apm.in: Likewise. * testsuite/apm.ok: Likewise. * testsuite/color.test: Likewise. * testsuite/bug-wnum.test: New test, extracted from the former color.test. * testsuite/bug-procmailsubj.test: Likewise. * testsuite/procmail.in: Renamed to... * testsuite/bug-procmailsubj.in: ...this. * testsuite/procmail.ok: Renamed to... * testsuite/bug-procmailsubj.ok: ...this. * testsuite/bug-wnum.test: New test, extracted from the former color.test. * testsuite/bug-sysrepeat.test: Likewise. * testsuite/syslog.in: Renamed to... * testsuite/bug-sysrepeat.in: ...this. * testsuite/syslog.ok: Renamed to... * testsuite/bug-sysrepeat.ok: ...this. * testsuite/Makefile.in (TESTS): Updated according to the above changes. (TEST_IO): New variable. (EXTRA_DIST): Compute dynamically using ${TEST_IO}. * testsuite/version.test: Added DESCRIPTION. new files: testsuite/.arch-ids/bug-procmailsubj.test.id testsuite/.arch-ids/bug-sysrepeat.test.id testsuite/.arch-ids/bug-wnum.test.id testsuite/bug-procmailsubj.test testsuite/bug-sysrepeat.test testsuite/bug-wnum.test removed files: testsuite/.arch-ids/apm.in.id testsuite/.arch-ids/apm.ok.id testsuite/.arch-ids/exim.in.id testsuite/.arch-ids/exim.ok.id testsuite/.arch-ids/color.test.id testsuite/apm.in testsuite/apm.ok testsuite/exim.in testsuite/exim.ok testsuite/color.test modified files: ChangeLog testsuite/Makefile.in testsuite/defs testsuite/do-test testsuite/version.test renamed files: testsuite/.arch-ids/syslog.in.id ==> testsuite/.arch-ids/bug-sysrepeat.in.id testsuite/.arch-ids/syslog.ok.id ==> testsuite/.arch-ids/bug-sysrepeat.ok.id testsuite/.arch-ids/procmail.in.id ==> testsuite/.arch-ids/bug-procmailsubj.in.id testsuite/.arch-ids/procmail.ok.id ==> testsuite/.arch-ids/bug-procmailsubj.ok.id testsuite/syslog.in ==> testsuite/bug-sysrepeat.in testsuite/syslog.ok ==> testsuite/bug-sysrepeat.ok testsuite/procmail.in ==> testsuite/bug-procmailsubj.in testsuite/procmail.ok ==> testsuite/bug-procmailsubj.ok 2003-03-11 08:14:43 GMT Gergely Nagy patch-224 Summary: ccze_getsubopt() redesign Revision: ccze--0.1--patch-224 * configure.ac: Lift the suboptarg check from Thy, and drop the previous getsubopt() checks. * src/ccze-compat.h (ccze_getsubopt): Define this unconditionally. * src/ccze-compat.c [HAVE_GETSUBOPT] (ccze_getsubopt): New function. [!HAVE_GETSUBOPT] (getsubopt): Renamed to... [!HAVE_GETSUBOPT] (ccze_getsubopt): ...this. * src/ccze.c (parse_opt): Updated to new ccze_getsubopt calling conventions. modified files: ChangeLog configure.ac src/ccze-compat.c src/ccze-compat.h src/ccze.c 2003-03-08 11:39:34 GMT Gergely Nagy patch-223 Summary: Fixed src/ccze.o dependencies Revision: ccze--0.1--patch-223 * src/Makefile.in (ccze.o): Depend on ${top_srcdir}/ChangeLog too. So it picks up the new version number ASAP after a commit. modified files: ChangeLog src/Makefile.in 2003-03-08 10:30:23 GMT Gergely Nagy patch-222 Summary: Fixed a minor word coloring bug Revision: ccze--0.1--patch-222 * src/ccze-wordcolor (ccze_wordcolor_setup): Changed the `reg_pre' and `reg_post' regexps to be less greedy, and work even if the matched string is shorter than three characters. * testsuite/bug-wnum.in: New test-case input from Mark Szabo. Tests for the problem mentioned and fixed by the above change. * testsuite/bug-wnum.ok: The expected output from the test case. * testsuite/color.test (SUBTESTS): Added bug-wnum. (SUBTEST_PLUGINS): Added bug-wnum:syslog. * testsuite/Makefile.in (EXTRA_DIST): Added bug-wnum.in and bug-wnum.ok. new files: testsuite/.arch-ids/bug-wnum.in.id testsuite/.arch-ids/bug-wnum.ok.id testsuite/bug-wnum.in testsuite/bug-wnum.ok modified files: ChangeLog src/ccze-wordcolor.c testsuite/Makefile.in testsuite/color.test 2003-03-06 16:46:01 GMT Gergely Nagy patch-221 Summary: mod_proftpd Revision: ccze--0.1--patch-221 * src/mod_proftpd.c: New file. * ccze.plugins: Added proftpd. * doc/ccze.1.in (PLUGINS): Mention it. new files: src/.arch-ids/mod_proftpd.c.id src/mod_proftpd.c modified files: ChangeLog ccze.plugins doc/ccze.1.in 2003-03-06 08:33:10 GMT Gergely Nagy patch-220 Summary: New, non-settable colors Revision: ccze--0.1--patch-220 * src/ccze.h (ccze_color_t): Added CCZE_COLOR_STATIC_*. * src/ccze-color.c (ccze_color_keyword_map): Added them to the table. (ccze_color_init): Initialise them. * src/ccze-dump.c (ccze_dump_color_hidden): New function. (main): Skip one iteration of the loop, if the color is hidden. modified files: ChangeLog src/ccze-color.c src/ccze-dump.c src/ccze.h 2003-03-06 08:12:17 GMT Gergely Nagy patch-219 Summary: make all-recursive, clean and distclean in testsuite/ too Revision: ccze--0.1--patch-219 * Makefile.in (all-recursive): Descend into testsuite too. (clean): Likewise. (distclean): Likewise. modified files: ChangeLog Makefile.in 2003-03-06 08:03:55 GMT Gergely Nagy patch-218 Summary: Support non-settable colors Revision: ccze--0.1--patch-218 * src/ccze-color.c (CCZE_KEYWORD_R): New macro. (CCZE_KEYWORD): Use it. (CCZE_KEYWORD_H): New macro. (ccze_color_keyword_t): Added a ->settable member. (ccze_color_keyword_lookup): Renamed and made it a wrapper of... (_ccze_color_keyword_lookup): ...this. (_ccze_colorname_map_lookup): Use _ccze_color_keyword_lookup (). (ccze_color_parse): Likewise. This will allow us stuff like ccze_addstr (CCZE_COLOR_STATIC_BLUE, "Blah") in the near future... modified files: ChangeLog src/ccze-color.c 2003-03-05 20:38:10 GMT Gergely Nagy patch-217 Summary: Got rid of PLUGIN_LIBPATH Revision: ccze--0.1--patch-217 * src/ccze-plugin.c [PLUGIN_LIBPATH]: Got rid of this ancient relic. Use PKGLIBDIR instead. modified files: ChangeLog src/ccze-plugin.c 2003-03-05 15:57:02 GMT Gergely Nagy patch-216 Summary: CCZE_ABI_VERSION Revision: ccze--0.1--patch-216 * src/ccze.h (CCZE_ABI_VERSION): New constant. (ccze_plugin_t): The first member is now an int: abi_version. * src/ccze-plugin.c (_ccze_plugin_load): Do not load the plugin if abi_version does not match. This is a safety barrier. Old plugins had a `void *dlhandle' as their first member, initialised to NULL, thus resulting in a zero abi_version when opened with this later CCZE, therefore, getting rejected instead of causing a segfault later on. Obviously, when the structure changes incompatibly, CCZE_ABI_VERSION will get bumped. modified files: ChangeLog src/ccze-plugin.c src/ccze.h 2003-03-05 15:10:03 GMT Gergely Nagy patch-215 Summary: Fixed good/bad word colorising Revision: ccze--0.1--patch-215 * src/ccze-wordcolor.c (ccze_wordcolor_process_one): Unrolled the `if (slookup)' branch, it was a bad idea. (This reverts patch 179). modified files: ChangeLog src/ccze-wordcolor.c 2003-03-05 12:51:13 GMT Gergely Nagy patch-214 Summary: Typo fixes Revision: ccze--0.1--patch-214 * debian/control (Description): roboust -> robust. modified files: ChangeLog debian/control 2003-03-05 12:46:16 GMT Gergely Nagy patch-213 Summary: ccze_getsubopt Revision: ccze--0.1--patch-213 * configure.ac: Check for FreeBSD and Linux-style getsubopt(). * src/ccze.c (ccze_getsubopt): New function. (parse_opt): Use ccze_getsubopt(). modified files: ChangeLog configure.ac src/ccze.c 2003-03-04 18:54:42 GMT Gergely Nagy patch-212 Summary: The `Avatar' release Revision: ccze--0.1--patch-212 (Instrumental) * NEWS: Updated. * debian/changelog: Likewise. modified files: ChangeLog NEWS debian/changelog 2003-03-04 18:51:24 GMT Gergely Nagy patch-211 Summary: Manual page corrections Revision: ccze--0.1--patch-211 * doc/ccze.1.in: Escaped some more `-' chars. * doc/ccze-cssdump.1.in: Likewise. * doc/ccze-plugin.7.in: Likewise, and corrected the section too. modified files: ChangeLog doc/ccze-cssdump.1.in doc/ccze-plugin.7.in doc/ccze.1.in 2003-03-04 17:07:25 GMT Gergely Nagy patch-210 Summary: mod_procmail fix Revision: ccze--0.1--patch-210 * src/mod_procmail.c (ccze_procmail_setup): Added a missing `?' to the regexps, so it catches stuff for real. * testsuite/procmail.in: Added a test case that triggered the bug, thanks to Morten Brix Pedersen. * testsuite/procmail.ok: And added the expected, good output. * testsuite/Makefile.in (EXTRA_DIST): Include them. * testsuite/color.test (SUBTESTS): Run the new test. * THANKS: Added Morten Brix Pedersen. new files: testsuite/.arch-ids/procmail.in.id testsuite/.arch-ids/procmail.ok.id testsuite/procmail.in testsuite/procmail.ok modified files: ChangeLog THANKS src/mod_procmail.c testsuite/Makefile.in testsuite/color.test 2003-03-04 17:02:03 GMT Gergely Nagy patch-209 Summary: Documentation update Revision: ccze--0.1--patch-209 * doc/ccze-plugin.7.in (SYNOPSIS): Added all the important function definitions. (DISPLAY METHODS): Document the display methods. (HELPER METHODS): Document the helper methods. * doc/ccze.1.in (OPTIONS): Document that -a's arguments are whitespace separated. (NOTES): Removed this section. * TODO: Updated. * FAQ: Added a section about extensions. modified files: ChangeLog FAQ TODO debian/rules doc/ccze-plugin.7.in doc/ccze.1.in 2003-03-03 18:20:30 GMT Gergely Nagy patch-208 Summary: Recompute subjlen Revision: ccze--0.1--patch-208 * src/ccze.c (ccze_main): Recompute subjlen before calling ccze_plugin_run. Fixes a rare output corruption. modified files: ChangeLog src/ccze.c 2003-03-03 15:23:09 GMT Gergely Nagy patch-207 Summary: CCZE_PLUGIN_TYPE_ANY Revision: ccze--0.1--patch-207 * src/ccze.h (ccze_plugin_type_t): Added CCZE_PLUGIN_TYPE_ANY. * src/ccze-plugin.c (ccze_plugin_run): Run the plugin if it is _ANY, regardless of `type'. modified files: ChangeLog src/ccze-plugin.c src/ccze.h 2003-03-03 14:15:45 GMT Gergely Nagy patch-206 Summary: configure.ac update Revision: ccze--0.1--patch-206 * configure.ac: Updated, based on autoscan results. modified files: ChangeLog configure.ac 2003-03-03 13:47:10 GMT Gergely Nagy patch-205 Summary: ccze_color_keyword_lookup() Revision: ccze--0.1--patch-205 * src/ccze.h (ccze_color_keyword_lookup): New public prototype. * src/ccze-color.c (_ccze_color_keyword_lookup): Renamed to... (ccze_color_keyword_lookup): ..this, and removed staticness. modified files: ChangeLog src/ccze-color.c src/ccze.h 2003-03-02 18:18:12 GMT Gergely Nagy patch-204 Summary: Minor plugin-argument cleanup Revision: ccze--0.1--patch-204 * src/ccze.c (parse_opt): Removed a debugging printf. * src/ccze-plugin.c (_ccze_plugin_load): Do not touch ->argv, so we can check for NULL in plugins. modified files: ChangeLog src/ccze-plugin.c src/ccze.c 2003-03-02 17:25:05 GMT Gergely Nagy patch-203 Summary: Fixed ccze.1.in Revision: ccze--0.1--patch-203 * doc/ccze.1.in (PLUGINS): Fixed. There were a bunch of roff errors. (well, not errors.. it just did not format right) modified files: ChangeLog doc/ccze.1.in 2003-03-02 17:20:58 GMT Gergely Nagy patch-202 Summary: Support for passing arguments to plugins Revision: ccze--0.1--patch-202 * src/ccze.h (ccze_plugin_t): Added an ->argv member. (CCZE_DEFINE_PLUGIN): Modified accordingly. (ccze_plugin_argv_get): New function prototype. * src/ccze-private.h (ccze_plugin_argv_init): New function prototype. (ccze_plugin_argv_set): Likewise. (ccze_plugin_argv_finalise): Likewise. * src/ccze-plugin.c (ccze_plugin_argv_init): New function. (ccze_plugin_argv_set): Likewise. (ccze_plugin_argv_finalise): Likewise. (ccze_plugin_argv_get): Likewise. (_ccze_plugin_load): Initialise ->argv. (_ccze_plugin_find): New function. (_ccze_plugin_loaded): Use it. (ccze_plugin_shutdown): Free ->argv. * src/ccze.c (options): Added --argument. (parse_opt): Handle it. (ccze_main): Call ccze_plugin_init() earlier, and ccze_plugin_argv_finalise() after loading the plugins. (main): Call ccze_plugin_argv_init(). * src/Makefile.in (ccze-dump): Depend on ccze-color.c too. (ccze-cssdump): Likewise. * doc/ccze.1: Documented --argument. * doc/ccze-plugin.7.in: Documented ccze_plugin_argv_get(). modified files: ChangeLog doc/ccze-plugin.7.in doc/ccze.1.in src/Makefile.in src/ccze-plugin.c src/ccze-private.h src/ccze.c src/ccze.h 2003-02-25 09:38:40 GMT Gergely Nagy patch-201 Summary: FAQ Revision: ccze--0.1--patch-201 * FAQ: New file. * Makefile.in (EXTRA_DIST): Added it. * ccze.spec.in (%files): Include it among the %docs. * debian/rules (install): Install it. new files: .arch-ids/FAQ.id FAQ modified files: ChangeLog Makefile.in ccze.spec.in debian/rules 2003-02-21 10:41:59 GMT Gergely Nagy patch-200 Summary: The `Enigma of the Absolute' release Revision: ccze--0.1--patch-200 Across the sea lies the fountain of renewal Where you will see the whole cause of your loneliness Can be measured in dreams that transcend all these lies And I wish and I pray that there may come a day For a saviour's arms... * NEWS: Updated. * debian/changelog: Likewise. modified files: ChangeLog NEWS debian/changelog 2003-02-21 09:09:02 GMT Gergely Nagy patch-199 Summary: Minor mem-leak fix in argp_parse Revision: ccze--0.1--patch-199 * src/ccze-compat.c [HAVE_GETOPT_LONG] (argp_parse): Free `longopts'. modified files: ChangeLog src/ccze-compat.c 2003-02-20 17:32:51 GMT Gergely Nagy patch-198 Summary: Fixed a malloc issue Revision: ccze--0.1--patch-198 * src/ccze-compat.c [HAVE_GETOPT_LONG] (argp_parse): Use ccze_calloc, not ccze_malloc. modified files: ChangeLog src/ccze-compat.c 2003-02-20 17:03:45 GMT Gergely Nagy patch-197 Summary: Support long options everywhere, where getopt_long is present Revision: ccze--0.1--patch-197 * configure.ac: Check for getopt_long in libc and libgnugetopt. * src/ccze-compat.c (argp_parse): Use getopt_long, if present. Also format the --help message a bit better. modified files: ChangeLog configure.ac src/ccze-compat.c 2003-02-20 15:28:00 GMT Gergely Nagy patch-196 Summary: .spec update Revision: ccze--0.1--patch-196 * ccze.spec.in: Use %{buildroot}, %configure and %makeinstall. While there, copied the long description from debian/control. modified files: ChangeLog ccze.spec.in 2003-02-20 15:16:11 GMT Gergely Nagy patch-195 Summary: Fixed make dist from an objdir Revision: ccze--0.1--patch-195 * Rules.mk.in (distdir): Copy from the current dir, if the file does not exist in ${srcdir}. modified files: ChangeLog Rules.mk.in 2003-02-20 15:06:21 GMT Gergely Nagy patch-194 Summary: Fixed a typo Revision: ccze--0.1--patch-194 * src/Makefile.in (ccze-compat.o): Depend on .c, not on itself. modified files: ChangeLog src/Makefile.in 2003-02-20 15:01:37 GMT Gergely Nagy patch-193 Summary: Add a generator meta-tag to the HTML output Revision: ccze--0.1--patch-193 * src/ccze.c (ccze_main): Add a generator meta-tag to the HTML output. modified files: ChangeLog src/ccze.c 2003-02-20 11:40:57 GMT Gergely Nagy patch-192 Summary: True64 port Revision: ccze--0.1--patch-192 * src/ccze.h: #include (ccze_malloc): New prototype. (ccze_realloc): Likewise. (ccze_calloc): Likewise. * src/ccze-compat.c: #include (ccze_malloc): New function. (ccze_realloc): Likewise. (ccze_calloc): Likewise. All malloc/realloc/calloc users updated. * src/ccze-wordcolor.c: Do not #include , ccze.h does that for us. * src/Makefile.in (ccze-compat.o): New dependency-target. * THANKS: Added Erik Braun. modified files: ChangeLog THANKS src/Makefile.in src/ccze-compat.c src/ccze-dump.c src/ccze-plugin.c src/ccze-wordcolor.c src/ccze.c src/ccze.h 2003-02-13 17:59:10 GMT Gergely Nagy patch-191 Summary: THANKS update Revision: ccze--0.1--patch-191 * THANKS: Added a few people. modified files: ChangeLog THANKS 2003-02-13 17:46:33 GMT Gergely Nagy patch-190 Summary: unLinuxize version.test Revision: ccze--0.1--patch-190 * testsuite/version.test: Use `-V' instead of `--version'. modified files: ChangeLog testsuite/version.test 2003-02-13 17:43:10 GMT Gergely Nagy patch-189 Summary: Fixed strndup() implementation. Revision: ccze--0.1--patch-189 * src/ccze-compat.c [!HAVE_STRNDUP] (strndup): NULL-terminate the string. modified files: ChangeLog src/ccze-compat.c 2003-02-13 17:20:03 GMT Gergely Nagy patch-188 Summary: New getline() implementation from Mailutils Revision: ccze--0.1--patch-188 * configure.ac: Check for getdelim() too. * src/ccze-compat.h [!HAVE_GETDELIM] (getdelim): New prototype. * src/ccze-compat.c [!HAVE_GETLINE] (getline): New implementation. [!HAVE_GETDELIM] (getdelim): New function. modified files: ChangeLog configure.ac src/ccze-compat.c src/ccze-compat.h 2003-02-13 16:22:32 GMT Gergely Nagy patch-187 Summary: Use pcre-config Revision: ccze--0.1--patch-187 * configure.ac: Disabled the pcre.h and pcre/pcre.h tests, likewise the -lpcre test. Use pcre-config instead. * src/Makefile.in (ALL_CFLAGS): Added @PCRE_CFLAGS@. (LIBS): Added @PCRE_LIBS@. * src/ccze.h: #include , unconditionally. modified files: ChangeLog configure.ac src/Makefile.in src/ccze.h 2003-02-12 22:44:25 GMT Gergely Nagy patch-186 Summary: Use stringification in CCZE_DEFINE_PLUGIN. Revision: ccze--0.1--patch-186 * src/ccze.h (CCZE_DEFINE_PLUGIN): Use stringification, and remove the quoted-name argument. All users updated. * doc/ccze-plugin.7.in: Reflect the above change. modified files: ChangeLog doc/ccze-plugin.7.in src/ccze.h src/mod_apm.c src/mod_distcc.c src/mod_exim.c src/mod_fetchmail.c src/mod_httpd.c src/mod_icecast.c src/mod_oops.c src/mod_php.c src/mod_postfix.c src/mod_procmail.c src/mod_squid.c src/mod_sulog.c src/mod_super.c src/mod_syslog.c src/mod_ulogd.c src/mod_vsftpd.c src/mod_xferlog.c 2003-02-12 22:33:49 GMT Gergely Nagy patch-185 Summary: Corrected ccze-plugin.7 SYNOPSIS Revision: ccze--0.1--patch-185 * doc/ccze-plugin.7 (SYNOPSIS): Include existing, non-obsolete headers only. Also moved the CCZE_DEFINE_PLUGIN call to the end. modified files: ChangeLog doc/ccze-plugin.7.in 2003-02-12 22:13:43 GMT Gergely Nagy patch-184 Summary: Fixed an ICC warning Revision: ccze--0.1--patch-184 * src/ccze.c (ccze_addstr_internal): Use a temporary variable to hold the result of ccze_color_lookup_name(). modified files: ChangeLog src/ccze.c 2003-02-12 21:57:46 GMT Gergely Nagy patch-183 Summary: mod_distcc Revision: ccze--0.1--patch-183 * src/mod_distcc.c: New file. * ccze.plugins: Added distcc. * doc/ccze.1.in: Documented it. new files: src/.arch-ids/mod_distcc.c.id src/mod_distcc.c modified files: ChangeLog ccze.plugins doc/ccze.1.in 2003-02-12 18:56:11 GMT Gergely Nagy patch-182 Summary: Include some more files Revision: ccze--0.1--patch-182 * testsuite/Makefile.in (EXTRA_DIST): Added defs and do-test. modified files: ChangeLog testsuite/Makefile.in 2003-02-12 18:51:31 GMT Gergely Nagy patch-181 Summary: argp fixes Revision: ccze--0.1--patch-181 * src/ccze.c (options): Removed the first NULL entry. * src/ccze-compat.h (OPTION_HIDDEN): New constant. * src/ccze-compat.c (argp_parse): Do not treat -h specially, it is used by something else. Also, do not show hidden options in -h output. As a consequence, all references to -h were changed to -?. modified files: ChangeLog src/ccze-compat.c src/ccze-compat.h src/ccze.c 2003-02-12 17:53:59 GMT Gergely Nagy patch-180 Summary: Fixed a typo Revision: ccze--0.1--patch-180 * testsuite/Makefile.in (EXTRA_DIST): It is `exim.ok', not `exim.out'. modified files: ChangeLog testsuite/Makefile.in 2003-02-10 17:49:41 GMT Gergely Nagy patch-179 Summary: -o nolookups fix Revision: ccze--0.1--patch-179 * src/ccze-wordcolor.c (ccze_wordcolor_process_one): Wrap all the slookup stuff in one if branch. Solves the -d -o nolookups problem. modified files: ChangeLog src/ccze-wordcolor.c 2003-02-10 17:42:39 GMT Gergely Nagy patch-178 Summary: Support -p foo,bar Revision: ccze--0.1--patch-178 * src/ccze.c (parse_opt): Use getsubopt when parsing -p. * testsuite/color.test: Modified to use this new feature. modified files: ChangeLog src/ccze.c testsuite/color.test 2003-02-10 09:46:56 GMT Gergely Nagy patch-177 Summary: Exim added to the testsuite Revision: ccze--0.1--patch-177 * testsuite/exim.in: New file. * testsuite/exim.out: Likewise. * testsuite/Makefile.in (EXTRA_DIST): Added them. * testsuite/color.test (SUBTESTS): Added exim. new files: testsuite/.arch-ids/exim.in.id testsuite/.arch-ids/exim.ok.id testsuite/exim.in testsuite/exim.ok modified files: ChangeLog testsuite/Makefile.in testsuite/color.test 2003-02-10 09:18:11 GMT Gergely Nagy patch-176 Summary: New tests Revision: ccze--0.1--patch-176 * testsuite/syslog.test: Renamed to... * testsuite/color.test: ..this. Also hacked to run multiple tests in a row. * testsuite/apm.in: New file. * testsuite/apm.ok: Likewise. * testsuite/Makefile.in (EXTRA_DIST): Added apm.in and apm.ok. new files: testsuite/.arch-ids/apm.in.id testsuite/.arch-ids/apm.ok.id testsuite/apm.in testsuite/apm.ok modified files: ChangeLog testsuite/Makefile.in testsuite/color.test renamed files: testsuite/.arch-ids/syslog.test.id ==> testsuite/.arch-ids/color.test.id testsuite/syslog.test ==> testsuite/color.test 2003-02-10 08:44:49 GMT Gergely Nagy patch-175 Summary: Made the testsuite use -d. Revision: ccze--0.1--patch-175 * testsuite/syslog.ok: Regenerated output. * testsuite/syslog.test: Updated. modified files: ChangeLog testsuite/syslog.ok testsuite/syslog.test 2003-02-10 08:35:44 GMT Gergely Nagy patch-174 Summary: --debug Revision: ccze--0.1--patch-174 * src/ccze-private.h (ccze_config_t): New member: `debug'. * src/ccze.c (ccze_config): Initialise it to zero. (options): Add --debug. (parse_opt): Parse it. (ccze_newline): Handle ccze_config.debug. (ccze_addstr_internal): Likewise. (sigint_handler): Likewise. (ccze_main): Likewise. modified files: ChangeLog src/ccze-private.h src/ccze.c 2003-02-09 19:08:49 GMT Gergely Nagy patch-173 Summary: Fixed a compile warning Revision: ccze--0.1--patch-173 * src/ccze-plugin.c (_ccze_plugin_allow): `i' should be `int', not `size_t'. ccze_config.pluginlist_len was changed a few commits ago. modified files: ChangeLog src/ccze-plugin.c 2003-02-09 18:49:31 GMT Gergely Nagy patch-172 Summary: First shot at a testsuite Revision: ccze--0.1--patch-172 * configure.ac (AC_OUTPUT): Added testsuite/Makefile. * Rules.mk.in (DISTFILES): Include ${TESTS}. * Makefile.in (distdir): Make distdir in testsuite/ too. (check): New target. * testsuite/*: New files. new files: testsuite/.arch-ids/Makefile.in.id testsuite/.arch-ids/defs.id testsuite/.arch-ids/do-test.id testsuite/.arch-ids/syslog.test.id testsuite/.arch-ids/version.test.id testsuite/.arch-ids/syslog.in.id testsuite/.arch-ids/syslog.ok.id testsuite/.arch-ids/=id testsuite/Makefile.in testsuite/defs testsuite/do-test testsuite/syslog.test testsuite/version.test testsuite/syslog.in testsuite/syslog.ok modified files: ChangeLog Makefile.in Rules.mk.in configure.ac new directories: testsuite/.arch-ids testsuite 2003-02-09 13:57:34 GMT Gergely Nagy patch-171 Summary: The `Mesmerism' release. Revision: ccze--0.1--patch-171 Remain in light Renounce your fears For you have been Mesmerized * configure.ac: Call ourselves -stable. * NEWS: Updated. * debian/changelog: Likewise. * debian/control (Description): Removed trailing dot from short description. modified files: ChangeLog NEWS configure.ac debian/changelog debian/control 2003-02-09 13:02:02 GMT Gergely Nagy patch-170 Summary: colorize built from another source Revision: ccze--0.1--patch-170 * debian/control (ccze): Replaces: colorize (<= 0.3.1-2) (colorize): Removed. * debian/rules: Removed colorize building code. modified files: ChangeLog debian/control debian/rules 2003-02-08 22:53:05 GMT Gergely Nagy patch-169 Summary: Fixed mod_ulogd. Revision: ccze--0.1--patch-169 * src/mod_ulogd.c (ccze_ulogd_process): In case there is a field=value pair, put a space after the value. modified files: ChangeLog src/mod_ulogd.c 2003-02-08 16:47:47 GMT Gergely Nagy patch-168 Summary: mod_oops Revision: ccze--0.1--patch-168 * src/mod_oops.c: New file. * ccze.plugins: Added oops. * doc/ccze.1.in (PLUGINS): Document it. * TODO: Removed relevant entry. new files: src/.arch-ids/mod_oops.c.id src/mod_oops.c modified files: ChangeLog TODO ccze.plugins doc/ccze.1.in 2003-02-07 23:33:44 GMT Gergely Nagy patch-167 Summary: Optional building of compatibility package Revision: ccze--0.1--patch-167 * debian/rules (COMPAT): If DEB_BUILD_OPTIONS contains compat, set it to binary-colorize, otherwise empty. (COMPAT_VERSION): New variable. (binary-indep): Depend on ${COMPAT} and use ${COMPAT_VERSION}. modified files: ChangeLog debian/rules 2003-02-07 23:15:44 GMT Gergely Nagy patch-166 Summary: icecast/usage.log colorisation Revision: ccze--0.1--patch-166 * src/mod_icecast.c (ccze_icecast_usage_process): New function. (ccze_icecast_setup): Initialise reg_icecast_usage. (ccze_icecast_shutdown): Free it. (ccze_icecast_handle): Hande usage.log first. * doc/ccze.1.in (PLUGINS): Corrected a typo. It is usage.log, not user.log modified files: ChangeLog doc/ccze.1.in src/mod_icecast.c 2003-02-07 22:43:56 GMT Gergely Nagy patch-165 Summary: Splitted off ALL_PLUGINS from configure.ac Revision: ccze--0.1--patch-165 * configure.ac (ALL_PLUGINS): Moved the list to... * ccze.plugins: ...here. * Makefile.in (DISTFILES): Include ccze.plugins. new files: .arch-ids/ccze.plugins.id ccze.plugins modified files: ChangeLog Makefile.in configure.ac 2003-02-07 22:27:20 GMT Gergely Nagy patch-164 Summary: Fixed mod_php copyright year Revision: ccze--0.1--patch-164 * src/mod_php.c: Fixed the copyright year, it is 2003 only. modified files: ChangeLog src/mod_php.c 2003-02-07 22:20:35 GMT Gergely Nagy patch-163 Summary: Fixed CSS Revision: ccze--0.1--patch-163 * src/ccze-color.c (ccze_csscolor_normal_map): red->darkred. (ccze_csscolor_bold_map): lightred->red. modified files: ChangeLog src/ccze-color.c 2003-02-07 22:16:59 GMT Gergely Nagy patch-162 Summary: mod_icecast Revision: ccze--0.1--patch-162 * src/mod_icecast.c: New file. * configure.ac (ALL_PLUGINS): Added icecast. * doc/ccze.1.in (PLUGINS): Added a note about it. * TODO: Removed relevant entry. new files: src/.arch-ids/mod_icecast.c.id src/mod_icecast.c modified files: ChangeLog TODO configure.ac doc/ccze.1.in 2003-02-07 21:44:25 GMT Gergely Nagy patch-161 Summary: Make builtin plugins behave correctly when -p is used. Revision: ccze--0.1--patch-161 * src/ccze-private.h (ccze_config_t): New typedef. * src/ccze-plugin.c (_ccze_plugin_allow): New function. (ccze_plugin_add): Use it. * src/ccze.c (ccze_config_t): Use the new ccze_config_t type, and do not make it static. (ccze_main): When loading selected plugins, use a temporary variable, don't clobber ccze_plugin.pluginlist_len. modified files: ChangeLog src/ccze-plugin.c src/ccze-private.h src/ccze.c 2003-02-07 21:10:59 GMT Gergely Nagy patch-160 Summary: mod_php Revision: ccze--0.1--patch-160 * configure.ac (ALL_PLUGINS): Added php. * src/mod_php.c: New file. * src/ccze.h (ccze_color_t): Added CCZE_COLOR_KEYWORD. * src/ccze-color.c (ccze_color_keyword_map): Added `keyword'. (ccze_color_init): Initialize CCZE_COLOR_KEYWORD to bold yellow. * src/ccze-wordcolor.c (words_error): Added fatal. * doc/ccze.1 (PLUGINS): Mention mod_php. * TODO: Removed relevant entry. new files: src/.arch-ids/mod_php.c.id src/mod_php.c modified files: ChangeLog TODO configure.ac doc/ccze.1.in src/ccze-color.c src/ccze-wordcolor.c src/ccze.h 2003-02-07 20:08:51 GMT Gergely Nagy patch-159 Summary: Fixed building in an objdir Revision: ccze--0.1--patch-159 * Makefile.in (ccze.spec): Depend on Rules.mk, not ${top_srcdir}/Rules.mk. modified files: ChangeLog Makefile.in 2003-02-07 15:08:21 GMT Gergely Nagy patch-158 Summary: colorize->ccze transition Revision: ccze--0.1--patch-158 * debian/control: Added a dummy colorize control info. * debian/rules (binary-colorize): New target. (clean): remove ${PKGDIR_D} too. (.PHONY): Added binary-colorize. modified files: ChangeLog debian/control debian/rules 2003-02-07 08:10:52 GMT Gergely Nagy patch-157 Summary: Description improvement Revision: ccze--0.1--patch-157 * debian/control (Description): Rewrote. modified files: ChangeLog debian/control 2003-02-05 13:44:30 GMT Gergely Nagy patch-156 Summary: Another makefile fix Revision: ccze--0.1--patch-156 * src/Makefile.in (ccze-builtins.c): Surround the for cycles with an ifneq. Required for older, buggy bashes. modified files: ChangeLog src/Makefile.in 2003-02-05 08:20:47 GMT Gergely Nagy patch-155 Summary: Makefile fixes Revision: ccze--0.1--patch-155 * Makefile.in (ccze.spec): Use ${srcdir}/$@. * doc/Makefile.in (% [%.in]): Likewise. * src/Makefile.in (ccze-builtins.c): Do not use echo -e, but multiple echos. Allows building with /bin/ash. modified files: ChangeLog Makefile.in doc/Makefile.in src/Makefile.in 2003-02-05 01:12:10 GMT Gergely Nagy patch-154 Summary: THANKS update Revision: ccze--0.1--patch-154 * THANKS: Added Alan Schmitt. modified files: ChangeLog THANKS 2003-02-05 01:03:23 GMT Gergely Nagy patch-153 Summary: Transparency support Revision: ccze--0.1--patch-153 * src/ccze.c (ccze_config): Added a `transparent', initialised to 1. (parse_opt): Support it. (ccze_main): If ccze_config.transparent is on, and use_default_colors() returns OK, set colors[0] to -1, which appears as transparent, in an appropriate XTerm. modified files: ChangeLog doc/ccze.1.in src/ccze.c 2003-02-04 17:26:12 GMT Gergely Nagy patch-152 Summary: Fixed mod_xferlog's date regexp Revision: ccze--0.1--patch-152 * src/mod_xferlog.c (ccze_xferlog_setup): Allow dates of the form "Feb 4" not only "Feb 04". modified files: ChangeLog src/mod_xferlog.c 2003-02-04 17:20:22 GMT Gergely Nagy patch-151 Summary: TODO update Revision: ccze--0.1--patch-151 * TODO: Updated. modified files: ChangeLog TODO 2003-02-04 17:04:36 GMT Gergely Nagy patch-150 Summary: The `Cardinal Sin' release. Revision: ccze--0.1--patch-150 When all is said and done It will be you who pays the price * NEWS: Updated. * debian/changelog: Likewise. modified files: ChangeLog NEWS debian/changelog 2003-02-04 16:51:59 GMT Gergely Nagy patch-149 Summary: SIGHUP handler Revision: ccze--0.1--patch-149 * src/ccze.c (sigint_handler): Only do the freeing if sig is non-zero. (sighup_handler): New function. (ccze_main): Moved most of main() here. (main): Use ccze_main(). modified files: ChangeLog src/ccze.c 2003-02-02 15:48:13 GMT Gergely Nagy patch-148 Summary: Compatibility.. Revision: ccze--0.1--patch-148 * src/ccze.c: #include "ccze-compat.h" * src/ccze-wordcolor.c: Likewise. * src/mod_postfix.c: Likewise. * src/mod_syslog.c: Likewise. * src/mod_ulogd.c: Likewise. modified files: ChangeLog src/ccze-wordcolor.c src/ccze.c src/mod_postfix.c src/mod_syslog.c src/mod_ulogd.c 2003-02-01 22:20:42 GMT Gergely Nagy patch-147 Summary: Code cleanups Revision: ccze--0.1--patch-147 * src/ccze-worcolor.c (ccze_wordcolor_process_one): Use a temporary variable to hold the length of `host' and `ip' (in the hostip branch) * src/mod_postfix.c (_ccze_postfix_process_one): Likewise for `s' and `field'. modified files: ChangeLog src/ccze-wordcolor.c src/mod_postfix.c 2003-01-31 08:57:37 GMT Gergely Nagy patch-146 Summary: Minor wordcolor fixes Revision: ccze--0.1--patch-146 * src/ccze-wordcolor.c (ccze_wordcolor_setup): Allow dots in reg_hostip, and `=' and '+' in reg_email and reg_msgid. modified files: ChangeLog src/ccze-wordcolor.c 2003-01-31 08:49:55 GMT Gergely Nagy patch-145 Summary: Postfix colorizer fix Revision: ccze--0.1--patch-145 * src/mod_postfix.c (ccze_postfix_setup): Modified the regexp to catch `from=' too. modified files: ChangeLog src/mod_postfix.c 2003-01-30 00:56:43 GMT Gergely Nagy patch-144 Summary: reg_hostip fixup Revision: ccze--0.1--patch-144 * src/ccze-wordcolor.c (ccze_wordcolor_setup): Modified reg_hostip to match dotless hosts too. modified files: ChangeLog src/ccze-wordcolor.c 2003-01-28 17:37:26 GMT Gergely Nagy patch-143 Summary: mod_postfix Revision: ccze--0.1--patch-143 * configure.ac (ALL_PLUGINS): Added postfix. * src/mod_postfix.c: New file. * doc/ccze.1.in (PLUGINS): Added a note about this. new files: src/.arch-ids/mod_postfix.c.id src/mod_postfix.c modified files: ChangeLog configure.ac doc/ccze.1.in 2003-01-28 17:16:52 GMT Gergely Nagy patch-142 Summary: Word coloring enhancements and HTML-escaping Revision: ccze--0.1--patch-142 * src/ccze.c (ccze_str_htmlencode): New function. (ccze_addstr): Renamed to, and made it a wrapper around... (ccze_addstr_internal): ...this. Use ccze_str_htmlencode(). (ccze_space): Use ccze_addstr_internal when adding a HTML space. * src/ccze-wordcolor.c (ccze_wordcolor_process_one): Process Message-ID and HOST[IP] stuff too. Do not ccze_space()! (ccze_wordcolor_process): Use the ccze_space() here. (ccze_wordcolor_setup): Setup _msgid and _hostid. (ccze_wordcolor_shutdown): Free them. modified files: ChangeLog src/ccze-wordcolor.c src/ccze.c 2003-01-28 12:10:59 GMT Gergely Nagy patch-141 Summary: mod_xferlog Revision: ccze--0.1--patch-141 * configure.ac (ALL_PLUGINS): Added xferlog. * src/ccze.h (ccze_color_t): Added CCZE_COLOR_FTPCODES. * src/ccze-color.c (ccze_color_keyword_map): Recognise `ftpcodes'. (ccze_color_init): Initialise [CCZE_COLOR_FTPCODES]. * doc/ccze.1.in (PLUGINS): Mention xferlog. * TODO: Removed relevant entry. new files: src/.arch-ids/mod_xferlog.c.id src/mod_xferlog.c modified files: ChangeLog TODO configure.ac doc/ccze.1.in src/ccze-color.c src/ccze.h 2003-01-28 11:16:07 GMT Gergely Nagy patch-140 Summary: Cosmetic fixup Revision: ccze--0.1--patch-140 Updated the internal filename reference in all the modules. modified files: ChangeLog src/mod_apm.c src/mod_exim.c src/mod_fetchmail.c src/mod_httpd.c src/mod_procmail.c src/mod_squid.c src/mod_sulog.c src/mod_super.c src/mod_syslog.c src/mod_ulogd.c src/mod_vsftpd.c 2003-01-25 12:45:08 GMT Gergely Nagy patch-139 Summary: .spec update Revision: ccze--0.1--patch-139 * ccze.spec.in: Updated to include ccze.h. modified files: ChangeLog ccze.spec.in 2003-01-24 09:50:02 GMT Gergely Nagy patch-138 Summary: Documentation update Revision: ccze--0.1--patch-138 * doc/ccze-plugin.7.in (EXAMPLE): Updated the #includes, to reflect the recent reorganisation. modified files: ChangeLog doc/ccze-plugin.7.in 2003-01-24 09:44:17 GMT Gergely Nagy patch-137 Summary: Install ccze.h. Revision: ccze--0.1--patch-137 * Rules.mk.in (includedir): New substvar. * src/Makefile.in (install): Install ccze.h (uninstall): Uninstall it. modified files: ChangeLog Rules.mk.in src/Makefile.in 2003-01-23 18:12:40 GMT Gergely Nagy patch-136 Summary: Internal cleanup, part two Revision: ccze--0.1--patch-136 Renamed all modules to mod_.c, modified src/Makefile.in accordingly. modified files: ChangeLog src/Makefile.in renamed files: src/.arch-ids/ccze-sulog.c.id ==> src/.arch-ids/mod_sulog.c.id src/.arch-ids/ccze-fetchmail.c.id ==> src/.arch-ids/mod_fetchmail.c.id src/.arch-ids/ccze-ulogd.c.id ==> src/.arch-ids/mod_ulogd.c.id src/.arch-ids/ccze-apm.c.id ==> src/.arch-ids/mod_apm.c.id src/.arch-ids/ccze-super.c.id ==> src/.arch-ids/mod_super.c.id src/.arch-ids/ccze-exim.c.id ==> src/.arch-ids/mod_exim.c.id src/.arch-ids/ccze-httpd.c.id ==> src/.arch-ids/mod_httpd.c.id src/.arch-ids/ccze-procmail.c.id ==> src/.arch-ids/mod_procmail.c.id src/.arch-ids/ccze-squid.c.id ==> src/.arch-ids/mod_squid.c.id src/.arch-ids/ccze-syslog.c.id ==> src/.arch-ids/mod_syslog.c.id src/.arch-ids/ccze-vsftpd.c.id ==> src/.arch-ids/mod_vsftpd.c.id src/ccze-sulog.c ==> src/mod_sulog.c src/ccze-fetchmail.c ==> src/mod_fetchmail.c src/ccze-ulogd.c ==> src/mod_ulogd.c src/ccze-apm.c ==> src/mod_apm.c src/ccze-super.c ==> src/mod_super.c src/ccze-exim.c ==> src/mod_exim.c src/ccze-httpd.c ==> src/mod_httpd.c src/ccze-procmail.c ==> src/mod_procmail.c src/ccze-squid.c ==> src/mod_squid.c src/ccze-syslog.c ==> src/mod_syslog.c src/ccze-vsftpd.c ==> src/mod_vsftpd.c 2003-01-23 17:43:46 GMT Gergely Nagy patch-135 Summary: Internal cleanup, part one Revision: ccze--0.1--patch-135 All the public structures and functions are in ccze.h now, private ones in ccze-private.h. All source files updated. new files: src/.arch-ids/ccze-private.h.id src/ccze-private.h removed files: src/.arch-ids/ccze-wordcolor.h.id src/.arch-ids/ccze-plugin.h.id src/.arch-ids/ccze-color.h.id src/ccze-wordcolor.h src/ccze-plugin.h src/ccze-color.h modified files: ChangeLog src/Makefile.in src/ccze-apm.c src/ccze-color.c src/ccze-compat.c src/ccze-cssdump.c src/ccze-dump.c src/ccze-exim.c src/ccze-fetchmail.c src/ccze-httpd.c src/ccze-plugin.c src/ccze-procmail.c src/ccze-squid.c src/ccze-sulog.c src/ccze-super.c src/ccze-syslog.c src/ccze-ulogd.c src/ccze-vsftpd.c src/ccze-wordcolor.c src/ccze.c src/ccze.h 2003-01-19 18:13:09 GMT Gergely Nagy patch-134 Summary: The `Song of the Dispossessed' release. Revision: ccze--0.1--patch-134 You blocked up my ears You plucked out my eyes You cut out my tongue You fed me with lies Oh Lord... * NEWS: Updated. * debian/changelog: Likewise. modified files: ChangeLog NEWS debian/changelog 2003-01-19 14:42:26 GMT Gergely Nagy patch-133 Summary: Fixed a segmentation fault Revision: ccze--0.1--patch-133 * src/ccze.c (main): In the main loop if subject did not had a trailing newline, do not try to replace it with a \0. modified files: ChangeLog src/ccze.c 2003-01-19 14:39:11 GMT Gergely Nagy patch-132 Summary: FreeBSD compatibility Revision: ccze--0.1--patch-132 * src/ccze-compat.h: #include . * src/ccze-plugin.c: Likewise. * src/ccze-syslog.c: #include "ccze-compat.h" * src/ccze-ulogd.c: Likewise. * src/ccze-compat.c (getline): Fixed, so it does not segfault anymore. modified files: ChangeLog src/ccze-compat.c src/ccze-compat.h src/ccze-plugin.c src/ccze-syslog.c src/ccze-ulogd.c 2003-01-19 13:27:22 GMT Gergely Nagy patch-131 Summary: CC check reworded Revision: ccze--0.1--patch-131 * configure.ac: Reworded the C compiler check, look for `cc' first, instead of `gcc'. modified files: ChangeLog configure.ac 2003-01-19 02:31:25 GMT Gergely Nagy patch-130 Summary: Support changing colors on the command-line Revision: ccze--0.1--patch-130 * src/ccze-color.h (ccze_color_parse): New prototype. * src/ccze-color.c (ccze_color_parse): New function, broken out of ccze_color_load's main loop. (ccze_color_load): Use it. * src/ccze.c (ccze_config): New members: color_argv, color_argv_alloc and color_argv_len. (options): Added --color. (empty_subopts): New global variable. (parse_opt): Handle --color. (main): Cycle through ccze_config.color_argv after loading the configuration files, passing each element to ccze_color_parse(). * TODO: Removed relevant entry. * THANKS: Added Matyas Koszik. * doc/ccze.1.in (OPTIONS): Documented the new --color option. modified files: ChangeLog THANKS TODO doc/ccze.1.in src/ccze-color.c src/ccze-color.h src/ccze.c 2003-01-19 01:46:21 GMT Gergely Nagy patch-129 Summary: TODO Updates Revision: ccze--0.1--patch-129 * TODO: Added a new entry. modified files: ChangeLog TODO 2003-01-19 01:41:03 GMT Gergely Nagy patch-128 Summary: Added ICC support to the build system Revision: ccze--0.1--patch-128 * Rules.mk.in (INCLUDES): Moved to src/Makefile.in. (DEFINES): Likewise. (WFLAGS): Likewise. (WFLAGS_3X): Likewise. (ALL_CFLAGS): Likewise. (LIBS): Likewise. * src/Makefile.in (WFLAGS): Made it a substvar, but moved the former contents to... (WFLAGS_GCC): ...here. (WFLAGS_ICC): New variable. * configure.ac: Enhanced the compiler version check. (Lifted from thy 0.4.34) modified files: ChangeLog Rules.mk.in configure.ac src/Makefile.in 2003-01-19 01:29:54 GMT Gergely Nagy patch-127 Summary: Minor fixes & cleanups Revision: ccze--0.1--patch-127 * src/ccze.h (ccze_addstr): Takes a ccze_color_t, not an int. (ccze_http_action): Returns ccze_color_t, not an int. * src/ccze.c (ccze_config): Made this static. [!HAVE_ARGP_PARSE] (argp_program_name): Only define in this case. (ccze_http_action): Changed to match the fixed prototype. (ccze_addstr): Likewise. * src/ccze-color.h (ccze_color_to_css): Take a ccze_color_t, not an int. * src/ccze-color.c (ccze_color_to_css): Changed to match the fixed prototype. Also fixed the asprintf() call, so ICC won't emit a warning anymore. (ccze_color_table): Increased its size. (ccze_color_to_name_css): Take an int and a ccze_color_t, not two * src/ccze-wordcolor.c (ccze_wordcolor_process_one): Changed the type of `col' from int to ccze_color_t. * src/ccze-apm.c (ccze_apm_setup): Unescape `%'. * src/ccze-httpd.c (_ccze_httpd_error): Return ccze_color_t. (ccze_httpd_error_log_process): Changed the type of `lcol' from int to ccze_color_t. * src/ccze-procmail.c (ccze_procmail_process): Changed the type of `col' to ccze_color_t. * src/ccze-squid.c (_ccze_proxy_action): Return ccze_color_t. (_ccze_proxy_hierarch): Likewise. (_ccze_proxy_tag): Likewise. * src/ccze-dump.c: Fixed all the various ICC warnings. modified files: ChangeLog src/ccze-apm.c src/ccze-color.c src/ccze-color.h src/ccze-dump.c src/ccze-httpd.c src/ccze-procmail.c src/ccze-squid.c src/ccze-wordcolor.c src/ccze.c src/ccze.h 2003-01-19 00:28:56 GMT Gergely Nagy patch-126 Summary: Support for changing the HTML body background Revision: ccze--0.1--patch-126 * src/ccze-color.h (ccze_cssbody_color): New prototype. * src/ccze-color.c (ccze_cssbody): New global variable. (ccze_color_load): Support "cssbody". (ccze_cssbody_color): New function. * src/ccze.c (main): Use ccze_cssbody_color(). * src/ccze-cssdump.c (main): Dump cssbody too. modified files: ChangeLog src/ccze-color.c src/ccze-color.h src/ccze-dump.c src/ccze.c 2003-01-19 00:17:29 GMT Gergely Nagy patch-125 Summary: strdup()ing command-line options Revision: ccze--0.1--patch-125 * src/ccze.c (parse_opt): strdup() the command-line arguments. modified files: ChangeLog src/ccze.c 2003-01-16 21:58:59 GMT Gergely Nagy patch-124 Summary: Portability, #2 Revision: ccze--0.1--patch-124 * configure.ac (AC_CHECK_TYPE): Check for error_t, and fall back to `int'. (AC_CHECK_HEADERS): Added getopt.h. * src/ccze-compat.c [HAVE_GETOPT_H]: #include getopt.h. modified files: ChangeLog configure.ac src/ccze-compat.c 2003-01-13 20:09:40 GMT Gergely Nagy patch-123 Summary: Portability Revision: ccze--0.1--patch-123 * src/ccze-compat.h: New file. * src/ccze-compat.c: Likewise. * configure.ac: A set of new checks. * src/ccze-color.c: #include "ccze-compat.h" * src/ccze-cssdump.c: Likewise. * src/ccze-dump.c: Likewise. * src/ccze.c: Likewise. * src/Makefile.in: Adjust accordingly. new files: src/.arch-ids/ccze-compat.h.id src/.arch-ids/ccze-compat.c.id src/ccze-compat.h src/ccze-compat.c modified files: ChangeLog configure.ac src/Makefile.in src/ccze-color.c src/ccze-cssdump.c src/ccze-dump.c src/ccze.c 2003-01-13 16:14:02 GMT Gergely Nagy patch-122 Summary: The `Wild in The Woods' release. Revision: ccze--0.1--patch-122 Wild in The Woods of Love We harm those whom we adore Contrary to other intentions We suffocate them in an alarming embrace * NEWS: Updated. * debian/changelog: Likewise. modified files: ChangeLog NEWS debian/changelog 2003-01-13 16:11:30 GMT Gergely Nagy patch-121 Summary: Fix an unitialised variable warning. Revision: ccze--0.1--patch-121 * src/ccze-color.c (ccze_color_load): Initialise ncolor and nkeyword to zero. modified files: ChangeLog src/ccze-color.c 2003-01-13 15:33:04 GMT Gergely Nagy patch-120 Summary: Install ccze-cssdump Revision: ccze--0.1--patch-120 * src/Makefile.in (install): Install ccze-cssdump. (uninstall): Unintall it. * doc/ccze-cssdump.1.in: New file. * doc/Makefile.in (MANS): Added ccze-cssdump.1. (EXTRA_DIST): Added ccze-cssdump.1.in. (install): Install ccze-cssdump.1. (uninstall): Uninstall it. * ccze.spec.in: Handle the above changes. * debian/rules: Likewise. While there, also corrected a few typos and errors in the other manual pages. new files: doc/.arch-ids/ccze-cssdump.1.in.id doc/ccze-cssdump.1.in modified files: ChangeLog ccze.spec.in debian/rules doc/Makefile.in doc/ccze-plugin.7.in src/Makefile.in 2003-01-13 14:43:26 GMT Gergely Nagy patch-119 Summary: TODO cleanup Revision: ccze--0.1--patch-119 * TODO: Removed HTML output entries, all done. modified files: ChangeLog TODO 2003-01-13 14:29:58 GMT Gergely Nagy patch-118 Summary: Customisable CSS codes Revision: ccze--0.1--patch-118 * src/ccze-color.c (ccze_csscolor_normal_map): New array. (ccze_csscolor_bold_map): Likewise. (ccze_color_to_name_css): Use these new maps. (ccze_color_load): Added ability to put "css" tags into different maps. * src/ccze-dump.c (main): Added code to dump the css maps too. modified files: ChangeLog src/ccze-color.c src/ccze-dump.c 2003-01-13 13:36:27 GMT Gergely Nagy patch-117 Summary: Yet more cleanup Revision: ccze--0.1--patch-117 * src/ccze-color.c: Use a cleaner typedef-style. modified files: ChangeLog src/ccze-color.c 2003-01-13 13:01:23 GMT Gergely Nagy patch-116 Summary: Code cleanup Revision: ccze--0.1--patch-116 * src/ccze.h (CCZE_ADDSTR): Removed compatibility macro. (CCZE_NEWLINE): Likewise. Updated all sources to use ccze_addstr() and ccze_newline(). * Rules.mk.in (.c.o): Moved to src/Makefile.in. (%.so): Likewise. (.SUFFIXES): Added .so. * src/Makefile.in (%.o): Moved here from Rules.mk.in. (%.so): Likewise. (ulogd.so): Removed. (ccze-ulogd.o): Likewise. modified files: ChangeLog Rules.mk.in src/Makefile.in src/ccze-apm.c src/ccze-exim.c src/ccze-fetchmail.c src/ccze-httpd.c src/ccze-procmail.c src/ccze-squid.c src/ccze-sulog.c src/ccze-super.c src/ccze-syslog.c src/ccze-ulogd.c src/ccze-vsftpd.c src/ccze-wordcolor.c src/ccze.c src/ccze.h 2003-01-13 12:31:35 GMT Gergely Nagy patch-115 Summary: Documentation updates Revision: ccze--0.1--patch-115 * doc/ccze.1.in: Documented -o cssfile. * doc/ccze-plugin.7.in: Use ccze_addstr(). modified files: ChangeLog doc/ccze-plugin.7.in doc/ccze.1.in 2003-01-13 12:23:41 GMT Gergely Nagy patch-114 Summary: Added War_New to THANKS Revision: ccze--0.1--patch-114 * THANKS: Added War_New. modified files: ChangeLog THANKS 2003-01-12 19:29:48 GMT Gergely Nagy patch-113 Summary: Support CSS in an external file Revision: ccze--0.1--patch-113 * src/ccze.c (ccze_config): Added a `cssfile' member. (parse_opt): Support -o cssfile=. (main): If ccze_config.cssfile is NULL, do as usual, if not, include a reference in the HTML header. modified files: ChangeLog src/ccze.c 2003-01-12 17:45:50 GMT Gergely Nagy patch-112 Summary: Command-line args support for ccze-dump and -cssdump Revision: ccze--0.1--patch-112 * src/ccze-dump.c: Added command-line argument support. * src/ccze-cssdump.c: Likewise. modified files: ChangeLog src/ccze-cssdump.c src/ccze-dump.c 2003-01-12 17:27:57 GMT Gergely Nagy patch-111 Summary: Working in-line CSS in HTML output Revision: ccze--0.1--patch-111 * src/ccze-color.c (ccze_color_to_name_css): Moved here from src/ccze.c. (ccze_color_to_css): Use ccze_color_to_name_css(), and a `.ccze_' prefix for css classes. * src/ccze.c (ccze_color_to_name_html): Moved to src/ccze-color.c. (ccze_addstr): HTML output part rewritten. (ccze_color_to_html): Unused function, removed. (main): Move the CSS output stuff after loading the configuration. modified files: ChangeLog src/ccze-color.c src/ccze.c 2003-01-12 17:02:41 GMT Gergely Nagy patch-110 Summary: Preparing CSS-in-HTML Revision: ccze--0.1--patch-110 * src/ccze-color.h (ccze_color_to_css): New prototype. (ccze_colors_to_css): Likewise. * src/ccze-color.c (ccze_color_to_css): Moved here from src/ccze-cssdump.c::ccze_dump_color_to_css(). (ccze_colors_to_css): New function. * src/ccze-cssdump.c: Use them. modified files: ChangeLog src/ccze-color.c src/ccze-color.h src/ccze-cssdump.c 2003-01-12 16:44:48 GMT Gergely Nagy patch-109 Summary: ccze-cssdump Revision: ccze--0.1--patch-109 * src/ccze-color.h (ccze_color_lookup_name): New prototype. * src/ccze-color.c (ccze_color_lookup_name): New function, moved here from src/ccze-dump.c::ccze_dump_lookup_name(). * src/ccze-dump.c (ccze_dump_lookup_name): Moved to src/ccze-color.c. (main): Use the new name. * src/ccze-cssdump.c: New file. * src/Makefile.in (SOURCES): Added ccze-cssdump.c. (CLEANFILES): Added ccze-cssdump. (all): Likewise. (ccze-dump, ccze-cssdump): Merged the two and generalised them. new files: src/.arch-ids/ccze-cssdump.c.id src/ccze-cssdump.c modified files: ChangeLog src/Makefile.in src/ccze-color.c src/ccze-color.h src/ccze-dump.c 2003-01-11 02:56:45 GMT Gergely Nagy patch-108 Summary: The `Devorzhum' release. Revision: ccze--0.1--patch-108 * NEWS: Updated. * debian/changelog: Likewise. * debian/copyright: Refer to .../stable/. * debian/control (Standards-Version): Bumped to 3.5.8. * TODO: Extended the HTML output entry. modified files: ChangeLog NEWS TODO debian/changelog debian/control debian/copyright 2003-01-09 22:53:40 GMT Gergely Nagy patch-107 Summary: HTML output Revision: ccze--0.1--patch-107 * src/ccze.c (parse_opt): Handle 'h'. (ccze_newline): Updated to work when ccze_config.html is true. (ccze_space): Likewise. (ccze_addstr): Likewise. (sigint_handler): Likewise. (main): Likewise. (ccze_color_to_name_html): New function. (ccze_color_to_html): Likewise. * doc/ccze.1.in: Documented --html. modified files: ChangeLog doc/ccze.1.in src/ccze-color.c src/ccze-color.h src/ccze-dump.c src/ccze.c src/ccze.h 2003-01-09 20:36:21 GMT Gergely Nagy patch-106 Summary: Preparing HTML output... Revision: ccze--0.1--patch-106 * src/ccze.h (ccze_addstr): New prototype. (ccze_newline): Likewise. (ccze_space): Likewise. (CCZE_ADDSTR): Make it an alias of ccze_addstr. (CCZE_NEWLINE): Make it an alias of ccze_newline. * src/ccze.c (ccze_config): Added a `html' member, and switched to using C99-style initialisers. (options): Added `html' (not handled yet). (ccze_newline): New function. (ccze_addstr): Likewise. (ccze_space): Likewise. (main): Remove most of hte ccze_config initialisation code. * src/ccze-color.h (ccze_color_strip_attrib): New prototype. (ccze_color_to_name_simple): New prototype. * src/ccze-color.c (ccze_color_strip_attrib): New function, from src/ccze-dump.c. (ccze_color_to_name_simple): Likewise. * src/ccze-dump.c (ccze_dump_color_strip_attrib): Moved to src/ccze-color.c. (ccze_dump_color_to_name_simple): Likewise. (ccze_dump_color_to_name): Simpified. modified files: ChangeLog src/ccze-color.c src/ccze-color.h src/ccze-dump.c src/ccze.c src/ccze.h 2003-01-09 19:37:05 GMT Gergely Nagy patch-105 Summary: Use make's ifneq stuff Revision: ccze--0.1--patch-105 * src/Makefile.in (install): Use make's ifneq stuff instead of shell trickery. (uninstall): Likewise. modified files: ChangeLog src/Makefile.in 2002-12-02 20:17:43 GMT Gergely Nagy patch-104 Summary: Fixed all-static installation, once again Revision: ccze--0.1--patch-104 * src/Makefile.in (install): Give up and use shell. (uninstall): Likewise. modified files: ChangeLog src/Makefile.in 2002-12-02 19:48:38 GMT Gergely Nagy patch-103 Summary: The `For My Fallen Angel' release. Revision: ccze--0.1--patch-103 "Loves golden arrow At her should have fled, And not Deaths ebon dart To strike her dead." * NEWS: Updated. * debian/changelog: Likewise. modified files: ChangeLog NEWS debian/changelog 2002-12-02 14:53:01 GMT Gergely Nagy patch-102 Summary: Fetchmail log colorisation Revision: ccze--0.1--patch-102 * src/ccze-fetchmail.c: New file. * configure.ac (ALL_PLUGINS): Added fetchmail. * doc/ccze.1.in (PLUGINS): Documented it. new files: src/.arch-ids/ccze-fetchmail.c.id src/ccze-fetchmail.c modified files: ChangeLog configure.ac doc/ccze.1.in 2002-11-29 22:48:20 GMT Gergely Nagy patch-101 Summary: Fixed a stupid but in src/Makefile.in Revision: ccze--0.1--patch-101 * src/Makefile.in (install): It is `ifdef PLUGIN_SHOBJS', not `ifdef ${PLUGIN_SHOBJS}'. This fixes the install problems reported by a few people. Thanks to ciga for helping me track this down. (uninstall): Likewise. * THANKS: Added `ciga' and IRC nicks for the others. modified files: ChangeLog THANKS src/Makefile.in 2002-11-21 17:29:43 GMT Gergely Nagy patch-100 Summary: Fixed built-in module support Revision: ccze--0.1--patch-100 * src/ccze-plugins.c (ccze_plugin_shutdown): Do not dlclose() ->dlhandle if it is NULL. * src/Makefile.in (ccze-builtins.c): _info are `ccze_plugin_t', not pointers to such a struct. modified files: ChangeLog src/Makefile.in src/ccze-plugin.c 2002-11-21 16:55:42 GMT Gergely Nagy patch-99 Summary: Fixed src/Makefile.in::uninstall Revision: ccze--0.1--patch-99 * src/Makefile.in: It is `ifdef', not `ifeq'. modified files: ChangeLog src/Makefile.in 2002-11-20 14:56:59 GMT Gergely Nagy patch-98 Summary: Fixed all-static installation Revision: ccze--0.1--patch-98 * src/Makefile.in (install): Only install plugins if there are any. (uninstall): Only uninstall plugins if there are any. modified files: ChangeLog src/Makefile.in 2002-11-20 14:39:41 GMT Gergely Nagy patch-97 Summary: Vs. Revision: ccze--0.1--patch-97 * configure.ac: Check whether we need pcre.h or pcre/pcre.h. * src/ccze.h (PCRE_H): New define. Use it all over the place instead of hardcoding . * ccze.spec.in (%build): The -I/usr/include/pcre flag is not needed anymore. modified files: ChangeLog ccze.spec.in configure.ac src/ccze-apm.c src/ccze-exim.c src/ccze-httpd.c src/ccze-procmail.c src/ccze-squid.c src/ccze-sulog.c src/ccze-super.c src/ccze-syslog.c src/ccze-ulogd.c src/ccze-vsftpd.c src/ccze-wordcolor.c src/ccze.h 2002-11-20 14:21:32 GMT Gergely Nagy patch-96 Summary: Fixed make dist Revision: ccze--0.1--patch-96 * src/Makefile.in (SOURCES): Use ${ALL_PLUGINS} instead of ${PLUGINS}. modified files: ChangeLog src/Makefile.in 2002-11-20 14:07:07 GMT Gergely Nagy patch-95 Summary: Added support for built-in plugins Revision: ccze--0.1--patch-95 * src/ccze-plugin.h (ccze_plugin_add): New prototype. (ccze_plugin_load_all_builtins): Likewise. * src/ccze-plugin.c (_ccze_plugin_add): Exported, and renamed to... (ccze_plugin_add): ...this. (ccze_plugin_shutdown): Check if plugins[i] is NULL before dereferencing it. * src/ccze-wordcolor.c (ccze_wordcolor_process): Bail out early if `msg' is NULL. * src/ccze.c (main): Call ccze_plugin_load_all_builtins() before _finalise(). * src/Makefile.in (ALL_PLUGINS): New substvar. (S_PLUGINS): Likewise. (SH_PLUGINS): New variable. (PLUGIN_SHOBJS): Likewise. (PLUGIN_SOBJS): Likewise. (PLUGIN_OBJS): This should be the aggregate of _SHOBJS and _SOBJS. (CLEANFILES): Only clean `ccze-dump', the rest is taken care of by Rules.mk.in. (DISTCLEANFILES): Added ccze-builtins.c. (OBJECTS): Added ccze-builtins.o. (all): Depend on ${PLUGIN_SHOBJS}, not on ${PLUGIN_OBJS}. (install): Only install plugins if there are any, and in that case, ${PLUGIN_SHOBJS} only. (${PROGRAM}): Depend on ${PLUGIN_SOBJS}. (ccze-builtin.c): New rule. (ccze-ulogd.o): Likewise. * Makefile.in: Eradicate all traces of etc/. * Rules.mk.in (clean): Remove *.o, *.so and *.da automatically. * configure.ac: Support --with-builtins. (AC_OUTPUT): Removed etc/Makefile. * ccze.spec.in: Use src/ccze-dump and --with-builtins=all. * debian/rules: Likewise. * TODO: Remove relevant entry. * doc/ccze.1.in (PLUGINS): Remove .so suffix. * etc/Makefile.in: Removed. * etc/cczerc: Likewise. * etc/: Likewise. removed files: etc/.arch-ids/=id etc/.arch-ids/Makefile.in.id etc/.arch-ids/cczerc.id etc/Makefile.in etc/cczerc modified files: ChangeLog Makefile.in Rules.mk.in TODO ccze.spec.in configure.ac debian/rules doc/ccze.1.in src/Makefile.in src/ccze-plugin.c src/ccze-plugin.h src/ccze-wordcolor.c src/ccze.c removed directories: etc/.arch-ids etc 2002-11-19 22:44:20 GMT Gergely Nagy patch-94 Summary: ccze-dump Revision: ccze--0.1--patch-94 * src/ccze-dump.c: New file. * src/Makefile.in (SOURCES): Added ccze-dump.c. (CLEANFILES): Added ccze-dump. (all): Likewise. (ccze-dump): New target. * src/ccze-color.c (CCZE_KEYWORD): New macro. (ccze_color_keyword_map): Use it all over the place. new files: src/.arch-ids/ccze-dump.c.id src/ccze-dump.c modified files: ChangeLog src/Makefile.in src/ccze-color.c 2002-11-19 20:53:04 GMT Gergely Nagy patch-93 Summary: Added color keyword comments Revision: ccze--0.1--patch-93 * src/ccze-color.c (ccze_color_keyword_t): Added a `comment' member. (ccze_color_keyword_map): Added comments for all the keywords. modified files: ChangeLog src/ccze-color.c 2002-11-19 19:00:19 GMT Gergely Nagy patch-92 Summary: Documented plugin architecture Revision: ccze--0.1--patch-92 * doc/ccze-plugin.7.in: New file. * doc/Makefile.in: Added support for building multiple manual pages. (EXTRA_DIST): Added ccze-plugin.7.in. * Rules.mk.in (man7dir): New variable. * TODO: Removed relevant entry. * debian/rules: Compress ccze-plugin.7 too. new files: doc/.arch-ids/ccze-plugin.7.in.id doc/ccze-plugin.7.in modified files: ChangeLog Rules.mk.in TODO debian/rules doc/Makefile.in 2002-11-19 17:44:12 GMT Gergely Nagy patch-91 Summary: The `Like Gods of the Sun' release. Revision: ccze--0.1--patch-91 We burn like gods of the sun Paradise pales compared to you * NEWS: Updated. * debian/changelog: Likewise. modified files: ChangeLog NEWS debian/changelog 2002-11-19 17:32:25 GMT Gergely Nagy patch-90 Summary: ccze.spec.in Revision: ccze--0.1--patch-90 * ccze.spec.in: New file, based on the work of Andreas Brenk. * Makefile.in: Added support for generating ccze.spec. (dist): Depend on ccze.spec. new files: .arch-ids/ccze.spec.in.id ccze.spec.in modified files: ChangeLog Makefile.in 2002-11-19 17:06:25 GMT Gergely Nagy patch-89 Summary: AC_FUNC_REALLOC Revision: ccze--0.1--patch-89 * configure.ac: Added AC_FUNC_REALLOC, thanks to autoscan. modified files: ChangeLog configure.ac 2002-11-18 22:17:47 GMT Gergely Nagy patch-88 Summary: APM log colorisation Revision: ccze--0.1--patch-88 * src/ccze-apm.c: New file. * src/Makefile.in (PLUGINS): Added apm. * doc/ccze.1.in (PLUGINS): Document it. * src/ccze-wordcolor.c (words_bad): Added `empty'. (words_system): Added `discharging' and `resume'. * src/ccze-color.h (ccze_color_t): Added CCZE_COLOR_PERCENTAGE. * src/ccze-color.c: Added support code for it. * src/ccze.c (main): Support word colorisation of partial plugin output. * THANKS: Added Janos Lorincz. new files: src/.arch-ids/ccze-apm.c.id src/ccze-apm.c modified files: ChangeLog THANKS doc/ccze.1.in src/Makefile.in src/ccze-color.c src/ccze-color.h src/ccze-wordcolor.c src/ccze.c 2002-11-18 21:41:38 GMT Gergely Nagy patch-87 Summary: Implemented partial coloriser plugin support Revision: ccze--0.1--patch-87 * src/ccze-plugin.h (ccze_plugin_run): New prototype. * src/ccze-plugin.c (ccze_plugin_run): New function. * src/ccze.c (main): Use it, and if there are pending stuff after all full plugins were run, filter the rest of the input through the partial ones, and only then through wordcolor. * src/ccze-ulogd.c: Converted to a partial plugin. Yay! modified files: ChangeLog src/ccze-plugin.c src/ccze-plugin.h src/ccze-ulogd.c src/ccze.c 2002-11-18 21:12:38 GMT Gergely Nagy patch-86 Summary: Plugin support revamped once again Revision: ccze--0.1--patch-86 * src/ccze-plugin.h (CCZE_DEFINE_PLUGIN): New macro. (ccze_plugin_startup_t): It is void, not void *. (ccze_plugin_shutdown_t): Likewise. (ccze_plugin_type_t): New enum. (ccze_plugin_t): Added a `type' member. * src/ccze-plugin.c (_ccze_plugin_load): dlsym the newly introduced ccze_foo_info symbol, and nothing else. (ccze_plugin_shutdown): Since ccze_plugin_t is dlsym()ed now, we must not free nor ->name, or the struct itself. * Rules.mk.in (%.so): Depend on ccze-plugin.h too. * src/Makefile.in (ulogd.so): Likewise. All users and modules updated accordingly. modified files: ChangeLog Rules.mk.in src/Makefile.in src/ccze-exim.c src/ccze-httpd.c src/ccze-plugin.c src/ccze-plugin.h src/ccze-procmail.c src/ccze-squid.c src/ccze-sulog.c src/ccze-super.c src/ccze-syslog.c src/ccze-ulogd.c src/ccze-vsftpd.c 2002-11-18 18:24:29 GMT Gergely Nagy patch-85 Summary: Documented the ulogd plugin Revision: ccze--0.1--patch-85 * doc/ccze.1.in (PLUGINS): Documented the ulogd plugin. modified files: ChangeLog doc/ccze.1.in 2002-11-18 18:20:16 GMT Gergely Nagy patch-84 Summary: ulogd colorisation Revision: ccze--0.1--patch-84 * src/ccze-ulogd.c: New file. * src/Makefile.in (PLUGINS): Added ulogd. (ulogd.so): Special case, as it depends on ccze-wordcolor.h too. * THANKS: Added DC-1. new files: src/.arch-ids/ccze-ulogd.c.id src/ccze-ulogd.c modified files: ChangeLog THANKS src/Makefile.in 2002-11-18 18:16:01 GMT Gergely Nagy patch-83 Summary: Some stuff reorganised Revision: ccze--0.1--patch-83 * src/ccze-wordcolor.h (ccze_wordcolor_process_one): New prototype. * src/ccze-wordcolor.c (ccze_wordcolor_process_one): New function. (ccze_wordcolor_process): Use it. (xstrdup): Moved to src/ccze.c. (_my_strbrk): Likewise. * src/ccze.h (xstrdup): New prototype. (ccze_strbrk): Likewise. * src/ccze.c (xstrdup): Moved here from src/ccze-wordcolor.c. (ccze_strbrk): Likewise. * src/ccze-color.h (ccze_color_t): Added _FIELD and _CHAIN. * src/ccze-color.c: Added support code for them. modified files: ChangeLog src/ccze-color.c src/ccze-color.h src/ccze-wordcolor.c src/ccze-wordcolor.h src/ccze.c src/ccze.h 2002-11-04 20:01:50 GMT Gergely Nagy patch-82 Summary: Link shared objects to ncurses and pcre Revision: ccze--0.1--patch-82 * Rules.mk.in (%.so): Add ${ALL_LDFLAGS} to the command-line. * THANKS: Added Ferenc Kalcso. modified files: ChangeLog Rules.mk.in THANKS 2002-10-13 12:56:24 GMT Gergely Nagy patch-81 Summary: #include Revision: ccze--0.1--patch-81 * src/ccze.h: #include . modified files: ChangeLog src/ccze.h 2002-10-12 21:35:55 GMT Gergely Nagy patch-80 Summary: The `Stance of Evander Sinque' release. Revision: ccze--0.1--patch-80 He lays forgotten Dead skin and broken neck And no-one knew him Though he was genius * NEWS: Updated. * debian/changelog: Likewise. modified files: ChangeLog NEWS debian/changelog 2002-10-12 21:29:57 GMT Gergely Nagy patch-79 Summary: Various updates under debian/ Revision: ccze--0.1--patch-79 * debian/rules (install): We need root privileges for this target. * debian/copyright: Changed my e-mail address, and replaced the standard GPL header with one tuned for CCZE. * debian/control (Maintainer): Changed my e-mail address. modified files: ChangeLog debian/control debian/copyright debian/rules 2002-10-12 21:20:36 GMT Gergely Nagy patch-78 Summary: Getting rid of strndupa() Revision: ccze--0.1--patch-78 * src/ccze-color.c (_ccze_colorname_map_lookup): Get rid of strndupa(). modified files: ChangeLog src/ccze-color.c 2002-10-12 21:16:26 GMT Gergely Nagy patch-77 Summary: AC_FUNC_STAT Revision: ccze--0.1--patch-77 * configure.ac: Added AC_FUNC_STAT, noticed by autoscan. modified files: ChangeLog configure.ac 2002-10-12 21:11:46 GMT Gergely Nagy patch-76 Summary: TODO updates Revision: ccze--0.1--patch-76 * TODO: Added two new entries. modified files: ChangeLog TODO 2002-10-12 20:56:01 GMT Gergely Nagy patch-75 Summary: Automatically generate the manual page Revision: ccze--0.1--patch-75 * doc/ccze.1: Renamed to... * doc/ccze.1.in: ...this, and replaced all configurable paths with an appropriate magic word. * doc/Makefile.in (DISTCLEANFILES): Added ${MAN}. (EXTRA_DIST): Added ${MAN}.in. (all): Depend on ${MAN}. (${MAN}): New target. * Rules.mk.in (DISTFILES): Removed ${MAN}. modified files: ChangeLog Rules.mk.in doc/Makefile.in doc/ccze.1.in renamed files: doc/.arch-ids/ccze.1.id ==> doc/.arch-ids/ccze.1.in.id doc/ccze.1 ==> doc/ccze.1.in 2002-10-12 20:46:14 GMT Gergely Nagy patch-74 Summary: "last message..." and "-- MARK --" coloring Revision: ccze--0.1--patch-74 * src/ccze-color.h (ccze_color_t): Added CCZE_COLOR_REPEAT. * src/ccze-color.c (ccze_color_keyword_map): Added `repeat'. (ccze_color_init): Initialise CCZE_COLOR_REPEAT to white. * src/ccze-wordcolor.c (ccze_wordcolor_process): Color "last message ..." and "-- MARK --" messages with CCZE_COLOR_REPEAT. modified files: ChangeLog src/ccze-color.c src/ccze-color.h src/ccze-wordcolor.c 2002-10-12 20:28:22 GMT Gergely Nagy patch-73 Summary: Exit if no plugins were found Revision: ccze--0.1--patch-73 * src/ccze.c (main): Exit if no plugins could be loaded. Thanks to Istvan Karaszi for the idea. modified files: ChangeLog src/ccze.c 2002-10-04 10:35:42 GMT Gergely Nagy patch-72 Summary: The `Base Level Erotica' release. Revision: ccze--0.1--patch-72 What do you see What do you see when eyes are closed What do you feel What do you feel when she's below What do you want What do you want her to be. A star What do you see What do you see when eyes flick open * NEWS: Updated. * debian/changelog: Likewise. modified files: ChangeLog NEWS debian/changelog 2002-10-04 10:17:41 GMT Gergely Nagy patch-71 Summary: Exported function should not be static. Revision: ccze--0.1--patch-71 Modules were broken since 0.1.64, where I declared all the functions in them `static'. However, _setup, _shutdown and _handle should be exported, therefore they must NOT be static. This is now fixed. modified files: ChangeLog src/ccze-exim.c src/ccze-httpd.c src/ccze-procmail.c src/ccze-squid.c src/ccze-sulog.c src/ccze-super.c src/ccze-syslog.c src/ccze-vsftpd.c 2002-10-03 13:43:28 GMT Gergely Nagy patch-70 Summary: The `Edenbeast' release Revision: ccze--0.1--patch-70 All are welcome here To the Eden Feast Enter if you will This is Edenbeast * debian/maint/conffiles: Removed. * debian/rules: Support DEB_BUILD_OPTIONS=noopt, and generate DEBIAN/conffiles. * NEWS: Added release notes. * debian/changelog: Likewise. removed files: debian/maint/.arch-ids/=id debian/maint/.arch-ids/conffiles.id debian/maint/conffiles modified files: ChangeLog NEWS debian/changelog debian/rules removed directories: debian/maint/.arch-ids debian/maint 2002-10-01 12:25:53 GMT Gergely Nagy patch-69 Summary: Removed --scroll Revision: ccze--0.1--patch-69 * src/ccze.c (options): Removed --scroll, as it is unused. modified files: ChangeLog src/ccze.c 2002-10-01 12:23:42 GMT Gergely Nagy patch-68 Summary: Documentation updates Revision: ccze--0.1--patch-68 * README: Mention that CCZE is a drop-in replacement for colorize. * doc/ccze.1: Almost completely rewritten to be up-to-date. * TODO: Removed relevant entries. modified files: ChangeLog README TODO doc/ccze.1 2002-09-29 17:30:57 GMT Gergely Nagy patch-67 Summary: --remove-facility Revision: ccze--0.1--patch-67 * src/ccze.c: Implemented --remove-facility a'la colorize. modified files: ChangeLog src/ccze.c 2002-09-29 17:18:21 GMT Gergely Nagy patch-66 Summary: Folded a set of options into --options Revision: ccze--0.1--patch-66 * src/ccze.c: Folded --no-* and --scroll into --options [no]{scroll,wordcolor,lookups}. modified files: ChangeLog src/ccze.c 2002-09-28 20:47:58 GMT Gergely Nagy patch-65 Summary: -Wunused-function Revision: ccze--0.1--patch-65 * Rules.mk.in (WFLAGS_3X): Added -Wunused and Wno-unused-function. modified files: ChangeLog Rules.mk.in 2002-09-28 20:27:50 GMT Gergely Nagy patch-64 Summary: A big header cleanup Revision: ccze--0.1--patch-64 * src/ccze-exim.h: Removed. * src/ccze-httpd.h: Likewise. * src/ccze-procmail.h: Likewise. * src/ccze-squid.h: Likewise. * src/ccze-sulog.h: Likewise. * src/ccze-super.h: Likewise. * src/ccze-syslog.h: Likewise. * src/ccze-vsftpd.h: Likewise. * src/ccze-exim.c: Adjust to the removal of module headers. * src/ccze-httpd.c: Likewise. * src/ccze-procmail.c: Likewise. * src/ccze-squid.c: Likewise. * src/ccze-sulog.c: Likewise. * src/ccze-super.c: Likewise. * src/ccze-syslog.c: Likewise. * src/ccze-vsftpd.c: Likewise. * src/Makefile.in (HEADERS): Remove plugin headers. (ccze-*.so): Removed. * Rules.mk.in (%.so): Do not depend on ccze-%.h. (.SUFFIXES): First empty it, then set it to ".c .o". (WFLAGS): Remove -Wunused. removed files: src/.arch-ids/ccze-sulog.h.id src/.arch-ids/ccze-super.h.id src/.arch-ids/ccze-exim.h.id src/.arch-ids/ccze-httpd.h.id src/.arch-ids/ccze-procmail.h.id src/.arch-ids/ccze-squid.h.id src/.arch-ids/ccze-syslog.h.id src/.arch-ids/ccze-vsftpd.h.id src/ccze-sulog.h src/ccze-super.h src/ccze-exim.h src/ccze-httpd.h src/ccze-procmail.h src/ccze-squid.h src/ccze-syslog.h src/ccze-vsftpd.h modified files: ChangeLog Rules.mk.in src/Makefile.in src/ccze-exim.c src/ccze-httpd.c src/ccze-procmail.c src/ccze-squid.c src/ccze-sulog.c src/ccze-super.c src/ccze-syslog.c src/ccze-vsftpd.c 2002-09-28 16:41:06 GMT Gergely Nagy patch-63 Summary: Fixed plugin loading from ~/.ccze/ Revision: ccze--0.1--patch-63 * src/ccze-plugin.c (ccze_plugin_load_all): Pass `homeplugs' to _ccze_load_set, not `home', so modules will be searched under ~/.ccze, not under ~/ itself. modified files: ChangeLog src/ccze-plugin.c 2002-09-28 16:36:17 GMT Gergely Nagy patch-62 Summary: Exim mainlog colorisation module Revision: ccze--0.1--patch-62 * src/ccze-color.c (ccze_color_keyword_map): Added `incoming', `outgoing', and `uniqn'. (ccze_color_init): Initialise them. * src/ccze-color.h (ccze_color_t): Added CCZE_COLOR_INCOMING, CCZE_COLOR_OUTGOING, and CCZE_COLOR_UNIQN. * src/ccze-exim.h: New file. * src/ccze-exim.c: Likewise. * Makefile.in (PLUGINS): Added `exim'. (ccze-exim.so): New target. new files: src/.arch-ids/ccze-exim.c.id src/.arch-ids/ccze-exim.h.id src/ccze-exim.c src/ccze-exim.h modified files: ChangeLog src/Makefile.in src/ccze-color.c src/ccze-color.h 2002-09-28 15:33:51 GMT Gergely Nagy patch-61 Summary: Minor optimisation in plugin loading Revision: ccze--0.1--patch-61 * src/ccze-plugin.c (_ccze_plugin_load): Moved most of ccze_plugin_load() here. (ccze_plugin_load): Made it a wrapper around _ccze_plugin_load(). (_ccze_plugin_load_set): Take a `base' argument, and use it to construct `path' which is passed to _ccze_plugin_load() (yes, changed to use _ccze_plugin_load() instead of ccze_plugin_load()). (ccze_plugin_load_all): Adapted to _ccze_plugin_load_set change. modified files: ChangeLog src/ccze-plugin.c 2002-09-28 14:41:01 GMT Gergely Nagy patch-60 Summary: Plugin architecture cleanup and redesign Revision: ccze--0.1--patch-60 * src/ccze-plugin.h (ccze_plugin_init): New prototype. (ccze_plugins): Likewise. (ccze_plugin_shutdown): Likewise. (ccze_plugin_finalise): Likewise. (ccze_plugin_load): Changed prototype. (ccze_plugin_load_all): Likewise. * src/ccze_plugin.c (_ccze_plugin_add): New helper function. (ccze_plugin_init): New function. (ccze_plugin_finalise): Likewise. (ccze_plugin_shutdown): Likewise. (ccze_plugins): Likewise. (ccze_plugin_load): Adapted to new plugin design. (ccze_plugin_load_all): Likewise. (_ccze_plugin_loaded): Likewise. (_ccze_plugin_load_set): Likewise. * src/ccze.c (sigint_handler): Use sigint_handler(). (main): Adapted to the new plugin design. * TODO: Plugin stuff is done. This new design is actually rather simple: there is one "global" ccze_plugin_t ** in src/ccze_plugin.c, and that module does all the hard job. This way no code is duplicated unnecessarily, less arguments are passed around, and in general it is Far Better(tm). modified files: ChangeLog TODO src/ccze-plugin.c src/ccze-plugin.h src/ccze.c 2002-09-24 16:35:05 GMT Gergely Nagy patch-59 Summary: TODO updates Revision: ccze--0.1--patch-59 * TODO (Bugfixes and cleanups): New section. modified files: ChangeLog TODO 2002-09-24 16:32:41 GMT Gergely Nagy patch-58 Summary: --plugin support Revision: ccze--0.1--patch-58 * src/ccze.c (ccze_config): Added pluginlist, pluginlist_len and pluginlist_alloc members. (options): Added --plugin. (parse_opt): Handle --plugin. (main): If no --plugin option was given, try to load all of them. If there was at least one, only load the ones which were explicitly specified. modified files: ChangeLog src/ccze.c 2002-09-24 16:18:32 GMT Gergely Nagy patch-57 Summary: CLEANFILES cleanup Revision: ccze--0.1--patch-57 * src/Makefile.in (CLEANFILES): Clean ${OBJECTS:.o=.da} only, not the whole ${SOURCES:.c=.da}. modified files: ChangeLog src/Makefile.in 2002-09-20 13:48:21 GMT Gergely Nagy patch-56 Summary: Scan ~/.ccze/ for plugins too Revision: ccze--0.1--patch-56 * src/ccze-plugin.c (_ccze_plugin_load_set): New function. (ccze_plugin_load_all): Utilise _ccze_plugin_load_set() to load plugins from under ~/.ccze/ and PLUGIN_LIBPATH. modified files: ChangeLog src/ccze-plugin.c 2002-09-20 13:09:18 GMT Gergely Nagy patch-55 Summary: Search for plugins under ~/.ccze/ Revision: ccze--0.1--patch-55 * src/ccze-plugin.c (ccze_plugin_load): Check if the plugin exists under ~/.ccze, and only load from the global area if not. modified files: ChangeLog src/ccze-plugin.c 2002-09-18 16:01:14 GMT Gergely Nagy patch-54 Summary: Pre-tag fixes Revision: ccze--0.1--patch-54 * src/ccze-color.c (ccze_color_load): Fixed to correctly setup colors with pre-tags (bold, blink, etc). modified files: ChangeLog src/ccze-color.c 2002-09-18 15:40:36 GMT Gergely Nagy patch-53 Summary: Updated debianisation Revision: ccze--0.1--patch-53 * debian/maint/conffiles: New file. * debian/rules (install): Install /etc/cczerc. (binary-ccze): Install DEBIAN/conffiles. new files: debian/maint/.arch-ids/=id debian/maint/.arch-ids/conffiles.id debian/maint/conffiles modified files: ChangeLog debian/rules new directories: debian/maint/.arch-ids debian/maint 2002-09-18 15:31:16 GMT Gergely Nagy patch-52 Summary: Simplified background-color parsing logic Revision: ccze--0.1--patch-52 * src/ccze-color.c (ccze_color_load): Instead of the ugly strstr() check, put the on_ variants into the ccze_colorname_map table too. modified files: ChangeLog src/ccze-color.c 2002-09-18 15:25:35 GMT Gergely Nagy patch-51 Summary: Background color support Revision: ccze--0.1--patch-51 * src/ccze.c (main): Set up all the colors, with backgrounds. * src/ccze-color.c (ccze_colorname_map): Use numbers instead of COLOR_PAIR()s. (ccze_color_load): Catch "bold", "underline", "reverse" and "blink" pre-tags. Parse further for the background color (and accept both and on_ patch-50 Summary: Introducing: etc/cczerc Revision: ccze--0.1--patch-50 * etc/cczerc: New file. * etc/Makefile.in: New file. * configure.ac: Generate etc/Makefile. * Makefile.in: Recurse into etc/ too. new files: etc/.arch-ids/=id etc/.arch-ids/Makefile.in.id etc/.arch-ids/cczerc.id etc/Makefile.in etc/cczerc modified files: ChangeLog Makefile.in configure.ac new directories: etc/.arch-ids etc 2002-09-18 14:30:20 GMT Gergely Nagy patch-49 Summary: Support --rcfile Revision: ccze--0.1--patch-49 * src/ccze-color.c (ccze_color_load): Stat the file before opening, and bail out if it is not a regular file. * src/ccze.c (ccze_config): Added an `rcfile' member. (options): Added `--rcfile'. (parse_opts): Recognise it. (main): Initialise ccze_config.rcfile to NULL, and only load any other files if it is still NULL after parsing. modified files: ChangeLog src/ccze-color.c src/ccze.c 2002-09-18 14:05:58 GMT Gergely Nagy patch-48 Summary: Minor memory-leak fix Revision: ccze--0.1--patch-48 * src/ccze-plugin.c (ccze_plugin_load_all): In the while() loop, free() namelist[m], and after the loop, free() namelist itself too. modified files: ChangeLog src/ccze-plugin.c 2002-09-18 14:00:06 GMT Gergely Nagy patch-47 Summary: Removed a debugging statement Revision: ccze--0.1--patch-47 * src/ccze.c (main): The endwin() after ccze_color_init() accidentally creeped in from my development tree. Removed. modified files: ChangeLog src/ccze.c 2002-09-18 13:57:34 GMT Gergely Nagy patch-46 Summary: Load $SYSCONFDIR/cczerc and ~/.cczerc too Revision: ccze--0.1--patch-46 * src/ccze.c (main): Try loading $SYCONFDIR/cczerc and ~/.cczerc too. modified files: ChangeLog src/ccze.c 2002-09-18 13:53:31 GMT Gergely Nagy patch-45 Summary: Check for fcntl.h Revision: ccze--0.1--patch-45 * configure.ac: AC_CHECK_HEADERS([fcntl.h]). modified files: ChangeLog configure.ac 2002-09-18 13:26:12 GMT Gergely Nagy patch-44 Summary: Configuration support, take #1 Revision: ccze--0.1--patch-44 * src/ccze-color.h: New file. * src/ccze-color.c: Likewise. * src/ccze.h: Removed all the color-related defines. * src/ccze.c (main): Initialise color support, and load the configuration files. * src/Makefile.in (SOURCES): Added ccze-color.c. (HEADERS): Added ccze-color.h. (OBJECTS): Added ccze-color.o. (ccze.o): Depend on ccze-color.h too. (ccze-color.o): New target. * TODO: Updated relevant entry. new files: src/.arch-ids/ccze-color.h.id src/.arch-ids/ccze-color.c.id src/ccze-color.h src/ccze-color.c modified files: ChangeLog TODO src/Makefile.in src/ccze.c src/ccze.h 2002-09-18 13:15:22 GMT Gergely Nagy patch-43 Summary: Syslog modularised Revision: ccze--0.1--patch-43 * src/ccze.c (siginthandler): Do not shutdown the syslog module explictly. (main): Got rid of the syslog-module special case. * src/Makefile.in (SOURCES): Removed ccze-syslog.c. (HEADERS): Removed ccze-syslog.h (OBJECTS): Removed ccze-syslog.o (PLUGINS): Added syslog. (ccze.o): Do not depend on ccze-syslog.h. (ccze-syslog.o): Renamed to... (ccze-syslog.so): ...this. modified files: ChangeLog src/Makefile.in src/ccze.c 2002-09-17 14:44:01 GMT Gergely Nagy patch-42 Summary: Workaround for a bug in pcre Revision: ccze--0.1--patch-42 * src/ccze-wordcolor.c (ccze_wordcolor_setup): Remove the '$' from reg_email, and introduce reg_email2, containing the final part with the $. (ccze_wordcolor_process): Use reg_email2 together with reg_email. This does not match exactly the same set as reg_email was intended to match, but it is close enough. (ccze_wordcolor_shutdown): free() reg_email2. modified files: ChangeLog src/ccze-wordcolor.c 2002-09-16 19:54:22 GMT Gergely Nagy patch-41 Summary: Introducing: ccze.1 Revision: ccze--0.1--patch-41 * doc/Makefile.in: New file. * doc/ccze.1: New file. * configure.ac: Create doc/Makefile too. * Makefile.in: Recurse into doc/ * TODO: Updated Documentation entry. * debian/rules: Compress the manual page. new files: doc/.arch-ids/=id doc/.arch-ids/Makefile.in.id doc/.arch-ids/ccze.1.id doc/Makefile.in doc/ccze.1 modified files: ChangeLog Makefile.in TODO configure.ac debian/rules new directories: doc/.arch-ids doc 2002-09-16 17:40:27 GMT Gergely Nagy patch-40 Summary: Debianisation Revision: ccze--0.1--patch-40 Debianised ccze. It was a fast job, so there might be rough edges, but this is still better than nothing. new files: debian/.arch-ids/=id debian/.arch-ids/changelog.id debian/.arch-ids/control.id debian/.arch-ids/copyright.id debian/.arch-ids/rules.id debian/changelog debian/control debian/copyright debian/rules modified files: ChangeLog new directories: debian/.arch-ids debian 2002-09-16 16:56:43 GMT Gergely Nagy patch-39 Summary: Modularisation Revision: ccze--0.1--patch-39 * src/ccze-plugin.h: New file. * src/ccze-plugin.c: Likewise. * src/ccze.h: Removed the CCZE_MATCH_* enum. All users updated. * src/ccze.c: Adapted to the new plugin-handling scheme. * src/ccze-super.c: New file (forgot to add earlier). * src/ccze-super.h: Likewise. * src/Makefile.in (SOURCES): Reorganised. (HEADERS): Likewise. (PLUGINS): New variable. (PLUGIN_OBJS): Likewise. (CLEANFILES): Added ${PLUGIN_OBJS}. (OBJECTS): Moved here from Rules.mk.in. (install): Install plugins too. (uninstall): Uninstall plugins too. (all): Depend on ${PLUGIN_OBJS}. (${PROGRAM}): Link with -rdynamic. * Rules.mk.in (libdir): New variable. (pkglibdir): Likewise. (DEFINES): Pass on -DPKGLIBDIR. (OBJECTS): Moved to src/Makefile.in. (%.so): New target. * configure.ac: Added AC_HEADER_DIRENT and -ldl checks. * TODO: Removed relevant entry. new files: src/.arch-ids/ccze-plugin.c.id src/.arch-ids/ccze-plugin.h.id src/.arch-ids/ccze-super.c.id src/.arch-ids/ccze-super.h.id src/ccze-plugin.c src/ccze-plugin.h src/ccze-super.c src/ccze-super.h modified files: ChangeLog Rules.mk.in TODO configure.ac src/Makefile.in src/ccze-httpd.c src/ccze-procmail.c src/ccze-squid.c src/ccze-sulog.c src/ccze-syslog.c src/ccze-vsftpd.c src/ccze.c src/ccze.h 2002-09-16 10:09:59 GMT Gergely Nagy patch-38 Summary: TODO updates Revision: ccze--0.1--patch-38 * TODO: Added `Modularisation' entry. modified files: ChangeLog TODO 2002-09-16 10:03:51 GMT Gergely Nagy patch-37 Summary: Calling conventions revamped Revision: ccze--0.1--patch-37 Abstracted away all the various regexp-matching routines into opaque modules, all providing the same interface. This makes it possible to write a colouriser module without pcre, and it also allows us to implement run-time loadable modules at some point in the future. modified files: ChangeLog src/ccze-httpd.c src/ccze-httpd.h src/ccze-procmail.c src/ccze-procmail.h src/ccze-squid.c src/ccze-squid.h src/ccze-sulog.c src/ccze-sulog.h src/ccze-syslog.c src/ccze-syslog.h src/ccze-vsftpd.c src/ccze-vsftpd.h src/ccze-wordcolor.h src/ccze.c 2002-09-16 08:57:46 GMT Gergely Nagy patch-36 Summary: Signal colouring fix Revision: ccze--0.1--patch-36 * src/ccze-wordcolor.c (ccze_wordcolor_setup): Lowercased the signal names in `reg_sig', since we try to apply the regexp to a lowercase string. Also removed the capital letters from `reg_size', for the same reason. modified files: ChangeLog src/ccze-wordcolor.c 2002-09-15 16:23:48 GMT Gergely Nagy patch-35 Summary: HTTPd access.log colorisation enhancements Revision: ccze--0.1--patch-35 * src/ccze-httpd.c (ccze_httpd_access_log_process): Extract the optional vhost, and put `other' on the output queue as-is. (ccze_httpd_setup): The access.log regexp was tuned up a bit, to support vhost and timezone elements. modified files: ChangeLog src/ccze-httpd.c 2002-09-14 11:37:36 GMT Gergely Nagy patch-34 Summary: Fixed procmail colorisation Revision: ccze--0.1--patch-34 * src/ccze-procmail.c (ccze_procmail_process): Do not CCZE_ADDSTR `extra' in the if branch. Set `col' instead, and use that to add extra to the output queue. modified files: ChangeLog src/ccze-procmail.c 2002-09-14 11:30:59 GMT Gergely Nagy patch-33 Summary: Fixed two double free()s Revision: ccze--0.1--patch-33 * src/ccze-wordcolor.c (ccze_wordcolor_process): Do not try to free word or lword twice. modified files: ChangeLog src/ccze-wordcolor.c 2002-09-14 11:04:47 GMT Gergely Nagy patch-32 Summary: Minor memory-leak fixes Revision: ccze--0.1--patch-32 * src/ccze-wordcolor.c (ccze_wordcolor_process): free() some more variables. modified files: ChangeLog src/ccze-wordcolor.c 2002-09-14 10:48:24 GMT Gergely Nagy patch-31 Summary: An strtok() replacement Revision: ccze--0.1--patch-31 * src/ccze-wordcolor.c (_my_strbrk): New function. Works almost like strtok(), but does not eat multiple delimiters. (ccze_wordcolor_process): Use it. modified files: ChangeLog src/ccze-wordcolor.c 2002-09-14 10:07:15 GMT Gergely Nagy patch-30 Summary: Better word colouring Revision: ccze--0.1--patch-30 * src/ccze-wordcolor.c (ccze_wordcolor_process): Compare the lower-cased word with all those regexps, and in case of good/badwords, only colour the word if the badword matches the beginning of the word. modified files: ChangeLog src/ccze-wordcolor.c 2002-09-13 16:37:43 GMT Gergely Nagy patch-29 Summary: Fixed a segmentation fault Revision: ccze--0.1--patch-29 * src/ccze-wordcolor.c (ccze_wordcolor_process): If the message does not contain any spaces, or it is empty, put it onto the output queue as-is. modified files: ChangeLog src/ccze-wordcolor.c 2002-09-13 15:51:27 GMT Gergely Nagy patch-28 Summary: Typo fix Revision: ccze--0.1--patch-28 * Rules.mk.in (maintainer-clean): it is ${MAINTAINERCLEANFILES}, with a capital S. modified files: ChangeLog Rules.mk.in 2002-09-13 14:48:38 GMT Gergely Nagy patch-27 Summary: Include patchlevel in the version string Revision: ccze--0.1--patch-27 * src/ccze.c (argp_program_version): Include the PATCHLEVEL too. modified files: ChangeLog src/ccze.c 2002-09-13 14:44:55 GMT Gergely Nagy patch-26 Summary: --no-service-lookup and --no-word-color Revision: ccze--0.1--patch-26 * src/ccze.c (ccze_config): Added `wcol' and `slookup' members. (options): Added --no-service-lookup and --no-word-color. (parse_opt): Recognise them. (main): Initialise them to on, and pass them to ccze_wordcolor_process. * src/ccze-wordcolor.h (ccze_wordcolor_process): Take two new arguments. * src/ccze-wordcolor.c (ccze_wordcolor_process): If `wcol' is disabled, print the message in the default color. If slookup is disabled, do not try costy lookups. modified files: ChangeLog src/ccze-wordcolor.c src/ccze-wordcolor.h src/ccze.c 2002-09-13 14:23:36 GMT Gergely Nagy patch-25 Summary: Minor regexp tweaks Revision: ccze--0.1--patch-25 * src/ccze-wordcolor.c (words_error): Added `alarm'. (ccze_wordcolor_setup): Do not place any requirement on the length of reg_size, so we can catch `0.21Kbyte/sec' too. modified files: ChangeLog src/ccze-wordcolor.c 2002-09-13 13:47:56 GMT Gergely Nagy patch-24 Summary: configure.ac updates Revision: ccze--0.1--patch-24 * configure.ac: AC_FUNC_STRFTIME and AC_CHECK_HEADERS([netdb.h]) were added. modified files: ChangeLog configure.ac 2002-09-13 13:41:40 GMT Gergely Nagy patch-23 Summary: UNIX timestamp conversion support Revision: ccze--0.1--patch-23 * src/ccze.h (ccze_print_date): New prototype. * src/ccze.c (ccze_print_date): New function. (ccze_config): Added a convdate member. (options): Handle --convert-date. (parse_opt): Recognise it. (main): Initialise ->convdate to off. * src/ccze-squid.c (ccze_squid_access_log_process): Use ccze_print_date. (ccze_squid_store_log_process): Likewise. modified files: ChangeLog src/ccze-squid.c src/ccze.c src/ccze.h 2002-09-13 13:23:52 GMT Gergely Nagy patch-22 Summary: Word-colorising Revision: ccze--0.1--patch-22 * src/ccze-wordcolor.h: New file. * src/ccze-wordcolor.c: New file. * src/ccze.h (CCZE_COLOR_MAC): New colour. (CCZE_COLOR_VERSION): Likewise. (CCZE_COLOR_ADDRESS): Likewise. (CCZE_COLOR_NUMBERS): Likewise. (CCZE_COLOR_SIGNAL): Likewise. (CCZE_COLOR_SERVICE): Likewise. (CCZE_COLOR_PROT): Likewise. (CCZE_COLOR_BADWORD): Likewise. (CCZE_COLOR_GOODWORD): Likewise. (CCZE_COLOR_SYSTEMWORD): Likewise. * src/ccze.c (main): Support word colorising. new files: src/.arch-ids/ccze-wordcolor.c.id src/.arch-ids/ccze-wordcolor.h.id src/ccze-wordcolor.c src/ccze-wordcolor.h modified files: ChangeLog src/Makefile.in src/ccze.c src/ccze.h 2002-09-13 11:34:33 GMT Gergely Nagy patch-21 Summary: No Texinfo docs Revision: ccze--0.1--patch-21 There won't be any texinfo docs for CCZE, so support code was removed from the build system. modified files: ChangeLog Makefile.in Rules.mk.in configure.ac 2002-09-13 11:09:03 GMT Gergely Nagy patch-20 Summary: Remove trailing \n from input Revision: ccze--0.1--patch-20 * src/ccze.c (main): Remove the trailing \n from the input, so our regexps which use $ will work again. modified files: ChangeLog src/ccze.c 2002-09-13 10:21:38 GMT Gergely Nagy patch-19 Summary: Configure check for signal return type Revision: ccze--0.1--patch-19 * configure.ac: AC_TYPE_SIGNAL. modified files: ChangeLog configure.ac 2002-09-13 10:04:02 GMT Gergely Nagy patch-18 Summary: Squid access.log colorisation fix Revision: ccze--0.1--patch-18 * src/ccze-squid.c (ccze_squid_access_log_process): After the hierarchy, print fhost, not host. (ccze_squid_setup): Made the access.log regexp more robust. modified files: ChangeLog src/ccze-squid.c 2002-09-13 09:54:16 GMT Gergely Nagy patch-17 Summary: fgets() -> getline() Revision: ccze--0.1--patch-17 * src/ccze.c (main): Use getline() instead of fgets(). modified files: ChangeLog src/ccze.c 2002-09-13 09:49:22 GMT Gergely Nagy patch-16 Summary: super.log colorisation support Revision: ccze--0.1--patch-16 * src/ccze-super.h: New file. * src/ccze-super.c: New file. * src/ccze.h (CCZE_MATCH_SUPER): New enum member. * src/ccze.c (main): Support super.log colorisation. * src/Makefile.in (SOURCES): Added ccze-super.c. (HEADERS): Added ccze-super.h (ccze.o): Depend on ccze-super.h too. (ccze-super.o): New target. modified files: ChangeLog src/Makefile.in src/ccze.c src/ccze.h 2002-09-13 09:31:17 GMT Gergely Nagy patch-15 Summary: Minor leak fix Revision: ccze--0.1--patch-15 * src/ccze-sulog.c (ccze_sulog_process): free() islogin. modified files: ChangeLog src/ccze-sulog.c 2002-09-13 09:26:58 GMT Gergely Nagy patch-14 Summary: sulog colorisation Revision: ccze--0.1--patch-14 * src/ccze-sulog.h: New file. * src/ccze-sulog.c: New file. * src/ccze.h (CCZE_MATCH_SULOG): New enum member. * src/ccze.c (main): Support sulog colorisation. * src/Makefile.in (SOURCES): Added ccze-sulog.c. (HEADERS): Added ccze-sulog.h. (ccze.o): Depend on ccze-sulog.h too. (ccze-sulog.o): New target. new files: src/.arch-ids/ccze-sulog.c.id src/.arch-ids/ccze-sulog.h.id src/ccze-sulog.c src/ccze-sulog.h modified files: ChangeLog src/Makefile.in src/ccze.c src/ccze.h 2002-09-13 08:47:31 GMT Gergely Nagy patch-13 Summary: HTTPd error.log colorisation Revision: ccze--0.1--patch-13 * src/ccze-httpd.h (ccze_httpd_setup): Take two new arguments. (ccze_httpd_error_log_process): New prototype. * src/ccze-httpd.c (_ccze_httpd_error): New function. (ccze_httpd_error_log_process): New function. (ccze_httpd_setup): Setup error.log regexp too. * src/ccze.h (CCZE_MATCH_HTTPD_ERROR_LOG): New enum member. * src/ccze.c (main): Support error.log colorisation. modified files: ChangeLog src/ccze-httpd.c src/ccze-httpd.h src/ccze.c src/ccze.h 2002-09-13 08:26:42 GMT Gergely Nagy patch-12 Summary: Full support for store.log coloristation Revision: ccze--0.1--patch-12 * src/ccze.h (CCZE_COLOR_PROXY_CREATE): New colour. (CCZE_COLOR_PROXY_SWAPIN): Likewise. (CCZE_COLOR_PROXY_SWAPOUT): Likewise. (CCZE_COLOR_PROXY_RELEASE): Likewise. * src/ccze-squid.c (_ccze_proxy_tag): New function. (ccze_squid_store_log_process): Use it. modified files: ChangeLog src/ccze-squid.c src/ccze.h 2002-09-13 08:17:22 GMT Gergely Nagy patch-11 Summary: Memory-leak plugging Revision: ccze--0.1--patch-11 * src/ccze-squid.c (ccze_squid_store_log_process): free() the variables allocated by pcre_get_substring(). modified files: ChangeLog src/ccze-squid.c 2002-09-13 08:14:29 GMT Gergely Nagy patch-10 Summary: Squid store.log colorisation fix Revision: ccze--0.1--patch-10 * src/ccze-squid.c (ccze_squid_setup): Changed the store.log regexp to be more robust. (ccze_squid_store_log_process): Adapted to the regexp change. Thanks to Mark Szabo for providing a store.log. modified files: ChangeLog src/ccze-squid.c 2002-09-12 22:24:58 GMT Gergely Nagy patch-9 Summary: Squid store.log colorisation, take #1 Revision: ccze--0.1--patch-9 * src/ccze.h (CCZE_COLOR_SWAPNUM): New colour. (CCZE_MATCH_SQUID_STORE_LOG): New enum member. * src/ccze-squid.h (ccze_squid_store_log_process): New prototype. (ccze_squid_setup): Take two new arguments. * src/ccze-squid.c (ccze_squid_store_log_process): New function. (ccze_squid_setup): Setup store.log regexps too. * src/ccze.c (main): Support store.log colorisation. modified files: ChangeLog src/ccze-squid.c src/ccze-squid.h src/ccze.c src/ccze.h 2002-09-12 21:20:13 GMT Gergely Nagy patch-8 Summary: Signal handlers Revision: ccze--0.1--patch-8 * src/ccze.c (sigint_handler): New function. (sigwinch_handler): New function. (main): Use them. modified files: ChangeLog src/ccze.c 2002-09-12 16:16:18 GMT Gergely Nagy patch-7 Summary: addstr -> CCZE_ADDSTR Revision: ccze--0.1--patch-7 * src/ccze.h (CCZE_ADDSTR): Surround the macro with {}, so it can be safely used in an if-branch. (CCZE_NEWLINE): New macro. * src/ccze-procmail.c (ccze_procmail_process): Use them. * src/ccze-squid.c (ccze_squid_access_log_process): Likewise. * src/ccze.c (main): Likewise. modified files: ChangeLog src/ccze-procmail.c src/ccze-squid.c src/ccze.c src/ccze.h 2002-09-12 16:09:52 GMT Gergely Nagy patch-6 Summary: ccze_space() macroised Revision: ccze--0.1--patch-6 * src/ccze.h (ccze_space): Made it a macro. * src/ccze.c (ccze_space): Removed this function, as it is superceded by the macro in src/ccze.h. modified files: ChangeLog src/ccze.c src/ccze.h 2002-09-12 16:06:44 GMT Gergely Nagy patch-5 Summary: Splitting sources Revision: ccze--0.1--patch-5 Split up src/ccze.c into smaller parts, each one containing one or more colorizer methods and a setup routine. new files: src/.arch-ids/ccze.h.id src/.arch-ids/ccze-httpd.h.id src/.arch-ids/ccze-httpd.c.id src/.arch-ids/ccze-procmail.c.id src/.arch-ids/ccze-procmail.h.id src/.arch-ids/ccze-squid.h.id src/.arch-ids/ccze-squid.c.id src/.arch-ids/ccze-syslog.c.id src/.arch-ids/ccze-syslog.h.id src/.arch-ids/ccze-vsftpd.c.id src/.arch-ids/ccze-vsftpd.h.id src/ccze.h src/ccze-httpd.h src/ccze-httpd.c src/ccze-procmail.c src/ccze-procmail.h src/ccze-squid.h src/ccze-squid.c src/ccze-syslog.c src/ccze-syslog.h src/ccze-vsftpd.c src/ccze-vsftpd.h modified files: ChangeLog src/Makefile.in src/ccze.c 2002-09-12 15:13:47 GMT Gergely Nagy patch-4 Summary: There is no EXTRAVERSION Revision: ccze--0.1--patch-4 * Rules.mk.in (DEFINES): Do not define EXTRAVERSION. modified files: ChangeLog Rules.mk.in 2002-09-12 15:11:57 GMT Gergely Nagy patch-3 Summary: Some more configure checks Revision: ccze--0.1--patch-3 * configure.ac: Check for -lpcre and -lncurses. * Rules.mk.in (LIBS): New variable. * src/Makefile.in (ALL_LDFLAGS): Use ${LIBS} instead of the hardcoded -lpcre -lncurses setup. modified files: ChangeLog Rules.mk.in configure.ac src/Makefile.in 2002-09-12 14:45:28 GMT Gergely Nagy patch-2 Summary: THANKS Revision: ccze--0.1--patch-2 * THANKS: New file. * Makefile.in (EXTRA_DIST): Include THANKS. new files: .arch-ids/THANKS.id THANKS modified files: ChangeLog Makefile.in 2002-09-12 14:42:58 GMT Gergely Nagy patch-1 Summary: Squid cache.log support Revision: ccze--0.1--patch-1 * src/ccze.c (CCZE_MATCH_SQUID_CACHE_LOG): New enum-member. (process_squid_cache_log): New function. (main): Use them. And also free() the vsftpd stuff. modified files: ChangeLog src/ccze.c 2002-09-12 14:28:42 GMT Gergely Nagy base-0 Summary: Initial import Revision: ccze--0.1--base-0 This is the initial import of CCZE, a clone of `colorize' written in C to be fast and light on resources. new files: ./.arch-ids/AUTHORS.id ./.arch-ids/COPYING.id ./.arch-ids/ChangeLog.id ./.arch-ids/INSTALL.id ./.arch-ids/Makefile.in.id ./.arch-ids/NEWS.id ./.arch-ids/README.id ./.arch-ids/Rules.mk.in.id ./.arch-ids/TODO.id ./.arch-ids/config.guess.id ./.arch-ids/config.sub.id ./.arch-ids/configure.ac.id ./.arch-ids/install-sh.id ./AUTHORS ./COPYING ./ChangeLog ./INSTALL ./Makefile.in ./NEWS ./README ./Rules.mk.in ./TODO ./config.guess ./config.sub ./configure.ac ./install-sh ./src/.arch-ids/=id ./src/.arch-ids/Makefile.in.id ./src/.arch-ids/ccze.c.id ./src/Makefile.in ./src/ccze.c ccze-0.2.1/doc/0040755000175400017540000000000007660232760013423 5ustar algernonalgernonccze-0.2.1/doc/Makefile.in0100644000175400017540000000163707660232332015467 0ustar algernonalgernon## doc/Makefile.in ## -- User-modifiable variables -- ## srcdir = @srcdir@ top_srcdir = @top_srcdir@ subdir = doc ## == The code below shouldn't need to be touched at all == ## include ../Rules.mk ## -- Private variables -- ## MANS = ccze.1 ccze-plugin.7 ccze-cssdump.1 DISTCLEANFILES = ${MANS} EXTRA_DIST = ccze.1.in ccze-plugin.7.in ccze-cssdump.1.in ## -- Generic rules -- ## all: ${MANS} %: %.in ${top_srcdir}/ChangeLog sed -e "s,@VERSION\@,${VERSION},g" \ -e "s,@sysconfdir\@,${sysconfdir},g" \ -e "s,@pkglibdir\@,${pkglibdir},g" \ <${srcdir}/$@.in >$@T && mv -f $@T $@ install: ${MANS} ${INSTALL} -d ${DESTDIR}${man1dir} ${INSTALL_DATA} ccze.1 ccze-cssdump.1 ${DESTDIR}${man1dir}/ ${INSTALL} -d ${DESTDIR}${man7dir} ${INSTALL_DATA} ccze-plugin.7 ${DESTDIR}${man7dir}/ uninstall: rm -f ${DESTDIR}${man1dir}/ccze.1 ${DESTDIR}${man7dir}/ccze-plugin.7 \ ${DESTDIR}${man1dir}/ccze-cssdump.1 ccze-0.2.1/doc/ccze.1.in0100644000175400017540000001561507660232332015036 0ustar algernonalgernon.\" Hey Emacs! This is -*- nroff -*-! .\" Copyright (C) 2002, 2003 Gergely Nagy .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Permission is granted to copy and distribute translations of this .\" manual into another language, under the above conditions for modified .\" versions, except that this permission notice may be stated in a .\" translation approved by the Author. .TH CCZE 1 "2003-04-24" "CCZE @VERSION@" CCZE .SH NAME ccze \- A robust log colorizer .SH SYNOPSIS .B ccze .RI [ options "] <" logfile .SH DESCRIPTION This manual page documents briefly the .B ccze utility, which is a drop\-in replacement for .BR colorize , but written in C, to be faster and less resource\-hungry. The goal was to be fully backwards compatible, yet superior with respect to speed and features. .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes (`\-'). A summary of options is included below. .TP .B \-a, \-\-argument \fIPLUGIN=ARGUMENTS\fB Use this option to pass \fIARGUMENTS\fR to the specified \fIPLUGIN\fR. The argument list is whitespace separated. .TP .B \-A, \-\-raw\-ansi If one wants to enable raw ANSI color sequences instead of using curses, this option does just that. .TP .B \-c, \-\-color \fIKEY=COLOR\fB Set the color of the keyword \fIKEY\fR to \fICOLOR\fR, like one would do in one of the configuration files. .TP .B \-C, \-\-convert\-date Convert unix timestamp to readable date format (in oops and squid logs, for example). .TP .B \-F, \-\-rcfile \fIrcfile\fB Read \fIrcfile\fR as a configuration file upon startup, instead of the default ones. .TP .B \-h, \-\-html Instead of colorising the input onto the console, output it in HTML format instead. .TP .B \-l, \-\-list\-plugins List all available (loaded) plugins, along with their type and a short description. .TP .B \-m, \-\-mode \fImode\fB Change the output mode. Available modes are \fIcurses\fR, \fIansi\fR and \fIhtml\fR. .TP .B \-o, \-\-options \fIOPTIONS...\fB \fBCCZE\fR is able to toggle some of its features with this option. You can toggle the \fIscroll\fR, \fIwordcolor\fR, \fIlookups\fR, and \fItransparent\fR features, or you can fiddle with \fIcssfile\fR. All of these are enabled by default, except \fIcssfile\fR. One can turn them off by prefixing the option with a "no". With \fIscroll\fR, one can enable or disable scrolling. If the output is not redirected, it is wise to leave it enabled. The \fIwordcolor\fR option makes \fBccze\fR search for different keywords in unparsed input, and color those too. Since it is quite fast, and makes the output look better, it is recommended to leave this enabled. However, \fIlookups\fR is an option that might be better to disable. When on, \fBccze\fR will try to look up usernames, service names, and lots of other stuff, which will slow down coloring a great deal. If one is piping a long log through \fBccze\fR, this option might be turned off to speed up the process. With the \fItransparent\fR option, one can make CCZE treat black background colors as transparent \- that means, a black background will appear transparent in a similar X terminal. If turned off, it will appear as black. If \fIcssfile\fR is set, then CCZE will not inline the Cascading Style Sheet information into the outputted HTML, but include a link to the external stylesheet given in this paramater. .TP .B \-p, \-\-plugin \fIPLUGIN\fR While the default action is to load all plugins (see the \fBPlugins\fR section below), when this option is present, only the specified plugins will be loaded. If one knows what kind of log will be piped through \fBccze\fR, using this option may result in a slight speedup. .TP .B \-r, \-\-remove\-facilty Syslog\-ng puts the facility level before log messages. With this switch, these can be cut off. .TP .B \-\-help Show summary of options and exit. .TP .B \-V, \-\-version Show version of program. .SH PLUGINS Different programs have different kind of logs, and every kind of log \fBccze\fR supports is implemented via a plug\-in. They are by default located under \fI@pkglibdir@\fR and \fI$HOME/.ccze\fR (so they can be overridden by the user easily). At the moment, the following modules are bundled with the official release: .TP .IR apm For coloring apmd's logs. .TP .IR distcc For coloring distccd's logs. (See \fIdistccd\fR(1)) .TP .IR exim For coloring exim's \fImain.log\fR. (See \fIexim\fR(8)) .TP .IR fetchmail For coloring fetchmail's log files. (See \fIfetchmail\fR(1)) .TP .IR ftpstats For coloring ftpStats compatible log files, such as Pure\-FTPD's \fIStats\fR log format. .TP .IR httpd For coloring apache\-style \fIaccess.log\fR and \fIerror.log\fR files. (See \fIapache\fR(8)) As a side\-effect, all compatible formats, like \fIpure\-ftpd\fR(8)'s common\-log format is also supported by this plugin. .TP .IR icecast For coloring \fIicecast/icecast.log\fR and \fIicecast/usage.log\fR files. (See \fIicecast\fR(8)) .TP .IR oops For coloring \fIoops/oops.log\fR files. .TP .IR php For coloring \fIphp.log\fR files. .TP .IR postfix For coloring postfix logs. (See \fIpostfix\fR(1)) .TP .IR procmail For coloring procmail's log file. (See \fIprocmail\fR(1)) .TP .IR proftpd For coloring proftpd's \fIaccess.log\fR and \fIauth.log\fR files. (See \fIproftpd\fR(8)) .TP .IR squid For coloring squid's \fIaccess.log\fR, \fIstore.log\fR and \fIcache.log\fR files. (See \fIsquid\fR(8)) .TP .IR sulog For coloring \fIsulog\fR files. (See \fIsu\fR(1)) .TP .IR super For coloring \fIsuper.log\fR files. (See \fIsuper\fR(1)) .TP .IR syslog For coloring generic syslog messages. (See \fIsyslogd\fR(8)) .TP .IR ulogd For coloring ulogd logs. .TP .IR vsftpd For coloring \fIvsftpd.log\fR files. (See \fIvsftpd\fR(8)) .TP .IR xferlog For coloring \fIxferlog\fR files. (See \fIxferlog\fR(5)) .SH FILES .TP .IR @sysconfdir@/colorizerc ", " $HOME/.colorizerc .RS These files are the default configuration files for \fBcolorize\fR, and are parsed by \fBccze\fR for the sake of full compatibility. .RE .IR @sysconfdir@/cczerc ", " $HOME/.cczerc .RS This two are the main configuration files, in which one can change the colors used by the program to his liking. See the comments in the beginning of \fI@sysconfdir@/cczerc\fR for a description on the files' structure. If neither of these files exist on your system, consider using the \fBccze\-dump\fR utility in the source tree, which dumps the default color set to standard output. .RE .SH "SEE ALSO" .BR colorize (1) .SH AUTHOR ccze was written by Gergely Nagy , based on colorize by Istvan Karaszi . ccze-0.2.1/doc/ccze-plugin.7.in0100644000175400017540000001546607660232332016344 0ustar algernonalgernon.\" Hey Emacs! This is -*- mode: nroff; fill-column: 76 -*-! .\" Copyright (C) 2002, 2003 Gergely Nagy .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Permission is granted to copy and distribute translations of this .\" manual into another language, under the above conditions for modified .\" versions, except that this permission notice may be stated in a .\" translation approved by the Author. .TH CCZE-PLUGIN 7 "2003-03-29" "CCZE @VERSION@" CCZE .SH NAME ccze \- A robust log colorizer, plugin infrastructure .SH SYNOPSIS .B #include .B /* Plugin support */ .br .BI "typedef void (*" ccze_plugin_startup_t ") (void);" .br .BI "typedef void (*" ccze_plugin_shutdown_t ") (void);" .br .BI "typedef int (*" ccze_plugin_handle_t ") (const char *" str , .BI "size_t " length ", char **" rest ); .BI "CCZE_DEFINE_PLUGIN (" name ", " type ", " desc ); .br .BI "CCZE_DEFINE_PLUGINS (" plugins "...);" .br .B /* Display */ .br .BI "void ccze_addstr (ccze_color_t " col ", const char *" str ");" .br .B void ccze_newline (void); .br .B void ccze_space (void); .br .BI "void ccze_wordcolor_process_one (char *" word ", int " slookup ");" .br .B /* Helpers */ .br .BI "ccze_color_t ccze_http_action (const char *" method ");" .br .BI "void ccze_print_date (const char *" date ");" .B /* Command line */ .br .BI "char **ccze_plugin_argv_get (const char *" name ");" .br .BI "const char *ccze_plugin_name_get (void);" .SH DESCRIPTION This manual page attempts to outline the internals of CCZE plugins: how they work, how they are implemented, and how to add new ones. There are four required entry points in a plugin: a \fIstartup\fR, a \fIshutdown\fR and a \fIhandler\fR routine (more on these later), and an informational structure. The \fIstartup\fR function must be of type \fBccze_plugin_startup_t\fR. This is called right after the module is loaded. Its purpose is to initialise all kinds of module\-specific global variables, such as the regular expressions. The \fIshutdown\fR function is its counterpart: this is used to deallocate any memory reserved by the \fIstartup\fR code. The core part of a plugin is the \fIhandler\fR, of type \fBccze_plugin_handle_t\fR. This does the actual coloring. The string to process is passed in the \fIstr\fR argument, its length in \fIlength\fR. The third argument, \fIrest\fR is a pointer to a string. Unlike the first two, this argument is used only for output. When a handler processed a string, it must return a non\-zero value, in case it could not process it, the handler must return with zero. If the string could be processed only partially, the part which was deemed unknown by the handler must be passed back in the \fIrest\fR variable. The fourth part, although the smallest part, is the most important. Without this, the module is useless, it cannot be loaded. This part tells CCZE what the \fIstartup\fR, \fIshutdown\fR and \fIhandler\fR functions are called. To encourage good style, the little details of this structure will not be disclosed in this manual page. Instead, the helper macro, \fICCZE_DEFINE_PLUGIN\fR will be explained. \fICCZE_DEFINE_PLUGIN\fR is the macro to use if one wants to make the plugin loadable. Its first argument is an unquoted string: the name of the plugin. The second part is the type of the plugin, it can be \fIFULL\fR, \fIPARTIAL\fR or \fIANY\fR. The last argument is a short description of the plugin. It is assumed that the three functions mentioned earlier are called \fIccze_\fBname\fI_setup\fR, \fIccze_\fBname\fI_shutdown\fR and \fIccze_\fBname\fI_handle\fR, respectively. A \fIFULL\fR plugin is one that accepts raw input, untouched by any other plugin before, and processes it. On the other hand, a \fIPARTIAL\fR plugin relies on previous ones preprocessing the input. For example, \fIsyslog\fR is a full plugin, on which \fIulogd\fR, a partial plugin relies. The \fIsyslog\fR plugin processes the raw input from the logfile, adds colour to most of it, save the actual message sent by a process, that is left to subsequent plugins, like \fIulogd\fR. An \fIANY\fR plugin is one can act as both other types. With \fICCZE_DEFINE_PLUGINS\fR one can place more than one plugin into one shared object. There are two other helper functions, \fIccze_plugin_argv_get\fR and \fIccze_plugin_name_get\fR. One can pass arguments to CCZE plugins, and these is the function to retrieve them. While \fIccze_plugin_name_get\fR returns the name of the current plugin, \fIccze_plugin_argv_get\fR returns a NULL\-terminated array, with each entry containing an argument. .SH "DISPLAY METHODS" The so\-called \fIdisplay methods\fR are the \fBonly\fR supported interface to emit something to the display. These handle both the normal, ncurses\-based, and the HTML output. This is a kind of abstraction so plugins will not have to worry about the differences between the output formats. The most important one is \fIccze_addstr\fR, which takes a color (see \fIccze.h\fR for a list of supported color tags) and a string, and displays it appropriately. The \fIccze_space\fR and \fIccze_newline\fR functions emit a space and a newline, respectively. Our last function, \fIccze_wordcolor_process_one\fR passes \fBword\fR to the word colourising engine. If the second argument, \fBslookup\fR is non\-zero, the engine will perform service lookups (like \fIgetent\fR and friends). .SH "HELPER METHODS" We only have two helper methods: \fIccze_print_date\fR, which simply prints out the date in the appropriate colour, and \fIccze_http_action\fR, which given a HTTP \fBmethod\fR, returns the associated colour, in a format suitable for \fIccze_addstr\fR. .SH EXAMPLE .nf #include #include #include static char **ccze_foo_argv; static int ccze_foo_handle (const char *str, size_t length, char **rest) { int i = 1; if (strstr (str, "foo")) { ccze_addstr (CCZE_COLOR_GOODWORD, str); return 1; } while (ccze_foo_argv[i]) { if (strstr (str, ccze_foo_argv[i])) { ccze_addstr (CCZE_COLOR_GOODWORD, str); return 1; } i++; } return 0; } static void ccze_foo_startup (void) { ccze_foo_argv = ccze_plugin_argv_get (ccze_plugin_name_get ()); } static void ccze_foo_shutdown (void) { } CCZE_DEFINE_PLUGIN (foo, PARTIAL, "Partial FOO coloriser."); .fi .SH "SEE ALSO" .BR ccze (1) .SH AUTHOR ccze was written by Gergely Nagy , based on colorize by Istvan Karaszi . ccze-0.2.1/doc/ccze-cssdump.1.in0100644000175400017540000000431707660232332016507 0ustar algernonalgernon.\" Hey Emacs! This is -*- nroff -*-! .\" Copyright (C) 2003 Gergely Nagy .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Permission is granted to copy and distribute translations of this .\" manual into another language, under the above conditions for modified .\" versions, except that this permission notice may be stated in a .\" translation approved by the Author. .TH CCZE-CSSDUMP 1 "2003-01-13" "CCZE @VERSION@" CCZE .SH NAME ccze\-cssdump \- Dump CCZE color setup into CSS format .SH SYNOPSIS .B ccze\-cssdump .RI [ options ] .SH DESCRIPTION This manual page documents briefly the .B ccze\-cssdump utility, which is a simple tool to dump the color setup of CCZE into Cascading Style Sheet format, to be used later by \fBccze \-h \-o cssfile\fR. .SH OPTIONS This program follows the usual GNU command line syntax, with long options starting with two dashes (`\-'). A summary of options is included below. .TP .B \-F, \-\-rcfile \fIrcfile\fB Read \fIrcfile\fR as a configuration file upon startup. .TP .B \-l, \-\-load Load the default configuration files upon startup. .TP .B \-\-help Show summary of options and exit. .TP .B \-V, \-\-version Show version of program. .SH FILES .TP .IR @sysconfdir@/colorizerc ", " $HOME/.colorizerc .RS These files are the default configuration files for \fBcolorize\fR, and are parsed by \fBccze\fR for the sake of full compatibility. .RE .IR @sysconfdir@/cczerc ", " $HOME/.cczerc .RS This two are the main configuration files, in which one can change the colors used by the program to his liking. See the comments in the beginning of \fI@sysconfdir@/cczerc\fR for a description on the files' structure. .RE .SH "SEE ALSO" .BR ccze (1) .SH AUTHOR ccze was written by Gergely Nagy , based on colorize by Istvan Karaszi . ccze-0.2.1/src/0040755000175400017540000000000007660232761013446 5ustar algernonalgernonccze-0.2.1/src/ccze.c0100644000175400017540000004216107660232332014531 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * ccze.c -- CCZE itself * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "system.h" #ifdef HAVE_ARGP_H # include #endif #include #include #include #include #include #include #include #include #include "ccze-private.h" #include "ccze-compat.h" #define BLACK COLOR_PAIR (0) #define RED COLOR_PAIR (1) #define GREEN COLOR_PAIR (2) #define YELLOW COLOR_PAIR (3) #define BLUE COLOR_PAIR (4) #define CYAN COLOR_PAIR (5) #define MAGENTA COLOR_PAIR (6) #define WHITE COLOR_PAIR (7) #define ESC 0x1b /* ccze somehow swaped cyan and magenta */ static int ccze_raw_ansi_color[] = {30, 31, 32, 33, 34, 36, 35, 37}; ccze_config_t ccze_config = { .scroll = 1, .convdate = 0, .remfac = 0, .wcol = 1, .slookup = 1, .rcfile = NULL, .cssfile = NULL, .transparent = 1, .pluginlist_len = 0, .pluginlist_alloc = 10, .color_argv_len = 0, .color_argv_alloc = 10, .mode = CCZE_MODE_CURSES }; static short colors[] = {COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_YELLOW, COLOR_BLUE, COLOR_CYAN, COLOR_MAGENTA, COLOR_WHITE}; static volatile sig_atomic_t sighup_received = 0; #ifndef HAVE_ARGP_PARSE const char *argp_program_name = "ccze"; #endif const char *argp_program_version = "ccze 0.2." PATCHLEVEL; const char *argp_program_bug_address = ""; static struct argp_option options[] = { {"rcfile", 'F', "FILE", 0, "Read configuration from FILE", 1}, {"html", 'h', NULL, 0, "Generate HTML output", 1}, {"options", 'o', "OPTIONS...", 0, "Toggle some options\n" "(such as scroll, wordcolor and lookups, transparent, or cssfile)", 1}, {"convert-date", 'C', NULL, 0, "Convert UNIX timestamps to readable format", 1}, {"plugin", 'p', "PLUGIN", 0, "Load PLUGIN", 1}, {"remove-facility", 'r', NULL, 0, "remove syslog-ng's facility from start of the lines", 1}, {"color", 'c', "KEY=COLOR,...", 0, "Set the color of KEY to COLOR", 1}, {"argument", 'a', "PLUGIN=ARGS...", 0, "Add ARGUMENTS to PLUGIN", 1}, {"debug", 'd', NULL, OPTION_HIDDEN, "Turn on debugging.", 1}, {"raw-ansi", 'A', NULL, 0, "Generate raw ANSI output", 1}, {"list-plugins", 'l', NULL, 0, "List available plugins", 1}, {"mode", 'm', "MODE", 0, "Change the output mode\n" "(Available modes are curses, ansi and html.)", 1}, {NULL, 0, NULL, 0, NULL, 0} }; static error_t parse_opt (int key, char *arg, struct argp_state *state); static struct argp argp = {options, parse_opt, 0, "ccze -- cheer up 'yer logs.", NULL, NULL, NULL}; enum { CCZE_O_SUBOPT_SCROLL = 0, CCZE_O_SUBOPT_NOSCROLL, CCZE_O_SUBOPT_WORDCOLOR, CCZE_O_SUBOPT_NOWORDCOLOR, CCZE_O_SUBOPT_LOOKUPS, CCZE_O_SUBOPT_NOLOOKUPS, CCZE_O_SUBOPT_CSSFILE, CCZE_O_SUBOPT_NOCSSFILE, CCZE_O_SUBOPT_TRANSPARENT, CCZE_O_SUBOPT_NOTRANSPARENT, CCZE_O_SUBOPT_END }; static char *o_subopts[] = { [CCZE_O_SUBOPT_SCROLL] = "scroll", [CCZE_O_SUBOPT_NOSCROLL] = "noscroll", [CCZE_O_SUBOPT_WORDCOLOR] = "wordcolor", [CCZE_O_SUBOPT_NOWORDCOLOR] = "nowordcolor", [CCZE_O_SUBOPT_LOOKUPS] = "lookups", [CCZE_O_SUBOPT_NOLOOKUPS] = "nolookups", [CCZE_O_SUBOPT_CSSFILE] = "cssfile", [CCZE_O_SUBOPT_NOCSSFILE] = "nocssfile", [CCZE_O_SUBOPT_TRANSPARENT] = "transparent", [CCZE_O_SUBOPT_NOTRANSPARENT] = "notransparent", [CCZE_O_SUBOPT_END] = NULL }; enum { CCZE_M_SUBOPT_CURSES, CCZE_M_SUBOPT_ANSI, CCZE_M_SUBOPT_HTML, CCZE_M_SUBOPT_DEBUG, CCZE_M_SUBOPT_END }; static char *m_subopts[] = { [CCZE_M_SUBOPT_CURSES] = "curses", [CCZE_M_SUBOPT_ANSI] = "ansi", [CCZE_M_SUBOPT_HTML] = "html", [CCZE_M_SUBOPT_DEBUG] = "debug", [CCZE_M_SUBOPT_END] = NULL }; static char *empty_subopts[] = { NULL }; static char *_strbrk_string; static size_t _strbrk_string_len; char * ccze_strbrk (char *str, char delim) { char *found; if (str) { _strbrk_string = str; _strbrk_string_len = strlen (str); found = str; } else found = _strbrk_string + 1; if (!_strbrk_string_len) return NULL; while (_strbrk_string_len >= 1 && *_strbrk_string != delim) { _strbrk_string++; _strbrk_string_len--; } if (_strbrk_string_len > 0) *_strbrk_string = '\0'; return found; } char * xstrdup (const char *str) { if (!str) return NULL; else return strdup (str); } static error_t parse_opt (int key, char *arg, struct argp_state *state) { char *subopts, *value, *plugin; switch (key) { case 'c': subopts = arg; while (*subopts != '\0') { ccze_getsubopt (&subopts, empty_subopts, &value); ccze_config.color_argv[ccze_config.color_argv_len++] = strdup (value); if (ccze_config.color_argv_len >= ccze_config.color_argv_alloc) { ccze_config.color_argv_alloc *= 2; ccze_config.color_argv = (char **)ccze_realloc (ccze_config.color_argv, ccze_config.color_argv_alloc * sizeof (char *)); } } break; case 'a': plugin = strtok (optarg, "="); value = strtok (NULL, "\n"); ccze_plugin_argv_set (plugin, value); break; case 'p': subopts = arg; while (*subopts != '\0') { ccze_getsubopt (&subopts, empty_subopts, &value); ccze_config.pluginlist[ccze_config.pluginlist_len++] = strdup (value); if (ccze_config.pluginlist_len >= ccze_config.pluginlist_alloc) { ccze_config.pluginlist_alloc *= 2; ccze_config.pluginlist = (char **)ccze_realloc (ccze_config.pluginlist, ccze_config.pluginlist_alloc * sizeof (char *)); } } break; case 'h': ccze_config.mode = CCZE_MODE_HTML; break; case 'A': ccze_config.mode = CCZE_MODE_RAW_ANSI; break; case 'd': ccze_config.mode = CCZE_MODE_DEBUG; break; case 'l': ccze_config.mode = CCZE_MODE_PLUGIN_LIST; break; case 'F': ccze_config.rcfile = strdup (arg); break; case 'r': ccze_config.remfac = 1; break; case 'm': subopts = optarg; while (*subopts != '\0') { switch (getsubopt (&subopts, m_subopts, &value)) { case CCZE_M_SUBOPT_CURSES: ccze_config.mode = CCZE_MODE_CURSES; break; case CCZE_M_SUBOPT_ANSI: ccze_config.mode = CCZE_MODE_RAW_ANSI; break; case CCZE_M_SUBOPT_HTML: ccze_config.mode = CCZE_MODE_HTML; break; case CCZE_M_SUBOPT_DEBUG: ccze_config.mode = CCZE_MODE_DEBUG; break; default: argp_error (state, "unrecognised mode: `%s'", value); break; } } break; case 'o': subopts = optarg; while (*subopts != '\0') { switch (getsubopt (&subopts, o_subopts, &value)) { case CCZE_O_SUBOPT_SCROLL: ccze_config.scroll = 1; break; case CCZE_O_SUBOPT_NOSCROLL: ccze_config.scroll = 0; break; case CCZE_O_SUBOPT_WORDCOLOR: ccze_config.wcol = 1; break; case CCZE_O_SUBOPT_NOWORDCOLOR: ccze_config.wcol = 0; break; case CCZE_O_SUBOPT_LOOKUPS: ccze_config.slookup = 1; break; case CCZE_O_SUBOPT_NOLOOKUPS: ccze_config.slookup = 0; break; case CCZE_O_SUBOPT_CSSFILE: if (value) ccze_config.cssfile = strdup (value); break; case CCZE_O_SUBOPT_NOCSSFILE: ccze_config.cssfile = NULL; break; case CCZE_O_SUBOPT_TRANSPARENT: ccze_config.transparent = 1; break; case CCZE_O_SUBOPT_NOTRANSPARENT: ccze_config.transparent = 0; break; default: argp_error (state, "unrecognised option: `%s'", value); break; } } break; case 'C': ccze_config.convdate = 1; break; default: return ARGP_ERR_UNKNOWN; } return 0; } ccze_color_t ccze_http_action (const char *method) { if (!strcasecmp ("GET", method)) return CCZE_COLOR_HTTP_GET; else if (!strcasecmp ("POST", method)) return CCZE_COLOR_HTTP_POST; else if (!strcasecmp ("HEAD", method)) return CCZE_COLOR_HTTP_HEAD; else if (!strcasecmp ("PUT", method)) return CCZE_COLOR_HTTP_PUT; else if (!strcasecmp ("CONNECT", method)) return CCZE_COLOR_HTTP_CONNECT; else if (!strcasecmp ("TRACE", method)) return CCZE_COLOR_HTTP_TRACE; else return CCZE_COLOR_UNKNOWN; } void ccze_print_date (const char *date) { time_t ltime; char tmp[128]; if (ccze_config.convdate) { ltime = atol (date); if (ltime < 0) { ccze_addstr (CCZE_COLOR_DATE, date); return; } strftime (tmp, sizeof (tmp) - 1, "%b %e %T", gmtime (<ime)); ccze_addstr (CCZE_COLOR_DATE, tmp); } else ccze_addstr (CCZE_COLOR_DATE, date); } void ccze_newline (void) { switch (ccze_config.mode) { case CCZE_MODE_HTML: printf ("
\n"); break; case CCZE_MODE_DEBUG: case CCZE_MODE_RAW_ANSI: printf ("\n"); break; case CCZE_MODE_CURSES: addstr ("\n"); break; default: break; } } static char * ccze_str_htmlencode (const char *src) { char *buf, *dest; unsigned char c; dest = (char *)ccze_malloc (strlen (src) * 5 + 1); if (!dest) return NULL; buf = dest; while ((c = *src++)) { switch (c) { case '>': *dest++ = '&'; *dest++ = 'g'; *dest++ = 't'; *dest++ = ';'; break; case '<': *dest++ = '&'; *dest++ = 'l'; *dest++ = 't'; *dest++ = ';'; break; case '&': *dest++ = '&'; *dest++ = 'a'; *dest++ = 'm'; *dest++ = 'p'; *dest++ = ';'; break; default: *dest++ = c; } } *dest = '\0'; return buf; } static void ccze_addstr_internal (ccze_color_t col, const char *str, int enc) { switch (ccze_config.mode) { case CCZE_MODE_HTML: if (str) { char *d; if (enc) d = ccze_str_htmlencode (str); else d = strdup (str); printf ("%s", ccze_color_lookup_name (col), d); free (d); } break; case CCZE_MODE_RAW_ANSI: if (str) { int c = ccze_color (col); printf("%c[22m", ESC); /* default */ if (c & 0x1000) /* Bold */ { printf("%c[1m", ESC); c ^= 0x1000; } if (c & 0x2000) /* Underline */ { printf("%c[4m", ESC); c ^= 0x2000; } if (c & 0x4000) /* Reverse */ { printf("%c[5m", ESC); c ^= 0x4000; } if (c & 0x8000) /* Blink */ { printf("%c[7m", ESC); c ^= 0x8000; } if (c >> 8 > 0 || !ccze_config.transparent) printf("%c[%dm", ESC, ccze_raw_ansi_color[c >> 8] + 10); printf ("%c[%dm%s%c[0m", ESC, ccze_raw_ansi_color[c & 0xf], str, ESC); } break; case CCZE_MODE_DEBUG: if (str) { char *cn = ccze_color_lookup_name (col); printf ("<%s>%s", cn, str, cn); } break; case CCZE_MODE_CURSES: attrset (ccze_color (col)); addstr (str); break; default: break; } } void ccze_addstr (ccze_color_t col, const char *str) { ccze_addstr_internal (col, str, 1); } void ccze_space (void) { switch (ccze_config.mode) { case CCZE_MODE_HTML: ccze_addstr_internal (CCZE_COLOR_DEFAULT, " ", 0); break; default: ccze_addstr (CCZE_COLOR_DEFAULT, " "); break; } } static void sigint_handler (int sig) __attribute__ ((noreturn)); static void sigint_handler (int sig) { switch (ccze_config.mode) { case CCZE_MODE_CURSES: endwin (); break; case CCZE_MODE_HTML: printf ("\n\n\n"); break; case CCZE_MODE_RAW_ANSI: printf("%c[0m", ESC); break; default: break; } if (sig) { ccze_wordcolor_shutdown (); ccze_plugin_shutdown (); } exit (0); } static void sigwinch_handler (int sig) { endwin (); refresh (); signal (SIGWINCH, sigwinch_handler); } static void sighup_handler (int sig) { sighup_received = 1; signal (SIGHUP, sighup_handler); } static void ccze_main (void) { char *subject = NULL; size_t subjlen = 0; int i, j; char *homerc, *home; ccze_plugin_t **plugins; sighup_received = 0; ccze_color_init (); ccze_plugin_init (); if (ccze_config.rcfile) ccze_color_load (ccze_config.rcfile); else { ccze_color_load (SYSCONFDIR "/colorizerc"); ccze_color_load (SYSCONFDIR "/cczerc"); home = getenv ("HOME"); if (home) { asprintf (&homerc, "%s/.colorizerc", home); ccze_color_load (homerc); free (homerc); asprintf (&homerc, "%s/.cczerc", home); ccze_color_load (homerc); free (homerc); } } while (ccze_config.color_argv_len > 0) { ccze_color_parse (ccze_config.color_argv[ccze_config.color_argv_len - 1]); free (ccze_config.color_argv[--ccze_config.color_argv_len]); } if (ccze_config.mode == CCZE_MODE_CURSES) { initscr (); signal (SIGWINCH, sigwinch_handler); nonl (); if (ccze_config.scroll) { idlok (stdscr, TRUE); scrollok (stdscr, TRUE); leaveok (stdscr, FALSE); } start_color (); if (ccze_config.transparent) { if (use_default_colors () == OK) { colors[0] = -1; } } for (i = 0; i < 8; i++) for (j = 0; j < 8; j++) init_pair (i*8 + j, colors[j], colors[i]); } else if (ccze_config.mode == CCZE_MODE_HTML) { printf ("\n" "\n\n\n", argp_program_version); if (ccze_config.cssfile) printf ("\n", ccze_config.cssfile); else { printf ("\n"); } printf ("Log colorisation generated by %s\n" "\n\n\n", argp_program_version, ccze_cssbody_color ()); } signal (SIGINT, sigint_handler); signal (SIGHUP, sighup_handler); ccze_wordcolor_setup (); if (ccze_config.pluginlist_len == 0) ccze_plugin_load_all (); else { int pl = ccze_config.pluginlist_len; while (pl-- > 0) ccze_plugin_load (ccze_config.pluginlist[pl]); } ccze_plugin_load_all_builtins (); ccze_plugin_finalise (); i = 0; plugins = ccze_plugins (); if (!plugins[0]) { endwin (); fprintf (stderr, "ccze: No plugins found. Exiting.\n"); exit (1); } ccze_plugin_argv_finalise (); if (ccze_config.mode == CCZE_MODE_PLUGIN_LIST) { ccze_plugin_list_fancy (); sigint_handler (0); } ccze_plugin_setup (); while ((getline (&subject, &subjlen, stdin) != -1) && !sighup_received) { int handled = 0; int status = 0; char *rest = NULL, *rest2 = NULL; char *tmp = strchr (subject, '\n'); unsigned int remfac_tmp; if (tmp) tmp[0] = '\0'; if (ccze_config.remfac && (sscanf (subject, "<%u>", &remfac_tmp) > 0)) { tmp = strdup (strchr (subject, '>') + 1); free (subject); subject = tmp; } subjlen = strlen (subject); ccze_plugin_run (plugins, subject, subjlen, &rest, CCZE_PLUGIN_TYPE_FULL, &handled, &status); if (rest) { handled = 0; ccze_plugin_run (plugins, rest, strlen (rest), &rest2, CCZE_PLUGIN_TYPE_PARTIAL, &handled, &status); if (handled == 0) ccze_wordcolor_process (rest, ccze_config.wcol, ccze_config.slookup); else ccze_wordcolor_process (rest2, ccze_config.wcol, ccze_config.slookup); ccze_newline (); free (rest); free (rest2); } if (status == 0) { ccze_wordcolor_process (subject, ccze_config.wcol, ccze_config.slookup); ccze_newline (); } if (ccze_config.mode == CCZE_MODE_CURSES) refresh (); } if (ccze_config.mode == CCZE_MODE_CURSES) refresh (); } int main (int argc, char **argv) { ccze_config.pluginlist = (char **)ccze_calloc (ccze_config.pluginlist_alloc, sizeof (char *)); ccze_config.color_argv = (char **)ccze_calloc (ccze_config.color_argv_alloc, sizeof (char *)); ccze_plugin_argv_init (); argp_parse (&argp, argc, argv, 0, 0, NULL); do { ccze_main (); ccze_wordcolor_shutdown (); ccze_plugin_shutdown (); } while (sighup_received); sigint_handler (0); return 0; } ccze-0.2.1/src/ccze-color.c0100644000175400017540000005611007660232332015644 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * ccze-color.c -- Color-handling routines for CCZE * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include #include #include #include #include "ccze-private.h" #include "ccze-compat.h" #define BOLD A_BOLD | #define BLACK COLOR_PAIR (0) #define RED COLOR_PAIR (1) #define GREEN COLOR_PAIR (2) #define YELLOW COLOR_PAIR (3) #define BLUE COLOR_PAIR (4) #define CYAN COLOR_PAIR (5) #define MAGENTA COLOR_PAIR (6) #define WHITE COLOR_PAIR (7) #define RAW_ANSI_BOLD 0x1000 #define RAW_ANSI_UNDERLINE 0x2000 #define RAW_ANSI_REVERSE 0x4000 #define RAW_ANSI_BLINK 0x8000 #define RAW_ANSI_BLACK 0 #define RAW_ANSI_RED 1 #define RAW_ANSI_GREEN 2 #define RAW_ANSI_YELLOW 3 #define RAW_ANSI_BLUE 4 #define RAW_ANSI_CYAN 5 #define RAW_ANSI_MAGENTA 6 #define RAW_ANSI_WHITE 7 #define CCZE_KEYWORD_R(k,c,s) k, c, s #if CCZE_DUMP #define CCZE_KEYWORD(k,c,d) CCZE_KEYWORD_R (k, c, 1), d #define CCZE_KEYWORD_H(k,c,d) CCZE_KEYWORD_R (k, c, 0), d #else #define CCZE_KEYWORD(k,c,d) CCZE_KEYWORD_R (k, c, 1) #define CCZE_KEYWORD_H(k,c,d) CCZE_KEYWORD_R (k, c, 0) #endif static int ccze_color_table [CCZE_COLOR_LAST + 1]; static char *ccze_csscolor_normal_map[] = { "black", "darkred", "#00C000", "brown", "blue", "darkcyan", "darkmagenta", "grey" }; static char *ccze_csscolor_bold_map[] = { "black", "red", "lime", "yellow", "slateblue", "cyan", "magenta", "white" }; static char *ccze_cssbody = "#404040"; typedef struct { char *name; int value; } ccze_colorname_t; static ccze_colorname_t ccze_colorname_map[] = { {"black", 0}, {"red", 1}, {"green", 2}, {"yellow", 3}, {"blue", 4}, {"cyan", 5}, {"magenta", 6}, {"white", 7}, {"on_black", 0}, {"on_red", 1}, {"on_green", 2}, {"on_yellow", 3}, {"on_blue", 4}, {"on_cyan", 5}, {"on_magenta", 6}, {"on_white", 7} }; typedef struct { char *keyword; ccze_color_t idx; int settable; #if CCZE_DUMP char *comment; #endif } ccze_color_keyword_t; static ccze_color_keyword_t ccze_color_keyword_map[] = { {CCZE_KEYWORD ("default", CCZE_COLOR_DEFAULT, "Default (not colorised)")}, {CCZE_KEYWORD ("unknown", CCZE_COLOR_UNKNOWN, "Unknown message")}, {CCZE_KEYWORD ("date", CCZE_COLOR_DATE, "Dates and times")}, {CCZE_KEYWORD ("host", CCZE_COLOR_HOST, "Host names and IP numbers")}, {CCZE_KEYWORD ("mac", CCZE_COLOR_MAC, "MAC addresses")}, {CCZE_KEYWORD ("pid", CCZE_COLOR_PID, "PIDs (Process IDs)")}, {CCZE_KEYWORD ("pid-sqbr", CCZE_COLOR_PIDB, "Brackets around PIDs")}, {CCZE_KEYWORD ("get", CCZE_COLOR_HTTP_GET, "HTTP GET")}, {CCZE_KEYWORD ("post", CCZE_COLOR_HTTP_POST, "HTTP POST")}, {CCZE_KEYWORD ("head", CCZE_COLOR_HTTP_HEAD, "HTTP HEAD")}, {CCZE_KEYWORD ("put", CCZE_COLOR_HTTP_PUT, "HTTP PUT")}, {CCZE_KEYWORD ("connect", CCZE_COLOR_HTTP_CONNECT, "HTTP CONNECT")}, {CCZE_KEYWORD ("trace", CCZE_COLOR_HTTP_TRACE, "HTTP TRACE")}, {CCZE_KEYWORD ("httpcodes", CCZE_COLOR_HTTPCODES, "HTTP status codes (200, 404, etc)")}, {CCZE_KEYWORD ("gettime", CCZE_COLOR_GETTIME, "Transfer times")}, {CCZE_KEYWORD ("getsize", CCZE_COLOR_GETSIZE, "Transfer sizes")}, {CCZE_KEYWORD ("debug", CCZE_COLOR_DEBUG, "Debug messages")}, {CCZE_KEYWORD ("error", CCZE_COLOR_ERROR, "Error messages")}, {CCZE_KEYWORD ("warning", CCZE_COLOR_WARNING, "Warnings")}, {CCZE_KEYWORD ("bad", CCZE_COLOR_BADWORD, "\"Bad words\"")}, {CCZE_KEYWORD ("good", CCZE_COLOR_GOODWORD, "\"Good words\"")}, {CCZE_KEYWORD ("system", CCZE_COLOR_SYSTEMWORD, "\"System words\"")}, {CCZE_KEYWORD ("process", CCZE_COLOR_PROC, "Sender process")}, {CCZE_KEYWORD ("dir", CCZE_COLOR_DIR, "Directory names")}, {CCZE_KEYWORD ("prot", CCZE_COLOR_PROT, "Protocols")}, {CCZE_KEYWORD ("service", CCZE_COLOR_SERVICE, "Services")}, {CCZE_KEYWORD ("email", CCZE_COLOR_EMAIL, "E-mail addresses")}, {CCZE_KEYWORD ("size", CCZE_COLOR_SIZE, "Sizes")}, {CCZE_KEYWORD ("version", CCZE_COLOR_VERSION, "Version numbers")}, {CCZE_KEYWORD ("address", CCZE_COLOR_ADDRESS, "Memory addresses")}, {CCZE_KEYWORD ("uri", CCZE_COLOR_URI, "URIs (http://, ftp://, etc)")}, {CCZE_KEYWORD ("miss", CCZE_COLOR_PROXY_MISS, "Proxy MISS")}, {CCZE_KEYWORD ("parent", CCZE_COLOR_PROXY_PARENT, "Proxy PARENT")}, {CCZE_KEYWORD ("direct", CCZE_COLOR_PROXY_DIRECT, "Proxy DIRECT")}, {CCZE_KEYWORD ("hit", CCZE_COLOR_PROXY_HIT, "Proxy HIT")}, {CCZE_KEYWORD ("deny", CCZE_COLOR_PROXY_DENIED, "Proxy DENIED")}, {CCZE_KEYWORD ("ident", CCZE_COLOR_IDENT, "Remote user (proxy/http)")}, {CCZE_KEYWORD ("refresh", CCZE_COLOR_PROXY_REFRESH, "Proxy REFRESH")}, {CCZE_KEYWORD ("swapfail", CCZE_COLOR_PROXY_SWAPFAIL, "Proxy SWAPFAIL")}, {CCZE_KEYWORD ("ctype", CCZE_COLOR_CTYPE, "Content type (http/proxy)")}, {CCZE_KEYWORD ("create", CCZE_COLOR_PROXY_CREATE, "Proxy CREATE")}, {CCZE_KEYWORD ("swapin", CCZE_COLOR_PROXY_SWAPIN, "Proxy SWAPIN")}, {CCZE_KEYWORD ("swapout", CCZE_COLOR_PROXY_SWAPOUT, "Proxy SWAPOUT")}, {CCZE_KEYWORD ("release", CCZE_COLOR_PROXY_RELEASE, "Proxy RELEASE")}, {CCZE_KEYWORD ("swapnum", CCZE_COLOR_SWAPNUM, "Proxy swap number")}, {CCZE_KEYWORD ("user", CCZE_COLOR_USER, "Usernames")}, {CCZE_KEYWORD ("numbers", CCZE_COLOR_NUMBERS, "Numbers")}, {CCZE_KEYWORD ("subject", CCZE_COLOR_SUBJECT, "Subject lines (procmail)")}, {CCZE_KEYWORD ("signal", CCZE_COLOR_SIGNAL, "Signal names")}, {CCZE_KEYWORD ("incoming", CCZE_COLOR_INCOMING, "Incoming mail (exim)")}, {CCZE_KEYWORD ("outgoing", CCZE_COLOR_OUTGOING, "Outgoing mail (exim)")}, {CCZE_KEYWORD ("uniqn", CCZE_COLOR_UNIQN, "Unique ID (exim)")}, {CCZE_KEYWORD ("repeat", CCZE_COLOR_REPEAT, "'last message repeated N times'")}, {CCZE_KEYWORD ("field", CCZE_COLOR_FIELD, "RFC822 Field")}, {CCZE_KEYWORD ("chain", CCZE_COLOR_CHAIN, "Chain names (ulogd)")}, {CCZE_KEYWORD ("percentage", CCZE_COLOR_PERCENTAGE, "Percentages")}, {CCZE_KEYWORD ("ftpcodes", CCZE_COLOR_FTPCODES, "FTP codes")}, {CCZE_KEYWORD ("keyword", CCZE_COLOR_KEYWORD, "Various keywords (like PHP in php.log, etc)")}, {CCZE_KEYWORD_H ("black", CCZE_COLOR_STATIC_BLACK, "Black")}, {CCZE_KEYWORD_H ("red", CCZE_COLOR_STATIC_RED, "Red")}, {CCZE_KEYWORD_H ("green", CCZE_COLOR_STATIC_GREEN, "Green")}, {CCZE_KEYWORD_H ("yellow", CCZE_COLOR_STATIC_YELLOW, "Yyellow")}, {CCZE_KEYWORD_H ("blue", CCZE_COLOR_STATIC_BLUE, "Blue")}, {CCZE_KEYWORD_H ("cyan", CCZE_COLOR_STATIC_CYAN, "Cyan")}, {CCZE_KEYWORD_H ("magenta", CCZE_COLOR_STATIC_MAGENTA, "Magenta")}, {CCZE_KEYWORD_H ("white", CCZE_COLOR_STATIC_WHITE, "White")}, {CCZE_KEYWORD_H ("bold_black", CCZE_COLOR_STATIC_BOLD_BLACK, "Bold black")}, {CCZE_KEYWORD_H ("bold_red", CCZE_COLOR_STATIC_BOLD_RED, "Bold red")}, {CCZE_KEYWORD_H ("bold_green", CCZE_COLOR_STATIC_BOLD_GREEN, "Bold green")}, {CCZE_KEYWORD_H ("bold_yellow", CCZE_COLOR_STATIC_BOLD_YELLOW, "Bold yellow")}, {CCZE_KEYWORD_H ("bold_blue", CCZE_COLOR_STATIC_BOLD_BLUE, "Bold blue")}, {CCZE_KEYWORD_H ("bold_cyan", CCZE_COLOR_STATIC_BOLD_CYAN, "Bold cyan")}, {CCZE_KEYWORD_H ("bold_magenta", CCZE_COLOR_STATIC_BOLD_MAGENTA, "Bold magenta")}, {CCZE_KEYWORD_H ("bold_white", CCZE_COLOR_STATIC_BOLD_WHITE, "Bold white")}, }; char * ccze_color_to_name_simple (int color) { switch (color) { case BLACK: return "black"; case RED: return "red"; case GREEN: return "green"; case YELLOW: return "yellow"; case BLUE: return "blue"; case CYAN: return "cyan"; case MAGENTA: return "magenta"; case WHITE: return "white"; } return NULL; } static char * ccze_color_to_name_css (int color, ccze_color_t realcolor) { if (ccze_color (realcolor) & A_BOLD) return ccze_csscolor_bold_map[PAIR_NUMBER (color)]; else return ccze_csscolor_normal_map[PAIR_NUMBER (color)]; } int ccze_color_strip_attrib (int color) { int mycolor = color; if (mycolor & A_BOLD) mycolor ^= A_BOLD; if (mycolor & A_UNDERLINE) mycolor ^= A_UNDERLINE; if (mycolor & A_REVERSE) mycolor ^= A_REVERSE; if (mycolor & A_BLINK) mycolor ^= A_BLINK; return mycolor; } char * ccze_color_lookup_name (ccze_color_t color) { size_t cidx; for (cidx = 0; cidx < sizeof (ccze_color_keyword_map); cidx++) if (ccze_color_keyword_map[cidx].idx == color) return ccze_color_keyword_map[cidx].keyword; return NULL; } char * ccze_color_to_css (ccze_color_t cidx) { int my_color = ccze_color_strip_attrib (ccze_color (cidx)); char *str, *tmp; if (my_color < COLOR_PAIR (8)) asprintf (&tmp, "\tcolor: %s\n", ccze_color_to_name_css (my_color, cidx)); else { int i,j; char *ci, *cj; j = (my_color >> 8) % 8; i = (my_color >> 8) / 8; ci = ccze_color_to_name_css (COLOR_PAIR (i), cidx); cj = ccze_color_to_name_css (COLOR_PAIR (j), cidx); asprintf (&tmp, "\tcolor: %s\n\ttext-background: %s\n", cj, ci); } if (ccze_color (cidx) & A_UNDERLINE) asprintf (&str, ".ccze_%s {\n%s\ttext-decoration: underline\n}\n", ccze_color_lookup_name (cidx), tmp); else asprintf (&str, ".ccze_%s {\n%s}\n", ccze_color_lookup_name (cidx), tmp); free (tmp); return str; } void ccze_colors_to_css (void) { ccze_color_t cidx; for (cidx = CCZE_COLOR_DATE; cidx < CCZE_COLOR_LAST; cidx++) { char *line; line = ccze_color_to_css (cidx); printf ("%s\n", line); free (line); } } int ccze_color (ccze_color_t idx) { return ccze_color_table[idx]; } static int _ccze_color_keyword_lookup (const char *key, int hiddentoo) { size_t i; for (i = 0; i < sizeof (ccze_color_keyword_map) / sizeof (ccze_color_keyword_t); i++) if (!strcmp (key, ccze_color_keyword_map[i].keyword) && (hiddentoo || ccze_color_keyword_map[i].settable)) return ccze_color_keyword_map[i].idx; return -1; } int ccze_color_keyword_lookup (const char *key) { return _ccze_color_keyword_lookup (key, 1); } static int _ccze_colorname_map_lookup (const char *color) { size_t i; if (color[0] == '\'') { char *tmp = strndup (&color[1], strlen (color) - 2); int rval = ccze_color_table[_ccze_color_keyword_lookup (tmp, 0)]; free (tmp); return rval; } for (i = 0; i < sizeof (ccze_colorname_map) / sizeof (ccze_colorname_t); i++) if (!strcmp (color, ccze_colorname_map[i].name)) return ccze_colorname_map[i].value; return -1; } void ccze_color_parse (char *line) { char *tmp, *keyword, *color, *pre = NULL, *bg; int ncolor = 0, nkeyword = 0, nbg, rcolor, csskey = 0; keyword = strtok (line, " \t\n="); if (!keyword) return; if (strstr (keyword, "css") == keyword) csskey = 1; else { tmp = strstr (line, "#"); if (tmp) tmp[0]='\0'; } if (!csskey && ((nkeyword = _ccze_color_keyword_lookup (keyword, 0)) == -1)) return; color = strtok (NULL, " \t\n"); if (!csskey) { if (color && (!strcmp (color, "bold") || !strcmp (color, "underline") || !strcmp (color, "reverse") || !strcmp (color, "blink"))) { pre = color; color = strtok (NULL, " \t\n"); } } if (!color) return; if (!csskey && (ncolor = _ccze_colorname_map_lookup (color)) == -1) return; bg = strtok (NULL, " \t\n"); if (bg) { if (!csskey && (nbg = _ccze_colorname_map_lookup (bg)) != -1) { if (ccze_config.mode == CCZE_MODE_RAW_ANSI) ncolor += (nbg << 8); else ncolor += nbg*8; } } if (color[0] == '\'') rcolor = ncolor; else { if (ccze_config.mode == CCZE_MODE_RAW_ANSI) rcolor = ncolor; else rcolor = COLOR_PAIR (ncolor); } if (pre) { if (!strcmp (pre, "bold")) rcolor |= (ccze_config.mode == CCZE_MODE_RAW_ANSI) ? RAW_ANSI_BOLD : A_BOLD; else if (!strcmp (pre, "underline")) rcolor |= (ccze_config.mode == CCZE_MODE_RAW_ANSI) ? RAW_ANSI_UNDERLINE : A_UNDERLINE; else if (!strcmp (pre, "reverse")) rcolor |= (ccze_config.mode == CCZE_MODE_RAW_ANSI) ? RAW_ANSI_REVERSE : A_REVERSE; else if (!strcmp (pre, "blink")) rcolor |= (ccze_config.mode == CCZE_MODE_RAW_ANSI) ? RAW_ANSI_BLINK : A_BLINK; } if (!csskey) ccze_color_table[nkeyword] = rcolor; else { int bold = 0; if (!strcmp (keyword, "cssbody")) ccze_cssbody = strdup (color); else { keyword += 3; if (strstr (keyword, "bold") == keyword) { keyword += 4; bold = 1; } ncolor = _ccze_colorname_map_lookup (keyword); if (bold) ccze_csscolor_bold_map[ncolor] = strdup (color); else ccze_csscolor_normal_map[ncolor] = strdup (color); } } } void ccze_color_load (const char *fn) { FILE *fp; char *line = NULL; size_t len; struct stat stb; stat (fn, &stb); if (!S_ISREG (stb.st_mode)) return; fp = fopen (fn, "r"); if (!fp) return; while (getline (&line, &len, fp) != -1) ccze_color_parse (line); free (line); fclose (fp); } char * ccze_cssbody_color (void) { return ccze_cssbody; } static void ccze_color_init_raw_ansi (void) { ccze_color_table[CCZE_COLOR_DATE] = (RAW_ANSI_BOLD | RAW_ANSI_CYAN); ccze_color_table[CCZE_COLOR_HOST] = (RAW_ANSI_BOLD | RAW_ANSI_BLUE); ccze_color_table[CCZE_COLOR_PROC] = (RAW_ANSI_GREEN); ccze_color_table[CCZE_COLOR_PID] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_PIDB] = (RAW_ANSI_BOLD | RAW_ANSI_GREEN); ccze_color_table[CCZE_COLOR_DEFAULT] = (RAW_ANSI_CYAN); ccze_color_table[CCZE_COLOR_EMAIL] = (RAW_ANSI_BOLD | RAW_ANSI_GREEN); ccze_color_table[CCZE_COLOR_SUBJECT] = (RAW_ANSI_MAGENTA); ccze_color_table[CCZE_COLOR_DIR] = (RAW_ANSI_BOLD | RAW_ANSI_CYAN); ccze_color_table[CCZE_COLOR_SIZE] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_USER] = (RAW_ANSI_BOLD | RAW_ANSI_YELLOW); ccze_color_table[CCZE_COLOR_HTTPCODES] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_GETSIZE] = (RAW_ANSI_MAGENTA); ccze_color_table[CCZE_COLOR_HTTP_GET] = (RAW_ANSI_GREEN); ccze_color_table[CCZE_COLOR_HTTP_POST] = (RAW_ANSI_BOLD | RAW_ANSI_GREEN); ccze_color_table[CCZE_COLOR_HTTP_HEAD] = (RAW_ANSI_GREEN); ccze_color_table[CCZE_COLOR_HTTP_PUT] = (RAW_ANSI_BOLD | RAW_ANSI_GREEN); ccze_color_table[CCZE_COLOR_HTTP_CONNECT] = (RAW_ANSI_GREEN); ccze_color_table[CCZE_COLOR_HTTP_TRACE] = (RAW_ANSI_GREEN); ccze_color_table[CCZE_COLOR_UNKNOWN] = ccze_color_table[CCZE_COLOR_DEFAULT]; ccze_color_table[CCZE_COLOR_GETTIME] = (RAW_ANSI_BOLD | RAW_ANSI_MAGENTA); ccze_color_table[CCZE_COLOR_URI] = (RAW_ANSI_BOLD | RAW_ANSI_GREEN); ccze_color_table[CCZE_COLOR_IDENT] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_CTYPE] = (RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_ERROR] = (RAW_ANSI_BOLD | RAW_ANSI_RED); ccze_color_table[CCZE_COLOR_PROXY_MISS] = (RAW_ANSI_RED); ccze_color_table[CCZE_COLOR_PROXY_HIT] = (RAW_ANSI_BOLD | RAW_ANSI_YELLOW); ccze_color_table[CCZE_COLOR_PROXY_DENIED] = (RAW_ANSI_BOLD | RAW_ANSI_RED); ccze_color_table[CCZE_COLOR_PROXY_REFRESH] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_PROXY_SWAPFAIL] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_DEBUG] = (RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_WARNING] = (RAW_ANSI_RED); ccze_color_table[CCZE_COLOR_PROXY_DIRECT] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_PROXY_PARENT] = (RAW_ANSI_BOLD | RAW_ANSI_YELLOW); ccze_color_table[CCZE_COLOR_SWAPNUM] = ccze_color_table[CCZE_COLOR_DEFAULT]; /* XXX */ ccze_color_table[CCZE_COLOR_PROXY_CREATE] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_PROXY_SWAPIN] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_PROXY_SWAPOUT] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_PROXY_RELEASE] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_MAC] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_VERSION] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_ADDRESS] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_NUMBERS] = (RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_SIGNAL] = (RAW_ANSI_BOLD | RAW_ANSI_YELLOW); ccze_color_table[CCZE_COLOR_SERVICE] = (RAW_ANSI_BOLD | RAW_ANSI_MAGENTA); ccze_color_table[CCZE_COLOR_PROT] = (RAW_ANSI_MAGENTA); ccze_color_table[CCZE_COLOR_BADWORD] = (RAW_ANSI_BOLD | RAW_ANSI_YELLOW); ccze_color_table[CCZE_COLOR_GOODWORD] = (RAW_ANSI_BOLD | RAW_ANSI_GREEN); ccze_color_table[CCZE_COLOR_SYSTEMWORD] = (RAW_ANSI_BOLD | RAW_ANSI_CYAN); ccze_color_table[CCZE_COLOR_INCOMING] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_OUTGOING] = (RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_UNIQN] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_REPEAT] = (RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_FIELD] = (RAW_ANSI_GREEN); ccze_color_table[CCZE_COLOR_CHAIN] = (RAW_ANSI_CYAN); ccze_color_table[CCZE_COLOR_PERCENTAGE] = (RAW_ANSI_BOLD | RAW_ANSI_YELLOW); ccze_color_table[CCZE_COLOR_FTPCODES] = (RAW_ANSI_CYAN); ccze_color_table[CCZE_COLOR_KEYWORD] = (RAW_ANSI_BOLD | RAW_ANSI_YELLOW); ccze_color_table[CCZE_COLOR_STATIC_BLACK] = (RAW_ANSI_BLACK); ccze_color_table[CCZE_COLOR_STATIC_RED] = (RAW_ANSI_RED); ccze_color_table[CCZE_COLOR_STATIC_GREEN] = (RAW_ANSI_GREEN); ccze_color_table[CCZE_COLOR_STATIC_YELLOW] = (RAW_ANSI_YELLOW); ccze_color_table[CCZE_COLOR_STATIC_BLUE] = (RAW_ANSI_BLUE); ccze_color_table[CCZE_COLOR_STATIC_CYAN] = (RAW_ANSI_CYAN); ccze_color_table[CCZE_COLOR_STATIC_MAGENTA] = (RAW_ANSI_MAGENTA); ccze_color_table[CCZE_COLOR_STATIC_WHITE] = (RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_STATIC_BOLD_BLACK] = (RAW_ANSI_BOLD | RAW_ANSI_BLACK); ccze_color_table[CCZE_COLOR_STATIC_BOLD_RED] = (RAW_ANSI_BOLD | RAW_ANSI_RED); ccze_color_table[CCZE_COLOR_STATIC_BOLD_GREEN] = (RAW_ANSI_BOLD | RAW_ANSI_GREEN); ccze_color_table[CCZE_COLOR_STATIC_BOLD_YELLOW] = (RAW_ANSI_BOLD | RAW_ANSI_YELLOW); ccze_color_table[CCZE_COLOR_STATIC_BOLD_BLUE] = (RAW_ANSI_BOLD | RAW_ANSI_BLUE); ccze_color_table[CCZE_COLOR_STATIC_BOLD_CYAN] = (RAW_ANSI_BOLD | RAW_ANSI_CYAN); ccze_color_table[CCZE_COLOR_STATIC_BOLD_MAGENTA] = (RAW_ANSI_BOLD | RAW_ANSI_MAGENTA); ccze_color_table[CCZE_COLOR_STATIC_BOLD_WHITE] = (RAW_ANSI_BOLD | RAW_ANSI_WHITE); ccze_color_table[CCZE_COLOR_LAST] = (RAW_ANSI_CYAN); } void ccze_color_init (void) { if (ccze_config.mode == CCZE_MODE_RAW_ANSI) { ccze_color_init_raw_ansi (); return; } ccze_color_table[CCZE_COLOR_DATE] = (BOLD CYAN); ccze_color_table[CCZE_COLOR_HOST] = (BOLD BLUE); ccze_color_table[CCZE_COLOR_PROC] = (GREEN); ccze_color_table[CCZE_COLOR_PID] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_PIDB] = (BOLD GREEN); ccze_color_table[CCZE_COLOR_DEFAULT] = (CYAN); ccze_color_table[CCZE_COLOR_EMAIL] = (BOLD GREEN); ccze_color_table[CCZE_COLOR_SUBJECT] = (MAGENTA); ccze_color_table[CCZE_COLOR_DIR] = (BOLD CYAN); ccze_color_table[CCZE_COLOR_SIZE] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_USER] = (BOLD YELLOW); ccze_color_table[CCZE_COLOR_HTTPCODES] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_GETSIZE] = (MAGENTA); ccze_color_table[CCZE_COLOR_HTTP_GET] = (GREEN); ccze_color_table[CCZE_COLOR_HTTP_POST] = (BOLD GREEN); ccze_color_table[CCZE_COLOR_HTTP_HEAD] = (GREEN); ccze_color_table[CCZE_COLOR_HTTP_PUT] = (BOLD GREEN); ccze_color_table[CCZE_COLOR_HTTP_CONNECT] = (GREEN); ccze_color_table[CCZE_COLOR_HTTP_TRACE] = (GREEN); ccze_color_table[CCZE_COLOR_UNKNOWN] = ccze_color_table[CCZE_COLOR_DEFAULT]; ccze_color_table[CCZE_COLOR_GETTIME] = (BOLD MAGENTA); ccze_color_table[CCZE_COLOR_URI] = (BOLD GREEN); ccze_color_table[CCZE_COLOR_IDENT] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_CTYPE] = (WHITE); ccze_color_table[CCZE_COLOR_ERROR] = (BOLD RED); ccze_color_table[CCZE_COLOR_PROXY_MISS] = (RED); ccze_color_table[CCZE_COLOR_PROXY_HIT] = (BOLD YELLOW); ccze_color_table[CCZE_COLOR_PROXY_DENIED] = (BOLD RED); ccze_color_table[CCZE_COLOR_PROXY_REFRESH] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_PROXY_SWAPFAIL] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_DEBUG] = (WHITE); ccze_color_table[CCZE_COLOR_WARNING] = (RED); ccze_color_table[CCZE_COLOR_PROXY_DIRECT] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_PROXY_PARENT] = (BOLD YELLOW); ccze_color_table[CCZE_COLOR_SWAPNUM] = COLOR_PAIR (4 + 7*8); ccze_color_table[CCZE_COLOR_PROXY_CREATE] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_PROXY_SWAPIN] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_PROXY_SWAPOUT] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_PROXY_RELEASE] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_MAC] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_VERSION] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_ADDRESS] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_NUMBERS] = (WHITE); ccze_color_table[CCZE_COLOR_SIGNAL] = (BOLD YELLOW); ccze_color_table[CCZE_COLOR_SERVICE] = (BOLD MAGENTA); ccze_color_table[CCZE_COLOR_PROT] = (MAGENTA); ccze_color_table[CCZE_COLOR_BADWORD] = (BOLD YELLOW); ccze_color_table[CCZE_COLOR_GOODWORD] = (BOLD GREEN); ccze_color_table[CCZE_COLOR_SYSTEMWORD] = (BOLD CYAN); ccze_color_table[CCZE_COLOR_INCOMING] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_OUTGOING] = (WHITE); ccze_color_table[CCZE_COLOR_UNIQN] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_REPEAT] = (WHITE); ccze_color_table[CCZE_COLOR_FIELD] = (GREEN); ccze_color_table[CCZE_COLOR_CHAIN] = (CYAN); ccze_color_table[CCZE_COLOR_PERCENTAGE] = (BOLD YELLOW); ccze_color_table[CCZE_COLOR_FTPCODES] = (CYAN); ccze_color_table[CCZE_COLOR_KEYWORD] = (BOLD YELLOW); ccze_color_table[CCZE_COLOR_STATIC_BLACK] = (BLACK); ccze_color_table[CCZE_COLOR_STATIC_RED] = (RED); ccze_color_table[CCZE_COLOR_STATIC_GREEN] = (GREEN); ccze_color_table[CCZE_COLOR_STATIC_YELLOW] = (YELLOW); ccze_color_table[CCZE_COLOR_STATIC_BLUE] = (BLUE); ccze_color_table[CCZE_COLOR_STATIC_CYAN] = (CYAN); ccze_color_table[CCZE_COLOR_STATIC_MAGENTA] = (MAGENTA); ccze_color_table[CCZE_COLOR_STATIC_WHITE] = (WHITE); ccze_color_table[CCZE_COLOR_STATIC_BOLD_BLACK] = (BOLD BLACK); ccze_color_table[CCZE_COLOR_STATIC_BOLD_RED] = (BOLD RED); ccze_color_table[CCZE_COLOR_STATIC_BOLD_GREEN] = (BOLD GREEN); ccze_color_table[CCZE_COLOR_STATIC_BOLD_YELLOW] = (BOLD YELLOW); ccze_color_table[CCZE_COLOR_STATIC_BOLD_BLUE] = (BOLD BLUE); ccze_color_table[CCZE_COLOR_STATIC_BOLD_CYAN] = (BOLD CYAN); ccze_color_table[CCZE_COLOR_STATIC_BOLD_MAGENTA] = (BOLD MAGENTA); ccze_color_table[CCZE_COLOR_STATIC_BOLD_WHITE] = (BOLD WHITE); ccze_color_table[CCZE_COLOR_LAST] = (CYAN); } ccze-0.2.1/src/ccze-plugin.c0100644000175400017540000002161007660232332016021 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * ccze-plugin.c -- Plugin interface for CCZE. * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include #include #include #include #include "ccze-private.h" static ccze_plugin_t **plugins; static size_t plugins_alloc, plugins_len; static ccze_plugin_t **plugin_args; static size_t plugin_args_alloc, plugin_args_len; static char *plugin_running = NULL; static ccze_plugin_t * _ccze_plugin_find (const char *name) { size_t i; for (i = 0; i < plugins_len; i++) { if (!strcmp (plugins[i]->name, name)) return plugins[i]; } return NULL; } static int _ccze_plugin_loaded (const char *name) { if (_ccze_plugin_find (name)) return 1; return 0; } static int _ccze_plugin_allow (const char *name) { int i = 0; int rval = 0; if (_ccze_plugin_loaded (name)) return 0; if (ccze_config.pluginlist_len == 0) return 1; while (i < ccze_config.pluginlist_len) { if (!strcmp (ccze_config.pluginlist[i], name)) { rval = 1; break; } i++; } return rval; } void ccze_plugin_add (ccze_plugin_t *plugin) { if (!_ccze_plugin_allow (plugin->name)) return; plugins[plugins_len] = plugin; plugins_len++; if (plugins_len >= plugins_alloc) { plugins_alloc *= 2; plugins = (ccze_plugin_t **)ccze_realloc (plugins, plugins_alloc * sizeof (ccze_plugin_t *)); } } void ccze_plugin_init (void) { plugins_alloc = 10; plugins_len = 0; plugins = (ccze_plugin_t **)ccze_calloc (plugins_alloc, sizeof (ccze_plugin_t *)); } void ccze_plugin_argv_init (void) { plugin_args_alloc = 10; plugin_args_len = 0; plugin_args = (ccze_plugin_t **)ccze_calloc (plugin_args_alloc, sizeof (ccze_plugin_t *)); } static void _ccze_plugin_load (const char *name, const char *path, int recurse) { ccze_plugin_t *plugin; char *tmp, *n; void *dlhandle; char **pluginlist = NULL; int bailout = 0; if (_ccze_plugin_loaded (name)) return; dlhandle = dlopen (path, RTLD_LAZY); if (dlerror () || !dlhandle) return; asprintf (&tmp, "ccze_%s_info", name); plugin = (ccze_plugin_t *)dlsym (dlhandle, tmp); free (tmp); if (dlerror () || !plugin) { if (!plugin) { n = (char *)dlsym (dlhandle, "ccze_default_plugin"); asprintf (&tmp, "ccze_%s_info", n); plugin = (ccze_plugin_t *)dlsym (dlhandle, tmp); free (tmp); if (!plugin) bailout = 1; else plugin->name = strdup (name); } else { dlclose (dlhandle); return; } } if (!bailout) { if (plugin->abi_version != CCZE_ABI_VERSION) { dlclose (dlhandle); return; } plugin->dlhandle = dlhandle; ccze_plugin_add (plugin); } /* If there are more plugins defined in the file, load them all! */ if (recurse) { pluginlist = (char **)dlsym (dlhandle, "ccze_plugin_list"); if (pluginlist) { int i = 0; while (pluginlist[i]) { if (!_ccze_plugin_loaded (pluginlist[i])) _ccze_plugin_load (pluginlist[i], path, 0); i++; } } } } void ccze_plugin_load (const char *name) { char *home; char *path; if ((home = getenv ("HOME")) != NULL) { asprintf (&path, "%s/.ccze/%s.so", home, name); if (access (path, F_OK)) { free (path); asprintf (&path, PKGLIBDIR "/%s.so", name); } } else asprintf (&path, PKGLIBDIR "/%s.so", name); _ccze_plugin_load (name, path, 1); free (path); } static int _ccze_plugin_select (const struct dirent *de) { if (strstr (de->d_name, ".so")) return 1; return 0; } static void _ccze_plugin_load_set (struct dirent ***namelist, int nn, const char *base) { int m, n = nn; m = 0; while (m < n) { char *tmp = strdup ((*namelist)[m]->d_name); char *tmp2 = strstr (tmp, ".so"); char *path; tmp2[0] = '\0'; if (!_ccze_plugin_loaded (tmp)) { asprintf (&path, "%s/%s.so", base, tmp); _ccze_plugin_load (tmp, path, 1); free (path); } free (tmp); free ((*namelist)[m]); m++; } free (*namelist); } void ccze_plugin_load_all (void) { struct dirent **namelist; int n; char *homeplugs, *home; if ((home = getenv ("HOME")) != NULL) { asprintf (&homeplugs, "%s/.ccze", home); n = scandir (homeplugs, &namelist, _ccze_plugin_select, alphasort); if (n != -1) _ccze_plugin_load_set (&namelist, n, homeplugs); free (homeplugs); } n = scandir (PKGLIBDIR, &namelist, _ccze_plugin_select, alphasort); if (n != -1) _ccze_plugin_load_set (&namelist, n, PKGLIBDIR); } void ccze_plugin_finalise (void) { plugins[plugins_len] = NULL; } ccze_plugin_t ** ccze_plugins (void) { return plugins; } void ccze_plugin_setup (void) { size_t i; for (i = 0; i < plugins_len; i++) { if (plugins[i]) { plugin_running = plugins[i]->name; (*(plugins[i]->startup))(); } } plugin_running = NULL; } void ccze_plugin_shutdown (void) { size_t i; for (i = 0; i < plugins_len; i++) { if (plugins[i]) { plugin_running = plugins[i]->name; (*(plugins[i]->shutdown)) (); free (plugins[i]->argv); if (plugins[i]->dlhandle) dlclose (plugins[i]->dlhandle); } } plugin_running = NULL; free (plugins); } void ccze_plugin_run (ccze_plugin_t **pluginset, char *subject, size_t subjlen, char **rest, ccze_plugin_type_t type, int *handled, int *status) { int i = 0; while (pluginset[i]) { if (pluginset[i]->type == type || pluginset[i]->type == CCZE_PLUGIN_TYPE_ANY) { plugin_running = pluginset[i]->name; if ((*handled = (*(pluginset[i]->handler)) (subject, subjlen, rest)) != 0) { *status = *handled; break; } } i++; } plugin_running = NULL; } char ** ccze_plugin_argv_get (const char *name) { ccze_plugin_t *p = _ccze_plugin_find (name); if (!p) return NULL; return p->argv; } int ccze_plugin_argv_set (const char *name, const char *args) { ccze_plugin_t *p = NULL; size_t i, j = 1; char *args_copy, *arg; if (!args || !name) return -1; for (i = 0; i < plugin_args_len; i++) { if (!strcmp (plugin_args[i]->name, name)) p = plugin_args[i]; } if (p) { free (p->argv); p->argv = NULL; } else { p = (ccze_plugin_t *)ccze_malloc (sizeof (ccze_plugin_t)); p->name = strdup (name); p->argv = NULL; i = plugin_args_len++; if (plugin_args_len >= plugin_args_alloc) { plugin_args_alloc *= 2; plugin_args = (ccze_plugin_t **)ccze_realloc (plugin_args, plugin_args_alloc * sizeof (ccze_plugin_t *)); } } args_copy = strdup (args); arg = strtok (args_copy, " \t\n"); do { p->argv = (char **)ccze_realloc (p->argv, (j + 1) * sizeof (char *)); p->argv[j++] = strdup (arg); } while ((arg = strtok (NULL, " \t\n")) != NULL); p->argv = (char **)ccze_realloc (p->argv, (j + 1) * sizeof (char *)); p->argv[j] = NULL; p->argv[0] = strdup (name); plugin_args[i] = p; free (args_copy); return 1; } void ccze_plugin_argv_finalise (void) { ccze_plugin_t *p; size_t i; for (i = 0; i < plugin_args_len; i++) { p = _ccze_plugin_find (plugin_args[i]->name); if (p) p->argv = plugin_args[i]->argv; free (plugin_args[i]); } free (plugin_args); } const char * ccze_plugin_name_get (void) { return plugin_running; } int ccze_plugin_list_fancy (void) { size_t i; printf ("Available plugins:\n\n"); printf ("%-10s| %-8s| %s\n", "Name", "Type", "Description"); printf ("------------------------------------------------------------\n"); for (i = 0; i < plugins_len; i++) { if (plugins[i]) { char *type = "Unknown"; switch (plugins[i]->type) { case CCZE_PLUGIN_TYPE_FULL: type = "Full"; break; case CCZE_PLUGIN_TYPE_PARTIAL: type = "Partial"; break; case CCZE_PLUGIN_TYPE_ANY: type = "Any"; break; } printf ("%-10s| %-8s| %s\n", plugins[i]->name, type, (plugins[i]->desc) ? plugins[i]->desc : "Undocumented."); } } plugin_running = NULL; return 0; } ccze-0.2.1/src/ccze-wordcolor.c0100644000175400017540000002244207660232332016541 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * ccze-wordcolor.c -- Word-coloriser functions * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include #include #include "ccze-private.h" #include "ccze-compat.h" static pcre *reg_pre, *reg_post, *reg_host, *reg_mac, *reg_email; static pcre *reg_uri, *reg_size, *reg_ver, *reg_time, *reg_addr; static pcre *reg_num, *reg_sig, *reg_email2, *reg_hostip, *reg_msgid; static char *words_bad[] = { "warn", "restart", "exit", "stop", "end", "shutting", "down", "close", "unreach", "can't", "cannot", "skip", "deny", "disable", "ignored", "miss", "oops", "not", "backdoor", "blocking", "ignoring", "unable", "readonly", "offline", "terminate", "empty" }; static char *words_good[] = { "activ", "start", "ready", "online", "load", "ok", "register", "detected", "configured", "enable", "listen", "open", "complete", "attempt", "done", "check", "listen", "connect", "finish" }; static char *words_error[] = { "error", "crit", "invalid", "fail", "false", "alarm", "fatal" }; static char *words_system[] = { "ext2-fs", "reiserfs", "vfs", "iso", "isofs", "cslip", "ppp", "bsd", "linux", "tcp/ip", "mtrr", "pci", "isa", "scsi", "ide", "atapi", "bios", "cpu", "fpu", "discharging", "resume" }; static char * _stolower (const char *str) { char *newstr = strdup (str); size_t i; for (i = 0; i < strlen (newstr); i++) newstr[i] = tolower (str[i]); return newstr; } void ccze_wordcolor_process_one (char *word, int slookup) { size_t wlen; int offsets[99]; ccze_color_t col; int match, printed = 0; char *pre = NULL, *post = NULL, *tmp, *lword; col = CCZE_COLOR_DEFAULT; /** prefix **/ if ((match = pcre_exec (reg_pre, NULL, word, strlen (word), 0, 0, offsets, 99)) >= 0) { pcre_get_substring (word, offsets, match, 1, (const char **)&pre); pcre_get_substring (word, offsets, match, 2, (const char **)&tmp); free (word); word = tmp; } else pre = NULL; /** postfix **/ if ((match = pcre_exec (reg_post, NULL, word, strlen (word), 0, 0, offsets, 99)) >= 0) { pcre_get_substring (word, offsets, match, 1, (const char **)&tmp); pcre_get_substring (word, offsets, match, 2, (const char **)&post); free (word); word = tmp; } else post = NULL; wlen = strlen (word); lword = _stolower (word); /** Host **/ if (pcre_exec (reg_host, NULL, lword, wlen, 0, 0, offsets, 99) >= 0) col = CCZE_COLOR_HOST; /** MAC address **/ else if (pcre_exec (reg_mac, NULL, lword, wlen, 0, 0, offsets, 99) >= 0) col = CCZE_COLOR_MAC; /** Directory **/ else if (lword[0] == '/') col = CCZE_COLOR_DIR; /** E-mail **/ else if (pcre_exec (reg_email, NULL, lword, wlen, 0, 0, offsets, 99) >= 0 && pcre_exec (reg_email2, NULL, lword, wlen, 0, 0, offsets,99) >= 0) col = CCZE_COLOR_EMAIL; /** Message-ID **/ else if (pcre_exec (reg_msgid, NULL, lword, wlen, 0, 0, offsets, 99) >= 0) col = CCZE_COLOR_EMAIL; /** URI **/ else if (pcre_exec (reg_uri, NULL, lword, wlen, 0, 0, offsets, 99) >= 0) col = CCZE_COLOR_URI; /** Size **/ else if (pcre_exec (reg_size, NULL, lword, wlen, 0, 0, offsets, 99) >= 0) col = CCZE_COLOR_SIZE; /** Version **/ else if (pcre_exec (reg_ver, NULL, lword, wlen, 0, 0, offsets, 99) >= 0) col = CCZE_COLOR_VERSION; /** Time **/ else if (pcre_exec (reg_time, NULL, lword, wlen, 0, 0, offsets, 99) >= 0) col = CCZE_COLOR_DATE; /** Address **/ else if (pcre_exec (reg_addr, NULL, lword, wlen, 0, 0, offsets, 99) >= 0) col = CCZE_COLOR_ADDRESS; /** Number **/ else if (pcre_exec (reg_num, NULL, lword, wlen, 0, 0, offsets, 99) >= 0) col = CCZE_COLOR_NUMBERS; /** Signal **/ else if (pcre_exec (reg_sig, NULL, lword, wlen, 0, 0, offsets, 99) >= 0) col = CCZE_COLOR_SIGNAL; /* Host + IP (postfix) */ else if (pcre_exec (reg_hostip, NULL, lword, wlen, 0, 0, offsets, 99) >= 0) { char *host, *ip; size_t hostlen, iplen; host = strndup (word, strchr (word, '[') - (word)); hostlen = strlen (host); iplen = strlen (word) - hostlen - 1; ip = strndup (&word[strlen (host) + 1], iplen); ccze_addstr (CCZE_COLOR_HOST, host); ccze_addstr (CCZE_COLOR_PIDB, "["); ccze_addstr (CCZE_COLOR_HOST, ip); ccze_addstr (CCZE_COLOR_PIDB, "]"); free (host); free (ip); printed = 1; } /* Service */ else if (slookup && getservbyname (lword, NULL)) col = CCZE_COLOR_SERVICE; /* Protocol */ else if (slookup && getprotobyname (lword)) col = CCZE_COLOR_PROT; /* User */ else if (slookup && getpwnam (lword)) col = CCZE_COLOR_USER; else { /* Good/Bad/System words */ size_t i; for (i = 0; i < sizeof (words_bad) / sizeof (char *); i++) { if (strstr (lword, words_bad[i]) == lword) col = CCZE_COLOR_BADWORD; } for (i = 0; i < sizeof (words_good) / sizeof (char *); i++) { if (strstr (lword, words_good[i]) == lword) col = CCZE_COLOR_GOODWORD; } for (i = 0; i < sizeof (words_error) / sizeof (char *); i++) { if (strstr (lword, words_error[i]) == lword) col = CCZE_COLOR_ERROR; } for (i = 0; i < sizeof (words_system) / sizeof (char *); i++) { if (strstr (lword, words_system[i]) == lword) col = CCZE_COLOR_SYSTEMWORD; } } if (!printed) { ccze_addstr (CCZE_COLOR_DEFAULT, pre); ccze_addstr (col, word); ccze_addstr (CCZE_COLOR_DEFAULT, post); } free (lword); free (word); free (post); free (pre); } void ccze_wordcolor_process (const char *msg, int wcol, int slookup) { char *word; char *msg2; if (msg) msg2 = strdup (msg); else return; if (!wcol) { ccze_addstr (CCZE_COLOR_DEFAULT, msg); free (msg2); return; } if ((strstr (msg, "last message repeated") && strstr (msg, "times")) || (strstr (msg, "-- MARK --"))) { ccze_addstr (CCZE_COLOR_REPEAT, msg); free (msg2); return; } word = xstrdup (ccze_strbrk (msg2, ' ')); if (!word) { ccze_addstr (CCZE_COLOR_DEFAULT, msg); free (msg2); free (word); return; } do { ccze_wordcolor_process_one (word, slookup); ccze_space (); } while ((word = xstrdup (ccze_strbrk (NULL, ' '))) != NULL); free (msg2); return; } void ccze_wordcolor_setup (void) { const char *error; int errptr; reg_pre = pcre_compile ("^([`'\".,!?:;(\\[{<]+)([^`'\".,!?:;(\\[{<]\\S*)$", 0, &error, &errptr, NULL); reg_post = pcre_compile ("^(\\S*[^`'\".,!?:;)\\]}>])([`'\".,!?:;)\\]}>]+)$", 0, &error, &errptr, NULL); reg_host = pcre_compile ("^(((\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|" "(([a-z0-9-_]+\\.)+[a-z]{2,3})|(localhost)|" "(\\w*::\\w+)+)(:\\d{1,5})?)$", 0, &error, &errptr, NULL); reg_hostip = pcre_compile ("^(((\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|" "(([a-z0-9-_\\.]+)+)|(localhost)|" "(\\w*::\\w+)+)(:\\d{1,5})?)" "\\[", 0, &error, &errptr, NULL); reg_mac = pcre_compile ("^([0-9a-f]{2}:){5}[0-9a-f]{2}$", 0, &error, &errptr, NULL); reg_email = pcre_compile ("^[a-z0-9-_=\\+]+@([a-z0-9-_\\.]+)+(\\.[a-z]{2,4})+", 0, &error, &errptr, NULL); reg_email2 = pcre_compile ("(\\.[a-z]{2,4})+$", 0, &error, &errptr, NULL); reg_uri = pcre_compile ("^\\w{2,}:\\/\\/(\\S+\\/?)+$", 0, &error, &errptr, NULL); reg_size = pcre_compile ("^\\d+(\\.\\d+)?[k|m|g|t]i?b?(ytes?)?", 0, &error, &errptr, NULL); reg_ver = pcre_compile ("^v?(\\d+\\.){1}((\\d|[a-z])+\\.)*(\\d|[a-z])+$", 0, &error, &errptr, NULL); reg_time = pcre_compile ("\\d{1,2}:\\d{1,2}(:\\d{1,2})?", 0, &error, &errptr, NULL); reg_addr = pcre_compile ("^0x(\\d|[a-f])+$", 0, &error, &errptr, NULL); reg_num = pcre_compile ("^-?\\d+$", 0, &error, &errptr, NULL); reg_sig = pcre_compile ("^sig(hup|int|quit|ill|abrt|fpe|kill|segv|pipe|" "alrm|term|usr1|usr2|chld|cont|stop|tstp|tin|tout|" "bus|poll|prof|sys|trap|urg|vtalrm|xcpu|xfsz|iot|" "emt|stkflt|io|cld|pwr|info|lost|winch|unused)", 0, &error, &errptr, NULL); reg_msgid = pcre_compile ("^[a-z0-9-_\\.\\$=\\+]+@([a-z0-9-_\\.]+)+(\\.?[a-z]+)+", 0, &error, &errptr, NULL); } void ccze_wordcolor_shutdown (void) { free (reg_pre); free (reg_post); free (reg_host); free (reg_mac); free (reg_email); free (reg_email2); free (reg_uri); free (reg_size); free (reg_ver); free (reg_time); free (reg_addr); free (reg_num); free (reg_sig); free (reg_hostip); free (reg_msgid); } ccze-0.2.1/src/mod_apm.c0100644000175400017540000000624407660232332015223 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_apm.c -- apm colorizers for CCZE * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include static void ccze_apm_setup (void); static void ccze_apm_shutdown (void); static int ccze_apm_handle (const char *str, size_t length, char **rest); static pcre *reg_apm; static char * ccze_apm_process (const char *str, int *offsets, int match) { char *battery, *charge, *rate, *stuff1, *elapsed, *remain; char *stuff2; pcre_get_substring (str, offsets, match, 1, (const char **)&battery); pcre_get_substring (str, offsets, match, 2, (const char **)&charge); pcre_get_substring (str, offsets, match, 4, (const char **)&rate); pcre_get_substring (str, offsets, match, 5, (const char **)&stuff1); pcre_get_substring (str, offsets, match, 6, (const char **)&elapsed); pcre_get_substring (str, offsets, match, 7, (const char **)&remain); pcre_get_substring (str, offsets, match, 8, (const char **)&stuff2); ccze_addstr (CCZE_COLOR_DEFAULT, "Battery:"); ccze_space (); ccze_addstr (CCZE_COLOR_PERCENTAGE, battery); ccze_addstr (CCZE_COLOR_DEFAULT, "%,"); ccze_space (); ccze_addstr (CCZE_COLOR_SYSTEMWORD, charge); ccze_space (); ccze_addstr (CCZE_COLOR_DEFAULT, "("); ccze_addstr (CCZE_COLOR_PERCENTAGE, rate); ccze_addstr (CCZE_COLOR_DEFAULT, "%"); ccze_space (); ccze_addstr (CCZE_COLOR_DEFAULT, stuff1); ccze_space (); ccze_addstr (CCZE_COLOR_DATE, elapsed); ccze_addstr (CCZE_COLOR_DEFAULT, "),"); ccze_space (); ccze_addstr (CCZE_COLOR_DATE, remain); ccze_space (); free (battery); free (charge); free (rate); free (stuff1); free (elapsed); free (remain); return stuff2; } static void ccze_apm_setup (void) { const char *error; int errptr; reg_apm = pcre_compile ("Battery: (-?\\d*)%, ((.*)charging) \\((-?\\d*)% ([^ ]*) " "(\\d*:\\d*:\\d*)\\), (\\d*:\\d*:\\d*) (.*)", 0, &error, &errptr, NULL); } static void ccze_apm_shutdown (void) { free (reg_apm); } static int ccze_apm_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_apm, NULL, str, length, 0, 0, offsets, 99)) >= 0) { if (rest) *rest = ccze_apm_process (str, offsets, match); else ccze_apm_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (apm, PARTIAL, "Coloriser for APM sub-logs."); ccze-0.2.1/src/mod_distcc.c0100644000175400017540000000477307660232332015724 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_distcc.c -- distcc.log colorizers for CCZE * Copyright (C) 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "ccze-compat.h" static void ccze_distcc_setup (void); static void ccze_distcc_shutdown (void); static int ccze_distcc_handle (const char *str, size_t length, char **rest); static pcre *reg_distcc; static pcre_extra *hints_distcc; static char * ccze_distcc_process (const char *str, int *offsets, int match) { char *pid, *func, *rest; pcre_get_substring (str, offsets, match, 1, (const char **)&pid); pcre_get_substring (str, offsets, match, 2, (const char **)&func); pcre_get_substring (str, offsets, match, 3, (const char **)&rest); ccze_addstr (CCZE_COLOR_PROC, "distccd"); ccze_addstr (CCZE_COLOR_PIDB, "["); ccze_addstr (CCZE_COLOR_PID, pid); ccze_addstr (CCZE_COLOR_PIDB, "]"); ccze_space (); if (func && func[0] != '\0') { ccze_addstr (CCZE_COLOR_KEYWORD, func); ccze_space (); } free (pid); free (func); return rest; } static void ccze_distcc_setup (void) { const char *error; int errptr; reg_distcc = pcre_compile ("^distccd\\[(\\d+)\\] (\\([^\\)]+\\))? ?(.*)", 0, &error, &errptr, NULL); hints_distcc = pcre_study (reg_distcc, 0, &error); } static void ccze_distcc_shutdown (void) { free (reg_distcc); free (hints_distcc); } static int ccze_distcc_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_distcc, hints_distcc, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_distcc_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (distcc, FULL, "Coloriser for distcc(1) logs."); ccze-0.2.1/src/mod_exim.c0100644000175400017540000000714207660232332015406 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_exim.c -- Exim log-coloriser module for CCZE * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include static void ccze_exim_setup (void); static void ccze_exim_shutdown (void); static int ccze_exim_handle (const char *str, size_t length, char **rest); static pcre *reg_exim, *reg_exim_actiontype, *reg_exim_uniqn; static pcre_extra *hints_exim; static char * ccze_exim_process (const char *str, int *offsets, int match) { char *date, *msg=NULL, *action=NULL, *uniqn=NULL, *msgfull; int match2, offsets2[99]; ccze_color_t color = CCZE_COLOR_UNKNOWN; pcre_get_substring (str, offsets, match, 1, (const char **)&date); pcre_get_substring (str, offsets, match, 2, (const char **)&msgfull); if ((match2 = pcre_exec (reg_exim_actiontype, NULL, msgfull, strlen (msgfull), 0, 0, offsets2, 99)) >= 0) { pcre_get_substring (msgfull, offsets2, match2, 1, (const char **)&uniqn); pcre_get_substring (msgfull, offsets2, match2, 2, (const char **)&action); pcre_get_substring (msgfull, offsets2, match2, 3, (const char **)&msg); if (action[0] == '<') color = CCZE_COLOR_INCOMING; else if (action[1] == '>') color = CCZE_COLOR_OUTGOING; else if (action[0] == '=' || action[0] == '*') color = CCZE_COLOR_ERROR; } else if ((match2 = pcre_exec (reg_exim_uniqn, NULL, msgfull, strlen (msgfull), 0, 0, offsets2, 99)) >= 0) { pcre_get_substring (msgfull, offsets2, match2, 1, (const char **)&uniqn); pcre_get_substring (msgfull, offsets2, match2, 2, (const char **)&msg); } else msg = strdup (msgfull); ccze_print_date (date); ccze_space (); if (uniqn && uniqn[0]) { ccze_addstr (CCZE_COLOR_UNIQN, uniqn); ccze_space(); } if (action && action[0]) { ccze_addstr (color, action); ccze_space(); } return msg; } static void ccze_exim_setup (void) { const char *error; int errptr; reg_exim = pcre_compile ("^(\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}:\\d{2})\\s(.*)$", 0, &error, &errptr, NULL); hints_exim = pcre_study (reg_exim, 0, &error); reg_exim_actiontype = pcre_compile ("^(\\S{16})\\s([<=\\*][=>\\*])\\s(\\S+.*)$", 0, &error, &errptr, NULL); reg_exim_uniqn = pcre_compile ("^(\\S{16})\\s(.*)$", 0, &error, &errptr, NULL); } static void ccze_exim_shutdown (void) { free (reg_exim); free (hints_exim); free (reg_exim_actiontype); free (reg_exim_uniqn); } static int ccze_exim_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_exim, hints_exim, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_exim_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (exim, FULL, "Coloriser for exim logs."); ccze-0.2.1/src/mod_fetchmail.c0100644000175400017540000000536007660232332016400 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_fetchmail.c -- fetchmail-related colorizers for CCZE * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include static void ccze_fetchmail_setup (void); static void ccze_fetchmail_shutdown (void); static int ccze_fetchmail_handle (const char *str, size_t length, char **rest); static pcre *reg_fetchmail; static char * ccze_fetchmail_process (const char *str, int *offsets, int match) { char *start, *addy, *current, *full, *rest; pcre_get_substring (str, offsets, match, 1, (const char **)&start); pcre_get_substring (str, offsets, match, 2, (const char **)&addy); pcre_get_substring (str, offsets, match, 3, (const char **)¤t); pcre_get_substring (str, offsets, match, 4, (const char **)&full); pcre_get_substring (str, offsets, match, 5, (const char **)&rest); ccze_addstr (CCZE_COLOR_DEFAULT, start); ccze_space (); ccze_addstr (CCZE_COLOR_EMAIL, addy); ccze_addstr (CCZE_COLOR_DEFAULT, ":"); ccze_addstr (CCZE_COLOR_NUMBERS, current); ccze_space (); ccze_addstr (CCZE_COLOR_DEFAULT, "of"); ccze_space (); ccze_addstr (CCZE_COLOR_NUMBERS, full); ccze_space (); free (start); free (addy); free (current); free (full); return rest; } static void ccze_fetchmail_setup (void) { const char *error; int errptr; reg_fetchmail = pcre_compile ("(reading message) ([^@]*@[^:]*):([0-9]*) of ([0-9]*) (.*)", 0, &error, &errptr, NULL); } static void ccze_fetchmail_shutdown (void) { free (reg_fetchmail); } static int ccze_fetchmail_handle (const char *str, size_t length, char **rest) { int offsets[99], match; if ((match = pcre_exec (reg_fetchmail, NULL, str, length, 0, 0, offsets, 99)) >= 0) { if (rest) *rest = ccze_fetchmail_process (str, offsets, match); else ccze_fetchmail_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (fetchmail, PARTIAL, "Coloriser for fetchmail(1) sub-logs."); ccze-0.2.1/src/mod_ftpstats.c0100644000175400017540000000637307660232332016321 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_ftpstats.c -- Stats coloriser for CCZE. * Copyright (C) 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "ccze-compat.h" static void ccze_ftpstats_setup (void); static void ccze_ftpstats_shutdown (void); static int ccze_ftpstats_handle (const char *str, size_t length, char **rest); static pcre *reg_ftpstats; static pcre_extra *hints_ftpstats; static char * ccze_ftpstats_process (const char *str, int *offsets, int match) { char *date, *sessionid, *user, *host, *type, *size, *duration, *file; pcre_get_substring (str, offsets, match, 1, (const char **)&date); pcre_get_substring (str, offsets, match, 2, (const char **)&sessionid); pcre_get_substring (str, offsets, match, 3, (const char **)&user); pcre_get_substring (str, offsets, match, 4, (const char **)&host); pcre_get_substring (str, offsets, match, 5, (const char **)&type); pcre_get_substring (str, offsets, match, 6, (const char **)&size); pcre_get_substring (str, offsets, match, 7, (const char **)&duration); pcre_get_substring (str, offsets, match, 8, (const char **)&file); ccze_print_date (date); ccze_space (); ccze_addstr (CCZE_COLOR_UNIQN, sessionid); ccze_space (); ccze_addstr (CCZE_COLOR_USER, user); ccze_space (); ccze_addstr (CCZE_COLOR_HOST, host); ccze_space (); ccze_addstr (CCZE_COLOR_FTPCODES, type); ccze_space (); ccze_addstr (CCZE_COLOR_GETSIZE, size); ccze_space (); ccze_addstr (CCZE_COLOR_DATE, duration); ccze_space (); ccze_addstr (CCZE_COLOR_DIR, file); ccze_newline (); free (file); free (duration); free (size); free (type); free (host); free (user); free (sessionid); free (date); return NULL; } static void ccze_ftpstats_setup (void) { const char *error; int errptr; reg_ftpstats = pcre_compile ("^(\\d{9,10})\\s([\\da-f]+\\.[\\da-f]+)\\s([^\\s]+)\\s([^\\s]+)" "\\s(U|D)\\s(\\d+)\\s(\\d+)\\s(.*)$", 0, &error, &errptr, NULL); hints_ftpstats = pcre_study (reg_ftpstats, 0, &error); } static void ccze_ftpstats_shutdown (void) { free (reg_ftpstats); free (hints_ftpstats); } static int ccze_ftpstats_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_ftpstats, hints_ftpstats, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_ftpstats_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (ftpstats, FULL, "Coloriser for ftpstats (pure-ftpd) logs."); ccze-0.2.1/src/mod_httpd.c0100644000175400017540000001206607660232332015570 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_httpd.c -- httpd-related colorizers for CCZE * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include static void ccze_httpd_setup (void); static void ccze_httpd_shutdown (void); static int ccze_httpd_handle (const char *str, size_t length, char **rest); static pcre *reg_httpd_access, *reg_httpd_error; static pcre_extra *hints_httpd_access, *hints_httpd_error; static ccze_color_t _ccze_httpd_error (const char *level) { if (strstr (level, "debug") || strstr (level, "info") || strstr (level, "notice")) return CCZE_COLOR_DEBUG; if (strstr (level, "warn")) return CCZE_COLOR_WARNING; if (strstr (level, "error") || strstr (level, "crit") || strstr (level, "alert") || strstr (level, "emerg")) return CCZE_COLOR_ERROR; return CCZE_COLOR_UNKNOWN; } static char * ccze_httpd_access_log_process (const char *str, int *offsets, int match) { char *host, *vhost, *user, *date, *full_action, *method, *http_code; char *gsize, *other; pcre_get_substring (str, offsets, match, 1, (const char **)&vhost); pcre_get_substring (str, offsets, match, 2, (const char **)&host); pcre_get_substring (str, offsets, match, 3, (const char **)&user); pcre_get_substring (str, offsets, match, 4, (const char **)&date); pcre_get_substring (str, offsets, match, 5, (const char **)&full_action); pcre_get_substring (str, offsets, match, 6, (const char **)&method); pcre_get_substring (str, offsets, match, 7, (const char **)&http_code); pcre_get_substring (str, offsets, match, 8, (const char **)&gsize); pcre_get_substring (str, offsets, match, 9, (const char **)&other); ccze_addstr (CCZE_COLOR_HOST, vhost); ccze_space(); ccze_addstr (CCZE_COLOR_HOST, host); if (host[0]) ccze_space (); ccze_addstr (CCZE_COLOR_DEFAULT, "-"); ccze_space (); ccze_addstr (CCZE_COLOR_USER, user); ccze_space (); ccze_addstr (CCZE_COLOR_DATE, date); ccze_space (); ccze_addstr (ccze_http_action (method), full_action); ccze_space (); ccze_addstr (CCZE_COLOR_HTTPCODES, http_code); ccze_space (); ccze_addstr (CCZE_COLOR_GETSIZE, gsize); ccze_space (); ccze_addstr (CCZE_COLOR_DEFAULT, other); ccze_newline (); free (host); free (user); free (date); free (method); free (full_action); free (http_code); free (gsize); return NULL; } static char * ccze_httpd_error_log_process (const char *str, int *offsets, int match) { char *date, *level, *msg; ccze_color_t lcol; pcre_get_substring (str, offsets, match, 1, (const char **)&date); pcre_get_substring (str, offsets, match, 2, (const char **)&level); pcre_get_substring (str, offsets, match, 3, (const char **)&msg); ccze_addstr (CCZE_COLOR_DATE, date); ccze_space (); lcol = _ccze_httpd_error (level); ccze_addstr (lcol, level); ccze_space (); ccze_addstr (lcol, msg); ccze_newline (); free (date); free (level); free (msg); return NULL; } static void ccze_httpd_setup (void) { const char *error; int errptr; reg_httpd_access = pcre_compile ("^(\\S*)\\s(\\S*)?\\s?-\\s(\\S+)\\s(\\[\\d{1,2}\\/\\S*" "\\/\\d{4}:\\d{2}:\\d{2}:\\d{2}.{0,6}[^\\]]*\\])\\s" "(\"([^ \"]+)\\s*[^\"]*\")\\s(\\d{3})\\s(\\d+|-)\\s*(.*)$", 0, &error, &errptr, NULL); hints_httpd_access = pcre_study (reg_httpd_access, 0, &error); reg_httpd_error = pcre_compile ("^(\\[\\w{3}\\s\\w{3}\\s{1,2}\\d{1,2}\\s\\d{2}:\\d{2}:\\d{2}\\s" "\\d{4}\\])\\s(\\[\\w*\\])\\s(.*)$", 0, &error, &errptr, NULL); hints_httpd_error = pcre_study (reg_httpd_error, 0, &error); } static void ccze_httpd_shutdown (void) { free (reg_httpd_access); free (hints_httpd_access); free (reg_httpd_error); free (hints_httpd_error); } static int ccze_httpd_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_httpd_access, hints_httpd_access, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_httpd_access_log_process (str, offsets, match); return 1; } if ((match = pcre_exec (reg_httpd_error, hints_httpd_error, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_httpd_error_log_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (httpd, FULL, "Coloriser for generic HTTPD access and error logs."); ccze-0.2.1/src/mod_icecast.c0100644000175400017540000001300307660232332016050 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_icecast.c -- icecast/{usage,icecast}.log colorizers for CCZE * Copyright (C) 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "ccze-compat.h" static void ccze_icecast_setup (void); static void ccze_icecast_shutdown (void); static int ccze_icecast_handle (const char *str, size_t length, char **rest); static pcre *reg_icecast, *reg_icecast_usage; static pcre_extra *hints_icecast, *hints_icecast_usage; static char * ccze_icecast_process (const char *str, int *offsets, int match) { char *date = NULL, *admin = NULL, *threadno = NULL, *thread = NULL; char *rest = NULL; pcre_get_substring (str, offsets, match, 1, (const char **)&date); pcre_get_substring (str, offsets, match, 2, (const char **)&admin); pcre_get_substring (str, offsets, match, 4, (const char **)&threadno); pcre_get_substring (str, offsets, match, 5, (const char **)&thread); pcre_get_substring (str, offsets, match, 6, (const char **)&rest); ccze_addstr (CCZE_COLOR_DATE, date); ccze_space (); if (admin && admin[0] != '\0') { ccze_addstr (CCZE_COLOR_KEYWORD, admin); ccze_space (); ccze_addstr (CCZE_COLOR_PIDB, "["); ccze_addstr (CCZE_COLOR_HOST, thread); ccze_addstr (CCZE_COLOR_PIDB, "]"); } else { ccze_addstr (CCZE_COLOR_PIDB, "["); ccze_addstr (CCZE_COLOR_NUMBERS, threadno); ccze_addstr (CCZE_COLOR_DEFAULT, ":"); ccze_addstr (CCZE_COLOR_KEYWORD, thread); ccze_addstr (CCZE_COLOR_PIDB, "]"); } ccze_space (); free (date); free (admin); free (threadno); free (thread); return rest; } static char * ccze_icecast_usage_process (const char *str, int *offsets, int match) { char *date, *threadno, *thread, *date2, *bw, *src; char *unit, *clients, *admins; pcre_get_substring (str, offsets, match, 1, (const char **)&date); pcre_get_substring (str, offsets, match, 3, (const char **)&threadno); pcre_get_substring (str, offsets, match, 4, (const char **)&thread); pcre_get_substring (str, offsets, match, 5, (const char **)&date2); pcre_get_substring (str, offsets, match, 6, (const char **)&bw); pcre_get_substring (str, offsets, match, 7, (const char **)&unit); pcre_get_substring (str, offsets, match, 8, (const char **)&src); pcre_get_substring (str, offsets, match, 9, (const char **)&clients); pcre_get_substring (str, offsets, match, 10, (const char **)&admins); ccze_addstr (CCZE_COLOR_DATE, date); ccze_space (); ccze_addstr (CCZE_COLOR_PIDB, "["); ccze_addstr (CCZE_COLOR_NUMBERS, threadno); ccze_addstr (CCZE_COLOR_DEFAULT, ":"); ccze_addstr (CCZE_COLOR_KEYWORD, thread); ccze_addstr (CCZE_COLOR_PIDB, "]"); ccze_space (); ccze_addstr (CCZE_COLOR_DATE, date2); ccze_space (); ccze_addstr (CCZE_COLOR_KEYWORD, "Bandwidth:"); ccze_addstr (CCZE_COLOR_NUMBERS, bw); ccze_addstr (CCZE_COLOR_DEFAULT, unit); ccze_space (); ccze_addstr (CCZE_COLOR_KEYWORD, "Sources:"); ccze_addstr (CCZE_COLOR_NUMBERS, src); ccze_space (); ccze_addstr (CCZE_COLOR_KEYWORD, "Clients:"); ccze_addstr (CCZE_COLOR_NUMBERS, clients); ccze_space (); ccze_addstr (CCZE_COLOR_KEYWORD, "Admins:"); ccze_addstr (CCZE_COLOR_NUMBERS, admins); ccze_newline (); free (date); free (threadno); free (thread); free (date2); free (bw); free (unit); free (src); free (clients); free (admins); return NULL; } static void ccze_icecast_setup (void) { const char *error; int errptr; reg_icecast = pcre_compile ("^(\\[\\d+/.../\\d+:\\d+:\\d+:\\d+\\]) " "(Admin)? *(\\[(\\d+)?:?([^\\]]*)\\]) (.*)$", 0, &error, &errptr, NULL); hints_icecast = pcre_study (reg_icecast, 0, &error); reg_icecast_usage = pcre_compile ("^(\\[\\d+/.../\\d+:\\d+:\\d+:\\d+\\]) " "(\\[(\\d+):([^\\]]*)\\]) " "(\\[\\d+/.../\\d+:\\d+:\\d+:\\d+\\]) " "Bandwidth:([\\d\\.]+)([^ ]*) " "Sources:(\\d+) " "Clients:(\\d+) Admins:(\\d+)", 0, &error, &errptr, NULL); hints_icecast_usage = pcre_study (reg_icecast_usage, 0, &error); } static void ccze_icecast_shutdown (void) { free (reg_icecast); free (hints_icecast); free (reg_icecast_usage); free (hints_icecast_usage); } static int ccze_icecast_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_icecast_usage, hints_icecast_usage, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_icecast_usage_process (str, offsets, match); return 1; } if ((match = pcre_exec (reg_icecast, hints_icecast, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_icecast_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (icecast, FULL, "Coloriser for Icecast(8) logs."); ccze-0.2.1/src/mod_oops.c0100644000175400017540000000636707660232332015434 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_oops.c -- oops/oops.log colorizers for CCZE * Copyright (C) 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "ccze-compat.h" static void ccze_oops_setup (void); static void ccze_oops_shutdown (void); static int ccze_oops_handle (const char *str, size_t length, char **rest); static pcre *reg_oops; static pcre_extra *hints_oops; static char * ccze_oops_process (const char *str, int *offsets, int match) { char *date, *sp1, *id, *field, *sp2, *value, *etc; pcre_get_substring (str, offsets, match, 1, (const char **)&date); pcre_get_substring (str, offsets, match, 4, (const char **)&sp1); pcre_get_substring (str, offsets, match, 5, (const char **)&id); pcre_get_substring (str, offsets, match, 6, (const char **)&field); pcre_get_substring (str, offsets, match, 7, (const char **)&sp2); pcre_get_substring (str, offsets, match, 8, (const char **)&value); pcre_get_substring (str, offsets, match, 9, (const char **)&etc); ccze_addstr (CCZE_COLOR_DATE, date); ccze_addstr (CCZE_COLOR_DEFAULT, sp1); ccze_addstr (CCZE_COLOR_PIDB, "["); ccze_addstr (CCZE_COLOR_PROC, id); ccze_addstr (CCZE_COLOR_PIDB, "]"); ccze_addstr (CCZE_COLOR_KEYWORD, "statistics()"); ccze_addstr (CCZE_COLOR_DEFAULT, ":"); ccze_space (); ccze_addstr (CCZE_COLOR_FIELD, field); ccze_addstr (CCZE_COLOR_DEFAULT, sp2); ccze_addstr (CCZE_COLOR_DEFAULT, ":"); ccze_space (); ccze_addstr (CCZE_COLOR_NUMBERS, value); ccze_addstr (CCZE_COLOR_DEFAULT, etc); ccze_newline (); free (date); free (sp1); free (id); free (field); free (sp2); free (value); free (etc); return NULL; } static void ccze_oops_setup (void) { const char *error; int errptr; reg_oops = pcre_compile ("^((Mon|Tue|Wed|Thu|Fri|Sat|Sun) " "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) " "\\d+ \\d+:\\d+:\\d+ \\d+)(\\s+)\\[([\\dxa-fA-F]+)\\]" "statistics\\(\\): ([\\S]+)(\\s*): (\\d+)(.*)", 0, &error, &errptr, NULL); hints_oops = pcre_study (reg_oops, 0, &error); } static void ccze_oops_shutdown (void) { free (reg_oops); free (hints_oops); } static int ccze_oops_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_oops, hints_oops, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_oops_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (oops, FULL, "Coloriser for oops proxy logs."); ccze-0.2.1/src/mod_php.c0100644000175400017540000000430307660232332015227 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_php.c -- php.log colorizers for CCZE * Copyright (C) 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "ccze-compat.h" static void ccze_php_setup (void); static void ccze_php_shutdown (void); static int ccze_php_handle (const char *str, size_t length, char **rest); static pcre *reg_php; static pcre_extra *hints_php; static char * ccze_php_process (const char *str, int *offsets, int match) { char *date = NULL, *rest = NULL; pcre_get_substring (str, offsets, match, 1, (const char **)&date); pcre_get_substring (str, offsets, match, 2, (const char **)&rest); ccze_addstr (CCZE_COLOR_DATE, date); ccze_space (); ccze_addstr (CCZE_COLOR_KEYWORD, "PHP"); ccze_space (); free (date); return rest; } static void ccze_php_setup (void) { const char *error; int errptr; reg_php = pcre_compile ("^(\\[\\d+-...-\\d+ \\d+:\\d+:\\d+\\]) PHP (.*)$", 0, &error, &errptr, NULL); hints_php = pcre_study (reg_php, 0, &error); } static void ccze_php_shutdown (void) { free (reg_php); free (hints_php); } static int ccze_php_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_php, hints_php, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_php_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (php, FULL, "Coloriser for PHP logs."); ccze-0.2.1/src/mod_postfix.c0100644000175400017540000000574707660232332016151 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_postfix.c -- Postfix colorizer for CCZE * Copyright (C) 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "ccze-compat.h" static void ccze_postfix_setup (void); static void ccze_postfix_shutdown (void); static int ccze_postfix_handle (const char *str, size_t length, char **rest); static pcre *reg_postfix; static int _ccze_postfix_process_one (const char *s, char **rest) { char *field, *value; size_t i; if (!strchr (s, '=')) return 1; field = strndup (s, strchr (s, '=') - s); i = strlen (s); i -= strlen (field) + 1; value = strndup (&s[strlen (field) + 1], i); ccze_addstr (CCZE_COLOR_FIELD, field); ccze_addstr (CCZE_COLOR_DEFAULT, "="); ccze_wordcolor_process_one (value, 1); return 0; } static char * ccze_postfix_process (const char *str, int *offsets, int match) { char *spoolid, *s, *rest, *tmp; int r; pcre_get_substring (str, offsets, match, 1, (const char **)&spoolid); pcre_get_substring (str, offsets, match, 2, (const char **)&s); pcre_get_substring (str, offsets, match, 4, (const char **)&rest); ccze_addstr (CCZE_COLOR_UNIQN, spoolid); ccze_addstr (CCZE_COLOR_DEFAULT, ": "); tmp = ccze_strbrk (s, ','); do { r = _ccze_postfix_process_one (tmp, &rest); if (r) ccze_addstr (CCZE_COLOR_DEFAULT, tmp); else tmp = ccze_strbrk (NULL, ','); if (tmp) ccze_addstr (CCZE_COLOR_DEFAULT, ","); } while (!r && (tmp != NULL)); return NULL; } static void ccze_postfix_setup (void) { const char *error; int errptr; reg_postfix = pcre_compile ("^([\\dA-F]+): ((client|to|message-id|uid|resent-message-id|from)(=.*))", 0, &error, &errptr, NULL); } static void ccze_postfix_shutdown (void) { free (reg_postfix); } static int ccze_postfix_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_postfix, NULL, str, length, 0, 0, offsets, 99)) >= 0) { if (rest) *rest = ccze_postfix_process (str, offsets, match); else ccze_postfix_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (postfix, PARTIAL, "Coloriser for postfix(1) sub-logs."); ccze-0.2.1/src/mod_procmail.c0100644000175400017540000000657407660232332016262 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_procmail.c -- procmail-related colorizers for CCZE * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include static void ccze_procmail_setup (void); static void ccze_procmail_shutdown (void); static int ccze_procmail_handle (const char *str, size_t length, char **rest); static pcre *reg_procmail; static pcre_extra *hints_procmail; static char * ccze_procmail_process (const char *str, int *offsets, int match) { char *header = NULL, *value = NULL, *space1 = NULL; char *space2 = NULL, *extra = NULL; int handled = 0; ccze_color_t col = CCZE_COLOR_UNKNOWN; pcre_get_substring (str, offsets, match, 1, (const char **)&space1); pcre_get_substring (str, offsets, match, 2, (const char **)&header); pcre_get_substring (str, offsets, match, 3, (const char **)&value); pcre_get_substring (str, offsets, match, 4, (const char **)&space2); pcre_get_substring (str, offsets, match, 5, (const char **)&extra); if (!strcasecmp ("from", header) || !strcasecmp (">from", header)) { col = CCZE_COLOR_EMAIL; handled = 1; } if (!strcasecmp ("subject:", header)) { col = CCZE_COLOR_SUBJECT; handled = 1; } if (!strcasecmp ("folder:", header)) { col = CCZE_COLOR_DIR; handled = 1; } if (!handled) { free (header); free (value); free (extra); return strdup (str); } ccze_addstr (CCZE_COLOR_DEFAULT, space1); ccze_addstr (CCZE_COLOR_DEFAULT, header); ccze_space (); ccze_addstr (col, value); if (col == CCZE_COLOR_EMAIL) col = CCZE_COLOR_DEFAULT; ccze_addstr (col, space2); if (!strcasecmp ("folder:", header)) col = CCZE_COLOR_SIZE; else if (!strcasecmp ("from", header)) col = CCZE_COLOR_DATE; ccze_addstr (col, extra); ccze_newline(); free (extra); free (header); free (value); return NULL; } static void ccze_procmail_setup (void) { const char *error; int errptr; reg_procmail = pcre_compile ("^(\\s*)(>?From|Subject:|Folder:)?\\s(\\S+)(\\s+)?(.*)", 0, &error, &errptr, NULL); hints_procmail = pcre_study (reg_procmail, 0, &error); } static void ccze_procmail_shutdown (void) { free (reg_procmail); free (hints_procmail); } static int ccze_procmail_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_procmail, hints_procmail, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_procmail_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (procmail, FULL, "Coloriser for procmail(1) logs."); ccze-0.2.1/src/mod_proftpd.c0100644000175400017540000001310107660232332016112 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_proftpd.c -- proftpd-related colorizers for CCZE * Copyright (C) 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include static void ccze_proftpd_setup (void); static void ccze_proftpd_shutdown (void); static int ccze_proftpd_handle (const char *str, size_t length, char **rest); static pcre *reg_proftpd_access, *reg_proftpd_auth; static pcre_extra *hints_proftpd_access, *hints_proftpd_auth; static char * ccze_proftpd_access_log_process (const char *str, int *offsets, int match) { char *host, *user, *auser, *date, *command, *file, *ftpcode, *size; pcre_get_substring (str, offsets, match, 1, (const char **)&host); pcre_get_substring (str, offsets, match, 2, (const char **)&user); pcre_get_substring (str, offsets, match, 3, (const char **)&auser); pcre_get_substring (str, offsets, match, 4, (const char **)&date); pcre_get_substring (str, offsets, match, 5, (const char **)&command); pcre_get_substring (str, offsets, match, 6, (const char **)&file); pcre_get_substring (str, offsets, match, 7, (const char **)&ftpcode); pcre_get_substring (str, offsets, match, 8, (const char **)&size); ccze_addstr (CCZE_COLOR_HOST, host); ccze_space (); ccze_addstr (CCZE_COLOR_USER, user); ccze_space (); ccze_addstr (CCZE_COLOR_USER, auser); ccze_space (); ccze_addstr (CCZE_COLOR_DEFAULT, "["); ccze_print_date (date); ccze_addstr (CCZE_COLOR_DEFAULT, "]"); ccze_space (); ccze_addstr (CCZE_COLOR_DEFAULT, "\""); ccze_addstr (CCZE_COLOR_KEYWORD, command); ccze_space (); ccze_addstr (CCZE_COLOR_URI, file); ccze_addstr (CCZE_COLOR_DEFAULT, "\""); ccze_space (); ccze_addstr (CCZE_COLOR_FTPCODES, ftpcode); ccze_space (); ccze_addstr (CCZE_COLOR_GETSIZE, size); ccze_newline (); free (size); free (ftpcode); free (file); free (command); free (date); free (auser); free (user); free (host); return NULL; } static char * ccze_proftpd_auth_log_process (const char *str, int *offsets, int match) { char *servhost, *pid, *remhost, *date, *cmd, *value, *ftpcode; pcre_get_substring (str, offsets, match, 1, (const char **)&servhost); pcre_get_substring (str, offsets, match, 2, (const char **)&pid); pcre_get_substring (str, offsets, match, 3, (const char **)&remhost); pcre_get_substring (str, offsets, match, 4, (const char **)&date); pcre_get_substring (str, offsets, match, 5, (const char **)&cmd); pcre_get_substring (str, offsets, match, 6, (const char **)&value); pcre_get_substring (str, offsets, match, 7, (const char **)&ftpcode); ccze_addstr (CCZE_COLOR_HOST, servhost); ccze_space (); ccze_addstr (CCZE_COLOR_DEFAULT, "ftp server"); ccze_space (); ccze_addstr (CCZE_COLOR_PIDB, "["); ccze_addstr (CCZE_COLOR_PID, pid); ccze_addstr (CCZE_COLOR_PIDB, "]"); ccze_space (); ccze_addstr (CCZE_COLOR_HOST, remhost); ccze_space (); ccze_addstr (CCZE_COLOR_DEFAULT, "["); ccze_print_date (date); ccze_addstr (CCZE_COLOR_DEFAULT, "]"); ccze_space (); ccze_addstr (CCZE_COLOR_DEFAULT, "\""); ccze_addstr (CCZE_COLOR_KEYWORD, cmd); ccze_space (); ccze_addstr (CCZE_COLOR_DEFAULT, value); ccze_addstr (CCZE_COLOR_DEFAULT, "\""); ccze_space (); ccze_addstr (CCZE_COLOR_FTPCODES, ftpcode); ccze_newline (); free (ftpcode); free (value); free (cmd); free (date); free (remhost); free (pid); free (servhost); return NULL; } static void ccze_proftpd_setup (void) { const char *error; int errptr; reg_proftpd_access = pcre_compile ("^(\\d+\\.\\d+\\.\\d+\\.\\d+) (\\S+) (\\S+) " "\\[(\\d{2}/.{3}/\\d{4}:\\d{2}:\\d{2}:\\d{2} [\\-\\+]\\d{4})\\] " "\"([A-Z]+) ([^\"]+)\" (\\d{3}) (-|\\d+)", 0, &error, &errptr, NULL); hints_proftpd_access = pcre_study (reg_proftpd_access, 0, &error); reg_proftpd_auth = pcre_compile ("^(\\S+) ftp server \\[(\\d+)\\] (\\d+\\.\\d+\\.\\d+\\.\\d+) " "\\[(\\d{2}/.{3}/\\d{4}:\\d{2}:\\d{2}:\\d{2} [\\-\\+]\\d{4})\\] " "\"([A-Z]+) ([^\"]+)\" (\\d{3})", 0, &error, &errptr, NULL); hints_proftpd_auth = pcre_study (reg_proftpd_auth, 0, &error); } static void ccze_proftpd_shutdown (void) { free (reg_proftpd_auth); free (hints_proftpd_auth); free (reg_proftpd_access); free (hints_proftpd_access); } static int ccze_proftpd_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_proftpd_access, hints_proftpd_access, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_proftpd_access_log_process (str, offsets, match); return 1; } if ((match = pcre_exec (reg_proftpd_auth, hints_proftpd_auth, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_proftpd_auth_log_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (proftpd, FULL, "Coloriser for proftpd access and auth logs."); ccze-0.2.1/src/mod_squid.c0100644000175400017540000002305007660232332015565 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_squid.c -- Squid-related colorizers for CCZE * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include static void ccze_squid_setup (void); static void ccze_squid_shutdown (void); static int ccze_squid_handle (const char *str, size_t length, char **rest); static pcre *reg_squid_access, *reg_squid_store, *reg_squid_cache; static pcre_extra *hints_squid_access, *hints_squid_store, *hints_squid_cache; static ccze_color_t _ccze_proxy_action (const char *action) { if (strstr (action, "ERR") == action) return CCZE_COLOR_ERROR; if (strstr (action, "MISS")) return CCZE_COLOR_PROXY_MISS; if (strstr (action, "HIT")) return CCZE_COLOR_PROXY_HIT; if (strstr (action, "DENIED")) return CCZE_COLOR_PROXY_DENIED; if (strstr (action, "REFRESH")) return CCZE_COLOR_PROXY_REFRESH; if (strstr (action, "SWAPFAIL")) return CCZE_COLOR_PROXY_SWAPFAIL; if (strstr (action, "NONE")) return CCZE_COLOR_DEBUG; return CCZE_COLOR_UNKNOWN; } static ccze_color_t _ccze_proxy_hierarch (const char *hierar) { if (strstr (hierar, "NO") == hierar) return CCZE_COLOR_WARNING; if (strstr (hierar, "DIRECT")) return CCZE_COLOR_PROXY_DIRECT; if (strstr (hierar, "PARENT")) return CCZE_COLOR_PROXY_PARENT; if (strstr (hierar, "MISS")) return CCZE_COLOR_PROXY_MISS; return CCZE_COLOR_UNKNOWN; } static ccze_color_t _ccze_proxy_tag (const char *tag) { if (strstr (tag, "CREATE")) return CCZE_COLOR_PROXY_CREATE; if (strstr (tag, "SWAPIN")) return CCZE_COLOR_PROXY_SWAPIN; if (strstr (tag, "SWAPOUT")) return CCZE_COLOR_PROXY_SWAPOUT; if (strstr (tag, "RELEASE")) return CCZE_COLOR_PROXY_RELEASE; return CCZE_COLOR_UNKNOWN; } static char * ccze_squid_access_log_process (const char *str, int *offsets, int match) { char *date, *espace, *elaps, *host, *action, *httpc, *gsize; char *method, *uri, *ident, *hierar, *fhost, *ctype; pcre_get_substring (str, offsets, match, 1, (const char **)&date); pcre_get_substring (str, offsets, match, 2, (const char **)&espace); pcre_get_substring (str, offsets, match, 3, (const char **)&elaps); pcre_get_substring (str, offsets, match, 4, (const char **)&host); pcre_get_substring (str, offsets, match, 5, (const char **)&action); pcre_get_substring (str, offsets, match, 6, (const char **)&httpc); pcre_get_substring (str, offsets, match, 7, (const char **)&gsize); pcre_get_substring (str, offsets, match, 8, (const char **)&method); pcre_get_substring (str, offsets, match, 9, (const char **)&uri); pcre_get_substring (str, offsets, match, 10, (const char **)&ident); pcre_get_substring (str, offsets, match, 11, (const char **)&hierar); pcre_get_substring (str, offsets, match, 12, (const char **)&fhost); pcre_get_substring (str, offsets, match, 13, (const char **)&ctype); ccze_print_date (date); ccze_addstr (CCZE_COLOR_DEFAULT, espace); ccze_addstr (CCZE_COLOR_GETTIME, elaps); ccze_space (); ccze_addstr (CCZE_COLOR_HOST, host); ccze_space (); ccze_addstr (_ccze_proxy_action (action), action); ccze_addstr (CCZE_COLOR_DEFAULT, "/"); ccze_addstr (CCZE_COLOR_HTTPCODES, httpc); ccze_space (); ccze_addstr (CCZE_COLOR_GETSIZE, gsize); ccze_space (); ccze_addstr (ccze_http_action (method), method); ccze_space (); ccze_addstr (CCZE_COLOR_URI, uri); ccze_space (); ccze_addstr (CCZE_COLOR_IDENT, ident); ccze_space (); ccze_addstr (_ccze_proxy_hierarch (hierar), hierar); ccze_addstr (CCZE_COLOR_DEFAULT, "/"); ccze_addstr (CCZE_COLOR_HOST, fhost); ccze_space (); ccze_addstr (CCZE_COLOR_CTYPE, ctype); ccze_newline (); free (date); free (espace); free (elaps); free (host); free (action); free (httpc); free (gsize); free (method); free (uri); free (ident); free (hierar); free (fhost); free (ctype); return NULL; } static char * ccze_squid_cache_log_process (const char *str, int *offsets, int match) { char *date, *other; pcre_get_substring (str, offsets, match, 1, (const char **)&date); pcre_get_substring (str, offsets, match, 3, (const char **)&other); ccze_addstr (CCZE_COLOR_DATE, date); ccze_space(); free (date); return other; } static char * ccze_squid_store_log_process (const char *str, int *offsets, int match) { char *date, *tag, *swapnum, *swapname, *swapsum, *space1, *hcode; char *hdate, *lmdate, *expire, *ctype, *size, *read, *method; char *uri, *space2, *space3, *space4; pcre_get_substring (str, offsets, match, 1, (const char **)&date); pcre_get_substring (str, offsets, match, 2, (const char **)&tag); pcre_get_substring (str, offsets, match, 3, (const char **)&swapnum); pcre_get_substring (str, offsets, match, 4, (const char **)&swapname); pcre_get_substring (str, offsets, match, 5, (const char **)&swapsum); pcre_get_substring (str, offsets, match, 6, (const char **)&space1); pcre_get_substring (str, offsets, match, 7, (const char **)&hcode); pcre_get_substring (str, offsets, match, 8, (const char **)&space2); pcre_get_substring (str, offsets, match, 9, (const char **)&hdate); pcre_get_substring (str, offsets, match, 10, (const char **)&space3); pcre_get_substring (str, offsets, match, 11, (const char **)&lmdate); pcre_get_substring (str, offsets, match, 12, (const char **)&space4); pcre_get_substring (str, offsets, match, 13, (const char **)&expire); pcre_get_substring (str, offsets, match, 14, (const char **)&ctype); pcre_get_substring (str, offsets, match, 15, (const char **)&size); pcre_get_substring (str, offsets, match, 16, (const char **)&read); pcre_get_substring (str, offsets, match, 17, (const char **)&method); pcre_get_substring (str, offsets, match, 18, (const char **)&uri); ccze_print_date (date); ccze_space(); ccze_addstr (_ccze_proxy_tag (tag), tag); ccze_space(); ccze_addstr (CCZE_COLOR_SWAPNUM, swapnum); ccze_space(); ccze_addstr (CCZE_COLOR_SWAPNUM, swapname); ccze_space(); ccze_addstr (CCZE_COLOR_SWAPNUM, swapsum); ccze_addstr (CCZE_COLOR_DEFAULT, space1); ccze_addstr (CCZE_COLOR_HTTPCODES, hcode); ccze_addstr (CCZE_COLOR_DEFAULT, space2); ccze_print_date (hdate); ccze_addstr (CCZE_COLOR_DEFAULT, space3); ccze_print_date (lmdate); ccze_addstr (CCZE_COLOR_DEFAULT, space4); ccze_print_date (expire); ccze_space(); ccze_addstr (CCZE_COLOR_CTYPE, ctype); ccze_space(); ccze_addstr (CCZE_COLOR_GETSIZE, size); ccze_addstr (CCZE_COLOR_DEFAULT, "/"); ccze_addstr (CCZE_COLOR_GETSIZE, read); ccze_space(); ccze_addstr (ccze_http_action (method), method); ccze_space(); ccze_addstr (CCZE_COLOR_URI, uri); ccze_newline (); free (date); free (tag); free (swapnum); free (swapname); free (swapsum); free (space1); free (hcode); free (hdate); free (lmdate); free (expire); free (ctype); free (size); free (read); free (method); free (uri); free (space2); free (space3); free (space4); return NULL; } static void ccze_squid_setup (void) { const char *error; int errptr; reg_squid_access = pcre_compile ("^(\\d{9,10}\\.\\d{3})(\\s+)(\\d+)\\s(\\S+)\\s(\\w+)\\/(\\d{3})" "\\s(\\d+)\\s(\\w+)\\s(\\S+)\\s(\\S+)\\s(\\w+)\\/([\\d\\.]+|-)\\s(.*)", 0, &error, &errptr, NULL); hints_squid_access = pcre_study (reg_squid_access, 0, &error); reg_squid_cache = pcre_compile ("^(\\d{4}\\/\\d{2}\\/\\d{2}\\s(\\d{2}:){2}\\d{2}\\|)\\s(.*)$", 0, &error, &errptr, NULL); hints_squid_cache = pcre_study (reg_squid_cache, 0, &error); reg_squid_store = pcre_compile ("^([\\d\\.]+)\\s(\\w+)\\s(\\-?[\\dA-F]+)\\s+(\\S+)\\s([\\dA-F]+)" "(\\s+)(\\d{3}|\\?)(\\s+)(\\-?[\\d\\?]+)(\\s+)(\\-?[\\d\\?]+)(\\s+)" "(\\-?[\\d\\?]+)\\s(\\S+)\\s(\\-?[\\d|\\?]+)\\/(\\-?[\\d|\\?]+)\\s" "(\\S+)\\s(.*)", 0, &error, &errptr, NULL); hints_squid_store = pcre_study (reg_squid_store, 0, &error); } static void ccze_squid_shutdown (void) { free (reg_squid_access); free (hints_squid_access); free (reg_squid_cache); free (hints_squid_cache); free (reg_squid_store); free (hints_squid_store); } static int ccze_squid_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_squid_access, hints_squid_access, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_squid_access_log_process (str, offsets, match); return 1; } if ((match = pcre_exec (reg_squid_store, hints_squid_store, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_squid_store_log_process (str, offsets, match); return 1; } if ((match = pcre_exec (reg_squid_cache, hints_squid_cache, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_squid_cache_log_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (squid, FULL, "Coloriser for squid access, store and cache logs."); ccze-0.2.1/src/mod_sulog.c0100644000175400017540000000561007660232332015573 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_sulog.c -- su-related colorizers for CCZE * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include static void ccze_sulog_setup (void); static void ccze_sulog_shutdown (void); static int ccze_sulog_handle (const char *str, size_t length, char **rest); static pcre *reg_sulog; static pcre_extra *hints_sulog; static char * ccze_sulog_process (const char *str, int *offsets, int match) { char *date, *islogin, *tty, *fromuser, *touser; pcre_get_substring (str, offsets, match, 1, (const char **)&date); pcre_get_substring (str, offsets, match, 2, (const char **)&islogin); pcre_get_substring (str, offsets, match, 3, (const char **)&tty); pcre_get_substring (str, offsets, match, 4, (const char **)&fromuser); pcre_get_substring (str, offsets, match, 5, (const char **)&touser); ccze_addstr (CCZE_COLOR_DEFAULT, "SU "); ccze_addstr (CCZE_COLOR_DATE, date); ccze_space (); ccze_addstr (CCZE_COLOR_DEFAULT, islogin); ccze_space (); switch (tty[0]) { case '?': ccze_addstr (CCZE_COLOR_UNKNOWN, tty); break; default: ccze_addstr (CCZE_COLOR_DIR, tty); break; } ccze_space (); ccze_addstr (CCZE_COLOR_USER, fromuser); ccze_addstr (CCZE_COLOR_DEFAULT, "-"); ccze_addstr (CCZE_COLOR_USER, touser); ccze_newline (); free (date); free (islogin); free (tty); free (fromuser); free (touser); return NULL; } static void ccze_sulog_setup (void) { const char *error; int errptr; reg_sulog = pcre_compile ("^SU (\\d{2}\\/\\d{2} \\d{2}:\\d{2}) ([\\+\\-]) " "(\\S+) ([^\\-]+)-(.*)$", 0, &error, &errptr, NULL); hints_sulog = pcre_study (reg_sulog, 0, &error); } static void ccze_sulog_shutdown (void) { free (reg_sulog); free (hints_sulog); } static int ccze_sulog_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_sulog, hints_sulog, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_sulog_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (sulog, FULL, "Coloriser for su(1) logs."); ccze-0.2.1/src/mod_super.c0100644000175400017540000000524707660232332015606 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_super.c -- super-related colorizers for CCZE * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include static void ccze_super_setup (void); static void ccze_super_shutdown (void); static int ccze_super_handle (const char *str, size_t length, char **rest); static pcre *reg_super; static pcre_extra *hints_super; static char * ccze_super_process (const char *str, int *offsets, int match) { char *email, *date, *space, *suptag, *other; pcre_get_substring (str, offsets, match, 1, (const char **)&email); pcre_get_substring (str, offsets, match, 2, (const char **)&date); pcre_get_substring (str, offsets, match, 3, (const char **)&space); pcre_get_substring (str, offsets, match, 4, (const char **)&suptag); pcre_get_substring (str, offsets, match, 5, (const char **)&other); ccze_addstr (CCZE_COLOR_EMAIL, email); ccze_space (); ccze_addstr (CCZE_COLOR_DATE, date); ccze_addstr (CCZE_COLOR_DEFAULT, space); ccze_addstr (CCZE_COLOR_PROC, suptag); ccze_space (); ccze_addstr (CCZE_COLOR_PIDB, "("); ccze_addstr (CCZE_COLOR_DEFAULT, other); ccze_addstr (CCZE_COLOR_PIDB, ")"); ccze_newline (); return NULL; } static void ccze_super_setup (void) { const char *error; int errptr; reg_super = pcre_compile ("^(\\S+)\\s(\\w+\\s+\\w+\\s+\\d+\\s+\\d+:\\d+:\\d+\\s+\\d+)" "(\\s+)(\\S+)\\s\\(([^\\)]+)\\)", 0, &error, &errptr, NULL); hints_super = pcre_study (reg_super, 0, &error); } static void ccze_super_shutdown (void) { free (reg_super); free (hints_super); } static int ccze_super_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_super, hints_super, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_super_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (super, FULL, "Coloriser for super(1) logs."); ccze-0.2.1/src/mod_syslog.c0100644000175400017540000000665007660232332015767 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_syslog.c -- Syslog-related colorizers for CCZE * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "ccze-compat.h" static void ccze_syslog_setup (void); static void ccze_syslog_shutdown (void); static int ccze_syslog_handle (const char *str, size_t length, char **rest); static pcre *reg_syslog; static pcre_extra *hints_syslog; static char * ccze_syslog_process (const char *str, int *offsets, int match) { char *date = NULL, *host = NULL, *send = NULL, *process = NULL; char *msg = NULL, *pid = NULL, *tmp = NULL, *toret; pcre_get_substring (str, offsets, match, 1, (const char **)&date); pcre_get_substring (str, offsets, match, 2, (const char **)&host); pcre_get_substring (str, offsets, match, 3, (const char **)&send); if ((strstr (send, "last message repeated") && strstr (send, "times")) || (strstr (send, "-- MARK --"))) msg = strdup (send); else { pcre_get_substring (str, offsets, match, 4, (const char **)&process); pcre_get_substring (str, offsets, match, 5, (const char **)&msg); } if (process) { char *t; if ((t = strchr (process, '['))) { char *t2 = strchr (t, ']'); pid = strndup (&t[1], (size_t)(t2 - t - 1)); tmp = strndup (process, (size_t)(t - process)); free (process); process = tmp; } } ccze_addstr (CCZE_COLOR_DATE, date); ccze_space (); ccze_addstr (CCZE_COLOR_HOST, host); ccze_space (); if (process) { ccze_addstr (CCZE_COLOR_PROC, process); if (pid) { ccze_addstr (CCZE_COLOR_PIDB, "["); ccze_addstr (CCZE_COLOR_PID, pid); ccze_addstr (CCZE_COLOR_PIDB, "]"); ccze_addstr (CCZE_COLOR_PROC, ":"); } ccze_space (); toret = strdup (msg); } else toret = strdup (send); free (date); free (host); free (send); free (process); free (msg); free (pid); return toret; } static void ccze_syslog_setup (void) { const char *error; int errptr; reg_syslog = pcre_compile ("^(\\S*\\s{1,2}\\d{1,2}\\s\\d\\d:\\d\\d:\\d\\d)" "\\s(\\S+)\\s((\\S+:?)\\s(.*))$", 0, &error, &errptr, NULL); hints_syslog = pcre_study (reg_syslog, 0, &error); } static void ccze_syslog_shutdown (void) { free (reg_syslog); free (hints_syslog); } static int ccze_syslog_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_syslog, hints_syslog, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_syslog_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (syslog, FULL, "Generic syslog(8) log coloriser."); ccze-0.2.1/src/mod_ulogd.c0100644000175400017540000000457207660232332015562 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_ulogd.c -- ulogd-related colorizers for CCZE * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "ccze-compat.h" static void ccze_ulogd_setup (void); static void ccze_ulogd_shutdown (void); static int ccze_ulogd_handle (const char *str, size_t length, char **rest); static pcre *reg_ulogd; static char * ccze_ulogd_process (const char *msg) { char *word, *tmp, *field, *value; char *msg2 = xstrdup (msg); word = xstrdup (ccze_strbrk (msg2, ' ')); do { if ((tmp = strchr (word, '=')) != NULL) { field = strndup (word, tmp - word); value = strdup (tmp + 1); ccze_addstr (CCZE_COLOR_FIELD, field); ccze_addstr (CCZE_COLOR_DEFAULT, "="); ccze_wordcolor_process_one (value, 1); free (field); ccze_space (); } else { ccze_addstr (CCZE_COLOR_FIELD, word); ccze_space (); } } while ((word = xstrdup (ccze_strbrk (NULL, ' '))) != NULL); free (msg2); return NULL; } static void ccze_ulogd_setup (void) { const char *error; int errptr; reg_ulogd = pcre_compile ("(IN|OUT|MAC|TTL|SRC|TOS|PREC|SPT)=", 0, &error, &errptr, NULL); } static void ccze_ulogd_shutdown (void) { free (reg_ulogd); } static int ccze_ulogd_handle (const char *str, size_t length, char **rest) { int offsets[10]; if (pcre_exec (reg_ulogd, NULL, str, length, 0, 0, offsets, 2) >= 0) { if (rest) *rest = ccze_ulogd_process (str); else ccze_ulogd_process (str); return 1; } return 0; } CCZE_DEFINE_PLUGIN (ulogd, PARTIAL, "Coloriser for ulogd sub-logs."); ccze-0.2.1/src/mod_vsftpd.c0100644000175400017540000000557407660232332015761 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_vstpd.c -- VSFTPd-related colorizers for CCZE * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include static void ccze_vsftpd_setup (void); static void ccze_vsftpd_shutdown (void); static int ccze_vsftpd_handle (const char *str, size_t length, char **rest); static pcre *reg_vsftpd; static pcre_extra *hints_vsftpd; static char * ccze_vsftpd_log_process (const char *str, int *offsets, int match) { char *date, *sspace, *pid, *user, *other; pcre_get_substring (str, offsets, match, 1, (const char **)&date); pcre_get_substring (str, offsets, match, 2, (const char **)&sspace); pcre_get_substring (str, offsets, match, 3, (const char **)&pid); pcre_get_substring (str, offsets, match, 5, (const char **)&user); pcre_get_substring (str, offsets, match, 6, (const char **)&other); ccze_addstr (CCZE_COLOR_DATE, date); ccze_addstr (CCZE_COLOR_DEFAULT, sspace); ccze_addstr (CCZE_COLOR_PIDB, "["); ccze_addstr (CCZE_COLOR_DEFAULT, "pid "); ccze_addstr (CCZE_COLOR_PID, pid); ccze_addstr (CCZE_COLOR_PIDB, "]"); ccze_space(); if (*user) { ccze_addstr (CCZE_COLOR_PIDB, "["); ccze_addstr (CCZE_COLOR_USER, user); ccze_addstr (CCZE_COLOR_PIDB, "]"); ccze_space (); } free (date); free (sspace); free (pid); free (user); return other; } static void ccze_vsftpd_setup (void) { const char *error; int errptr; reg_vsftpd = pcre_compile ("^(\\S+\\s+\\S+\\s+\\d{1,2}\\s+\\d{1,2}:\\d{1,2}:\\d{1,2}\\s+\\d+)" "(\\s+)\\[pid (\\d+)\\]\\s+(\\[(\\S+)\\])?\\s*(.*)$", 0, &error, &errptr, NULL); hints_vsftpd = pcre_study (reg_vsftpd, 0, &error); } static void ccze_vsftpd_shutdown (void) { free (reg_vsftpd); free (hints_vsftpd); } static int ccze_vsftpd_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_vsftpd, hints_vsftpd, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_vsftpd_log_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (vsftpd, FULL, "Coloriser for vsftpd(8) logs."); ccze-0.2.1/src/mod_xferlog.c0100644000175400017540000001046507660232332016114 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * mod_xferlog -- Xferlog colorizer for CCZE. * Copyright (C) 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include static void ccze_xferlog_setup (void); static void ccze_xferlog_shutdown (void); static int ccze_xferlog_handle (const char *str, size_t length, char **rest); static pcre *reg_xferlog; static pcre_extra *hints_xferlog; static char * ccze_xferlog_log_process (const char *str, int *offsets, int match) { char *curtime, *transtime, *host, *fsize, *fname, *transtype; char *actionflag, *direction, *amode, *user, *service, *amethod; char *auid, *status; pcre_get_substring (str, offsets, match, 1, (const char **)&curtime); pcre_get_substring (str, offsets, match, 2, (const char **)&transtime); pcre_get_substring (str, offsets, match, 3, (const char **)&host); pcre_get_substring (str, offsets, match, 4, (const char **)&fsize); pcre_get_substring (str, offsets, match, 5, (const char **)&fname); pcre_get_substring (str, offsets, match, 6, (const char **)&transtype); pcre_get_substring (str, offsets, match, 7, (const char **)&actionflag); pcre_get_substring (str, offsets, match, 8, (const char **)&direction); pcre_get_substring (str, offsets, match, 9, (const char **)&amode); pcre_get_substring (str, offsets, match, 10, (const char **)&user); pcre_get_substring (str, offsets, match, 11, (const char **)&service); pcre_get_substring (str, offsets, match, 12, (const char **)&amethod); pcre_get_substring (str, offsets, match, 13, (const char **)&auid); pcre_get_substring (str, offsets, match, 14, (const char **)&status); ccze_addstr (CCZE_COLOR_DATE, curtime); ccze_space (); ccze_addstr (CCZE_COLOR_GETTIME, transtime); ccze_space (); ccze_addstr (CCZE_COLOR_HOST, host); ccze_space (); ccze_addstr (CCZE_COLOR_GETSIZE, fsize); ccze_space (); ccze_addstr (CCZE_COLOR_DIR, fname); ccze_space (); ccze_addstr (CCZE_COLOR_PIDB, transtype); ccze_space (); ccze_addstr (CCZE_COLOR_FTPCODES, actionflag); ccze_space (); ccze_addstr (CCZE_COLOR_FTPCODES, direction); ccze_space (); ccze_addstr (CCZE_COLOR_FTPCODES, amode); ccze_space (); ccze_addstr (CCZE_COLOR_USER, user); ccze_space (); ccze_addstr (CCZE_COLOR_SERVICE, service); ccze_space (); ccze_addstr (CCZE_COLOR_FTPCODES, amethod); ccze_space (); ccze_addstr (CCZE_COLOR_USER, auid); ccze_space (); ccze_addstr (CCZE_COLOR_FTPCODES, status); ccze_newline (); free (curtime); free (transtime); free (host); free (fsize); free (fname); free (transtype); free (actionflag); free (direction); free (amode); free (user); free (service); free (amethod); free (auid); free (status); return NULL; } static void ccze_xferlog_setup (void) { const char *error; int errptr; /* FIXME: Does not handle spaces in filenames! */ reg_xferlog = pcre_compile ("^(... ... +\\d{1,2} +\\d{1,2}:\\d{1,2}:\\d{1,2} \\d+) (\\d+) ([^ ]+) " "(\\d+) (\\S+) (a|b) (C|U|T|_) (o|i) (a|g|r) ([^ ]+) ([^ ]+) " "(0|1) ([^ ]+) (c|i)", 0, &error, &errptr, NULL); hints_xferlog = pcre_study (reg_xferlog, 0, &error); } static void ccze_xferlog_shutdown (void) { free (reg_xferlog); free (hints_xferlog); } static int ccze_xferlog_handle (const char *str, size_t length, char **rest) { int match, offsets[99]; if ((match = pcre_exec (reg_xferlog, hints_xferlog, str, length, 0, 0, offsets, 99)) >= 0) { *rest = ccze_xferlog_log_process (str, offsets, match); return 1; } return 0; } CCZE_DEFINE_PLUGIN (xferlog, FULL, "Generic xferlog coloriser."); ccze-0.2.1/src/ccze-dump.c0100644000175400017540000001447107660232332015477 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * ccze-dump.c -- Dump internal color table * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze 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 CCZE_DUMP 1 #include #ifdef HAVE_ARGP_H # include #endif #include "ccze-color.c" #include "ccze-compat.h" ccze_config_t ccze_config = { .scroll = 1, .convdate = 0, .remfac = 0, .wcol = 1, .slookup = 1, .rcfile = NULL, .cssfile = NULL, .transparent = 1, .pluginlist_len = 0, .pluginlist_alloc = 10, .color_argv_len = 0, .color_argv_alloc = 10, .mode = CCZE_MODE_CURSES }; const char *argp_program_name = "ccze-dump"; const char *argp_program_version = "ccze-dump (ccze 0.1." PATCHLEVEL ")"; const char *argp_program_bug_address = ""; static struct argp_option options[] = { {NULL, 0, NULL, 0, "", 1}, {"rcfile", 'F', "FILE", 0, "Read configuration from FILE", 1}, {"load", 'l', NULL, 0, "Load default configuration files", 1}, {NULL, 0, NULL, 0, NULL, 0} }; static error_t parse_opt (int key, char *arg, struct argp_state *state); static struct argp argp = {options, parse_opt, 0, "ccze -- cheer up 'yer logs.", NULL, NULL, NULL}; static int ccze_loaddefs = 0; static error_t parse_opt (int key, char *arg, struct argp_state *state) { switch (key) { case 'F': ccze_config.rcfile = arg; break; case 'l': ccze_loaddefs = 1; break; default: return ARGP_ERR_UNKNOWN; } return 0; } static char * ccze_dump_color_get_attrib (int color) { char *str = (char *)ccze_calloc (100, sizeof (char)); if (color & A_BOLD) strcat (str, "bold "); if (color & A_UNDERLINE) strcat (str, "underline "); if (color & A_REVERSE) strcat (str, "reverse "); if (color & A_BLINK) strcat (str, "blink "); return str; } static char * ccze_dump_color_to_name (int color) { int my_color = ccze_color_strip_attrib (color); if (my_color < COLOR_PAIR (8)) return ccze_color_to_name_simple (my_color); else { int i,j; char *str, *cj, *ci; j = (my_color >> 8) % 8; i = (my_color >> 8) / 8; cj = ccze_color_to_name_simple (COLOR_PAIR (j)); ci = ccze_color_to_name_simple (COLOR_PAIR (i)); asprintf (&str, "%s on_%s", cj, ci); return str; } } static char * ccze_dump_color_comment (int cidx) { return ccze_color_keyword_map[cidx].comment; } static int ccze_dump_color_hidden (int cidx) { return !ccze_color_keyword_map[cidx].settable; } static int ccze_dump_color_to_idx (ccze_color_t color) { size_t cidx; for (cidx = 0; cidx < sizeof (ccze_color_keyword_map); cidx++) if (ccze_color_keyword_map[cidx].idx == color) return cidx; return 0; } int main (int argc, char *argv[]) { ccze_color_t cidx; char line[256]; int color; size_t llen; argp_parse (&argp, argc, argv, 0, 0, NULL); ccze_color_init (); if (ccze_config.rcfile) ccze_color_load (ccze_config.rcfile); else if (ccze_loaddefs) { char *home, *homerc; ccze_color_load (SYSCONFDIR "/colorizerc"); ccze_color_load (SYSCONFDIR "/cczerc"); home = getenv ("HOME"); if (home) { asprintf (&homerc, "%s/.colorizerc", home); ccze_color_load (homerc); free (homerc); asprintf (&homerc, "%s/.cczerc", home); ccze_color_load (homerc); free (homerc); } } printf ("# Configuration file for ccze\n#\n"); printf ("# Available 'pre' attributes: bold, underline, underscore, " "blink, reverse\n"); printf ("# Available colors: black, red, green, yellow, blue, magenta, " "cyan, white\n"); printf ("# Available bgcolors: on_black, on_red, on_green, on_yellow, " "on_blue, on_magenta, on_cyan, on_white\n#\n"); printf ("# You can also use item names in color definition, like:\n#\n"); printf ("# default blue\n# date 'default'\n#\n"); printf ("# Here you defined default color to blue, and date color to " "default value's color, so\n"); printf ("# your date color is blue. (You can only use predefined item " "names!)\n\n"); printf ("# item color # comment (what is " "color, or why it's that ;)\n\n"); /* Dump colors */ for (cidx = CCZE_COLOR_DATE; cidx < CCZE_COLOR_LAST; cidx++) { if (ccze_dump_color_hidden (cidx)) continue; color = ccze_color (cidx); strcpy (line, ccze_color_lookup_name (cidx)); llen = strlen (line); memset (&line[llen], ' ', 16 - llen); line[16]='\0'; strcat (line, ccze_dump_color_get_attrib (color)); strcat (line, ccze_dump_color_to_name (color)); llen = strlen (line); memset (&line[llen], ' ', 42 - llen); line[40]='#'; line[42]='\0'; strcat (line, ccze_dump_color_comment (ccze_dump_color_to_idx (cidx))); printf ("%s\n", line); } /* CSS codes */ printf ("\n# CSS codes for the HTML output\n"); for (color = 0; color < 8; color++) { strcpy (line, "css"); strcat (line, ccze_colorname_map[color].name); llen = strlen (line); memset (&line[llen], ' ', 16 - llen); line[16]='\0'; strcat (line, ccze_csscolor_normal_map[color]); printf ("%s\n", line); strcpy (line, "cssbold"); strcat (line, ccze_colorname_map[color].name); llen = strlen (line); memset (&line[llen], ' ', 16 - llen); line[16]='\0'; strcat (line, ccze_csscolor_bold_map[color]); printf ("%s\n", line); } strcpy (line, "cssbody"); llen = strlen (line); memset (&line[llen], ' ', 16 - llen); line[16]='\0'; strcat (line, ccze_cssbody_color ()); printf ("%s\n", line); return 0; } ccze-0.2.1/src/ccze-cssdump.c0100644000175400017540000000546307660232332016211 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * ccze-cssdump.c -- Dump internal color table into css format * Copyright (C) 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #ifdef HAVE_ARGP_H # include #endif #include "ccze-compat.h" #include "ccze-private.h" #include "ccze-color.c" const char *argp_program_name = "ccze-cssdump"; const char *argp_program_version = "ccze-cssdump (ccze 0.1." PATCHLEVEL ")"; const char *argp_program_bug_address = ""; static struct argp_option options[] = { {NULL, 0, NULL, 0, "", 1}, {"rcfile", 'F', "FILE", 0, "Read configuration from FILE", 1}, {"load", 'l', NULL, 0, "Load default configuration files", 1}, {NULL, 0, NULL, 0, NULL, 0} }; ccze_config_t ccze_config = { .scroll = 1, .convdate = 0, .remfac = 0, .wcol = 1, .slookup = 1, .rcfile = NULL, .cssfile = NULL, .transparent = 1, .pluginlist_len = 0, .pluginlist_alloc = 10, .color_argv_len = 0, .color_argv_alloc = 10, .mode = CCZE_MODE_HTML }; static error_t parse_opt (int key, char *arg, struct argp_state *state); static struct argp argp = {options, parse_opt, 0, "ccze -- cheer up 'yer logs.", NULL, NULL, NULL}; static int ccze_loaddefs = 0; static error_t parse_opt (int key, char *arg, struct argp_state *state) { switch (key) { case 'F': ccze_config.rcfile = arg; break; case 'l': ccze_loaddefs = 1; break; default: return ARGP_ERR_UNKNOWN; } return 0; } int main (int argc, char *argv[]) { argp_parse (&argp, argc, argv, 0, 0, NULL); ccze_color_init (); if (ccze_config.rcfile) ccze_color_load (ccze_config.rcfile); else if (ccze_loaddefs) { char *home, *homerc; ccze_color_load (SYSCONFDIR "/colorizerc"); ccze_color_load (SYSCONFDIR "/cczerc"); home = getenv ("HOME"); if (home) { asprintf (&homerc, "%s/.colorizerc", home); ccze_color_load (homerc); free (homerc); asprintf (&homerc, "%s/.cczerc", home); ccze_color_load (homerc); free (homerc); } } ccze_colors_to_css (); return 0; } ccze-0.2.1/src/ccze-compat.c0100644000175400017540000002401007660232332016003 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * ccze-compat.c -- OS compatibility stuff for CCZE * Copyright (C) 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include "system.h" #include "ccze-compat.h" #include #include #ifdef HAVE_GETOPT_H # include #endif #include #include #include #include #include #include #define XSREALLOC(ptr, type, nmemb) \ ptr = (type*)ccze_realloc (ptr, nmemb * sizeof (type)) #if malloc == rpl_malloc #undef malloc #undef realloc #endif void * ccze_malloc (size_t size) { register void *value = malloc (size); if (value == 0) exit (2); return value; } void * ccze_realloc (void *ptr, size_t size) { register void *value = realloc (ptr, size); if (value == 0) exit (2); return value; } void * ccze_calloc (size_t nmemb, size_t size) { register void *value = calloc (nmemb, size); if (value == 0) exit (2); return value; } #ifndef HAVE_STRNDUP char * strndup (const char *s, size_t size) { char *ns = (char *)ccze_malloc (size + 1); memcpy (ns, s, size); ns[size] = '\0'; return ns; } #endif #ifndef HAVE_ARGP_PARSE error_t argp_parse (const struct argp *argps, int argc, char **argv, unsigned flags, int arg_index, void *input) { char *options; int optpos = 0, optionspos = 0, optionssize = 30; struct argp_state *state; int c; #if HAVE_GETOPT_LONG struct option *longopts; int longoptionspos = 0; longopts = (struct option *)ccze_calloc (optionssize, sizeof (struct option)); #endif state = (struct argp_state *)ccze_malloc (sizeof (struct argp_state)); state->input = input; options = (char *)ccze_calloc (optionssize, sizeof (char *)); while (argps->options[optpos].name != NULL) { if (optionspos >= optionssize) { optionssize *= 2; XSREALLOC (options, char, optionssize); #if HAVE_GETOPT_LONG XSREALLOC (longopts, struct option, optionssize); #endif } options[optionspos++] = (char) argps->options[optpos].key; #if HAVE_GETOPT_LONG longopts[longoptionspos].name = argps->options[optpos].name; if (argps->options[optpos].arg) longopts[longoptionspos].has_arg = required_argument; else longopts[longoptionspos].has_arg = no_argument; longopts[longoptionspos].flag = NULL; longopts[longoptionspos].val = argps->options[optpos].key; longoptionspos++; #endif if (argps->options[optpos].arg) options[optionspos++] = ':'; optpos++; } if (optionspos + 4 >= optionssize) { optionssize += 5; XSREALLOC (options, char, optionssize); #if HAVE_GETOPT_LONG XSREALLOC (longopts, struct option, optionssize); #endif } options[optionspos++] = 'V'; options[optionspos++] = '?'; options[optionspos] = '\0'; #if HAVE_GETOPT_LONG longopts[longoptionspos].name = "help"; longopts[longoptionspos].has_arg = no_argument; longopts[longoptionspos].flag = NULL; longopts[longoptionspos].val = '?'; longoptionspos++; longopts[longoptionspos].name = "version"; longopts[longoptionspos].has_arg = no_argument; longopts[longoptionspos].flag = NULL; longopts[longoptionspos].val = 'V'; longoptionspos++; longopts[longoptionspos].name = NULL; longopts[longoptionspos].has_arg = 0; longopts[longoptionspos].flag = NULL; longopts[longoptionspos].val = 0; #endif #if HAVE_GETOPT_LONG while ((c = getopt_long (argc, argv, options, longopts, NULL)) != -1) #else while ((c = getopt (argc, argv, options)) != -1) #endif { switch (c) { case '?': printf ("Usage: %s [OPTION...]\n%s\n\n", argp_program_name, argps->doc); optpos = 0; while (argps->options[optpos].name != NULL) { if (!(argps->options[optpos].flags & OPTION_HIDDEN)) #if HAVE_GETOPT_LONG printf (" -%c, --%-15s %-12s\t%s\n", argps->options[optpos].key, argps->options[optpos].name, (argps->options[optpos].arg) ? argps->options[optpos].arg : "", argps->options[optpos].doc); #else printf (" -%c %-12s\t%s\n", argps->options[optpos].key, (argps->options[optpos].arg) ? argps->options[optpos].arg : "", argps->options[optpos].doc); #endif optpos++; } printf ("\nReport bugs to %s.\n", argp_program_bug_address); exit (0); break; case 'V': printf ("%s\n", argp_program_version); exit (0); break; default: argps->parser (c, optarg, state); break; } } free (state); free (options); #if HAVE_GETOPT_LONG free (longopts); #endif return 0; } error_t argp_error (const struct argp_state *state, char *fmt, ...) { va_list ap; va_start (ap, fmt); fprintf (stderr, "%s: ", argp_program_name); vfprintf (stderr, fmt, ap); fprintf (stderr, "\nTry `%s -?' for more information.\n", argp_program_name); exit (1); } #endif #ifndef HAVE_GETSUBOPT int ccze_getsubopt (char **optionp, char *const *tokens, char **valuep) { char *endp, *vstart; int cnt; if (**optionp == '\0') return -1; /* Find end of next token. */ endp = strchr (*optionp, ','); if (!endp) endp = *optionp + strlen (*optionp); /* Find start of value. */ vstart = memchr (*optionp, '=', endp - *optionp); if (vstart == NULL) vstart = endp; /* Try to match the characters between *OPTIONP and VSTART against one of the TOKENS. */ for (cnt = 0; tokens[cnt] != NULL; ++cnt) if (memcmp (*optionp, tokens[cnt], vstart - *optionp) == 0 && tokens[cnt][vstart - *optionp] == '\0') { /* We found the current option in TOKENS. */ *valuep = vstart != endp ? vstart + 1 : NULL; if (*endp != '\0') *endp++ = '\0'; *optionp = endp; return cnt; } /* The current suboption does not match any option. */ *valuep = *optionp; if (*endp != '\0') *endp++ = '\0'; *optionp = endp; return -1; } #else #if HAVE_SUBOPTARG extern char *suboptarg; #else #endif int ccze_getsubopt (char **optionp, char *const *tokens, char **valuep) { int i = getsubopt (optionp, tokens, valuep); #if HAVE_SUBOPTARg if (!*valuep && suboptarg) *valuep = strdup (suboptarg); #endif return i; } #endif #ifndef HAVE_SCANDIR int scandir (const char *dir, struct dirent ***namelist, int (*select)(const struct dirent *), int (*compar)(const struct dirent **, const struct dirent **)) { DIR *d; struct dirent *entry; register int i=0; size_t entrysize; if ((d = opendir (dir)) == NULL) return -1; *namelist=NULL; while ((entry = readdir (d)) != NULL) { if (select == NULL || (select != NULL && (*select) (entry))) { *namelist = (struct dirent **)ccze_realloc ((void *) (*namelist), (size_t)((i + 1) * sizeof (struct dirent *))); if (*namelist == NULL) return -1; entrysize = sizeof (struct dirent) - sizeof (entry->d_name) + strlen (entry->d_name) + 1; (*namelist)[i] = (struct dirent *)ccze_malloc (entrysize); if ((*namelist)[i] == NULL) return -1; memcpy ((*namelist)[i], entry, entrysize); i++; } } if (closedir (d)) return -1; if (i == 0) return -1; if (compar != NULL) qsort ((void *)(*namelist), (size_t) i, sizeof (struct dirent *), compar); return i; } #endif #ifndef HAVE_ALPHASORT int alphasort (const struct dirent **a, const struct dirent **b) { return (strcmp ((*a)->d_name, (*b)->d_name)); } #endif /* getline() and getdelim() were taken from GNU Mailutils' mailbox/getline.c */ /* First implementation by Alain Magloire */ #ifndef HAVE_GETLINE ssize_t getline (char **lineptr, size_t *n, FILE *stream) { return getdelim (lineptr, n, '\n', stream); } #endif #ifndef HAVE_GETDELIM /* Default value for line length. */ static const int line_size = 128; ssize_t getdelim (char **lineptr, size_t *n, int delim, FILE *stream) { size_t indx = 0; int c; /* Sanity checks. */ if (lineptr == NULL || n == NULL || stream == NULL) return -1; /* Allocate the line the first time. */ if (*lineptr == NULL) { *lineptr = ccze_malloc (line_size); if (*lineptr == NULL) return -1; *n = line_size; } while ((c = getc (stream)) != EOF) { /* Check if more memory is needed. */ if (indx >= *n) { *lineptr = ccze_realloc (*lineptr, *n + line_size); if (*lineptr == NULL) return -1; *n += line_size; } /* Push the result in the line. */ (*lineptr)[indx++] = c; /* Bail out. */ if (c == delim) break; } /* Make room for the null character. */ if (indx >= *n) { *lineptr = ccze_realloc (*lineptr, *n + line_size); if (*lineptr == NULL) return -1; *n += line_size; } /* Null terminate the buffer. */ (*lineptr)[indx++] = 0; /* The last line may not have the delimiter, we have to * return what we got and the error will be seen on the * next iteration. */ return (c == EOF && (indx - 1) == 0) ? -1 : (ssize_t)(indx - 1); } #endif #ifndef HAVE_ASPRINTF int asprintf(char **ptr, const char *fmt, ...) { va_list ap; size_t size = 1024; int n; if ((*ptr = ccze_malloc (size)) == NULL) return -1; while (1) { va_start (ap, fmt); n = vsnprintf (*ptr, size, fmt, ap); va_end (ap); if (n > -1 && n < (long) size) return n; if (n > -1) /* glibc 2.1 */ size = n+1; else /* glibc 2.0 */ size *= 2; if ((*ptr = ccze_realloc (*ptr, size)) == NULL) return -1; } } #endif ccze-0.2.1/src/ccze.h0100644000175400017540000001113607660232332014534 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * ccze.h -- Public interface to CCZE. * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze 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 _CCZE_H #define _CCZE_H 1 #ifdef HAVE_SYSTEM_H # include "system.h" #endif #include #include #include /* Compatibility */ void *ccze_malloc (size_t size); void *ccze_realloc (void *ptr, size_t size); void *ccze_calloc (size_t nmemb, size_t size); /* Colors */ typedef enum { CCZE_COLOR_DATE = 0, CCZE_COLOR_HOST, CCZE_COLOR_PROC, CCZE_COLOR_PID, CCZE_COLOR_PIDB, CCZE_COLOR_DEFAULT, CCZE_COLOR_EMAIL, CCZE_COLOR_SUBJECT, CCZE_COLOR_DIR, CCZE_COLOR_SIZE, CCZE_COLOR_USER, CCZE_COLOR_HTTPCODES, CCZE_COLOR_GETSIZE, CCZE_COLOR_HTTP_GET, CCZE_COLOR_HTTP_POST, CCZE_COLOR_HTTP_HEAD, CCZE_COLOR_HTTP_PUT, CCZE_COLOR_HTTP_CONNECT, CCZE_COLOR_HTTP_TRACE, CCZE_COLOR_UNKNOWN, CCZE_COLOR_GETTIME, CCZE_COLOR_URI, CCZE_COLOR_IDENT, CCZE_COLOR_CTYPE, CCZE_COLOR_ERROR, CCZE_COLOR_PROXY_MISS, CCZE_COLOR_PROXY_HIT, CCZE_COLOR_PROXY_DENIED, CCZE_COLOR_PROXY_REFRESH, CCZE_COLOR_PROXY_SWAPFAIL, CCZE_COLOR_DEBUG, CCZE_COLOR_WARNING, CCZE_COLOR_PROXY_DIRECT, CCZE_COLOR_PROXY_PARENT, CCZE_COLOR_SWAPNUM, CCZE_COLOR_PROXY_CREATE, CCZE_COLOR_PROXY_SWAPIN, CCZE_COLOR_PROXY_SWAPOUT, CCZE_COLOR_PROXY_RELEASE, CCZE_COLOR_MAC, CCZE_COLOR_VERSION, CCZE_COLOR_ADDRESS, CCZE_COLOR_NUMBERS, CCZE_COLOR_SIGNAL, CCZE_COLOR_SERVICE, CCZE_COLOR_PROT, CCZE_COLOR_BADWORD, CCZE_COLOR_GOODWORD, CCZE_COLOR_SYSTEMWORD, CCZE_COLOR_INCOMING, CCZE_COLOR_OUTGOING, CCZE_COLOR_UNIQN, CCZE_COLOR_REPEAT, CCZE_COLOR_FIELD, CCZE_COLOR_CHAIN, CCZE_COLOR_PERCENTAGE, CCZE_COLOR_FTPCODES, CCZE_COLOR_KEYWORD, CCZE_COLOR_STATIC_BLACK, CCZE_COLOR_STATIC_RED, CCZE_COLOR_STATIC_GREEN, CCZE_COLOR_STATIC_YELLOW, CCZE_COLOR_STATIC_BLUE, CCZE_COLOR_STATIC_CYAN, CCZE_COLOR_STATIC_MAGENTA, CCZE_COLOR_STATIC_WHITE, CCZE_COLOR_STATIC_BOLD_BLACK, CCZE_COLOR_STATIC_BOLD_RED, CCZE_COLOR_STATIC_BOLD_GREEN, CCZE_COLOR_STATIC_BOLD_YELLOW, CCZE_COLOR_STATIC_BOLD_BLUE, CCZE_COLOR_STATIC_BOLD_CYAN, CCZE_COLOR_STATIC_BOLD_MAGENTA, CCZE_COLOR_STATIC_BOLD_WHITE, CCZE_COLOR_LAST } ccze_color_t; int ccze_color (ccze_color_t idx); int ccze_color_keyword_lookup (const char *key); /* Helpers */ ccze_color_t ccze_http_action (const char *method); void ccze_print_date (const char *date); char *ccze_strbrk (char *str, char delim); char *xstrdup (const char *str); /* Display */ void ccze_addstr (ccze_color_t col, const char *str); void ccze_newline (void); void ccze_space (void); void ccze_wordcolor_process_one (char *word, int slookup); /* Plugins */ typedef void (*ccze_plugin_startup_t) (void); typedef void (*ccze_plugin_shutdown_t) (void); typedef int (*ccze_plugin_handle_t) (const char *str, size_t length, char **rest); typedef enum { CCZE_PLUGIN_TYPE_FULL, CCZE_PLUGIN_TYPE_PARTIAL, CCZE_PLUGIN_TYPE_ANY } ccze_plugin_type_t; typedef struct { int abi_version; void *dlhandle; char *name; char **argv; ccze_plugin_startup_t startup; ccze_plugin_shutdown_t shutdown; ccze_plugin_handle_t handler; ccze_plugin_type_t type; char *desc; } ccze_plugin_t; char **ccze_plugin_argv_get (const char *name); const char *ccze_plugin_name_get (void); #define CCZE_ABI_VERSION 2 #define CCZE_DEFINE_PLUGINS(plugins...) \ char *ccze_plugin_list[] = { plugins, NULL } #if !defined(BUILTIN) #define __default_plugin(name) ; \ char ccze_default_plugin[] = # name #else #define __default_plugin(name) #endif #define CCZE_DEFINE_PLUGIN(name,type,desc) \ ccze_plugin_t ccze_##name##_info = { CCZE_ABI_VERSION, \ NULL, \ # name, NULL, \ ccze_##name##_setup, \ ccze_##name##_shutdown, \ ccze_##name##_handle, \ CCZE_PLUGIN_TYPE_##type, desc } \ __default_plugin (name) #endif /* !_CCZE_H */ ccze-0.2.1/src/ccze-compat.h0100644000175400017540000000555707660232332016027 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * ccze-compat.h -- OS compatibility stuff for CCZE, prototypes * Copyright (C) 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze 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 _CCZE_COMPAT_H #define _CCZE_COMPAT_H 1 #include "system.h" #include #include #include #include #ifndef HAVE_STRNDUP char *strndup (const char *s, size_t size); #endif int ccze_getsubopt (char **optionp, char *const *tokens, char **valuep); #ifndef HAVE_SCANDIR int scandir (const char *dir, struct dirent ***namelist, int (*select)(const struct dirent *), int (*compar)(const struct dirent **, const struct dirent **)); #endif #ifndef HAVE_ALPHASORT int alphasort (const struct dirent **a, const struct dirent **b) #endif #ifndef HAVE_ASPRINTF int asprintf(char **ptr, const char *fmt, ...); #endif #ifndef HAVE_ARGP_PARSE struct argp_option { char *name; int key; const char *arg; int flags; char *doc; int group; }; struct argp; struct argp_state; typedef error_t (*argp_parser_t) (int key, char *arg, struct argp_state *state); #define ARGP_ERR_UNKNOWN E2BIG #define OPTION_HIDDEN 0x2 struct argp { const struct argp_option *options; argp_parser_t parser; const char *args_doc; const char *doc; /* The rest is ignored */ const void *children; char *(*help_filter) (int key, const char *text, void *input); const char *domain; }; struct argp_state { /* This is deliberately not compatible with glibc's one. We only use ->input anyway */ void *input; }; extern const char *argp_program_version; extern const char *argp_program_bug_address; extern const char *argp_program_name; error_t argp_parse (const struct argp *argps, int argc, char **argv, unsigned flags, int arg_index, void *input); error_t argp_error (const struct argp_state *state, char *fmt, ...) __attribute__ ((noreturn)); #endif #ifndef HAVE_GETLINE ssize_t getline(char **lineptr, size_t *n, FILE *stream); #endif #ifndef HAVE_GETDELIM ssize_t getdelim (char **lineptr, size_t *n, int delim, FILE *stream); #endif #ifdef _AIX char *strndup (const char *s, size_t size); #endif #endif /* !_CCZE_COMPAT_H */ ccze-0.2.1/src/ccze-private.h0100644000175400017540000000523607660232332016210 0ustar algernonalgernon/* -*- mode: c; c-file-style: "gnu" -*- * ccze-private.h -- Internal CCZE function prototypes * Copyright (C) 2002, 2003 Gergely Nagy * * This file is part of ccze. * * ccze 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. * * ccze 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 _CCZE_PRIVATE_H #define _CCZE_PRIVATE_H 1 #include /* ccze-color.c */ void ccze_color_init (void); void ccze_color_parse (char *line); void ccze_color_load (const char *fn); int ccze_color_strip_attrib (int color); char *ccze_color_to_name_simple (int color); char *ccze_color_lookup_name (ccze_color_t color); char *ccze_color_to_css (ccze_color_t cidx); void ccze_colors_to_css (void); char *ccze_cssbody_color (void); /* ccze-plugin.c */ void ccze_plugin_init (void); void ccze_plugin_argv_init (void); int ccze_plugin_argv_set (const char *name, const char *args); void ccze_plugin_argv_finalise (void); ccze_plugin_t **ccze_plugins (void); void ccze_plugin_load_all (void); void ccze_plugin_load (const char *name); void ccze_plugin_add (ccze_plugin_t *plugin); void ccze_plugin_setup (void); void ccze_plugin_shutdown (void); void ccze_plugin_finalise (void); void ccze_plugin_run (ccze_plugin_t **pluginset, char *subject, size_t subjlen, char **rest, ccze_plugin_type_t type, int *handled, int *status); void ccze_plugin_load_all_builtins (void); int ccze_plugin_list_fancy (void); /* ccze-wordcolor.c */ void ccze_wordcolor_process (const char *msg, int wcol, int slookup); void ccze_wordcolor_setup (void); void ccze_wordcolor_shutdown (void); /* ccze.c */ typedef enum { CCZE_MODE_CURSES, CCZE_MODE_RAW_ANSI, CCZE_MODE_HTML, CCZE_MODE_DEBUG, CCZE_MODE_PLUGIN_LIST } ccze_mode_t; typedef struct { int scroll; int convdate; int wcol; int slookup; int remfac; int transparent; char *rcfile; char *cssfile; char **pluginlist; int pluginlist_alloc, pluginlist_len; char **color_argv; int color_argv_alloc, color_argv_len; ccze_mode_t mode; } ccze_config_t; extern ccze_config_t ccze_config; #endif /* !_CCZE_PRIVATE_H */ ccze-0.2.1/src/Makefile.in0100644000175400017540000000734607660232332015514 0ustar algernonalgernon## src/Makefile ## -- User-modifiable variables -- ## srcdir = @srcdir@ top_srcdir = @top_srcdir@ subdir = src ## == The code below shouldn't need to be touched at all == ## include ../Rules.mk ## -- Private variables -- ## ALL_LDFLAGS = ${LDFLAGS} ${LIBS} INCLUDES = -I. -I${srcdir} -I${top_builddir} DEFINES = -DPATCHLEVEL=\"${PATCHLEVEL}\" -DSYSCONFDIR=\"${sysconfdir}\" \ -D_GNU_SOURCE=1 -DPKGLIBDIR=\"${pkglibdir}\" -DHAVE_SYSTEM_H=1 \ -DBUILTIN=1 WFLAGS = @WFLAGS@ WFLAGS_GCC = -Wshadow -Wpointer-arith -Waggregate-return \ -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual \ -Wbad-function-cast -Wsign-compare -Wchar-subscripts \ -Wcomment -Wformat -Wformat-nonliteral -Wformat-security \ -Wimplicit -Wmain -Wmissing-braces -Wparentheses \ -Wreturn-type -Wswitch -Wmulticharacter \ -Wmissing-noreturn -Wmissing-declarations @WFLAGS_3X@ WFLAGS_ICC = -Wall -wd193,279,810,869,1418,1419 WFLAGS_3X = -Wsequence-point -Wdiv-by-zero -W -Wunused \ -Wno-unused-parameter -Wno-unused-function ALL_CFLAGS = ${INCLUDES} ${DEFINES} ${WFLAGS} ${CFLAGS} @PCRE_CFLAGS@ LIBS = @PCRE_LIBS@ @LIBS@ SOURCES = ccze.c ccze-color.c ccze-plugin.c ccze-wordcolor.c \ $(addprefix mod_,$(addsuffix .c, ${ALL_PLUGINS})) \ ccze-dump.c ccze-cssdump.c ccze-compat.c HEADERS = ccze.h ccze-compat.h ccze-private.h ALL_PLUGINS = @ALL_PLUGINS@ S_PLUGINS = @S_PLUGINS@ SH_PLUGINS = $(filter-out ${S_PLUGINS},${ALL_PLUGINS}) PLUGIN_SHOBJS = $(addsuffix .so,${SH_PLUGINS}) PLUGIN_SOBJS = $(addsuffix .o,$(addprefix mod_,${S_PLUGINS})) PLUGIN_OBJS = ${PLUGIN_SHOBJS} ${PLUGIN_SOBJS} CLEANFILES = ccze-dump ccze-cssdump DISTCLEANFILES = ccze-builtins.c OBJECTS = ccze.o ccze-color.o ccze-plugin.o ccze-wordcolor.o \ ccze-builtins.o ccze-compat.o ## -- Standard targets -- ## all: ${PROGRAM} ${PLUGIN_SHOBJS} ccze-dump ccze-cssdump install: all ${INSTALL} -d ${DESTDIR}${bindir} ${INSTALL_PROGRAM} ${PROGRAM} ccze-cssdump ${DESTDIR}${bindir}/ ${INSTALL} -d ${DESTDIR}${includedir} ${INSTALL_DATA} ${srcdir}/ccze.h ${DESTDIR}${includedir} ifneq (${SH_PLUGINS},) ${INSTALL} -d ${DESTDIR}${pkglibdir} ${INSTALL_DATA} ${PLUGIN_SHOBJS} ${DESTDIR}${pkglibdir}/ endif install-strip: ${MAKE} INSTALL_PROGRAM='${INSTALL_PROGRAM} -s' \ INSTALL_DATA='${INSTALL_DATA} -s' install uninstall: rm -f ${DESTDIR}${bindir}/${PROGRAM} \ ${DESTDIR}${bindir}/ccze-cssdump \ ${DESTDIR}${includedir}/ccze.h ifneq (${SH_PLUGINS},) rm -f $(addprefix ${DESTDIR}${pkglibdir}/,${PLUGIN_SHOBJS}) endif ## -- Specific targets -- ## ${PROGRAM}: ${OBJECTS} ${PLUGIN_SOBJS} ${CC} -rdynamic ${ALL_CFLAGS} -o $@ $^ ${ALL_LDFLAGS} ccze-dump ccze-cssdump: %: %.o ccze-compat.o ccze-color.c ${CC} ${ALL_CFLAGS} -o $@ $@.o ccze-compat.o ccze-builtins.c: Makefile echo '#include ' >$@ echo '#include "ccze-private.h"' >>$@ echo >>$@ ifneq (${S_PLUGINS},) for p in ${S_PLUGINS}; do \ echo "extern ccze_plugin_t ccze_$${p}_info;" >>$@; \ done endif echo "void" >>$@ echo "ccze_plugin_load_all_builtins (void)" >>$@ echo "{" >>$@ ifneq (${S_PLUGINS},) for p in ${S_PLUGINS}; do \ echo " ccze_plugin_add (&ccze_$${p}_info);" >>$@; \ done endif echo "}" >>$@ %.o: %.c ccze.h ${CC} -c ${CPPFLAGS} ${ALL_CFLAGS} $< %.so: mod_%.c ccze.h ${CC} -fPIC -DPIC ${ALL_CFLAGS} ${ALL_LDFLAGS} -o $@ $< -shared ## -- Dependencies -- ## ccze.o: ccze.c ${top_builddir}/system.h ccze.h ccze-private.h \ ${top_srcdir}/ChangeLog ccze-color.o: ccze-color.c ${top_builddir}/system.h ccze.h ccze-private.h ccze-plugin.o: ccze-plugin.c ${top_builddir}/system.h ccze.h ccze-private.h ccze-wordcolor.o: ccze-wordcolor.c ${top_builddir}/system.h ccze.h \ ccze-private.h ccze-compat.o: ccze-compat.c ${top_builddir}/system.h ccze-compat.h \ ccze.h ${top_builddir}/system.h: ${top_builddir}/config.status ccze-0.2.1/testsuite/0040755000175400017540000000000007660232761014710 5ustar algernonalgernonccze-0.2.1/testsuite/Makefile.in0100644000175400017540000000435607660232332016754 0ustar algernonalgernon## src/Makefile ## -- User-modifiable variables -- ## srcdir = @srcdir@ top_srcdir = @top_srcdir@ subdir = testsuite ## == The code below shouldn't need to be touched at all == ## include ../Rules.mk TESTS_ENVIRONMENT = top_builddir=$(top_builddir) \ VERSION=$(VERSION) TESTS = version.test bug-wnum.test bug-procmailsubj.test \ bug-procmailsubj2.test bug-sysrepeat.test bug-httpd.test TEST_IO = $(foreach test,${TESTS},\ $(addsuffix .ok,$(basename $(test)))) \ $(foreach test,${TESTS},\ $(addsuffix .in,$(basename $(test)))) EXTRA_DIST = defs do-test \ $(filter-out version.in,$(filter-out version.ok,\ ${TEST_IO})) ## -- Standard targets -- ## all: ; # Taken from autoconf check: ${TESTS} @failed=0; all=0; xfail=0; xpass=0; \ srcdir=$(srcdir); export srcdir; \ list='$(TESTS)'; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ fi; \ done; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="All $$all tests passed"; \ else \ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all tests failed"; \ else \ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ fi; \ fi; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ fi @rm -rf test-tmp ccze-0.2.1/testsuite/version.test0100755000175400017540000000235107660232332017271 0ustar algernonalgernon#! /bin/sh ## version.test -- Test if CCZE responds to --version -*- sh -*- ## Copyright (C) 2003 Gergely Nagy ## ## This file is part of CCZE. ## ## CCZE 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. ## ## CCZE 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 DESCRIPTION="Test if CCZE responds to -V" PROG_CMDLINE="-V" # Common definitions if test -z "${srcdir}"; then srcdir=`echo "$0" | sed 's,[^/]*$,,'` test "${srcdir}" = "$0" && srcdir=. test -z "${srcdir}" && srcdir=. test "${VERBOSE+set}" != set && VERBOSE=1 fi . ${srcdir}/defs TEST_OK_LIST="${testname}.ok" cat >${testname}.ok < ## ## This file is part of CCZE. ## ## CCZE 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. ## ## CCZE 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 DESCRIPTION="Check if single digits are wordcolored right" PROG_CMDLINE="-F /dev/null -psyslog -o nolookups -d" # Common definitions if test -z "${srcdir}"; then srcdir=`echo "$0" | sed 's,[^/]*$,,'` test "${srcdir}" = "$0" && srcdir=. test -z "${srcdir}" && srcdir=. test "${VERBOSE+set}" != set && VERBOSE=1 fi . ${srcdir}/defs . ${srcdir}/do-test ccze-0.2.1/testsuite/bug-procmailsubj.test0100755000175400017540000000245307660232332021054 0ustar algernonalgernon#! /bin/sh ## bug-procmailsubj.test -- Check if a one-word subject in procmailrc is ok ## -*- sh -*- ## Copyright (C) 2003 Gergely Nagy ## Sample data from Morten Brix Pedersen. ## ## This file is part of CCZE. ## ## CCZE 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. ## ## CCZE 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 DESCRIPTION="Verify if a single-word subject in procmailrc is recognised." PROG_CMDLINE="-F /dev/null -p syslog,procmail -o nolookups -d" # Common definitions if test -z "${srcdir}"; then srcdir=`echo "$0" | sed 's,[^/]*$,,'` test "${srcdir}" = "$0" && srcdir=. test -z "${srcdir}" && srcdir=. test "${VERBOSE+set}" != set && VERBOSE=1 fi . ${srcdir}/defs . ${srcdir}/do-test ccze-0.2.1/testsuite/bug-procmailsubj2.test0100755000175400017540000000242507660232332021135 0ustar algernonalgernon#! /bin/sh ## bug-procmailsubj2.test -- Check if procmail subject is colored ok ## -*- sh -*- ## Copyright (C) 2003 Gergely Nagy ## Sample data from Alan Schmitt. ## ## This file is part of CCZE. ## ## CCZE 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. ## ## CCZE 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 DESCRIPTION="Verify if a multi-word subject is correctly colorised" PROG_CMDLINE="-F /dev/null -p syslog,procmail -o nolookups -d" # Common definitions if test -z "${srcdir}"; then srcdir=`echo "$0" | sed 's,[^/]*$,,'` test "${srcdir}" = "$0" && srcdir=. test -z "${srcdir}" && srcdir=. test "${VERBOSE+set}" != set && VERBOSE=1 fi . ${srcdir}/defs . ${srcdir}/do-test ccze-0.2.1/testsuite/bug-sysrepeat.test0100755000175400017540000000235607660232332020403 0ustar algernonalgernon#! /bin/sh ## bug-sysrepeat.test -- Check if syslog-ng "repeated n times" stuff is ok ## -*- sh -*- ## Copyright (C) 2003 Gergely Nagy ## ## This file is part of CCZE. ## ## CCZE 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. ## ## CCZE 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 DESCRIPTION="Check if syslog-ngs repeat marker is colorised right" PROG_CMDLINE="-F /dev/null -psyslog -o nolookups -d" # Common definitions if test -z "${srcdir}"; then srcdir=`echo "$0" | sed 's,[^/]*$,,'` test "${srcdir}" = "$0" && srcdir=. test -z "${srcdir}" && srcdir=. test "${VERBOSE+set}" != set && VERBOSE=1 fi . ${srcdir}/defs . ${srcdir}/do-test ccze-0.2.1/testsuite/bug-httpd.test0100755000175400017540000000232707660232332017505 0ustar algernonalgernon#! /bin/sh ## bug-httpd.test -- Check if bad http requests are recognised ## -*- sh -*- ## Copyright (C) 2003 Gergely Nagy ## ## This file is part of CCZE. ## ## CCZE 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. ## ## CCZE 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 DESCRIPTION="Check if bad http requests are recognised." PROG_CMDLINE="-F /dev/null -phttpd -o nolookups -d" # Common definitions if test -z "${srcdir}"; then srcdir=`echo "$0" | sed 's,[^/]*$,,'` test "${srcdir}" = "$0" && srcdir=. test -z "${srcdir}" && srcdir=. test "${VERBOSE+set}" != set && VERBOSE=1 fi . ${srcdir}/defs . ${srcdir}/do-test ccze-0.2.1/testsuite/defs0100644000175400017540000000344607660232332015552 0ustar algernonalgernon## -*- shell-script -*- ## defs - defines the testsuite enviroment ## Copyright (C) 2003 Gergely Nagy ## Based on defs (as found in The Autobook) by Gary V. Vaughan ## ## This file is part of CCZE. ## ## CCZE 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. ## ## CCZE 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 PACKAGE=${PACKAGE-ccze} srcdir=${srcdir-.} if test ! -d ${srcdir}; then echo "defs: installation error" 1>&2 exit 1 fi srcdir=`\cd ${srcdir} && pwd` top_builddir=`\cd ${top_builddir-..} && pwd` progname=`echo "$0" | sed 's,^.*/,,'` testname=`echo "${progname}" | sed 's,\.test$,,'` testsubdir=${testsubdir-test-tmp} # User can set VERBOSE to prevent output redirection TEST_DESC="" case x${VERBOSE} in xNO|xno|x0|x) exec 2>/dev/null exec 3>/dev/null ;; x1) exec 2>/dev/null exec 3>&1 TEST_DESC="${DESCRIPTION}" ;; *) TEST_DESC="${DESCRIPTION}" exec 3>&1 ;; esac rm -rf ${testsubdir} >/dev/null 2>&1 mkdir ${testsubdir} cd ${testsubdir} \ || { echo "Cannot make or change into ${testsubdir}"; exit 1; } echo "=== Running test ${testname}" >&3 if ! test -z "${TEST_DESC}"; then echo "=== ${TEST_DESC}" >&3 fi CMP="${CMP-cmp}" RUNPROG="${top_builddir}/src/${PACKAGE}" ccze-0.2.1/testsuite/do-test0100644000175400017540000000460407660232332016205 0ustar algernonalgernon## -*- shell-script -*- ## do-test - run the test script ## Copyright (C) 2003 Gergely Nagy ## ## This file is part of CCZE. ## ## CCZE 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. ## ## CCZE 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 # Run the test saving stderr to a file, and showing stdout if VERBOSE == 1 if test -f ${srcdir}/${testname}.in; then ${RUNPROG} ${PROG_CMDLINE} < ${srcdir}/${testname}.in \ 2>${testname}.err | tee -i ${testname}.out >&2 else if test -f ${testname}.in; then ${RUNPROG} ${PROG_CMDLINE} < ${testname}.in \ 2>${testname}.err | tee -i ${testname}.out >&2 else ${RUNPROG} ${PROG_CMDLINE} 2>${testname}.err | \ tee -i ${testname}.out >&2 fi fi if test -f ${srcdir}/${testname}.ok; then TEST_OK_LIST=${TEST_OK_LIST-${srcdir}/${testname}.ok} fi if test -f ${srcdir}/${testname}.errok; then TEST_ERROK_LIST=${TEST_ERROK_LIST-${srcdir}/${testname}.errok} fi # Test against expected output case x${TEST_OK_LIST} in x) TEST_OK=yes ;; x*) TEST_OK=no ;; esac for f in ${TEST_OK_LIST}; do if test -f $f; then if ${CMP} -s ${testname}.out $f; then TEST_OK=yes fi fi done if ! test ${TEST_OK} = yes; then echo "ok:" >&2 cat ${testname}.ok >&2 exit 1 fi # Munge error output to remove leading directories, `lt-' or trailing `.exe' sed -e "s,^[^:]*[lt-]*${PACKAGE}[.ex]*:,${PACKAGE}:," \ ${testname}.err > sederr && mv sederr ${testname}.err # Show stderr if doesn't match expected output if VERBOSE == 1 case x${TEST_ERROK_LIST} in x) TEST_ERROK=yes ;; x*) TEST_ERROK=no ;; esac for f in ${TEST_ERROK_LIST}; do if test -f $f; then if ${CMP} -s ${testname}.err $f; then TEST_ERROK=yes fi fi done if ! test ${TEST_ERROK} = yes; then echo "err:" >&2 cat ${testname}.err >&2 echo "errok:" >&2 cat ${testname}.errok >&2 exit 1 fi ccze-0.2.1/testsuite/bug-wnum.ok0100644000175400017540000000255307660232332017000 0ustar algernonalgernonMar 8 00:11:41 pange squid[4815]: Accepting HTTP connections at 0.0.0.0, port 3128, FD 9. Mar 8 00:11:41 pange squid[4815]: Accepting ICP messages at 0.0.0.0, port 3130, FD 10. ccze-0.2.1/testsuite/bug-procmailsubj.ok0100644000175400017540000000062607660232332020503 0ustar algernonalgernonFrom fetchmail Sun Mar 2 21:24:05 2003 Subject: Request Folder: pisg-general 31641 ccze-0.2.1/testsuite/bug-procmailsubj2.ok0100644000175400017540000000256607660232332020572 0ustar algernonalgernonFrom algernon@gandalph.mad.hu Sat Apr 26 09:26:11 2003 Subject: Re: ccze and light backgrounds Folder: Inbox/new/1051363571.11590_0.alan-schm1p 2690 From freeciv-dev-bounce@freeciv.org Sat Apr 26 09:26:12 2003 Subject: [Freeciv-Dev] Re: Speeding Up Games Folder: freeciv/new/1051363572.11603_0.alan-schm1p 4327 From steck@stecksoft.com Sat Apr 26 09:26:12 2003 Subject: Caml Weekly News Folder: Inbox/new/1051363572.11612_0.alan-schm1p 2497 ccze-0.2.1/testsuite/bug-sysrepeat.ok0100644000175400017540000000776107660232332020037 0ustar algernonalgernonSep 14 11:45:00 iluvatar xinetd[2965]: Exiting... Sep 14 11:45:02 iluvatar xinetd[3111]: xinetd Version 2.3.7 started with libwrap loadavg options compiled in. Sep 14 11:45:02 iluvatar xinetd[3111]: Started working: 5 available services Sep 14 11:45:04 iluvatar pppd[2755]: Script /etc/ppp/ip-down finished (pid 3079), status =
0x1
Sep 14 11:45:04 iluvatar pppd[2755]: Exit. Sep 14 12:20:02 iluvatar /USR/SBIN/CRON[10499]: (algernon) CMD (expect /usr/share/doc/tama/examples/tama-nanny.exp 2>/dev/null >/dev/null) Sep 14 12:27:46 iluvatar uptimed: moving up to position 50: 0 days, 01:04:13 Oct 12 22:40:12 iluvatar last message repeated 10 times Oct 12 22:40:12 iluvatar -- MARK -- Oct 12 22:40:12 iluvatar syslog-ng[2854]: syslog-ng version 1.5.15 going down ccze-0.2.1/testsuite/bug-httpd.ok0100644000175400017540000000211507660232332017127 0ustar algernonalgernon193.110.8.48 - - [29/Mar/2003:10:21:41 +0100] "X=a HTTP/1.0" 400 - "-" "-" 217.21.114.135 - - [27/Mar/2003:13:27:22 +0100] "\x04\x01" 200 145 "-" "-" 66.140.25.157 - - [29/Mar/2003:15:40:33 +0100] "POST http://66.140.25.157:802/ HTTP/1.0" 200 144 "-" "-" ccze-0.2.1/testsuite/bug-wnum.in0100644000175400017540000000026507660232332016773 0ustar algernonalgernonMar 8 00:11:41 pange squid[4815]: Accepting HTTP connections at 0.0.0.0, port 3128, FD 9. Mar 8 00:11:41 pange squid[4815]: Accepting ICP messages at 0.0.0.0, port 3130, FD 10. ccze-0.2.1/testsuite/bug-procmailsubj.in0100644000175400017540000000014007660232332020467 0ustar algernonalgernonFrom fetchmail Sun Mar 2 21:24:05 2003 Subject: Request Folder: pisg-general 31641 ccze-0.2.1/testsuite/bug-procmailsubj2.in0100644000175400017540000000072407660232332020561 0ustar algernonalgernonFrom algernon@gandalph.mad.hu Sat Apr 26 09:26:11 2003 Subject: Re: ccze and light backgrounds Folder: Inbox/new/1051363571.11590_0.alan-schm1p 2690 From freeciv-dev-bounce@freeciv.org Sat Apr 26 09:26:12 2003 Subject: [Freeciv-Dev] Re: Speeding Up Games Folder: freeciv/new/1051363572.11603_0.alan-schm1p 4327 From steck@stecksoft.com Sat Apr 26 09:26:12 2003 Subject: Caml Weekly News Folder: Inbox/new/1051363572.11612_0.alan-schm1p 2497 ccze-0.2.1/testsuite/bug-sysrepeat.in0100644000175400017540000000137107660232332020023 0ustar algernonalgernonSep 14 11:45:00 iluvatar xinetd[2965]: Exiting... Sep 14 11:45:02 iluvatar xinetd[3111]: xinetd Version 2.3.7 started with libwrap loadavg options compiled in. Sep 14 11:45:02 iluvatar xinetd[3111]: Started working: 5 available services Sep 14 11:45:04 iluvatar pppd[2755]: Script /etc/ppp/ip-down finished (pid 3079), status = 0x1 Sep 14 11:45:04 iluvatar pppd[2755]: Exit. Sep 14 12:20:02 iluvatar /USR/SBIN/CRON[10499]: (algernon) CMD (expect /usr/share/doc/tama/examples/tama-nanny.exp 2>/dev/null >/dev/null) Sep 14 12:27:46 iluvatar uptimed: moving up to position 50: 0 days, 01:04:13 Oct 12 22:40:12 iluvatar last message repeated 10 times Oct 12 22:40:12 iluvatar -- MARK -- Oct 12 22:40:12 iluvatar syslog-ng[2854]: syslog-ng version 1.5.15 going down ccze-0.2.1/testsuite/bug-httpd.in0100644000175400017540000000037707660232332017134 0ustar algernonalgernon193.110.8.48 - - [29/Mar/2003:10:21:41 +0100] "X=a HTTP/1.0" 400 - "-" "-" 217.21.114.135 - - [27/Mar/2003:13:27:22 +0100] "\x04\x01" 200 145 "-" "-" 66.140.25.157 - - [29/Mar/2003:15:40:33 +0100] "POST http://66.140.25.157:802/ HTTP/1.0" 200 144 "-" "-"